PageSourceSearch

https://www.retigo.com/js/minified_js.php

js retigo.com collected 2026-09-29 03:08:19 UTC 243,017 bytes, 3,052 lines download raw bytes

vendor: 4,697 bytes, lines 1-5
1
2/* modernizr.min.js */
3/*! modernizr 3.2.0 (Custom Build) | MIT *
4 * http://modernizr.com/download/?-addtest-atrule-domprefixes-hasevent-mq-prefixed-prefixedcss-prefixedcssvalue-prefixes-testallprops-testprop-teststyles !*/
5!function(e,n,t){function r(e,n){return typeof e===n}function o(){var e,n,t,o,i,s,u;for(var a in C)if(C.hasOwnProperty(a)){if(e=[],n=C[a],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(o=r(n.fn,"function")?n.fn():n.fn,i=0;i<e.length;i++)s=e[i],u=s.split("."),1===u.length?Modernizr[u[0]]=o:(!Modernizr[u[0]]||Modernizr[u[0]]instanceof Boolean||(Modernizr[u[0]]=new Boolean(Modernizr[u[0]])),Modernizr[u[0]][u[1]]=o),_.push((o?"":"no-")+u.join("-"))}}function i(e){var n=x.className,t=Modernizr._config.classPrefix||"";if(b&&(n=n.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(n+=" "+t+e.join(" "+t),b?x.className.baseVal=n:x.className=n)}function s(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function u(e,n){if("object"==typeof e)for(var t in e)j(e,t)&&u(t,e[t]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2==r.length&&(o=o[r[1]]),"undefined"!=typeof o)return Modernizr;n="function"==typeof n?n():n,1==r.length?Modernizr[r[0]]=n:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=n),i([(n&&0!=n?"":"no-")+r.join("-")]),Modernizr._trigger(e,n)}return Modernizr}function a(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):b?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function f(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function l(){var e=n.body;return e||(e=a(b?"svg":"body"),e.fake=!0),e}function c(e,t,r,o){var i,s,u,f,c="modernizr",p=a("div"),d=l();if(parseInt(r,10))for(;r--;)u=a("div"),u.id=o?o[r]:c+(r+1),p.appendChild(u);return i=a("style"),i.type="text/css",i.id="s"+c,(d.fake?d:p).appendChild(i),d.appendChild(p),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),p.id=c,d.fake&&(d.style.background="",d.style.overflow="hidden",f=x.style.overflow,x.style.overflow="hidden",x.appendChild(d)),s=t(p,e),d.fake?(d.parentNode.removeChild(d),x.style.overflow=f,x.offsetHeight):p.parentNode.removeChild(p),!!s}function p(e,n){return!!~(""+e).indexOf(n)}function d(n,r){var o=n.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(f(n[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+f(n[o])+":"+r+")");return i=i.join(" or "),c("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return t}function v(e,n){return function(){return e.apply(n,arguments)}}function m(e,n,t){var o;for(var i in e)if(e[i]in n)return t===!1?e[i]:(o=n[e[i]],r(o,"function")?v(o,t||n):o);return!1}function h(e,n,o,i){function u(){l&&(delete k.style,delete k.modElem)}if(i=r(i,"undefined")?!1:i,!r(o,"undefined")){var f=d(e,o);if(!r(f,"undefined"))return f}for(var l,c,v,m,h,y=["modernizr","tspan"];!k.style;)l=!0,k.modElem=a(y.shift()),k.style=k.modElem.style;for(v=e.length,c=0;v>c;c++)if(m=e[c],h=k.style[m],p(m,"-")&&(m=s(m)),k.style[m]!==t){if(i||r(o,"undefined"))return u(),"pfx"==n?m:!0;try{k.style[m]=o}catch(g){}if(k.style[m]!=h)return u(),"pfx"==n?m:!0}return u(),!1}function y(e,n,t,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),u=(e+" "+z.join(s+" ")+s).split(" ");return r(n,"string")||r(n,"undefined")?h(u,n,o,i):(u=(e+" "+E.join(s+" ")+s).split(" "),m(u,n,t))}function g(e,n,r){return y(e,t,t,n,r)}var _=[],C=[],S={_version:"3.2.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){C.push({name:e,fn:n,options:t})},addAsyncTest:function(e){C.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=S,Modernizr=new Modernizr;var w=S._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[];S._prefixes=w;var x=n.documentElement,b="svg"===x.nodeName.toLowerCase(),P="Moz O ms Webkit",E=S._config.usePrefixes?P.toLowerCase().split(" "):[];S._domPrefixes=E;var z=S._config.usePrefixes?P.split(" "):[];S._cssomPrefixes=z;var T=function(n){var r,o=w.length,i=e.CSSRule;if("undefined"==typeof i)return t;if(!n)return!1;if(n=n.replace(/^@/,""),r=n.replace(/-/g,"_").toUpperCase()+"_RULE",r in 
5i)return"@"+n;for(var s=0;o>s;s++){var u=w[s],a=u.toUpperCase()+"_"+r;if(a in i)return"@-"+u.toLowerCase()+"-"+n}return!1};S.atRule=T;var j;!function(){var e={}.hasOwnProperty;j=r(e,"undefined")||r(e.call,"undefined")?function(e,n){return n in e&&r(e.constructor.prototype[n],"undefined")}:function(n,t){return e.call(n,t)}}(),S._l={},S.on=function(e,n){this._l[e]||(this._l[e]=[]),this._l[e].push(n),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},S._trigger=function(e,n){if(this._l[e]){var t=this._l[e];setTimeout(function(){var e,r;for(e=0;e<t.length;e++)(r=t[e])(n)},0),delete this._l[e]}},Modernizr._q.push(function(){S.addTest=u});var A=function(){function e(e,n){var o;return e?(n&&"string"!=typeof n||(n=a(n||"div")),e="on"+e,o=e in n,!o&&r&&(n.setAttribute||(n=a("div")),n.setAttribute(e,""),o="function"==typeof n[e],n[e]!==t&&(n[e]=t),n.removeAttribute(e)),o):!1}var r=!("onblur"in n.documentElement);return e}();S.hasEvent=A;var N=function(e,n){var t=!1,r=a("div"),o=r.style;if(e in o){var i=E.length;for(o[e]=n,t=o[e];i--&&!t;)o[e]="-"+E[i]+"-"+n,t=o[e]}return""===t&&(t=!1),t};S.prefixedCSSValue=N;var L=function(){var n=e.matchMedia||e.msMatchMedia;return n?function(e){var t=n(e);return t&&t.matches||!1}:function(n){var t=!1;return c("@media "+n+" { #modernizr { position: absolute; } }",function(n){t="absolute"==(e.getComputedStyle?e.getComputedStyle(n,null):n.currentStyle).position}),t}}();S.mq=L;var O=(S.testStyles=c,{elem:a("modernizr")});Modernizr._q.push(function(){delete O.elem});var k={style:O.elem.style};Modernizr._q.unshift(function(){delete k.style});S.testProp=function(e,n,r){return h([e],t,n,r)};S.testAllProps=y;var q=S.prefixed=function(e,n,t){return 0===e.indexOf("@")?T(e):(-1!=e.indexOf("-")&&(e=s(e)),n?y(e,n,t):y(e,"pfx"))};S.prefixedCSS=function(e){var n=q(e);return n&&f(n)};S.testAllProps=g,o(),i(_),delete S.addTest,delete S.addAsyncTest;for(var R=0;R<Modernizr._q.length;R++)Modernizr._q[R]();e.Modernizr=Modernizr}(window,document);
6;
7
8/* svg-injector.min.js */
9/**
10 * SVGInjector v1.1.3 - Fast, caching, dynamic inline SVG DOM injection library
11 * https://github.com/iconic/SVGInjector
12 *
13 * Copyright (c) 2014-2015 Waybury <[email protected]>
14 * @license MIT
15 */
16!function(t,e){"use strict";function r(t){t=t.split(" ");for(var e={},r=t.length,n=[];r--;)e.hasOwnProperty(t[r])||(e[t[r]]=1,n.unshift(t[r]));return n.join(" ")}var n="file:"===t.location.protocol,i=e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),o=Array.prototype.forEach||function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;var r,n=this.length>>>0;for(r=0;n>r;++r)r in this&&t.call(e,this[r],r,this)},a={},l=0,s=[],u=[],c={},f=function(t){return t.cloneNode(!0)},p=function(t,e){u[t]=u[t]||[],u[t].push(e)},d=function(t){for(var e=0,r=u[t].length;r>e;e++)!function(e){setTimeout(function(){u[t][e](f(a[t]))},0)}(e)},v=function(e,r){if(void 0!==a[e])a[e]instanceof SVGSVGElement?r(f(a[e])):p(e,r);else{if(!t.XMLHttpRequest)return r("Browser does not support XMLHttpRequest"),!1;a[e]={},p(e,r);var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(404===i.status||null===i.responseXML)return r("Unable to load SVG file: "+e),n&&r("Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver."),r(),!1;if(!(200===i.status||n&&0===i.status))return r("There was a problem injecting the SVG: "+i.status+" "+i.statusText),!1;if(i.responseXML instanceof Document)a[e]=i.responseXML.documentElement;else if(DOMParser&&DOMParser instanceof Function){var t;try{var o=new DOMParser;t=o.parseFromString(i.responseText,"text/xml")}catch(l){t=void 0}if(!t||t.getElementsByTagName("parsererror").length)return r("Unable to parse SVG file: "+e),!1;a[e]=t.documentElement}d(e)}},i.open("GET",e),i.overrideMimeType&&i.overrideMimeType("text/xml"),i.send()}},h=function(e,n,a,u){var f=e.getAttribute("data-src")||e.getAttribute("src");if(!/\.svg/i.test(f))return void u("Attempted to inject a file with a non-svg extension: "+f);if(!i){var p=e.getAttribute("data-fallback")||e.getAttribute("data-png");return void(p?(e.setAttribute("src",p),u(null)):a?(e.setAttribute("src",a+"/"+f.split("/").pop().replace(".svg",".png")),u(null)):u("This browser does not support SVG and no PNG fallback was defined."))}-1===s.indexOf(e)&&(s.push(e),e.setAttribute("src",""),v(f,function(i){if("undefined"==typeof i||"string"==typeof i)return u(i),!1;var a=e.getAttribute("id");a&&i.setAttribute("id",a);var p=e.getAttribute("title");p&&i.setAttribute("title",p);var d=[].concat(i.getAttribute("class")||[],"injected-svg",e.getAttribute("class")||[]).join(" ");i.setAttribute("class",r(d));var v=e.getAttribute("style");v&&i.setAttribute("style",v);var h=[].filter.call(e.attributes,function(t){return/^data-\w[\w\-]*$/.test(t.name)});o.call(h,function(t){t.name&&t.value&&i.setAttribute(t.name,t.value)});var g,m,b,y,A,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};
16Object.keys(w).forEach(function(t){g=t,b=w[t],m=i.querySelectorAll("defs "+g+"[id]");for(var e=0,r=m.length;r>e;e++){y=m[e].id,A=y+"-"+l;var n;o.call(b,function(t){n=i.querySelectorAll("["+t+'*="'+y+'"]');for(var e=0,r=n.length;r>e;e++)n[e].setAttribute(t,"url(#"+A+")")}),m[e].id=A}}),i.removeAttribute("xmlns:a");for(var x,S,k=i.querySelectorAll("script"),j=[],G=0,T=k.length;T>G;G++)S=k[G].getAttribute("type"),S&&"application/ecmascript"!==S&&"application/javascript"!==S||(x=k[G].innerText||k[G].textContent,j.push(x),i.removeChild(k[G]));if(j.length>0&&("always"===n||"once"===n&&!c[f])){for(var M=0,V=j.length;V>M;M++)new Function(j[M])(t);c[f]=!0}var E=i.querySelectorAll("style");o.call(E,function(t){t.textContent+=""}),e.parentNode.replaceChild(i,e),delete s[s.indexOf(e)],e=null,l++,u(i)}))},g=function(t,e,r){e=e||{};var n=e.evalScripts||"always",i=e.pngFallback||!1,a=e.each;if(void 0!==t.length){var l=0;o.call(t,function(e){h(e,n,i,function(e){a&&"function"==typeof a&&a(e),r&&t.length===++l&&r(l)})})}else t?h(t,n,i,function(e){a&&"function"==typeof a&&a(e),r&&r(1),t=null}):r&&r(0)};"object"==typeof module&&"object"==typeof module.exports?module.exports=exports=g:"function"==typeof define&&define.amd?define(function(){return g}):"object"==typeof t&&(t.SVGInjector=g)}(window,document);
17
18;
19
20/* bootbox.all.min.js */
21/**
22 * bootbox.js 5.4.0
23 *
24 * http://bootboxjs.com/license.txt
25 */
26!function(t,e){'use strict';'function'==typeof define&&define.amd?define(['jquery'],e):'object'==typeof exports?module.exports=e(require('jquery')):t.bootbox=e(t.jQuery)}(this,function e(u,p){'use strict';var r,n,i,l;Object.keys||(Object.keys=(r=Object.prototype.hasOwnProperty,n=!{toString:null}.propertyIsEnumerable('toString'),l=(i=['toString','toLocaleString','valueOf','hasOwnProperty','isPrototypeOf','propertyIsEnumerable','constructor']).length,function(t){if('function'!=typeof t&&('object'!=typeof t||null===t))throw new TypeError('Object.keys called on non-object');var e,o,a=[];for(e in t)r.call(t,e)&&a.push(e);if(n)for(o=0;o<l;o++)r.call(t,i[o])&&a.push(i[o]);return a}));var d={};d.VERSION='5.0.0';var b={ar:{OK:'موافق',CANCEL:'الغاء',CONFIRM:'تأكيد'},bg_BG:{OK:'Ок',CANCEL:'Отказ',CONFIRM:'Потвърждавам'},br:{OK:'OK',CANCEL:'Cancelar',CONFIRM:'Sim'},cs:{OK:'OK',CANCEL:'Zrušit',CONFIRM:'Potvrdit'},da:{OK:'OK',CANCEL:'Annuller',CONFIRM:'Accepter'},de:{OK:'OK',CANCEL:'Abbrechen',CONFIRM:'Akzeptieren'},el:{OK:'Εντάξει',CANCEL:'Ακύρωση',CONFIRM:'Επιβεβαίωση'},en:{OK:'OK',CANCEL:'Cancel',CONFIRM:'OK'},es:{OK:'OK',CANCEL:'Cancelar',CONFIRM:'Aceptar'},eu:{OK:'OK',CANCEL:'Ezeztatu',CONFIRM:'Onartu'},et:{OK:'OK',CANCEL:'Katkesta',CONFIRM:'OK'},fa:{OK:'قبول',CANCEL:'لغو',CONFIRM:'تایید'},fi:{OK:'OK',CANCEL:'Peruuta',CONFIRM:'OK'},fr:{OK:'OK',CANCEL:'Annuler',CONFIRM:'Confirmer'},he:{OK:'אישור',CANCEL:'ביטול',CONFIRM:'אישור'},hu:{OK:'OK',CANCEL:'Mégsem',CONFIRM:'Megerősít'},hr:{OK:'OK',CANCEL:'Odustani',CONFIRM:'Potvrdi'},id:{OK:'OK',CANCEL:'Batal',CONFIRM:'OK'},it:{OK:'OK',CANCEL:'Annulla',CONFIRM:'Conferma'},ja:{OK:'OK',CANCEL:'キャンセル',CONFIRM:'確認'},ka:{OK:'OK',CANCEL:'გაუქმება',CONFIRM:'დადასტურება'},ko:{OK:'OK',CANCEL:'취소',CONFIRM:'확인'},lt:{OK:'Gerai',CANCEL:'Atšaukti',CONFIRM:'Patvirtinti'},lv:{OK:'Labi',CANCEL:'Atcelt',CONFIRM:'Apstiprināt'},nl:{OK:'OK',CANCEL:'Annuleren',CONFIRM:'Accepteren'},no:{OK:'OK',CANCEL:'Avbryt',CONFIRM:'OK'},pl:{OK:'OK',CANCEL:'Anuluj',CONFIRM:'Potwierdź'},pt:{OK:'OK',CANCEL:'Cancelar',CONFIRM:'Confirmar'},ru:{OK:'OK',CANCEL:'Отмена',CONFIRM:'Применить'},sk:{OK:'OK',CANCEL:'Zrušiť',CONFIRM:'Potvrdiť'},sl:{OK:'OK',CANCEL:'Prekliči',CONFIRM:'Potrdi'},sq:{OK:'OK',CANCEL:'Anulo',CONFIRM:'Prano'},sv:{OK:'OK',CANCEL:'Avbryt',CONFIRM:'OK'},sw:{OK:'Sawa',CANCEL:'Ghairi',CONFIRM:'Thibitisha'},ta:{OK:'சரி',CANCEL:'ரத்து செய்',CONFIRM:'உறுதி செய்'},th:{OK:'ตกลง',CANCEL:'ยกเลิก',CONFIRM:'ยืนยัน'},tr:{OK:'Tamam',CANCEL:'İptal',CONFIRM:'Onayla'},uk:{OK:'OK',CANCEL:'Відміна',CONFIRM:'Прийняти'},zh_CN:{OK:'OK',CANCEL:'取消',CONFIRM:'确认'},zh_TW:{OK:'OK',CANCEL:'取消',CONFIRM:'確認'}},f={dialog:"<div class=\"bootbox modal\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-body\"><div class=\"bootbox-body\"></div></div></div></div></div>",header:"<div class=\"modal-header\"><h5 class=\"modal-title\"></h5></div>
26",footer:'<div class="modal-footer"></div>',closeButton:'<button type="button" class="bootbox-close-button close" aria-hidden="true">&times;</button>',form:'<form class="bootbox-form"></form>',button:'<button type="button" class="btn"></button>',option:'<option></option>',promptMessage:'<div class="bootbox-prompt-message"></div>',inputs:{text:'<input class="bootbox-input bootbox-input-text form-control" autocomplete="off" type="text" />',textarea:'<textarea class="bootbox-input bootbox-input-textarea form-control"></textarea>',email:'<input class="bootbox-input bootbox-input-email form-control" autocomplete="off" type="email" />',select:'<select class="bootbox-input bootbox-input-select form-control"></select>',checkbox:'<div class="form-check checkbox"><label class="form-check-label"><input class="form-check-input bootbox-input bootbox-input-checkbox" type="checkbox" /></label></div>',radio:'<div class="form-check radio"><label class="form-check-label"><input class="form-check-input bootbox-input bootbox-input-radio" type="radio" name="bootbox-radio" /></label></div>',date:'<input class="bootbox-input bootbox-input-date form-control" autocomplete="off" type="date" />',time:'<input class="bootbox-input bootbox-input-time form-control" autocomplete="off" type="time" />',number:'<input class="bootbox-input bootbox-input-number form-control" autocomplete="off" type="number" />',password:'<input class="bootbox-input bootbox-input-password form-control" autocomplete="off" type="password" />',range:'<input class="bootbox-input bootbox-input-range form-control-range" autocomplete="off" type="range" />'}},m={locale:'en',backdrop:'static',animate:!0,className:null,closeButton:!0,show:!0,container:'body',value:'',inputType:'text',swapButtonOrder:!1,centerVertical:!1,multiple:!1,scrollable:!1};function c(t,e,o){return u.extend(!0,{},t,function(t,e){var o=t.length,a={};if(o<1||2<o)throw new Error('Invalid argument length');return 2===o||'string'==typeof t[0]?(a[e[0]]=t[0],a[e[1]]=t[1]):a=t[0],a}(e,o))}function h(t,e,o,a){var r;a&&a[0]&&(r=a[0].locale||m.locale,(a[0].swapButtonOrder||m.swapButtonOrder)&&(e=e.reverse()));var n,i,l,s={className:'bootbox-'+t,buttons:function(t,e){for(var o={},a=0,r=t.length;a<r;a++){var n=t[a],i=n.toLowerCase(),l=n.toUpperCase();o[i]={label:(s=l,c=e,u=b[c],u?u[s]:b.en[s])}}var s,c,u;return o}(e,r)};return n=c(s,a,o),l={},w(i=e,function(t,e){l[e]=!0}),w(n.buttons,function(t){if(l[t]===p)throw new Error('button key "'+t+'" is not allowed (options are '+i.join(' ')+')')}),n}function C(t){return Object.keys(t).length}function w(t,o){var a=0;u.each(t,function(t,e){o(t,e,a++)})}function O(t){t.data.dialog.find('.bootbox-accept').first().trigger('focus')}function v(t){t.target===t.data.dialog[0]&&t.data.dialog.remove()}function g(t){t.target===t.data.dialog[0]&&(t.data.dialog.off('escape.close.bb'),t.data.dialog.off('click'))}function N(t,e,o){t.stopPropagation(),t.preventDefault(),u.isFunction(o)&&!1===o.call(e,t)||e.modal('hide')}function y(t){return/([01][0-9]|2[0-3]):[0-5][0-9]?:[0-5][0-9]/.test(t)}function x(t){return/(\d{4})-(\d{2})-(\d{2})/.test(t)}return d.locales=function(t){return t?b[t]:b},d.addLocale=function(t,o){return u.each(['OK','CANCEL','CONFIRM'],function(t,e){if(!o[e])throw new Error('Please supply a translation for "'+e+'"')}),b[t]={OK:o.OK,CANCEL:o.CANCEL,CONFIRM:o.CONFIRM},d},d.removeLocale=function(t){if('en'===t)throw new Error('"en" is used as the default and fallback locale and cannot be removed.');return delete b[t],d},d.setLocale=function(t){return d.setDefaults('locale',t)},d.setDefaults=function(){var t={};return 2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0],u.extend(m,t),d},d.hideAll=function(){return u('.bootbox').modal('hide'),d},d.init=function(t){return e(t||u)},d.dialog=function(t){if(u.fn.modal===p)throw new Error("\"$.fn.modal\" is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(t=function(r){var n,i;if('object'!=typeof r)throw new Error('Please supply an object of options');if(!r.message)throw new Error('"message" option must not be null or an empty string.');(r=u.extend({},m,r)).buttons||(r.buttons={});
26return n=r.buttons,i=C(n),w(n,function(t,e,o){if(u.isFunction(e)&&(e=n[t]={callback:e}),'object'!==u.type(e))throw new Error('button with key "'+t+'" must be an object');if(e.label||(e.label=t),!e.className){var a=!1;a=r.swapButtonOrder?0===o:o===i-1,e.className=i<=2&&a?'btn-primary':'btn-secondary btn-default'}}),r}(t),u.fn.modal.Constructor.VERSION){t.fullBootstrapVersion=u.fn.modal.Constructor.VERSION;var e=t.fullBootstrapVersion.indexOf('.');t.bootstrap=t.fullBootstrapVersion.substring(0,e)}else t.bootstrap='2',t.fullBootstrapVersion='2.3.2',console.warn('Bootbox will *mostly* work with Bootstrap 2, but we do not officially support it. Please upgrade, if possible.');var o=u(f.dialog),a=o.find('.modal-dialog'),r=o.find('.modal-body'),n=u(f.header),i=u(f.footer),l=t.buttons,s={onEscape:t.onEscape};if(r.find('.bootbox-body').html(t.message),0<C(t.buttons)&&(w(l,function(t,e){var o=u(f.button);switch(o.data('bb-handler',t),o.addClass(e.className),t){case'ok':case'confirm':o.addClass('bootbox-accept');break;case'cancel':o.addClass('bootbox-cancel')}o.html(e.label),i.append(o),s[t]=e.callback}),r.after(i)),!0===t.animate&&o.addClass('fade'),t.className&&o.addClass(t.className),t.size)switch(t.fullBootstrapVersion.substring(0,3)<'3.1'&&console.warn('"size" requires Bootstrap 3.1.0 or higher. You appear to be using '+t.fullBootstrapVersion+'. Please upgrade to use this option.'),t.size){case'small':case'sm':a.addClass('modal-sm');break;case'large':case'lg':a.addClass('modal-lg');break;case'extra-large':case'xl':a.addClass('modal-xl'),t.fullBootstrapVersion.substring(0,3)<'4.2'&&console.warn('Using size "xl"/"extra-large" requires Bootstrap 4.2.0 or higher. You appear to be using '+t.fullBootstrapVersion+'. Please upgrade to use this option.')}if(t.scrollable&&(a.addClass('modal-dialog-scrollable'),t.fullBootstrapVersion.substring(0,3)<'4.3'&&console.warn('Using "scrollable" requires Bootstrap 4.3.0 or higher. You appear to be using '+t.fullBootstrapVersion+'. Please upgrade to use this option.')),t.title&&(r.before(n),o.find('.modal-title').html(t.title)),t.closeButton){var c=u(f.closeButton);t.title?3<t.bootstrap?o.find('.modal-header').append(c):o.find('.modal-header').prepend(c):c.prependTo(r)}if(t.centerVertical&&(a.addClass('modal-dialog-centered'),t.fullBootstrapVersion<'4.0.0'&&console.warn('"centerVertical" requires Bootstrap 4.0.0-beta.3 or higher. You appear to be using '+t.fullBootstrapVersion+'. Please upgrade to use this option.')),o.one('hide.bs.modal',{dialog:o},g),t.onHide){if(!u.isFunction(t.onHide))throw new Error('Argument supplied to "onHide" must be a function');o.on('hide.bs.modal',t.onHide)}if(o.one('hidden.bs.modal',{dialog:o},v),t.onHidden){if(!u.isFunction(t.onHidden))throw new Error('Argument supplied to "onHidden" must be a function');o.on('hidden.bs.modal',t.onHidden)}if(t.onShow){if(!u.isFunction(t.onShow))throw new Error('Argument supplied to "onShow" must be a function');o.on('show.bs.modal',t.onShow)}if(o.one('shown.bs.modal',{dialog:o},O),t.onShown){if(!u.isFunction(t.onShown))throw new Error('Argument supplied to "onShown" must be a function');o.on('shown.bs.modal',t.onShown)}return'static'!==t.backdrop&&o.on('click.dismiss.bs.modal',function(t){o.children('.modal-backdrop').length&&(t.currentTarget=o.children('.modal-backdrop').get(0)),t.target===t.currentTarget&&o.trigger('escape.close.bb')}),o.on('escape.close.bb',function(t){s.onEscape&&N(t,o,s.onEscape)}),o.on('click','.modal-footer button:not(.disabled)',function(t){var e=u(this).data('bb-handler');e!==p&&N(t,o,s[e])}),o.on('click','.bootbox-close-button',function(t){N(t,o,s.onEscape)}),o.on('keyup',function(t){27===t.which&&o.trigger('escape.close.bb')}),u(t.container).append(o),o.modal({backdrop:!!t.backdrop&&'static',keyboard:!1,show:!1}),t.show&&o.modal('show'),o},d.alert=function(){var t;if((t=h('alert',['ok'],['message','callback'],arguments)).callback&&!u.isFunction(t.callback))throw new Error('alert requires the "callback" property to be a function when provided');return t.buttons.ok.callback=t.onEscape=function(){return!u.isFunction(t.callback)||t.callback.call(this)},d.dialog(t)}
26,d.confirm=function(){var t;if(t=h('confirm',['cancel','confirm'],['message','callback'],arguments),!u.isFunction(t.callback))throw new Error('confirm requires a callback');return t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,!1)},t.buttons.confirm.callback=function(){return t.callback.call(this,!0)},d.dialog(t)},d.prompt=function(){var r,e,t,n,o,a;if(t=u(f.form),(r=h('prompt',['cancel','confirm'],['title','callback'],arguments)).value||(r.value=m.value),r.inputType||(r.inputType=m.inputType),o=r.show===p?m.show:r.show,r.show=!1,r.buttons.cancel.callback=r.onEscape=function(){return r.callback.call(this,null)},r.buttons.confirm.callback=function(){var t;if('checkbox'===r.inputType)t=n.find('input:checked').map(function(){return u(this).val()}).get();else if('radio'===r.inputType)t=n.find('input:checked').val();else{if(n[0].checkValidity&&!n[0].checkValidity())return!1;t='select'===r.inputType&&!0===r.multiple?n.find('option:selected').map(function(){return u(this).val()}).get():n.val()}return r.callback.call(this,t)},!r.title)throw new Error('prompt requires a title');if(!u.isFunction(r.callback))throw new Error('prompt requires a callback');if(!f.inputs[r.inputType])throw new Error('Invalid prompt type');switch(n=u(f.inputs[r.inputType]),r.inputType){case'text':case'textarea':case'email':case'password':n.val(r.value),r.placeholder&&n.attr('placeholder',r.placeholder),r.pattern&&n.attr('pattern',r.pattern),r.maxlength&&n.attr('maxlength',r.maxlength),r.required&&n.prop({required:!0}),r.rows&&!isNaN(parseInt(r.rows))&&'textarea'===r.inputType&&n.attr({rows:r.rows});break;case'date':case'time':case'number':case'range':if(n.val(r.value),r.placeholder&&n.attr('placeholder',r.placeholder),r.pattern&&n.attr('pattern',r.pattern),r.required&&n.prop({required:!0}),'date'!==r.inputType&&r.step){if(!('any'===r.step||!isNaN(r.step)&&0<parseFloat(r.step)))throw new Error('"step" must be a valid positive number or the value "any". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step for more information.');n.attr('step',r.step)}!function(t,e,o){var a=!1,r=!0,n=!0;if('date'===t)e===p||(r=x(e))?o===p||(n=x(o))||console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 https://www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your max value may not be enforced by this browser.'):console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 https://www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your min value may not be enforced by this browser.');else if('time'===t){if(e!==p&&!(r=y(e)))throw new Error('"min" is not a valid time. See https://www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.');if(o!==p&&!(n=y(o)))throw new Error('"max" is not a valid time. See https://www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.')}else{if(e!==p&&isNaN(e))throw r=!1,new Error('"min" must be a valid number. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min for more information.');if(o!==p&&isNaN(o))throw n=!1,new Error('"max" must be a valid number. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.')}if(r&&n){if(o<=e)throw new Error('"max" must be greater than "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');a=!0}return a}(r.inputType,r.min,r.max)||(r.min!==p&&n.attr('min',r.min),r.max!==p&&n.attr('max',r.max));break;case'select':var i={};if(a=r.inputOptions||[],!u.isArray(a))throw new Error('Please pass an array of input options');if(!a.length)throw new Error('prompt with "inputType" set to "select" requires at least one option');r.placeholder&&n.attr('placeholder',r.placeholder),r.required&&n.prop({required:!0}),r.multiple&&n.prop({multiple:!0}),w(a,function(t,e){var o=n;if(e.value===p||e.text===p)throw new Error('each option needs a "value" property and a "text" property');e.group&&(i[e.group]||(i[e.group]=u('<optgroup />').attr('label',e.group)),o=i[e.group]);var a=u(f.option);a.attr('value',e.value).text(e.text),o.append(a)}),w(i,function(t,e){n.append(e)}),n.val(r.value);break;case'checkbox':var l=u.isArray(r.value)?r.value:[r.value];if(!(a=r.inputOptions||[]).length)throw new Error('prompt with "inputType" set to "checkbox" requires at least one option');n=u('<div class="bootbox-checkbox-list"></div>'),w(a,function(t,o){if(o.value===p||o.text===p)throw new Error('each option needs a "value" property and a "text" property');var a=u(f.inputs[r.inputType]);a.find('input').attr('value',o.value),a.find('label').append('\n'+o.text),w(l,function(t,e){e===o.value&&a.find('input').prop('checked',!0)}),n.append(a)});break;case'radio':if(r.value!==p&&u.isArray(r.value))throw new Error('prompt with "inputType" set to "radio" requires a single, non-array value for "value"');if(!(a=r.inputOptions||[]).length)throw new Error('prompt with "inputType" set to "radio" requires at least one option');n=u('<div class="bootbox-radiobutton-list"></div>');var s=!0;w(a,function(t,e){if(e.value===p||e.text===p)throw new Error('each option needs a "value" property and a "text" property');var o=u(f.inputs[r.inputType]);o.find('input').attr('value',e.value),o.find('label').append('\n'+e.text),r.value!==p&&e.value===r.value&&(o.find('input').prop('checked',!0),s=!1),n.append(o)}),s&&n.find('input[type="radio"]').first().prop('checked',!0)}if(t.append(n),t.on('submit',function(t){t.preventDefault(),t.stopPropagation(),e.find('.bootbox-accept').trigger('click')}),''!==u.trim(r.message)){var c=u(f.promptMessage).html(r.message);t.prepend(c),r.message=t}else r.message=t;return(e=d.dialog(r)).off('shown.bs.modal',O),e.on('shown.bs.modal',function(){n.focus()}),!0===o&&e.modal('show'),e},d});
27;
28
29/* jquery.cookie.js */
30/*!
31* jQuery Cookie Plugin v1.4.0
32* https://github.com/carhartl/jquery-cookie
33*
34* Copyright 2013 Klaus Hartl
35* Released under the MIT license
36*/
37(function (factory) {
38if (typeof define === 'function' && define.amd) {
39// AMD. Register as anonymous module.
40define(['jquery'], factory);
41} else {
42// Browser globals.
43factory(jQuery);
44}
45}(function ($) {
46
47var pluses = /\+/g;
48
49function encode(s) {
50return config.raw ? s : encodeURIComponent(s);
51}
52
53function decode(s) {
54return config.raw ? s : decodeURIComponent(s);
55}
56
57function stringifyCookieValue(value) {
58return encode(config.json ? JSON.stringify(value) : String(value));
59}
60
61function parseCookieValue(s) {
62if (s.indexOf('"') === 0) {
63// This is a quoted cookie as according to RFC2068, unescape...
64s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
65}
66
67try {
68// Replace server-side written pluses with spaces.
69// If we can't decode the cookie, ignore it, it's unusable.
70// If we can't parse the cookie, ignore it, it's unusable.
71s = decodeURIComponent(s.replace(pluses, ' '));
72return config.json ? JSON.parse(s) : s;
73} catch(e) {}
74}
75
76function read(s, converter) {
77var value = config.raw ? s : parseCookieValue(s);
78return $.isFunction(converter) ? converter(value) : value;
79}
80
81var config = $.cookie = function (key, value, options) {
82
83// Write
84
85if (value !== undefined && !$.isFunction(value)) {
86options = $.extend({}, config.defaults, options);
87
88if (typeof options.expires === 'number') {
89var days = options.expires, t = options.expires = new Date();
90t.setTime(+t + days * 864e+5);
91}
92
93return (document.cookie = [
94encode(key), '=', stringifyCookieValue(value),
vendor: 1,888 bytes, lines 95-161
95options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
96options.path ? '; path=' + options.path : '',
97options.domain ? '; domain=' + options.domain : '',
98options.secure ? '; secure' : ''
99].join(''));
100}
101
102// Read
103
104var result = key ? undefined : {};
105
106// To prevent the for loop in the first place assign an empty array
107// in case there are no cookies at all. Also prevents odd result when
108// calling $.cookie().
109var cookies = document.cookie ? document.cookie.split('; ') : [];
110
111for (var i = 0, l = cookies.length; i < l; i++) {
112var parts = cookies[i].split('=');
113var name = decode(parts.shift());
114var cookie = parts.join('=');
115
116if (key && key === name) {
117// If second argument (value) is a function it's a converter...
118result = read(cookie, value);
119break;
120}
121
122// Prevent storing a cookie that we couldn't decode.
123if (!key && (cookie = read(cookie)) !== undefined) {
124result[name] = cookie;
125}
126}
127
128return result;
129};
130
131config.defaults = {};
132
133$.removeCookie = function (key, options) {
134if ($.cookie(key) === undefined) {
135return false;
136}
137
138// Must not alter options, thus extending a fresh object...
139$.cookie(key, '', $.extend({}, options, { expires: -1 }));
140return !$.cookie(key);
141};
142
143}));
144
145;
146
147/* mixitup.min.js */
148/**!
149 * MixItUp v3.3.1
150 * A high-performance, dependency-free library for animated filtering, sorting and more
151 * Build 94e0fbf6-cd0b-4987-b3c0-14b59b67b8a0
152 *
153 * @copyright Copyright 2014-2018 KunkaLabs Limited.
154 * @author    KunkaLabs Limited. 
155 * @link      https://www.kunkalabs.com/mixitup/
156 *
157 * @license   Commercial use requires a commercial license.
158 *            https://www.kunkalabs.com/mixitup/licenses/
159 *
160 *            Non-commercial use permitted under same terms as CC BY-NC 3.0 license.
161 *            http://creativecommons.org/licenses/by-nc/3.0/
vendor: 88,455 bytes, lines 161-165
161
162 */
163!function(t){"use strict";var e=null,n=null;!function(){var e=["webkit","moz","o","ms"],n=t.document.createElement("div"),a=-1;for(a=0;a<e.length&&!t.requestAnimationFrame;a++)t.requestAnimationFrame=t[e[a]+"RequestAnimationFrame"];"undefined"==typeof n.nextElementSibling&&Object.defineProperty(t.Element.prototype,"nextElementSibling",{get:function(){for(var t=this.nextSibling;t;){if(1===t.nodeType)return t;t=t.nextSibling}return null}}),function(t){t.matches=t.matches||t.machesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector||function(t){return Array.prototype.indexOf.call(this.parentElement.querySelectorAll(t),this)>-1}}(t.Element.prototype),Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!1,n=[],a=-1;return e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=n.length,function(i){var o=[],r="",s=-1;if("object"!=typeof i&&("function"!=typeof i||null===i))throw new TypeError("Object.keys called on non-object");for(r in i)t.call(i,r)&&o.push(r);if(e)for(s=0;s<a;s++)t.call(i,n[s])&&o.push(n[s]);return o}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),"function"!=typeof Object.create&&(Object.create=function(t){var e=function(){};return function(n,a){if(n!==Object(n)&&null!==n)throw TypeError("Argument must be an object, or null");e.prototype=n||{};var i=new e;return e.prototype=null,a!==t&&Object.defineProperties(i,a),null===n&&(i.__proto__=null),i}}()),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e,n,a,i;if(null===this)throw new TypeError;if(a=Object(this),i=a.length>>>0,0===i)return-1;if(e=0,arguments.length>1&&(e=Number(arguments[1]),e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e)))),e>=i)return-1;for(n=e>=0?e:Math.max(i-Math.abs(e),0);n<i;n++)if(n in a&&a[n]===t)return n;return-1}),Function.prototype.bind||(Function.prototype.bind=function(t){var e,n,a,i;if("function"!=typeof this)throw new TypeError;return e=Array.prototype.slice.call(arguments,1),n=this,a=function(){},i=function(){return n.apply(this instanceof a?this:t,e.concat(Array.prototype.slice.call(arguments)))},this.prototype&&(a.prototype=this.prototype),i.prototype=new a,i}),t.Element.prototype.dispatchEvent||(t.Element.prototype.dispatchEvent=function(t){try{return this.fireEvent("on"+t.type,t)}catch(e){}})}(),e=function(a,i,o){var r=null,s=!1,l=null,c=null,u=null,f=null,h=[],d="",m=[],g=-1;if(u=o||t.document,(s=arguments[3])&&(s="boolean"==typeof s),"string"==typeof a)m=u.querySelectorAll(a);else if(a&&"object"==typeof a&&n.isElement(a,u))m=[a];else{if(!a||"object"!=typeof a||!a.length)throw new Error(e.messages.errorFactoryInvalidContainer());m=a}if(m.length<1)throw new Error(e.messages.errorFactoryContainerNotFound());for(g=0;(r=m[g])&&(!(g>0)||s);g++)r.id?d=r.id:(d="MixItUp"+n.randomHex(),r.id=d),e.instances[d]instanceof e.Mixer?(l=e.instances[d],(!i||i&&i.debug&&i.debug.showWarnings!==!1)&&console.warn(e.messages.warningFactoryPreexistingInstance())):(l=new e.Mixer,l.attach(r,u,d,i),e.instances[d]=l),c=new e.Facade(l),i&&i.debug&&i.debug.enable?h.push(l):h.push(c);return f=s?new e.Collection(h):h[0]},e.use=function(t){e.Base.prototype.callActions.call(e,"beforeUse",arguments),"function"==typeof t&&"mixitup-extension"===t.TYPE?"undefined"==typeof e.extensions[t.NAME]&&(t(e),e.extensions[t.NAME]=t):t.fn&&t.fn.jquery&&(e.libraries.$=t),e.Base.prototype.callActions.call(e,"afterUse",arguments)},e.instances={},e.extensions={},e.libraries={},n={hasClass:function(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},addClass:function(t,e){this.hasClass(t,e)||(t.className+=t.className?" "+e:e)},removeClass:function(t,e){if(this.hasClass(t,e)){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ").trim()}},extend:function(t,e,n,a){var i=[],o="",r=-1;n=n||!1,a=a||!1;try{if(Array.isArray(e))for(r=0;r<e.length;r++)i.push(r);else e&&(i=Object.keys(e));for(r=0;r<i.length;r++)o=i[r],!n||"object"!=typeof e[o]||this.isElement(e[o])?t[o]=e[o]:Array.isArray(e[o])?(t[o]||(t[o]=[]),this.extend(t[o],e[o],n,a)):(t[o]||(t[o]={}),this.extend(t[o],e[o],n,a))}catch(s){if(!a)throw s;this.handleExtendError(s,t)}return t},handleExtendError:function(t,n){var a=/property "?(\w*)"?[,:] object/i,i=null,o="",r="",s="",l="",c="",u=-1,f=-1;if(t instanceof TypeError&&(i=a.exec(t.message))){o=i[1];for(c in n){for(f=0;f<o.length&&o.charAt(f)===c.charAt(f);)f++;f>u&&(u=f,l=c)}throw u>1&&(s=e.messages.errorConfigInvalidPropertySuggestion({probableMatch:l})),r=e.messages.errorConfigInvalidProperty({erroneous:o,suggestion:s}),new TypeError(r)}throw t},template:function(t){for(var e=/\${([\w]*)}/g,n={},a=null;a=e.exec(t);)n[a[1]]=new RegExp("\\${"+a[1]+"}","g");return function(e){var a="",i=t;e=e||{};for(a in n)i=i.replace(n[a],"undefined"!=typeof e[a]?e[a]:"");return i}},on:function(e,n,a,i){e&&(e.addEventListener?e.addEventListener(n,a,i):e.attachEvent&&(e["e"+n+a]=a,e[n+a]=function(){e["e"+n+a](t.event)},e.attachEvent("on"+n,e[n+a])))},off:function(t,e,n){t&&(t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&(t.detachEvent("on"+e,t[e+n]),t[e+n]=null))},getCustomEvent:function(e,n,a){var i=null;return a=a||t.document,"function"==typeof t.CustomEvent?i=new t.CustomEvent(e,{detail:n,bubbles:!0,cancelable:!0}):"function"==typeof a.createEvent?(i=a.createEvent("CustomEvent"),i.initCustomEvent(e,!0,!0,n)):(i=a.createEventObject(),i.type=e,i.returnValue=!1,i.cancelBubble=!1,i.detail=n),i},getOriginalEvent:function(t){return t.touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t},index:function(t,e){for(var n=0;null!==(t=t.previousElementSibling);)e&&!t.matches(e)||++n;return n},camelCase:function(t){return t.toLowerCase().replace(/([_-][a-z])/g,function(t){return t.toUpperCase().replace(/[_-]/,"")})},pascalCase:function(t){return(t=this.camelCase(t)).charAt(0).toUpperCase()+t.slice(1)},dashCase:function(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()},isElement:function(e,n){return n=n||t.document,!!(t.HTMLElement&&e instanceof t.HTMLElement)||(!!(n.defaultView&&n.defaultView.HTMLElement&&e instanceof n.defaultView.HTMLElement)||null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)},createElement:function(e,n){var a=null,i=null;for(n=n||t.document,a=n.createDocumentFragment(),i=n.createElement("div"),i.innerHTML=e.trim();i.firstChild;)a.appendChild(i.firstChild);return a},removeWhitespace:function(t){for(var e;t&&"#text"===t.nodeName;)e=t,t=t.previousSibling,e.parentElement&&e.parentElement.removeChild(e)},isEqualArray:function(t,e){var n=t.length;if(n!==e.length)return!1;for(;n--;)if(t[n]!==e[n])return!1;return!0},deepEquals:function(t,e){var n;if("object"==typeof t&&t&&"object"==typeof e&&e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t)if(!e.hasOwnProperty(n)||!this.deepEquals(t[n],e[n]))return!1}else if(t!==e)return!1;return!0},arrayShuffle:function(t){for(var e=t.slice(),n=e.length,a=n,i=-1,o=[];a--;)i=~~(Math.random()*n),o=e[a],e[a]=e[i],e[i]=o;return e},arrayFromList:function(t){var e,n;try{return Array.prototype.slice.call(t)}catch(a){for(e=[],n=0;n<t.length;n++)e.push(t[n]);return e}},debounce:function(t,e,n){var a;return function(){var i=this,o=arguments,r=n&&!a,s=null;s=function(){a=null,n||t.apply(i,o)},clearTimeout(a),a=setTimeout(s,e),r&&t.apply(i,o)}},position:function(t){for(var e=0,n=0,a=t;t;)e-=t.scrollLeft,n-=t.scrollTop,t===a&&(e+=t.offsetLeft,n+=t.offsetTop,a=t.offsetParent),t=t.parentElement;return{x:e,y:n}},getHypotenuse:function(t,e){var n=t.x-e.x,a=t.y-e.y;return n=n<0?n*-1:n,a=a<0?a*-1:a,Math.sqrt(Math.pow(n,2)+Math.pow(a,2))},getIntersectionRatio:function(t,e){var n=t.width*t.height,a=-1,i=-1,o=-1,r=-1;return a=Math.max(0,Math.min(t.left+t.width,e.left+e.width)-Math.max(t.left,e.left)),i=Math.max(0,Math.min(t.top+t.height,e.top+e.height)-Math.max(t.top,e.top)),o=i*a,r=o/n},closestParent:function(e,n,a,i){var o=e.parentNode;if(i=i||t.document,a&&e.matches(n))return e;for(;o&&o!=i.body;){if(o.matches&&o.matches(n))return o;if(!o.parentNode)return null;o=o.parentNode}return null},children:function(e,n,a){var i=[],o="";return a=a||t.doc,e&&(e.id||(o="Temp"+this.randomHexKey(),e.id=o),i=a.querySelectorAll("#"+e.id+" > "+n),o&&e.removeAttribute("id")),i},clean:function(t){var e=[],n=-1;for(n=0;n<t.length;n++)""!==t[n]&&e.push(t[n]);return e},defer:function(n){var a=null,i=null,o=null;return i=new this.Deferred,e.features.has.promises?i.promise=new Promise(function(t,e){i.resolve=t,i.reject=e}):(o=t.jQuery||n.$)&&"function"==typeof o.Deferred?(a=o.Deferred(),i.promise=a.promise(),i.resolve=a.resolve,i.reject=a.reject):t.console&&console.warn(e.messages.warningNoPromiseImplementation()),i},all:function(n,a){var i=null;return e.features.has.promises?Promise.all(n):(i=t.jQuery||a.$)&&"function"==typeof i.when?i.when.apply(i,n).done(function(){return arguments}):(t.console&&console.warn(e.messages.warningNoPromiseImplementation()),[])},getPrefix:function(t,e,a){var i=-1,o="";if(n.dashCase(e)in t.style)return"";for(i=0;o=a[i];i++)if(o+e in t.style)return o.toLowerCase();return"unsupported"},randomHex:function(){return("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6).toUpperCase()},getDocumentState:function(e){return e="object"==typeof e.body?e:t.document,{scrollTop:t.pageYOffset,scrollLeft:t.pageXOffset,docHeight:e.documentElement.scrollHeight,docWidth:e.documentElement.scrollWidth,viewportHeight:e.documentElement.clientHeight,viewportWidth:e.documentElement.clientWidth}},bind:function(t,e){return function(){return e.apply(t,arguments)}},isVisible:function(e){var n=null;return!!e.offsetParent||(n=t.getComputedStyle(e),"fixed"===n.position&&"hidden"!==n.visibility&&"0"!==n.opacity)},seal:function(t){"function"==typeof Object.seal&&Object.seal(t)},freeze:function(t){"function"==typeof Object.freeze&&Object.freeze(t)},compareVersions:function(t,e){var n=t.split("."),a=e.split("."),i=-1,o=-1,r=-1;for(r=0;r<n.length;r++){if(i=parseInt(n[r].replace(/[^\d.]/g,"")),o=parseInt(a[r].replace(/[^\d.]/g,"")||0),o<i)return!1;if(o>i)return!0}return!0},Deferred:function(){this.promise=null,this.resolve=null,this.reject=null,this.id=n.randomHex()},isEmptyObject:function(t){var e="";if("function"==typeof Object.keys)return 0===Object.keys(t).length;for(e in t)if(t.hasOwnProperty(e))return!1;return!0},getClassname:function(t,e,n){var a="";return a+=t.block,a.length&&(a+=t.delineatorElement),a+=t["element"+this.pascalCase(e)],n?(a.length&&(a+=t.delineatorModifier),a+=n):a},getProperty:function(t,e){var n=e.split("."),a=null,i="",o=0;if(!e)return t;for(a=function(t){return t?t[i]:null};o<n.length;)i=n[o],t=a(t),o++;return"undefined"!=typeof t?t:null}},e.h=n,e.Base=function(){},e.Base.prototype={constructor:e.Base,callActions:function(t,e){var a=this,i=a.constructor.actions[t],o="";if(i&&!n.isEmptyObject(i))for(o in i)i[o].apply(a,e)},callFilters:function(t,e,a){var i=this,o=i.constructor.filters[t],r=e,s="";if(!o||n.isEmptyObject(o))return r;a=a||[];for(s in o)a=n.arrayFromList(a),a.unshift(r),r=o[s].apply(i,a);return r}},e.BaseStatic=function(){this.actions={},this.filters={},this.extend=function(t){n.extend(this.prototype,t)},this.registerAction=function(t,e,n){(this.actions[t]=this.actions[t]||{})[e]=n},this.registerFilter=function(t,e,n){(this.filters[t]=this.filters[t]||{})[e]=n}},e.Features=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.boxSizingPrefix="",this.transformPrefix="",this.transitionPrefix="",this.boxSizingPrefix="",this.transformProp="",this.transformRule="",this.transitionProp="",this.perspectiveProp="",this.perspectiveOriginProp="",this.has=new e.Has,this.canary=null,this.BOX_SIZING_PROP="boxSizing",this.TRANSITION_PROP="transition",this.TRANSFORM_PROP="transform",this.PERSPECTIVE_PROP="perspective",this.PERSPECTIVE_ORIGIN_PROP="perspectiveOrigin",this.VENDORS=["Webkit","moz","O","ms"],this.TWEENABLE=["opacity","width","height","marginRight","marginBottom","x","y","scale","translateX","translateY","translateZ","rotateX","rotateY","rotateZ"],this.callActions("afterConstruct")},e.BaseStatic.call(e.Features),e.Features.prototype=Object.create(e.Base.prototype),n.extend(e.Features.prototype,{constructor:e.Features,init:function(){var t=this;t.callActions("beforeInit",arguments),t.canary=document.createElement("div"),t.setPrefixes(),t.runTests(),t.callActions("beforeInit",arguments)},runTests:function(){var e=this;e.callActions("beforeRunTests",arguments),e.has.promises="function"==typeof t.Promise,e.has.transitions="unsupported"!==e.transitionPrefix,e.callActions("afterRunTests",arguments),n.freeze(e.has)},setPrefixes:function(){var t=this;t.callActions("beforeSetPrefixes",arguments),t.transitionPrefix=n.getPrefix(t.canary,"Transition",t.VENDORS),t.transformPrefix=n.getPrefix(t.canary,"Transform",t.VENDORS),t.boxSizingPrefix=n.getPrefix(t.canary,"BoxSizing",t.VENDORS),t.boxSizingProp=t.boxSizingPrefix?t.boxSizingPrefix+n.pascalCase(t.BOX_SIZING_PROP):t.BOX_SIZING_PROP,t.transitionProp=t.transitionPrefix?t.transitionPrefix+n.pascalCase(t.TRANSITION_PROP):t.TRANSITION_PROP,t.transformProp=t.transformPrefix?t.transformPrefix+n.pascalCase(t.TRANSFORM_PROP):t.TRANSFORM_PROP,t.transformRule=t.transformPrefix?"-"+t.transformPrefix+"-"+t.TRANSFORM_PROP:t.TRANSFORM_PROP,t.perspectiveProp=t.transformPrefix?t.transformPrefix+n.pascalCase(t.PERSPECTIVE_PROP):t.PERSPECTIVE_PROP,t.perspectiveOriginProp=t.transformPrefix?t.transformPrefix+n.pascalCase(t.PERSPECTIVE_ORIGIN_PROP):t.PERSPECTIVE_ORIGIN_PROP,t.callActions("afterSetPrefixes",arguments)}}),e.Has=function(){this.transitions=!1,this.promises=!1,n.seal(this)},e.features=new e.Features,e.features.init(),e.ConfigAnimation=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!0,this.effects="fade scale",this.effectsIn="",this.effectsOut="",this.duration=600,this.easing="ease",this.applyPerspective=!0,this.perspectiveDistance="3000px",this.perspectiveOrigin="50% 50%",this.queue=!0,this.queueLimit=3,this.animateResizeContainer=!0,this.animateResizeTargets=!1,this.staggerSequence=null,this.reverseOut=!1,this.nudge=!0,this.clampHeight=!0,this.clampWidth=!0,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigAnimation),e.ConfigAnimation.prototype=Object.create(e.Base.prototype),e.ConfigAnimation.prototype.constructor=e.ConfigAnimation,e.ConfigBehavior=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.liveSort=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigBehavior),e.ConfigBehavior.prototype=Object.create(e.Base.prototype),e.ConfigBehavior.prototype.constructor=e.ConfigBehavior,e.ConfigCallbacks=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.onMixStart=null,this.onMixBusy=null,this.onMixEnd=null,this.onMixFail=null,this.onMixClick=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigCallbacks),e.ConfigCallbacks.prototype=Object.create(e.Base.prototype),e.ConfigCallbacks.prototype.constructor=e.ConfigCallbacks,e.ConfigControls=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!0,this.live=!1,this.scope="global",this.toggleLogic="or",this.toggleDefault="all",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigControls),e.ConfigControls.prototype=Object.create(e.Base.prototype),e.ConfigControls.prototype.constructor=e.ConfigControls,e.ConfigClassNames=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.block="mixitup",this.elementContainer="container",this.elementFilter="control",this.elementSort="control",this.elementMultimix="control",this.elementToggle="control",this.modifierActive="active",this.modifierDisabled="disabled",this.modifierFailed="failed",this.delineatorElement="-",this.delineatorModifier="-",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigClassNames),e.ConfigClassNames.prototype=Object.create(e.Base.prototype),e.ConfigClassNames.prototype.constructor=e.ConfigClassNames,e.ConfigData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.uidKey="",this.dirtyCheck=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigData),e.ConfigData.prototype=Object.create(e.Base.prototype),e.ConfigData.prototype.constructor=e.ConfigData,e.ConfigDebug=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!1,this.showWarnings=!0,this.fauxAsync=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigDebug),e.ConfigDebug.prototype=Object.create(e.Base.prototype),e.ConfigDebug.prototype.constructor=e.ConfigDebug,e.ConfigLayout=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.allowNestedTargets=!0,this.containerClassName="",this.siblingBefore=null,this.siblingAfter=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigLayout),e.ConfigLayout.prototype=Object.create(e.Base.prototype),e.ConfigLayout.prototype.constructor=e.ConfigLayout,e.ConfigLoad=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.filter="all",this.sort="default:asc",this.dataset=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigLoad),e.ConfigLoad.prototype=Object.create(e.Base.prototype),e.ConfigLoad.prototype.constructor=e.ConfigLoad,e.ConfigSelectors=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.target=".mix",this.control="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigSelectors),e.ConfigSelectors.prototype=Object.create(e.Base.prototype),e.ConfigSelectors.prototype.constructor=e.ConfigSelectors,e.ConfigRender=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.target=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigRender),e.ConfigRender.prototype=Object.create(e.Base.prototype),e.ConfigRender.prototype.constructor=e.ConfigRender,e.ConfigTemplates=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigTemplates),e.ConfigTemplates.prototype=Object.create(e.Base.prototype),e.ConfigTemplates.prototype.constructor=e.ConfigTemplates,e.Config=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.animation=new e.ConfigAnimation,this.behavior=new e.ConfigBehavior,this.callbacks=new e.ConfigCallbacks,this.controls=new e.ConfigControls,this.classNames=new e.ConfigClassNames,this.data=new e.ConfigData,this.debug=new e.ConfigDebug,this.layout=new e.ConfigLayout,this.load=new e.ConfigLoad,this.selectors=new e.ConfigSelectors,this.render=new e.ConfigRender,this.templates=new e.ConfigTemplates,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Config),e.Config.prototype=Object.create(e.Base.prototype),e.Config.prototype.constructor=e.Config,e.MixerDom=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.document=null,this.body=null,this.container=null,this.parent=null,this.targets=[],this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.MixerDom),e.MixerDom.prototype=Object.create(e.Base.prototype),e.MixerDom.prototype.constructor=e.MixerDom,e.UiClassNames=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.base="",this.active="",this.disabled="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.UiClassNames),e.UiClassNames.prototype=Object.create(e.Base.prototype),e.UiClassNames.prototype.constructor=e.UiClassNames,e.CommandDataset=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.dataset=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandDataset),e.CommandDataset.prototype=Object.create(e.Base.prototype),e.CommandDataset.prototype.constructor=e.CommandDataset,e.CommandMultimix=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.filter=null,this.sort=null,this.insert=null,this.remove=null,this.changeLayout=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandMultimix),e.CommandMultimix.prototype=Object.create(e.Base.prototype),e.CommandMultimix.prototype.constructor=e.CommandMultimix,e.CommandFilter=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.selector="",this.collection=null,this.action="show",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandFilter),e.CommandFilter.prototype=Object.create(e.Base.prototype),e.CommandFilter.prototype.constructor=e.CommandFilter,e.CommandSort=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.sortString="",this.attribute="",this.order="asc",this.collection=null,this.next=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandSort),e.CommandSort.prototype=Object.create(e.Base.prototype),e.CommandSort.prototype.constructor=e.CommandSort,e.CommandInsert=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.index=0,this.collection=[],this.position="before",this.sibling=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandInsert),e.CommandInsert.prototype=Object.create(e.Base.prototype),e.CommandInsert.prototype.constructor=e.CommandInsert,e.CommandRemove=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.targets=[],this.collection=[],this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandRemove),e.CommandRemove.prototype=Object.create(e.Base.prototype),e.CommandRemove.prototype.constructor=e.CommandRemove,e.CommandChangeLayout=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.containerClassName="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandChangeLayout),e.CommandChangeLayout.prototype=Object.create(e.Base.prototype),e.CommandChangeLayout.prototype.constructor=e.CommandChangeLayout,e.ControlDefinition=function(t,a,i,o){e.Base.call(this),this.callActions("beforeConstruct"),this.type=t,this.selector=a,this.live=i||!1,this.parent=o||"",this.callActions("afterConstruct"),n.freeze(this),n.seal(this)},e.BaseStatic.call(e.ControlDefinition),e.ControlDefinition.prototype=Object.create(e.Base.prototype),e.ControlDefinition.prototype.constructor=e.ControlDefinition,e.controlDefinitions=[],e.controlDefinitions.push(new e.ControlDefinition("multimix","[data-filter][data-sort]")),e.controlDefinitions.push(new e.ControlDefinition("filter","[data-filter]")),e.controlDefinitions.push(new e.ControlDefinition("sort","[data-sort]")),e.controlDefinitions.push(new e.ControlDefinition("toggle","[data-toggle]")),e.Control=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.el=null,this.selector="",this.bound=[],this.pending=-1,this.type="",this.status="inactive",this.filter="",this.sort="",this.canDisable=!1,this.handler=null,this.classNames=new e.UiClassNames,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Control),e.Control.prototype=Object.create(e.Base.prototype),n.extend(e.Control.prototype,{constructor:e.Control,init:function(t,n,a){var i=this;if(this.callActions("beforeInit",arguments),i.el=t,i.type=n,i.selector=a,i.selector)i.status="live";else switch(i.canDisable="boolean"==typeof i.el.disable,i.type){case"filter":i.filter=i.el.getAttribute("data-filter");break;case"toggle":i.filter=i.el.getAttribute("data-toggle");break;case"sort":i.sort=i.el.getAttribute("data-sort");break;case"multimix":i.filter=i.el.getAttribute("data-filter"),i.sort=i.el.getAttribute("data-sort")}i.bindClick(),e.controls.push(i),this.callActions("afterInit",arguments)},isBound:function(t){var e=this,n=!1;return this.callActions("beforeIsBound",arguments),n=e.bound.indexOf(t)>-1,e.callFilters("afterIsBound",n,arguments)},addBinding:function(t){var e=this;this.callActions("beforeAddBinding",arguments),e.isBound()||e.bound.push(t),this.callActions("afterAddBinding",arguments)},removeBinding:function(t){var n=this,a=-1;this.callActions("beforeRemoveBinding",arguments),(a=n.bound.indexOf(t))>-1&&n.bound.splice(a,1),n.bound.length<1&&(n.unbindClick(),a=e.controls.indexOf(n),e.controls.splice(a,1),"active"===n.status&&n.renderStatus(n.el,"inactive")),this.callActions("afterRemoveBinding",arguments)},bindClick:function(){var t=this;this.callActions("beforeBindClick",arguments),t.handler=function(e){t.handleClick(e)},n.on(t.el,"click",t.handler),this.callActions("afterBindClick",arguments)},unbindClick:function(){var t=this;this.callActions("beforeUnbindClick",arguments),n.off(t.el,"click",t.handler),t.handler=null,this.callActions("afterUnbindClick",arguments)},handleClick:function(t){var a=this,i=null,o=null,r=!1,s=void 0,l={},c=null,u=[],f=-1;if(this.callActions("beforeHandleClick",arguments),this.pending=0,o=a.bound[0],i=a.selector?n.closestParent(t.target,o.config.selectors.control+a.selector,!0,o.dom.document):a.el,!i)return void a.callActions("afterHandleClick",arguments);switch(a.type){case"filter":l.filter=a.filter||i.getAttribute("data-filter");break;case"sort":l.sort=a.sort||i.getAttribute("data-sort");break;case"multimix":l.filter=a.filter||i.getAttribute("data-filter"),l.sort=a.sort||i.getAttribute("data-sort");break;case"toggle":l.filter=a.filter||i.getAttribute("data-toggle"),r="live"===a.status?n.hasClass(i,a.classNames.active):"active"===a.status}for(f=0;f<a.bound.length;f++)c=new e.CommandMultimix,n.extend(c,l),u.push(c);for(u=a.callFilters("commandsHandleClick",u,arguments),a.pending=a.bound.length,f=0;o=a.bound[f];f++)l=u[f],l&&(o.lastClicked||(o.lastClicked=i),e.events.fire("mixClick",o.dom.container,{state:o.state,instance:o,originalEvent:t,control:o.lastClicked},o.dom.document),"function"==typeof o.config.callbacks.onMixClick&&(s=o.config.callbacks.onMixClick.call(o.lastClicked,o.state,t,o),s===!1)||("toggle"===a.type?r?o.toggleOff(l.filter):o.toggleOn(l.filter):o.multimix(l)));this.callActions("afterHandleClick",arguments)},update:function(t,n){var a=this,i=new e.CommandMultimix;a.callActions("beforeUpdate",arguments),a.pending--,a.pending=Math.max(0,a.pending),a.pending>0||("live"===a.status?a.updateLive(t,n):(i.sort=a.sort,i.filter=a.filter,a.callFilters("actionsUpdate",i,arguments),a.parseStatusChange(a.el,t,i,n)),a.callActions("afterUpdate",arguments))},updateLive:function(t,n){var a=this,i=null,o=null,r=null,s=-1;if(a.callActions("beforeUpdateLive",arguments),a.el){for(i=a.el.querySelectorAll(a.selector),s=0;r=i[s];s++){switch(o=new e.CommandMultimix,a.type){case"filter":o.filter=r.getAttribute("data-filter");break;case"sort":o.sort=r.getAttribute("data-sort");break;case"multimix":o.filter=r.getAttribute("data-filter"),o.sort=r.getAttribute("data-sort");break;case"toggle":o.filter=r.getAttribute("data-toggle")}o=a.callFilters("actionsUpdateLive",o,arguments),a.parseStatusChange(r,t,o,n)}a.callActions("afterUpdateLive",arguments)}},parseStatusChange:function(t,e,n,a){var i=this,o="",r="",s=-1;switch(i.callActions("beforeParseStatusChange",arguments),i.type){case"filter":e.filter===n.filter?i.renderStatus(t,"active"):i.renderStatus(t,"inactive");break;case"multimix":e.sort===n.sort&&e.filter===n.filter?i.renderStatus(t,"active"):i.renderStatus(t,"inactive");break;case"sort":e.sort.match(/:asc/g)&&(o=e.sort.replace(/:asc/g,"")),e.sort===n.sort||o===n.sort?i.renderStatus(t,"active"):i.renderStatus(t,"inactive");break;case"toggle":for(a.length<1&&i.renderStatus(t,"inactive"),e.filter===n.filter&&i.renderStatus(t,"active"),s=0;s<a.length;s++){if(r=a[s],r===n.filter){i.renderStatus(t,"active");break}i.renderStatus(t,"inactive")}}i.callActions("afterParseStatusChange",arguments)},renderStatus:function(t,e){var a=this;switch(a.callActions("beforeRenderStatus",arguments),e){case"active":n.addClass(t,a.classNames.active),n.removeClass(t,a.classNames.disabled),a.canDisable&&(a.el.disabled=!1);break;case"inactive":n.removeClass(t,a.classNames.active),n.removeClass(t,a.classNames.disabled),a.canDisable&&(a.el.disabled=!1);break;case"disabled":a.canDisable&&(a.el.disabled=!0),n.addClass(t,a.classNames.disabled),n.removeClass(t,a.classNames.active)}"live"!==a.status&&(a.status=e),a.callActions("afterRenderStatus",arguments)}}),e.controls=[],e.StyleData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.x=0,this.y=0,this.top=0,this.right=0,this.bottom=0,this.left=0,this.width=0,this.height=0,this.marginRight=0,this.marginBottom=0,this.opacity=0,this.scale=new e.TransformData,this.translateX=new e.TransformData,this.translateY=new e.TransformData,this.translateZ=new e.TransformData,this.rotateX=new e.TransformData,this.rotateY=new e.TransformData,this.rotateZ=new e.TransformData,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.StyleData),e.StyleData.prototype=Object.create(e.Base.prototype),e.StyleData.prototype.constructor=e.StyleData,e.TransformData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.value=0,this.unit="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.TransformData),e.TransformData.prototype=Object.create(e.Base.prototype),e.TransformData.prototype.constructor=e.TransformData,e.TransformDefaults=function(){e.StyleData.apply(this),this.callActions("beforeConstruct"),this.scale.value=.01,this.scale.unit="",this.translateX.value=20,this.translateX.unit="px",this.translateY.value=20,this.translateY.unit="px",this.translateZ.value=20,this.translateZ.unit="px",this.rotateX.value=90,this.rotateX.unit="deg",this.rotateY.value=90,this.rotateY.unit="deg",this.rotateX.value=90,this.rotateX.unit="deg",this.rotateZ.value=180,this.rotateZ.unit="deg",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.TransformDefaults),e.TransformDefaults.prototype=Object.create(e.StyleData.prototype),e.TransformDefaults.prototype.constructor=e.TransformDefaults,e.transformDefaults=new e.TransformDefaults,e.EventDetail=function(){this.state=null,this.futureState=null,this.instance=null,this.originalEvent=null},e.Events=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.mixStart=null,this.mixBusy=null,this.mixEnd=null,this.mixFail=null,this.mixClick=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Events),e.Events.prototype=Object.create(e.Base.prototype),e.Events.prototype.constructor=e.Events,e.Events.prototype.fire=function(t,a,i,o){var r=this,s=null,l=new e.EventDetail;if(r.callActions("beforeFire",arguments),"undefined"==typeof r[t])throw new Error('Event type "'+t+'" not found.');l.state=new e.State,n.extend(l.state,i.state),i.futureState&&(l.futureState=new e.State,n.extend(l.futureState,i.futureState)),l.instance=i.instance,i.originalEvent&&(l.originalEvent=i.originalEvent),s=n.getCustomEvent(t,l,o),r.callFilters("eventFire",s,arguments),a.dispatchEvent(s)},e.events=new e.Events,e.QueueItem=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.args=[],this.instruction=null,this.triggerElement=null,this.deferred=null,this.isToggling=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.QueueItem),e.QueueItem.prototype=Object.create(e.Base.prototype),e.QueueItem.prototype.constructor=e.QueueItem,e.Mixer=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.config=new e.Config,this.id="",this.isBusy=!1,this.isToggling=!1,this.incPadding=!0,this.controls=[],this.targets=[],this.origOrder=[],this.cache={},this.toggleArray=[],this.targetsMoved=0,this.targetsImmovable=0,this.targetsBound=0,this.targetsDone=0,this.staggerDuration=0,this.effectsIn=null,this.effectsOut=null,this.transformIn=[],this.transformOut=[],this.queue=[],this.state=null,this.lastOperation=null,
164this.lastClicked=null,this.userCallback=null,this.userDeferred=null,this.dom=new e.MixerDom,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Mixer),e.Mixer.prototype=Object.create(e.Base.prototype),n.extend(e.Mixer.prototype,{constructor:e.Mixer,attach:function(a,i,o,r){var s=this,l=null,c=-1;for(s.callActions("beforeAttach",arguments),s.id=o,r&&n.extend(s.config,r,!0,!0),s.sanitizeConfig(),s.cacheDom(a,i),s.config.layout.containerClassName&&n.addClass(s.dom.container,s.config.layout.containerClassName),e.features.has.transitions||(s.config.animation.enable=!1),"undefined"==typeof t.console&&(s.config.debug.showWarnings=!1),s.config.data.uidKey&&(s.config.controls.enable=!1),s.indexTargets(),s.state=s.getInitialState(),c=0;l=s.lastOperation.toHide[c];c++)l.hide();s.config.controls.enable&&(s.initControls(),s.buildToggleArray(null,s.state),s.updateControls({filter:s.state.activeFilter,sort:s.state.activeSort})),s.parseEffects(),s.callActions("afterAttach",arguments)},sanitizeConfig:function(){var t=this;t.callActions("beforeSanitizeConfig",arguments),t.config.controls.scope=t.config.controls.scope.toLowerCase().trim(),t.config.controls.toggleLogic=t.config.controls.toggleLogic.toLowerCase().trim(),t.config.controls.toggleDefault=t.config.controls.toggleDefault.toLowerCase().trim(),t.config.animation.effects=t.config.animation.effects.trim(),t.callActions("afterSanitizeConfig",arguments)},getInitialState:function(){var t=this,n=new e.State,a=new e.Operation;if(t.callActions("beforeGetInitialState",arguments),n.activeContainerClassName=t.config.layout.containerClassName,t.config.load.dataset){if(!t.config.data.uidKey||"string"!=typeof t.config.data.uidKey)throw new TypeError(e.messages.errorConfigDataUidKeyNotSet());a.startDataset=a.newDataset=n.activeDataset=t.config.load.dataset.slice(),a.startContainerClassName=a.newContainerClassName=n.activeContainerClassName,a.show=t.targets.slice(),n=t.callFilters("stateGetInitialState",n,arguments)}else n.activeFilter=t.parseFilterArgs([t.config.load.filter]).command,n.activeSort=t.parseSortArgs([t.config.load.sort]).command,n.totalTargets=t.targets.length,n=t.callFilters("stateGetInitialState",n,arguments),n.activeSort.collection||n.activeSort.attribute||"random"===n.activeSort.order||"desc"===n.activeSort.order?(a.newSort=n.activeSort,t.sortOperation(a),t.printSort(!1,a),t.targets=a.newOrder):a.startOrder=a.newOrder=t.targets,a.startFilter=a.newFilter=n.activeFilter,a.startSort=a.newSort=n.activeSort,a.startContainerClassName=a.newContainerClassName=n.activeContainerClassName,"all"===a.newFilter.selector?a.newFilter.selector=t.config.selectors.target:"none"===a.newFilter.selector&&(a.newFilter.selector="");return a=t.callFilters("operationGetInitialState",a,[n]),t.lastOperation=a,a.newFilter&&t.filterOperation(a),n=t.buildState(a)},cacheDom:function(t,e){var n=this;n.callActions("beforeCacheDom",arguments),n.dom.document=e,n.dom.body=n.dom.document.querySelector("body"),n.dom.container=t,n.dom.parent=t,n.callActions("afterCacheDom",arguments)},indexTargets:function(){var t=this,a=null,i=null,o=null,r=-1;if(t.callActions("beforeIndexTargets",arguments),t.dom.targets=t.config.layout.allowNestedTargets?t.dom.container.querySelectorAll(t.config.selectors.target):n.children(t.dom.container,t.config.selectors.target,t.dom.document),t.dom.targets=n.arrayFromList(t.dom.targets),t.targets=[],(o=t.config.load.dataset)&&o.length!==t.dom.targets.length)throw new Error(e.messages.errorDatasetPrerenderedMismatch());if(t.dom.targets.length){for(r=0;i=t.dom.targets[r];r++)a=new e.Target,a.init(i,t,o?o[r]:void 0),a.isInDom=!0,t.targets.push(a);t.dom.parent=t.dom.targets[0].parentElement===t.dom.container?t.dom.container:t.dom.targets[0].parentElement}t.origOrder=t.targets,t.callActions("afterIndexTargets",arguments)},initControls:function(){var t=this,n="",a=null,i=null,o=null,r=null,s=null,l=-1,c=-1;switch(t.callActions("beforeInitControls",arguments),t.config.controls.scope){case"local":o=t.dom.container;break;case"global":o=t.dom.document;break;default:throw new Error(e.messages.errorConfigInvalidControlsScope())}for(l=0;n=e.controlDefinitions[l];l++)if(t.config.controls.live||n.live){if(n.parent){if(r=t.dom[n.parent],!r||r.length<0)continue;"number"!=typeof r.length&&(r=[r])}else r=[o];for(c=0;i=r[c];c++)s=t.getControl(i,n.type,n.selector),t.controls.push(s)}else for(a=o.querySelectorAll(t.config.selectors.control+n.selector),c=0;i=a[c];c++)s=t.getControl(i,n.type,""),s&&t.controls.push(s);t.callActions("afterInitControls",arguments)},getControl:function(t,a,i){var o=this,r=null,s=-1;if(o.callActions("beforeGetControl",arguments),!i)for(s=0;r=e.controls[s];s++){if(r.el===t&&r.isBound(o))return o.callFilters("controlGetControl",null,arguments);if(r.el===t&&r.type===a&&r.selector===i)return r.addBinding(o),o.callFilters("controlGetControl",r,arguments)}return r=new e.Control,r.init(t,a,i),r.classNames.base=n.getClassname(o.config.classNames,a),r.classNames.active=n.getClassname(o.config.classNames,a,o.config.classNames.modifierActive),r.classNames.disabled=n.getClassname(o.config.classNames,a,o.config.classNames.modifierDisabled),r.addBinding(o),o.callFilters("controlGetControl",r,arguments)},getToggleSelector:function(){var t=this,e="or"===t.config.controls.toggleLogic?", ":"",a="";return t.callActions("beforeGetToggleSelector",arguments),t.toggleArray=n.clean(t.toggleArray),a=t.toggleArray.join(e),""===a&&(a=t.config.controls.toggleDefault),t.callFilters("selectorGetToggleSelector",a,arguments)},buildToggleArray:function(t,e){var a=this,i="";if(a.callActions("beforeBuildToggleArray",arguments),t&&t.filter)i=t.filter.selector.replace(/\s/g,"");else{if(!e)return;i=e.activeFilter.selector.replace(/\s/g,"")}i!==a.config.selectors.target&&"all"!==i||(i=""),"or"===a.config.controls.toggleLogic?a.toggleArray=i.split(","):a.toggleArray=a.splitCompoundSelector(i),a.toggleArray=n.clean(a.toggleArray),a.callActions("afterBuildToggleArray",arguments)},splitCompoundSelector:function(t){var e=t.split(/([\.\[])/g),n=[],a="",i=-1;for(""===e[0]&&e.shift(),i=0;i<e.length;i++)i%2===0&&(a=""),a+=e[i],i%2!==0&&n.push(a);return n},updateControls:function(t){var a=this,i=null,o=new e.CommandMultimix,r=-1;for(a.callActions("beforeUpdateControls",arguments),t.filter?o.filter=t.filter.selector:o.filter=a.state.activeFilter.selector,t.sort?o.sort=a.buildSortString(t.sort):o.sort=a.buildSortString(a.state.activeSort),o.filter===a.config.selectors.target&&(o.filter="all"),""===o.filter&&(o.filter="none"),n.freeze(o),r=0;i=a.controls[r];r++)i.update(o,a.toggleArray);a.callActions("afterUpdateControls",arguments)},buildSortString:function(t){var e=this,n="";return n+=t.sortString,t.next&&(n+=" "+e.buildSortString(t.next)),n},insertTargets:function(t,a){var i=this,o=null,r=-1,s=null,l=null,c=null,u=-1;if(i.callActions("beforeInsertTargets",arguments),"undefined"==typeof t.index&&(t.index=0),o=i.getNextSibling(t.index,t.sibling,t.position),s=i.dom.document.createDocumentFragment(),r=o?n.index(o,i.config.selectors.target):i.targets.length,t.collection){for(u=0;c=t.collection[u];u++){if(i.dom.targets.indexOf(c)>-1)throw new Error(e.messages.errorInsertPreexistingElement());c.style.display="none",s.appendChild(c),s.appendChild(i.dom.document.createTextNode(" ")),n.isElement(c,i.dom.document)&&c.matches(i.config.selectors.target)&&(l=new e.Target,l.init(c,i),l.isInDom=!0,i.targets.splice(r,0,l),r++)}i.dom.parent.insertBefore(s,o)}a.startOrder=i.origOrder=i.targets,i.callActions("afterInsertTargets",arguments)},getNextSibling:function(t,e,n){var a=this,i=null;return t=Math.max(t,0),e&&"before"===n?i=e:e&&"after"===n?i=e.nextElementSibling||null:a.targets.length>0&&"undefined"!=typeof t?i=t<a.targets.length||!a.targets.length?a.targets[t].dom.el:a.targets[a.targets.length-1].dom.el.nextElementSibling:0===a.targets.length&&a.dom.parent.children.length>0&&(a.config.layout.siblingAfter?i=a.config.layout.siblingAfter:a.config.layout.siblingBefore?i=a.config.layout.siblingBefore.nextElementSibling:a.dom.parent.children[0]),a.callFilters("elementGetNextSibling",i,arguments)},filterOperation:function(t){var e=this,n=!1,a=-1,i="",o=null,r=-1;for(e.callActions("beforeFilterOperation",arguments),i=t.newFilter.action,r=0;o=t.newOrder[r];r++)n=t.newFilter.collection?t.newFilter.collection.indexOf(o.dom.el)>-1:""!==t.newFilter.selector&&o.dom.el.matches(t.newFilter.selector),e.evaluateHideShow(n,o,i,t);if(t.toRemove.length)for(r=0;o=t.show[r];r++)t.toRemove.indexOf(o)>-1&&(t.show.splice(r,1),(a=t.toShow.indexOf(o))>-1&&t.toShow.splice(a,1),t.toHide.push(o),t.hide.push(o),r--);t.matching=t.show.slice(),0===t.show.length&&""!==t.newFilter.selector&&0!==e.targets.length&&(t.hasFailed=!0),e.callActions("afterFilterOperation",arguments)},evaluateHideShow:function(t,e,n,a){var i=this,o=!1,r=Array.prototype.slice.call(arguments,1);o=i.callFilters("testResultEvaluateHideShow",t,r),i.callActions("beforeEvaluateHideShow",arguments),o===!0&&"show"===n||o===!1&&"hide"===n?(a.show.push(e),!e.isShown&&a.toShow.push(e)):(a.hide.push(e),e.isShown&&a.toHide.push(e)),i.callActions("afterEvaluateHideShow",arguments)},sortOperation:function(t){var a=this,i=[],o=null,r=null,s=-1;if(a.callActions("beforeSortOperation",arguments),t.startOrder=a.targets,t.newSort.collection){for(i=[],s=0;r=t.newSort.collection[s];s++){if(a.dom.targets.indexOf(r)<0)throw new Error(e.messages.errorSortNonExistentElement());o=new e.Target,o.init(r,a),o.isInDom=!0,i.push(o)}t.newOrder=i}else"random"===t.newSort.order?t.newOrder=n.arrayShuffle(t.startOrder):""===t.newSort.attribute?(t.newOrder=a.origOrder.slice(),"desc"===t.newSort.order&&t.newOrder.reverse()):(t.newOrder=t.startOrder.slice(),t.newOrder.sort(function(e,n){return a.compare(e,n,t.newSort)}));n.isEqualArray(t.newOrder,t.startOrder)&&(t.willSort=!1),a.callActions("afterSortOperation",arguments)},compare:function(t,e,n){var a=this,i=n.order,o=a.getAttributeValue(t,n.attribute),r=a.getAttributeValue(e,n.attribute);return isNaN(1*o)||isNaN(1*r)?(o=o.toLowerCase(),r=r.toLowerCase()):(o=1*o,r=1*r),o<r?"asc"===i?-1:1:o>r?"asc"===i?1:-1:o===r&&n.next?a.compare(t,e,n.next):0},getAttributeValue:function(t,n){var a=this,i="";return i=t.dom.el.getAttribute("data-"+n),null===i&&a.config.debug.showWarnings&&console.warn(e.messages.warningInconsistentSortingAttributes({attribute:"data-"+n})),a.callFilters("valueGetAttributeValue",i||0,arguments)},printSort:function(e,a){var i=this,o=e?a.newOrder:a.startOrder,r=e?a.startOrder:a.newOrder,s=o.length?o[o.length-1].dom.el.nextElementSibling:null,l=t.document.createDocumentFragment(),c=null,u=null,f=null,h=-1;for(i.callActions("beforePrintSort",arguments),h=0;u=o[h];h++)f=u.dom.el,"absolute"!==f.style.position&&(n.removeWhitespace(f.previousSibling),f.parentElement.removeChild(f));for(c=s?s.previousSibling:i.dom.parent.lastChild,c&&"#text"===c.nodeName&&n.removeWhitespace(c),h=0;u=r[h];h++)f=u.dom.el,n.isElement(l.lastChild)&&l.appendChild(t.document.createTextNode(" ")),l.appendChild(f);i.dom.parent.firstChild&&i.dom.parent.firstChild!==s&&l.insertBefore(t.document.createTextNode(" "),l.childNodes[0]),s?(l.appendChild(t.document.createTextNode(" ")),i.dom.parent.insertBefore(l,s)):i.dom.parent.appendChild(l),i.callActions("afterPrintSort",arguments)},parseSortString:function(t,a){var i=this,o=t.split(" "),r=a,s=[],l=-1;for(l=0;l<o.length;l++){switch(s=o[l].split(":"),r.sortString=o[l],r.attribute=n.dashCase(s[0]),r.order=s[1]||"asc",r.attribute){case"default":r.attribute="";break;case"random":r.attribute="",r.order="random"}if(!r.attribute||"random"===r.order)break;l<o.length-1&&(r.next=new e.CommandSort,n.freeze(r),r=r.next)}return i.callFilters("commandsParseSort",a,arguments)},parseEffects:function(){var t=this,n="",a=t.config.animation.effectsIn||t.config.animation.effects,i=t.config.animation.effectsOut||t.config.animation.effects;t.callActions("beforeParseEffects",arguments),t.effectsIn=new e.StyleData,t.effectsOut=new e.StyleData,t.transformIn=[],t.transformOut=[],t.effectsIn.opacity=t.effectsOut.opacity=1,t.parseEffect("fade",a,t.effectsIn,t.transformIn),t.parseEffect("fade",i,t.effectsOut,t.transformOut,!0);for(n in e.transformDefaults)e.transformDefaults[n]instanceof e.TransformData&&(t.parseEffect(n,a,t.effectsIn,t.transformIn),t.parseEffect(n,i,t.effectsOut,t.transformOut,!0));t.parseEffect("stagger",a,t.effectsIn,t.transformIn),t.parseEffect("stagger",i,t.effectsOut,t.transformOut,!0),t.callActions("afterParseEffects",arguments)},parseEffect:function(t,n,a,i,o){var r=this,s=/\(([^)]+)\)/,l=-1,c="",u=[],f="",h=["%","px","em","rem","vh","vw","deg"],d="",m=-1;if(r.callActions("beforeParseEffect",arguments),"string"!=typeof n)throw new TypeError(e.messages.errorConfigInvalidAnimationEffects());if(n.indexOf(t)<0)return void("stagger"===t&&(r.staggerDuration=0));switch(l=n.indexOf(t+"("),l>-1&&(c=n.substring(l),u=s.exec(c),f=u[1]),t){case"fade":a.opacity=f?parseFloat(f):0;break;case"stagger":r.staggerDuration=f?parseFloat(f):100;break;default:if(o&&r.config.animation.reverseOut&&"scale"!==t?a[t].value=(f?parseFloat(f):e.transformDefaults[t].value)*-1:a[t].value=f?parseFloat(f):e.transformDefaults[t].value,f){for(m=0;d=h[m];m++)if(f.indexOf(d)>-1){a[t].unit=d;break}}else a[t].unit=e.transformDefaults[t].unit;i.push(t+"("+a[t].value+a[t].unit+")")}r.callActions("afterParseEffect",arguments)},buildState:function(t){var n=this,a=new e.State,i=null,o=-1;for(n.callActions("beforeBuildState",arguments),o=0;i=n.targets[o];o++)(!t.toRemove.length||t.toRemove.indexOf(i)<0)&&a.targets.push(i.dom.el);for(o=0;i=t.matching[o];o++)a.matching.push(i.dom.el);for(o=0;i=t.show[o];o++)a.show.push(i.dom.el);for(o=0;i=t.hide[o];o++)(!t.toRemove.length||t.toRemove.indexOf(i)<0)&&a.hide.push(i.dom.el);return a.id=n.id,a.container=n.dom.container,a.activeFilter=t.newFilter,a.activeSort=t.newSort,a.activeDataset=t.newDataset,a.activeContainerClassName=t.newContainerClassName,a.hasFailed=t.hasFailed,a.totalTargets=n.targets.length,a.totalShow=t.show.length,a.totalHide=t.hide.length,a.totalMatching=t.matching.length,a.triggerElement=t.triggerElement,n.callFilters("stateBuildState",a,arguments)},goMix:function(a,i){var o=this,r=null;return o.callActions("beforeGoMix",arguments),o.config.animation.duration&&o.config.animation.effects&&n.isVisible(o.dom.container)||(a=!1),i.toShow.length||i.toHide.length||i.willSort||i.willChangeLayout||(a=!1),i.startState.show.length||i.show.length||(a=!1),e.events.fire("mixStart",o.dom.container,{state:i.startState,futureState:i.newState,instance:o},o.dom.document),"function"==typeof o.config.callbacks.onMixStart&&o.config.callbacks.onMixStart.call(o.dom.container,i.startState,i.newState,o),n.removeClass(o.dom.container,n.getClassname(o.config.classNames,"container",o.config.classNames.modifierFailed)),r=o.userDeferred?o.userDeferred:o.userDeferred=n.defer(e.libraries),o.isBusy=!0,a&&e.features.has.transitions?(t.pageYOffset!==i.docState.scrollTop&&t.scrollTo(i.docState.scrollLeft,i.docState.scrollTop),o.config.animation.applyPerspective&&(o.dom.parent.style[e.features.perspectiveProp]=o.config.animation.perspectiveDistance,o.dom.parent.style[e.features.perspectiveOriginProp]=o.config.animation.perspectiveOrigin),o.config.animation.animateResizeContainer&&i.startHeight!==i.newHeight&&i.viewportDeltaY!==i.startHeight-i.newHeight&&(o.dom.parent.style.height=i.startHeight+"px"),o.config.animation.animateResizeContainer&&i.startWidth!==i.newWidth&&i.viewportDeltaX!==i.startWidth-i.newWidth&&(o.dom.parent.style.width=i.startWidth+"px"),i.startHeight===i.newHeight&&(o.dom.parent.style.height=i.startHeight+"px"),i.startWidth===i.newWidth&&(o.dom.parent.style.width=i.startWidth+"px"),i.startHeight===i.newHeight&&i.startWidth===i.newWidth&&(o.dom.parent.style.overflow="hidden"),requestAnimationFrame(function(){o.moveTargets(i)}),o.callFilters("promiseGoMix",r.promise,arguments)):(o.config.debug.fauxAsync?setTimeout(function(){o.cleanUp(i)},o.config.animation.duration):o.cleanUp(i),o.callFilters("promiseGoMix",r.promise,arguments))},getStartMixData:function(n){var a=this,i=t.getComputedStyle(a.dom.parent),o=a.dom.parent.getBoundingClientRect(),r=null,s={},l=-1,c=i[e.features.boxSizingProp];for(a.incPadding="border-box"===c,a.callActions("beforeGetStartMixData",arguments),l=0;r=n.show[l];l++)s=r.getPosData(),n.showPosData[l]={startPosData:s};for(l=0;r=n.toHide[l];l++)s=r.getPosData(),n.toHidePosData[l]={startPosData:s};n.startX=o.left,n.startY=o.top,n.startHeight=a.incPadding?o.height:o.height-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderTop)-parseFloat(i.borderBottom),n.startWidth=a.incPadding?o.width:o.width-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderLeft)-parseFloat(i.borderRight),a.callActions("afterGetStartMixData",arguments)},setInter:function(t){var e=this,a=null,i=-1;for(e.callActions("beforeSetInter",arguments),e.config.animation.clampHeight&&(e.dom.parent.style.height=t.startHeight+"px",e.dom.parent.style.overflow="hidden"),e.config.animation.clampWidth&&(e.dom.parent.style.width=t.startWidth+"px",e.dom.parent.style.overflow="hidden"),i=0;a=t.toShow[i];i++)a.show();t.willChangeLayout&&(n.removeClass(e.dom.container,t.startContainerClassName),n.addClass(e.dom.container,t.newContainerClassName)),e.callActions("afterSetInter",arguments)},getInterMixData:function(t){var e=this,n=null,a=-1;for(e.callActions("beforeGetInterMixData",arguments),a=0;n=t.show[a];a++)t.showPosData[a].interPosData=n.getPosData();for(a=0;n=t.toHide[a];a++)t.toHidePosData[a].interPosData=n.getPosData();e.callActions("afterGetInterMixData",arguments)},setFinal:function(t){var e=this,n=null,a=-1;for(e.callActions("beforeSetFinal",arguments),t.willSort&&e.printSort(!1,t),a=0;n=t.toHide[a];a++)n.hide();e.callActions("afterSetFinal",arguments)},getFinalMixData:function(e){var a=this,i=null,o=null,r=null,s=-1;for(a.callActions("beforeGetFinalMixData",arguments),s=0;r=e.show[s];s++)e.showPosData[s].finalPosData=r.getPosData();for(s=0;r=e.toHide[s];s++)e.toHidePosData[s].finalPosData=r.getPosData();for((a.config.animation.clampHeight||a.config.animation.clampWidth)&&(a.dom.parent.style.height=a.dom.parent.style.width=a.dom.parent.style.overflow=""),a.incPadding||(i=t.getComputedStyle(a.dom.parent)),o=a.dom.parent.getBoundingClientRect(),e.newX=o.left,e.newY=o.top,e.newHeight=a.incPadding?o.height:o.height-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderTop)-parseFloat(i.borderBottom),e.newWidth=a.incPadding?o.width:o.width-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderLeft)-parseFloat(i.borderRight),e.viewportDeltaX=e.docState.viewportWidth-this.dom.document.documentElement.clientWidth,e.viewportDeltaY=e.docState.viewportHeight-this.dom.document.documentElement.clientHeight,e.willSort&&a.printSort(!0,e),s=0;r=e.toShow[s];s++)r.hide();for(s=0;r=e.toHide[s];s++)r.show();e.willChangeLayout&&(n.removeClass(a.dom.container,e.newContainerClassName),n.addClass(a.dom.container,a.config.layout.containerClassName)),a.callActions("afterGetFinalMixData",arguments)},getTweenData:function(t){var n=this,a=null,i=null,o=Object.getOwnPropertyNames(n.effectsIn),r="",s=null,l=-1,c=-1,u=-1,f=-1;for(n.callActions("beforeGetTweenData",arguments),u=0;a=t.show[u];u++)for(i=t.showPosData[u],i.posIn=new e.StyleData,i.posOut=new e.StyleData,i.tweenData=new e.StyleData,a.isShown?(i.posIn.x=i.startPosData.x-i.interPosData.x,i.posIn.y=i.startPosData.y-i.interPosData.y):i.posIn.x=i.posIn.y=0,i.posOut.x=i.finalPosData.x-i.interPosData.x,i.posOut.y=i.finalPosData.y-i.interPosData.y,i.posIn.opacity=a.isShown?1:n.effectsIn.opacity,i.posOut.opacity=1,i.tweenData.opacity=i.posOut.opacity-i.posIn.opacity,a.isShown||n.config.animation.nudge||(i.posIn.x=i.posOut.x,i.posIn.y=i.posOut.y),i.tweenData.x=i.posOut.x-i.posIn.x,i.tweenData.y=i.posOut.y-i.posIn.y,n.config.animation.animateResizeTargets&&(i.posIn.width=i.startPosData.width,i.posIn.height=i.startPosData.height,l=(i.startPosData.width||i.finalPosData.width)-i.interPosData.width,i.posIn.marginRight=i.startPosData.marginRight-l,c=(i.startPosData.height||i.finalPosData.height)-i.interPosData.height,i.posIn.marginBottom=i.startPosData.marginBottom-c,i.posOut.width=i.finalPosData.width,i.posOut.height=i.finalPosData.height,l=(i.finalPosData.width||i.startPosData.width)-i.interPosData.width,i.posOut.marginRight=i.finalPosData.marginRight-l,c=(i.finalPosData.height||i.startPosData.height)-i.interPosData.height,i.posOut.marginBottom=i.finalPosData.marginBottom-c,i.tweenData.width=i.posOut.width-i.posIn.width,i.tweenData.height=i.posOut.height-i.posIn.height,i.tweenData.marginRight=i.posOut.marginRight-i.posIn.marginRight,i.tweenData.marginBottom=i.posOut.marginBottom-i.posIn.marginBottom),f=0;r=o[f];f++)s=n.effectsIn[r],s instanceof e.TransformData&&s.value&&(i.posIn[r].value=s.value,i.posOut[r].value=0,i.tweenData[r].value=i.posOut[r].value-i.posIn[r].value,i.posIn[r].unit=i.posOut[r].unit=i.tweenData[r].unit=s.unit);for(u=0;a=t.toHide[u];u++)for(i=t.toHidePosData[u],i.posIn=new e.StyleData,i.posOut=new e.StyleData,i.tweenData=new e.StyleData,i.posIn.x=a.isShown?i.startPosData.x-i.interPosData.x:0,i.posIn.y=a.isShown?i.startPosData.y-i.interPosData.y:0,i.posOut.x=n.config.animation.nudge?0:i.posIn.x,i.posOut.y=n.config.animation.nudge?0:i.posIn.y,i.tweenData.x=i.posOut.x-i.posIn.x,i.tweenData.y=i.posOut.y-i.posIn.y,n.config.animation.animateResizeTargets&&(i.posIn.width=i.startPosData.width,i.posIn.height=i.startPosData.height,l=i.startPosData.width-i.interPosData.width,i.posIn.marginRight=i.startPosData.marginRight-l,c=i.startPosData.height-i.interPosData.height,i.posIn.marginBottom=i.startPosData.marginBottom-c),i.posIn.opacity=1,i.posOut.opacity=n.effectsOut.opacity,i.tweenData.opacity=i.posOut.opacity-i.posIn.opacity,f=0;r=o[f];f++)s=n.effectsOut[r],s instanceof e.TransformData&&s.value&&(i.posIn[r].value=0,i.posOut[r].value=s.value,i.tweenData[r].value=i.posOut[r].value-i.posIn[r].value,i.posIn[r].unit=i.posOut[r].unit=i.tweenData[r].unit=s.unit);n.callActions("afterGetTweenData",arguments)},moveTargets:function(t){var a=this,i=null,o=null,r=null,s="",l=!1,c=-1,u=-1,f=a.checkProgress.bind(a);for(a.callActions("beforeMoveTargets",arguments),u=0;i=t.show[u];u++)o=new e.IMoveData,r=t.showPosData[u],s=i.isShown?"none":"show",l=a.willTransition(s,t.hasEffect,r.posIn,r.posOut),l&&c++,i.show(),o.posIn=r.posIn,o.posOut=r.posOut,o.statusChange=s,o.staggerIndex=c,o.operation=t,o.callback=l?f:null,i.move(o);for(u=0;i=t.toHide[u];u++)r=t.toHidePosData[u],o=new e.IMoveData,s="hide",l=a.willTransition(s,r.posIn,r.posOut),o.posIn=r.posIn,o.posOut=r.posOut,o.statusChange=s,o.staggerIndex=u,o.operation=t,o.callback=l?f:null,i.move(o);a.config.animation.animateResizeContainer&&(a.dom.parent.style[e.features.transitionProp]="height "+a.config.animation.duration+"ms ease, width "+a.config.animation.duration+"ms ease ",requestAnimationFrame(function(){t.startHeight!==t.newHeight&&t.viewportDeltaY!==t.startHeight-t.newHeight&&(a.dom.parent.style.height=t.newHeight+"px"),t.startWidth!==t.newWidth&&t.viewportDeltaX!==t.startWidth-t.newWidth&&(a.dom.parent.style.width=t.newWidth+"px")})),t.willChangeLayout&&(n.removeClass(a.dom.container,a.config.layout.ContainerClassName),n.addClass(a.dom.container,t.newContainerClassName)),a.callActions("afterMoveTargets",arguments)},hasEffect:function(){var t=this,e=["scale","translateX","translateY","translateZ","rotateX","rotateY","rotateZ"],n="",a=null,i=!1,o=-1,r=-1;if(1!==t.effectsIn.opacity)return t.callFilters("resultHasEffect",!0,arguments);for(r=0;n=e[r];r++)if(a=t.effectsIn[n],o="undefined"!==a.value?a.value:a,0!==o){i=!0;break}return t.callFilters("resultHasEffect",i,arguments)},willTransition:function(t,e,a,i){var o=this,r=!1;return r=!!n.isVisible(o.dom.container)&&(!!("none"!==t&&e||a.x!==i.x||a.y!==i.y)||!!o.config.animation.animateResizeTargets&&(a.width!==i.width||a.height!==i.height||a.marginRight!==i.marginRight||a.marginTop!==i.marginTop)),o.callFilters("resultWillTransition",r,arguments)},checkProgress:function(t){var e=this;e.targetsDone++,e.targetsBound===e.targetsDone&&e.cleanUp(t)},cleanUp:function(t){var a=this,i=null,o=null,r=null,s=null,l=-1;for(a.callActions("beforeCleanUp",arguments),a.targetsMoved=a.targetsImmovable=a.targetsBound=a.targetsDone=0,l=0;i=t.show[l];l++)i.cleanUp(),i.show();for(l=0;i=t.toHide[l];l++)i.cleanUp(),i.hide();if(t.willSort&&a.printSort(!1,t),a.dom.parent.style[e.features.transitionProp]=a.dom.parent.style.height=a.dom.parent.style.width=a.dom.parent.style.overflow=a.dom.parent.style[e.features.perspectiveProp]=a.dom.parent.style[e.features.perspectiveOriginProp]="",t.willChangeLayout&&(n.removeClass(a.dom.container,t.startContainerClassName),n.addClass(a.dom.container,t.newContainerClassName)),t.toRemove.length){for(l=0;i=a.targets[l];l++)t.toRemove.indexOf(i)>-1&&((o=i.dom.el.previousSibling)&&"#text"===o.nodeName&&(r=i.dom.el.nextSibling)&&"#text"===r.nodeName&&n.removeWhitespace(o),t.willSort||a.dom.parent.removeChild(i.dom.el),a.targets.splice(l,1),i.isInDom=!1,l--);a.origOrder=a.targets}t.willSort&&(a.targets=t.newOrder),a.state=t.newState,a.lastOperation=t,a.dom.targets=a.state.targets,e.events.fire("mixEnd",a.dom.container,{state:a.state,instance:a},a.dom.document),"function"==typeof a.config.callbacks.onMixEnd&&a.config.callbacks.onMixEnd.call(a.dom.container,a.state,a),t.hasFailed&&(e.events.fire("mixFail",a.dom.container,{state:a.state,instance:a},a.dom.document),"function"==typeof a.config.callbacks.onMixFail&&a.config.callbacks.onMixFail.call(a.dom.container,a.state,a),n.addClass(a.dom.container,n.getClassname(a.config.classNames,"container",a.config.classNames.modifierFailed))),"function"==typeof a.userCallback&&a.userCallback.call(a.dom.container,a.state,a),"function"==typeof a.userDeferred.resolve&&a.userDeferred.resolve(a.state),a.userCallback=null,a.userDeferred=null,a.lastClicked=null,a.isToggling=!1,a.isBusy=!1,a.queue.length&&(a.callActions("beforeReadQueueCleanUp",arguments),s=a.queue.shift(),a.userDeferred=s.deferred,a.isToggling=s.isToggling,a.lastClicked=s.triggerElement,s.instruction.command instanceof e.CommandMultimix?a.multimix.apply(a,s.args):a.dataset.apply(a,s.args)),a.callActions("afterCleanUp",arguments)},parseMultimixArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandMultimix,r=0;r<t.length;r++)o=t[r],null!==o&&("object"==typeof o?n.extend(i.command,o):"boolean"==typeof o?i.animate=o:"function"==typeof o&&(i.callback=o));return!i.command.insert||i.command.insert instanceof e.CommandInsert||(i.command.insert=a.parseInsertArgs([i.command.insert]).command),!i.command.remove||i.command.remove instanceof e.CommandRemove||(i.command.remove=a.parseRemoveArgs([i.command.remove]).command),!i.command.filter||i.command.filter instanceof e.CommandFilter||(i.command.filter=a.parseFilterArgs([i.command.filter]).command),!i.command.sort||i.command.sort instanceof e.CommandSort||(i.command.sort=a.parseSortArgs([i.command.sort]).command),!i.command.changeLayout||i.command.changeLayout instanceof e.CommandChangeLayout||(i.command.changeLayout=a.parseChangeLayoutArgs([i.command.changeLayout]).command),i=a.callFilters("instructionParseMultimixArgs",i,arguments),n.freeze(i),i},parseFilterArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandFilter,r=0;r<t.length;r++)o=t[r],"string"==typeof o?i.command.selector=o:null===o?i.command.collection=[]:"object"==typeof o&&n.isElement(o,a.dom.document)?i.command.collection=[o]:"object"==typeof o&&"undefined"!=typeof o.length?i.command.collection=n.arrayFromList(o):"object"==typeof o?n.extend(i.command,o):"boolean"==typeof o?i.animate=o:"function"==typeof o&&(i.callback=o);if(i.command.selector&&i.command.collection)throw new Error(e.messages.errorFilterInvalidArguments());return i=a.callFilters("instructionParseFilterArgs",i,arguments),n.freeze(i),i},parseSortArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r="",s=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandSort,s=0;s<t.length;s++)if(o=t[s],null!==o)switch(typeof o){case"string":r=o;break;case"object":o.length&&(i.command.collection=n.arrayFromList(o));break;case"boolean":i.animate=o;break;case"function":i.callback=o}return r&&(i.command=a.parseSortString(r,i.command)),i=a.callFilters("instructionParseSortArgs",i,arguments),n.freeze(i),i},parseInsertArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandInsert,r=0;r<t.length;r++)o=t[r],null!==o&&("number"==typeof o?i.command.index=o:"string"==typeof o&&["before","after"].indexOf(o)>-1?i.command.position=o:"string"==typeof o?i.command.collection=n.arrayFromList(n.createElement(o).childNodes):"object"==typeof o&&n.isElement(o,a.dom.document)?i.command.collection.length?i.command.sibling=o:i.command.collection=[o]:"object"==typeof o&&o.length?i.command.collection.length?i.command.sibling=o[0]:i.command.collection=o:"object"==typeof o&&o.childNodes&&o.childNodes.length?i.command.collection.length?i.command.sibling=o.childNodes[0]:i.command.collection=n.arrayFromList(o.childNodes):"object"==typeof o?n.extend(i.command,o):"boolean"==typeof o?i.animate=o:"function"==typeof o&&(i.callback=o));if(i.command.index&&i.command.sibling)throw new Error(e.messages.errorInsertInvalidArguments());return!i.command.collection.length&&a.config.debug.showWarnings&&console.warn(e.messages.warningInsertNoElements()),i=a.callFilters("instructionParseInsertArgs",i,arguments),n.freeze(i),i},parseRemoveArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=null,s=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandRemove,s=0;s<t.length;s++)if(r=t[s],null!==r)switch(typeof r){case"number":a.targets[r]&&(i.command.targets[0]=a.targets[r]);break;case"string":i.command.collection=n.arrayFromList(a.dom.parent.querySelectorAll(r));break;case"object":r&&r.length?i.command.collection=r:n.isElement(r,a.dom.document)?i.command.collection=[r]:n.extend(i.command,r);break;case"boolean":i.animate=r;break;case"function":i.callback=r}if(i.command.collection.length)for(s=0;o=a.targets[s];s++)i.command.collection.indexOf(o.dom.el)>-1&&i.command.targets.push(o);return!i.command.targets.length&&a.config.debug.showWarnings&&console.warn(e.messages.warningRemoveNoElements()),n.freeze(i),i},parseDatasetArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandDataset,r=0;r<t.length;r++)if(o=t[r],null!==o)switch(typeof o){case"object":Array.isArray(o)||"number"==typeof o.length?i.command.dataset=o:n.extend(i.command,o);break;case"boolean":i.animate=o;break;case"function":i.callback=o}return n.freeze(i),i},parseChangeLayoutArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandChangeLayout,r=0;r<t.length;r++)if(o=t[r],null!==o)switch(typeof o){case"string":i.command.containerClassName=o;break;case"object":n.extend(i.command,o);break;case"boolean":i.animate=o;break;case"function":i.callback=o}return n.freeze(i),i},queueMix:function(t){var a=this,i=null,o="";return a.callActions("beforeQueueMix",arguments),i=n.defer(e.libraries),a.config.animation.queue&&a.queue.length<a.config.animation.queueLimit?(t.deferred=i,a.queue.push(t),a.config.controls.enable&&(a.isToggling?(a.buildToggleArray(t.instruction.command),o=a.getToggleSelector(),a.updateControls({filter:{selector:o}})):a.updateControls(t.instruction.command))):(a.config.debug.showWarnings&&console.warn(e.messages.warningMultimixInstanceQueueFull()),i.resolve(a.state),e.events.fire("mixBusy",a.dom.container,{state:a.state,instance:a},a.dom.document),"function"==typeof a.config.callbacks.onMixBusy&&a.config.callbacks.onMixBusy.call(a.dom.container,a.state,a)),
165a.callFilters("promiseQueueMix",i.promise,arguments)},getDataOperation:function(t){var a=this,i=new e.Operation,o=[];if(i=a.callFilters("operationUnmappedGetDataOperation",i,arguments),a.dom.targets.length&&!(o=a.state.activeDataset||[]).length)throw new Error(e.messages.errorDatasetNotSet());return i.id=n.randomHex(),i.startState=a.state,i.startDataset=o,i.newDataset=t.slice(),a.diffDatasets(i),i.startOrder=a.targets,i.newOrder=i.show,a.config.animation.enable&&(a.getStartMixData(i),a.setInter(i),i.docState=n.getDocumentState(a.dom.document),a.getInterMixData(i),a.setFinal(i),a.getFinalMixData(i),a.parseEffects(),i.hasEffect=a.hasEffect(),a.getTweenData(i)),a.targets=i.show.slice(),i.newState=a.buildState(i),Array.prototype.push.apply(a.targets,i.toRemove),i=a.callFilters("operationMappedGetDataOperation",i,arguments)},diffDatasets:function(t){var a=this,i=[],o=[],r=[],s=null,l=null,c=null,u=null,f=null,h={},d="",m=-1;for(a.callActions("beforeDiffDatasets",arguments),m=0;s=t.newDataset[m];m++){if("undefined"==typeof(d=s[a.config.data.uidKey])||d.toString().length<1)throw new TypeError(e.messages.errorDatasetInvalidUidKey({uidKey:a.config.data.uidKey}));if(h[d])throw new Error(e.messages.errorDatasetDuplicateUid({uid:d}));h[d]=!0,(l=a.cache[d])instanceof e.Target?(a.config.data.dirtyCheck&&!n.deepEquals(s,l.data)&&(c=l.render(s),l.data=s,c!==l.dom.el&&(l.isInDom&&(l.unbindEvents(),a.dom.parent.replaceChild(c,l.dom.el)),l.isShown||(c.style.display="none"),l.dom.el=c,l.isInDom&&l.bindEvents())),c=l.dom.el):(l=new e.Target,l.init(null,a,s),l.hide()),l.isInDom?(f=l.dom.el.nextElementSibling,o.push(d),u&&(u.lastElementChild&&u.appendChild(a.dom.document.createTextNode(" ")),a.insertDatasetFrag(u,l.dom.el,r),u=null)):(u||(u=a.dom.document.createDocumentFragment()),u.lastElementChild&&u.appendChild(a.dom.document.createTextNode(" ")),u.appendChild(l.dom.el),l.isInDom=!0,l.unbindEvents(),l.bindEvents(),l.hide(),t.toShow.push(l),r.push(l)),t.show.push(l)}for(u&&(f=f||a.config.layout.siblingAfter,f&&u.appendChild(a.dom.document.createTextNode(" ")),a.insertDatasetFrag(u,f,r)),m=0;s=t.startDataset[m];m++)d=s[a.config.data.uidKey],l=a.cache[d],t.show.indexOf(l)<0?(t.hide.push(l),t.toHide.push(l),t.toRemove.push(l)):i.push(d);n.isEqualArray(i,o)||(t.willSort=!0),a.callActions("afterDiffDatasets",arguments)},insertDatasetFrag:function(t,e,a){var i=this,o=e?n.arrayFromList(i.dom.parent.children).indexOf(e):i.targets.length;for(i.dom.parent.insertBefore(t,e);a.length;)i.targets.splice(o,0,a.shift()),o++},willSort:function(t,e){var n=this,a=!1;return a=!!(n.config.behavior.liveSort||"random"===t.order||t.attribute!==e.attribute||t.order!==e.order||t.collection!==e.collection||null===t.next&&e.next||t.next&&null===e.next)||!(!t.next||!e.next)&&n.willSort(t.next,e.next),n.callFilters("resultWillSort",a,arguments)},show:function(){var t=this;return t.filter("all")},hide:function(){var t=this;return t.filter("none")},isMixing:function(){var t=this;return t.isBusy},filter:function(){var t=this,e=t.parseFilterArgs(arguments);return t.multimix({filter:e.command},e.animate,e.callback)},toggleOn:function(){var t=this,e=t.parseFilterArgs(arguments),n=e.command.selector,a="";return t.isToggling=!0,t.toggleArray.indexOf(n)<0&&t.toggleArray.push(n),a=t.getToggleSelector(),t.multimix({filter:a},e.animate,e.callback)},toggleOff:function(){var t=this,e=t.parseFilterArgs(arguments),n=e.command.selector,a=t.toggleArray.indexOf(n),i="";return t.isToggling=!0,a>-1&&t.toggleArray.splice(a,1),i=t.getToggleSelector(),t.multimix({filter:i},e.animate,e.callback)},sort:function(){var t=this,e=t.parseSortArgs(arguments);return t.multimix({sort:e.command},e.animate,e.callback)},changeLayout:function(){var t=this,e=t.parseChangeLayoutArgs(arguments);return t.multimix({changeLayout:e.command},e.animate,e.callback)},dataset:function(){var t=this,n=t.parseDatasetArgs(arguments),a=null,i=null,o=!1;return t.callActions("beforeDataset",arguments),t.isBusy?(i=new e.QueueItem,i.args=arguments,i.instruction=n,t.queueMix(i)):(n.callback&&(t.userCallback=n.callback),o=n.animate^t.config.animation.enable?n.animate:t.config.animation.enable,a=t.getDataOperation(n.command.dataset),t.goMix(o,a))},multimix:function(){var t=this,n=null,a=!1,i=null,o=t.parseMultimixArgs(arguments);return t.callActions("beforeMultimix",arguments),t.isBusy?(i=new e.QueueItem,i.args=arguments,i.instruction=o,i.triggerElement=t.lastClicked,i.isToggling=t.isToggling,t.queueMix(i)):(n=t.getOperation(o.command),t.config.controls.enable&&(o.command.filter&&!t.isToggling&&(t.toggleArray.length=0,t.buildToggleArray(n.command)),t.queue.length<1&&t.updateControls(n.command)),o.callback&&(t.userCallback=o.callback),a=o.animate^t.config.animation.enable?o.animate:t.config.animation.enable,t.callFilters("operationMultimix",n,arguments),t.goMix(a,n))},getOperation:function(t){var a=this,i=t.sort,o=t.filter,r=t.changeLayout,s=t.remove,l=t.insert,c=new e.Operation;return c=a.callFilters("operationUnmappedGetOperation",c,arguments),c.id=n.randomHex(),c.command=t,c.startState=a.state,c.triggerElement=a.lastClicked,a.isBusy?(a.config.debug.showWarnings&&console.warn(e.messages.warningGetOperationInstanceBusy()),null):(l&&a.insertTargets(l,c),s&&(c.toRemove=s.targets),c.startSort=c.newSort=c.startState.activeSort,c.startOrder=c.newOrder=a.targets,i&&(c.startSort=c.startState.activeSort,c.newSort=i,c.willSort=a.willSort(i,c.startState.activeSort),c.willSort&&a.sortOperation(c)),c.startFilter=c.startState.activeFilter,o?c.newFilter=o:c.newFilter=n.extend(new e.CommandFilter,c.startFilter),"all"===c.newFilter.selector?c.newFilter.selector=a.config.selectors.target:"none"===c.newFilter.selector&&(c.newFilter.selector=""),a.filterOperation(c),c.startContainerClassName=c.startState.activeContainerClassName,r?(c.newContainerClassName=r.containerClassName,c.newContainerClassName!==c.startContainerClassName&&(c.willChangeLayout=!0)):c.newContainerClassName=c.startContainerClassName,a.config.animation.enable&&(a.getStartMixData(c),a.setInter(c),c.docState=n.getDocumentState(a.dom.document),a.getInterMixData(c),a.setFinal(c),a.getFinalMixData(c),a.parseEffects(),c.hasEffect=a.hasEffect(),a.getTweenData(c)),c.willSort&&(a.targets=c.newOrder),c.newState=a.buildState(c),a.callFilters("operationMappedGetOperation",c,arguments))},tween:function(t,e){var n=null,a=null,i=-1,o=-1;for(e=Math.min(e,1),e=Math.max(e,0),o=0;n=t.show[o];o++)a=t.showPosData[o],n.applyTween(a,e);for(o=0;n=t.hide[o];o++)n.isShown&&n.hide(),(i=t.toHide.indexOf(n))>-1&&(a=t.toHidePosData[i],n.isShown||n.show(),n.applyTween(a,e))},insert:function(){var t=this,e=t.parseInsertArgs(arguments);return t.multimix({insert:e.command},e.animate,e.callback)},insertBefore:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(e.command.collection,"before",e.command.sibling,e.animate,e.callback)},insertAfter:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(e.command.collection,"after",e.command.sibling,e.animate,e.callback)},prepend:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(0,e.command.collection,e.animate,e.callback)},append:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(t.state.totalTargets,e.command.collection,e.animate,e.callback)},remove:function(){var t=this,e=t.parseRemoveArgs(arguments);return t.multimix({remove:e.command},e.animate,e.callback)},getConfig:function(t){var e=this,a=null;return a=t?n.getProperty(e.config,t):e.config,e.callFilters("valueGetConfig",a,arguments)},configure:function(t){var e=this;e.callActions("beforeConfigure",arguments),n.extend(e.config,t,!0,!0),e.callActions("afterConfigure",arguments)},getState:function(){var t=this,a=null;return a=new e.State,n.extend(a,t.state),n.freeze(a),t.callFilters("stateGetState",a,arguments)},forceRefresh:function(){var t=this;t.indexTargets()},forceRender:function(){var t=this,e=null,n=null,a="";for(a in t.cache)e=t.cache[a],n=e.render(e.data),n!==e.dom.el&&(e.isInDom&&(e.unbindEvents(),t.dom.parent.replaceChild(n,e.dom.el)),e.isShown||(n.style.display="none"),e.dom.el=n,e.isInDom&&e.bindEvents());t.state=t.buildState(t.lastOperation)},destroy:function(t){var n=this,a=null,i=null,o=0;for(n.callActions("beforeDestroy",arguments),o=0;a=n.controls[o];o++)a.removeBinding(n);for(o=0;i=n.targets[o];o++)t&&i.show(),i.unbindEvents();n.dom.container.id.match(/^MixItUp/)&&n.dom.container.removeAttribute("id"),delete e.instances[n.id],n.callActions("afterDestroy",arguments)}}),e.IMoveData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.posIn=null,this.posOut=null,this.operation=null,this.callback=null,this.statusChange="",this.duration=-1,this.staggerIndex=-1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.IMoveData),e.IMoveData.prototype=Object.create(e.Base.prototype),e.IMoveData.prototype.constructor=e.IMoveData,e.TargetDom=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.el=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.TargetDom),e.TargetDom.prototype=Object.create(e.Base.prototype),e.TargetDom.prototype.constructor=e.TargetDom,e.Target=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.sortString="",this.mixer=null,this.callback=null,this.isShown=!1,this.isBound=!1,this.isExcluded=!1,this.isInDom=!1,this.handler=null,this.operation=null,this.data=null,this.dom=new e.TargetDom,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Target),e.Target.prototype=Object.create(e.Base.prototype),n.extend(e.Target.prototype,{constructor:e.Target,init:function(t,n,a){var i=this,o="";if(i.callActions("beforeInit",arguments),i.mixer=n,t||(t=i.render(a)),i.cacheDom(t),i.bindEvents(),"none"!==i.dom.el.style.display&&(i.isShown=!0),a&&n.config.data.uidKey){if("undefined"==typeof(o=a[n.config.data.uidKey])||o.toString().length<1)throw new TypeError(e.messages.errorDatasetInvalidUidKey({uidKey:n.config.data.uidKey}));i.id=o,i.data=a,n.cache[o]=i}i.callActions("afterInit",arguments)},render:function(t){var a=this,i=null,o=null,r=null,s="";if(a.callActions("beforeRender",arguments),i=a.callFilters("renderRender",a.mixer.config.render.target,arguments),"function"!=typeof i)throw new TypeError(e.messages.errorDatasetRendererNotSet());return s=i(t),s&&"object"==typeof s&&n.isElement(s)?o=s:"string"==typeof s&&(r=document.createElement("div"),r.innerHTML=s,o=r.firstElementChild),a.callFilters("elRender",o,arguments)},cacheDom:function(t){var e=this;e.callActions("beforeCacheDom",arguments),e.dom.el=t,e.callActions("afterCacheDom",arguments)},getSortString:function(t){var e=this,n=e.dom.el.getAttribute("data-"+t)||"";e.callActions("beforeGetSortString",arguments),n=isNaN(1*n)?n.toLowerCase():1*n,e.sortString=n,e.callActions("afterGetSortString",arguments)},show:function(){var t=this;t.callActions("beforeShow",arguments),t.isShown||(t.dom.el.style.display="",t.isShown=!0),t.callActions("afterShow",arguments)},hide:function(){var t=this;t.callActions("beforeHide",arguments),t.isShown&&(t.dom.el.style.display="none",t.isShown=!1),t.callActions("afterHide",arguments)},move:function(t){var e=this;e.callActions("beforeMove",arguments),e.isExcluded||e.mixer.targetsMoved++,e.applyStylesIn(t),requestAnimationFrame(function(){e.applyStylesOut(t)}),e.callActions("afterMove",arguments)},applyTween:function(t,n){var a=this,i="",o=null,r=t.posIn,s=[],l=new e.StyleData,c=-1;for(a.callActions("beforeApplyTween",arguments),l.x=r.x,l.y=r.y,0===n?a.hide():a.isShown||a.show(),c=0;i=e.features.TWEENABLE[c];c++)if(o=t.tweenData[i],"x"===i){if(!o)continue;l.x=r.x+o*n}else if("y"===i){if(!o)continue;l.y=r.y+o*n}else if(o instanceof e.TransformData){if(!o.value)continue;l[i].value=r[i].value+o.value*n,l[i].unit=o.unit,s.push(i+"("+l[i].value+o.unit+")")}else{if(!o)continue;l[i]=r[i]+o*n,a.dom.el.style[i]=l[i]}(l.x||l.y)&&s.unshift("translate("+l.x+"px, "+l.y+"px)"),s.length&&(a.dom.el.style[e.features.transformProp]=s.join(" ")),a.callActions("afterApplyTween",arguments)},applyStylesIn:function(t){var n=this,a=t.posIn,i=1!==n.mixer.effectsIn.opacity,o=[];n.callActions("beforeApplyStylesIn",arguments),o.push("translate("+a.x+"px, "+a.y+"px)"),n.mixer.config.animation.animateResizeTargets&&("show"!==t.statusChange&&(n.dom.el.style.width=a.width+"px",n.dom.el.style.height=a.height+"px"),n.dom.el.style.marginRight=a.marginRight+"px",n.dom.el.style.marginBottom=a.marginBottom+"px"),i&&(n.dom.el.style.opacity=a.opacity),"show"===t.statusChange&&(o=o.concat(n.mixer.transformIn)),n.dom.el.style[e.features.transformProp]=o.join(" "),n.callActions("afterApplyStylesIn",arguments)},applyStylesOut:function(t){var n=this,a=[],i=[],o=n.mixer.config.animation.animateResizeTargets,r="undefined"!=typeof n.mixer.effectsIn.opacity;if(n.callActions("beforeApplyStylesOut",arguments),a.push(n.writeTransitionRule(e.features.transformRule,t.staggerIndex)),"none"!==t.statusChange&&a.push(n.writeTransitionRule("opacity",t.staggerIndex,t.duration)),o&&(a.push(n.writeTransitionRule("width",t.staggerIndex,t.duration)),a.push(n.writeTransitionRule("height",t.staggerIndex,t.duration)),a.push(n.writeTransitionRule("margin",t.staggerIndex,t.duration))),!t.callback)return n.mixer.targetsImmovable++,void(n.mixer.targetsMoved===n.mixer.targetsImmovable&&n.mixer.cleanUp(t.operation));switch(n.operation=t.operation,n.callback=t.callback,!n.isExcluded&&n.mixer.targetsBound++,n.isBound=!0,n.applyTransition(a),o&&t.posOut.width>0&&t.posOut.height>0&&(n.dom.el.style.width=t.posOut.width+"px",n.dom.el.style.height=t.posOut.height+"px",n.dom.el.style.marginRight=t.posOut.marginRight+"px",n.dom.el.style.marginBottom=t.posOut.marginBottom+"px"),n.mixer.config.animation.nudge||"hide"!==t.statusChange||i.push("translate("+t.posOut.x+"px, "+t.posOut.y+"px)"),t.statusChange){case"hide":r&&(n.dom.el.style.opacity=n.mixer.effectsOut.opacity),i=i.concat(n.mixer.transformOut);break;case"show":r&&(n.dom.el.style.opacity=1)}(n.mixer.config.animation.nudge||!n.mixer.config.animation.nudge&&"hide"!==t.statusChange)&&i.push("translate("+t.posOut.x+"px, "+t.posOut.y+"px)"),n.dom.el.style[e.features.transformProp]=i.join(" "),n.callActions("afterApplyStylesOut",arguments)},writeTransitionRule:function(t,e,n){var a=this,i=a.getDelay(e),o="";return o=t+" "+(n>0?n:a.mixer.config.animation.duration)+"ms "+i+"ms "+("opacity"===t?"linear":a.mixer.config.animation.easing),a.callFilters("ruleWriteTransitionRule",o,arguments)},getDelay:function(t){var e=this,n=-1;return"function"==typeof e.mixer.config.animation.staggerSequence&&(t=e.mixer.config.animation.staggerSequence.call(e,t,e.state)),n=e.mixer.staggerDuration?t*e.mixer.staggerDuration:0,e.callFilters("delayGetDelay",n,arguments)},applyTransition:function(t){var n=this,a=t.join(", ");n.callActions("beforeApplyTransition",arguments),n.dom.el.style[e.features.transitionProp]=a,n.callActions("afterApplyTransition",arguments)},handleTransitionEnd:function(t){var e=this,n=t.propertyName,a=e.mixer.config.animation.animateResizeTargets;e.callActions("beforeHandleTransitionEnd",arguments),e.isBound&&t.target.matches(e.mixer.config.selectors.target)&&(n.indexOf("transform")>-1||n.indexOf("opacity")>-1||a&&n.indexOf("height")>-1||a&&n.indexOf("width")>-1||a&&n.indexOf("margin")>-1)&&(e.callback.call(e,e.operation),e.isBound=!1,e.callback=null,e.operation=null),e.callActions("afterHandleTransitionEnd",arguments)},eventBus:function(t){var e=this;switch(e.callActions("beforeEventBus",arguments),t.type){case"webkitTransitionEnd":case"transitionend":e.handleTransitionEnd(t)}e.callActions("afterEventBus",arguments)},unbindEvents:function(){var t=this;t.callActions("beforeUnbindEvents",arguments),n.off(t.dom.el,"webkitTransitionEnd",t.handler),n.off(t.dom.el,"transitionend",t.handler),t.callActions("afterUnbindEvents",arguments)},bindEvents:function(){var t=this,a="";t.callActions("beforeBindEvents",arguments),a="webkit"===e.features.transitionPrefix?"webkitTransitionEnd":"transitionend",t.handler=function(e){return t.eventBus(e)},n.on(t.dom.el,a,t.handler),t.callActions("afterBindEvents",arguments)},getPosData:function(n){var a=this,i={},o=null,r=new e.StyleData;return a.callActions("beforeGetPosData",arguments),r.x=a.dom.el.offsetLeft,r.y=a.dom.el.offsetTop,(a.mixer.config.animation.animateResizeTargets||n)&&(o=a.dom.el.getBoundingClientRect(),r.top=o.top,r.right=o.right,r.bottom=o.bottom,r.left=o.left,r.width=o.width,r.height=o.height),a.mixer.config.animation.animateResizeTargets&&(i=t.getComputedStyle(a.dom.el),r.marginBottom=parseFloat(i.marginBottom),r.marginRight=parseFloat(i.marginRight)),a.callFilters("posDataGetPosData",r,arguments)},cleanUp:function(){var t=this;t.callActions("beforeCleanUp",arguments),t.dom.el.style[e.features.transformProp]="",t.dom.el.style[e.features.transitionProp]="",t.dom.el.style.opacity="",t.mixer.config.animation.animateResizeTargets&&(t.dom.el.style.width="",t.dom.el.style.height="",t.dom.el.style.marginRight="",t.dom.el.style.marginBottom=""),t.callActions("afterCleanUp",arguments)}}),e.Collection=function(t){var e=null,a=-1;for(this.callActions("beforeConstruct"),a=0;e=t[a];a++)this[a]=e;this.length=t.length,this.callActions("afterConstruct"),n.freeze(this)},e.BaseStatic.call(e.Collection),e.Collection.prototype=Object.create(e.Base.prototype),n.extend(e.Collection.prototype,{constructor:e.Collection,mixitup:function(t){var a=this,i=null,o=Array.prototype.slice.call(arguments),r=[],s=-1;for(this.callActions("beforeMixitup"),o.shift(),s=0;i=a[s];s++)r.push(i[t].apply(i,o));return a.callFilters("promiseMixitup",n.all(r,e.libraries),arguments)}}),e.Operation=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.args=[],this.command=null,this.showPosData=[],this.toHidePosData=[],this.startState=null,this.newState=null,this.docState=null,this.willSort=!1,this.willChangeLayout=!1,this.hasEffect=!1,this.hasFailed=!1,this.triggerElement=null,this.show=[],this.hide=[],this.matching=[],this.toShow=[],this.toHide=[],this.toMove=[],this.toRemove=[],this.startOrder=[],this.newOrder=[],this.startSort=null,this.newSort=null,this.startFilter=null,this.newFilter=null,this.startDataset=null,this.newDataset=null,this.viewportDeltaX=0,this.viewportDeltaY=0,this.startX=0,this.startY=0,this.startHeight=0,this.startWidth=0,this.newX=0,this.newY=0,this.newHeight=0,this.newWidth=0,this.startContainerClassName="",this.startDisplay="",this.newContainerClassName="",this.newDisplay="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Operation),e.Operation.prototype=Object.create(e.Base.prototype),e.Operation.prototype.constructor=e.Operation,e.State=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.activeFilter=null,this.activeSort=null,this.activeContainerClassName="",this.container=null,this.targets=[],this.hide=[],this.show=[],this.matching=[],this.totalTargets=-1,this.totalShow=-1,this.totalHide=-1,this.totalMatching=-1,this.hasFailed=!1,this.triggerElement=null,this.activeDataset=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.State),e.State.prototype=Object.create(e.Base.prototype),e.State.prototype.constructor=e.State,e.UserInstruction=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.command={},this.animate=!1,this.callback=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.UserInstruction),e.UserInstruction.prototype=Object.create(e.Base.prototype),e.UserInstruction.prototype.constructor=e.UserInstruction,e.Messages=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.ERROR_FACTORY_INVALID_CONTAINER="[MixItUp] An invalid selector or element reference was passed to the mixitup factory function",this.ERROR_FACTORY_CONTAINER_NOT_FOUND="[MixItUp] The provided selector yielded no container element",this.ERROR_CONFIG_INVALID_ANIMATION_EFFECTS="[MixItUp] Invalid value for `animation.effects`",this.ERROR_CONFIG_INVALID_CONTROLS_SCOPE="[MixItUp] Invalid value for `controls.scope`",this.ERROR_CONFIG_INVALID_PROPERTY='[MixitUp] Invalid configuration object property "${erroneous}"${suggestion}',this.ERROR_CONFIG_INVALID_PROPERTY_SUGGESTION='. Did you mean "${probableMatch}"?',this.ERROR_CONFIG_DATA_UID_KEY_NOT_SET="[MixItUp] To use the dataset API, a UID key must be specified using `data.uidKey`",this.ERROR_DATASET_INVALID_UID_KEY='[MixItUp] The specified UID key "${uidKey}" is not present on one or more dataset items',this.ERROR_DATASET_DUPLICATE_UID='[MixItUp] The UID "${uid}" was found on two or more dataset items. UIDs must be unique.',this.ERROR_INSERT_INVALID_ARGUMENTS="[MixItUp] Please provider either an index or a sibling and position to insert, not both",this.ERROR_INSERT_PREEXISTING_ELEMENT="[MixItUp] An element to be inserted already exists in the container",this.ERROR_FILTER_INVALID_ARGUMENTS="[MixItUp] Please provide either a selector or collection `.filter()`, not both",this.ERROR_DATASET_NOT_SET="[MixItUp] To use the dataset API with pre-rendered targets, a starting dataset must be set using `load.dataset`",this.ERROR_DATASET_PRERENDERED_MISMATCH="[MixItUp] `load.dataset` does not match pre-rendered targets",this.ERROR_DATASET_RENDERER_NOT_SET="[MixItUp] To insert an element via the dataset API, a target renderer function must be provided to `render.target`",this.ERROR_SORT_NON_EXISTENT_ELEMENT="[MixItUp] An element to be sorted does not already exist in the container",this.WARNING_FACTORY_PREEXISTING_INSTANCE="[MixItUp] WARNING: This element already has an active MixItUp instance. The provided configuration object will be ignored. If you wish to perform additional methods on this instance, please create a reference.",this.WARNING_INSERT_NO_ELEMENTS="[MixItUp] WARNING: No valid elements were passed to `.insert()`",this.WARNING_REMOVE_NO_ELEMENTS="[MixItUp] WARNING: No valid elements were passed to `.remove()`",this.WARNING_MULTIMIX_INSTANCE_QUEUE_FULL="[MixItUp] WARNING: An operation was requested but the MixItUp instance was busy. The operation was rejected because the queue is full or queuing is disabled.",this.WARNING_GET_OPERATION_INSTANCE_BUSY="[MixItUp] WARNING: Operations can be be created while the MixItUp instance is busy.",this.WARNING_NO_PROMISE_IMPLEMENTATION="[MixItUp] WARNING: No Promise implementations could be found. If you wish to use promises with MixItUp please install an ES6 Promise polyfill.",this.WARNING_INCONSISTENT_SORTING_ATTRIBUTES='[MixItUp] WARNING: The requested sorting data attribute "${attribute}" was not present on one or more target elements which may product unexpected sort output',this.callActions("afterConstruct"),this.compileTemplates(),n.seal(this)},e.BaseStatic.call(e.Messages),e.Messages.prototype=Object.create(e.Base.prototype),e.Messages.prototype.constructor=e.Messages,e.Messages.prototype.compileTemplates=function(){var t="",e="";for(t in this)"string"==typeof(e=this[t])&&(this[n.camelCase(t)]=n.template(e))},e.messages=new e.Messages,e.Facade=function(t){e.Base.call(this),this.callActions("beforeConstruct",arguments),this.configure=t.configure.bind(t),this.show=t.show.bind(t),this.hide=t.hide.bind(t),this.filter=t.filter.bind(t),this.toggleOn=t.toggleOn.bind(t),this.toggleOff=t.toggleOff.bind(t),this.sort=t.sort.bind(t),this.changeLayout=t.changeLayout.bind(t),this.multimix=t.multimix.bind(t),this.dataset=t.dataset.bind(t),this.tween=t.tween.bind(t),this.insert=t.insert.bind(t),this.insertBefore=t.insertBefore.bind(t),this.insertAfter=t.insertAfter.bind(t),this.prepend=t.prepend.bind(t),this.append=t.append.bind(t),this.remove=t.remove.bind(t),this.destroy=t.destroy.bind(t),this.forceRefresh=t.forceRefresh.bind(t),this.forceRender=t.forceRender.bind(t),this.isMixing=t.isMixing.bind(t),this.getOperation=t.getOperation.bind(t),this.getConfig=t.getConfig.bind(t),this.getState=t.getState.bind(t),this.callActions("afterConstruct",arguments),n.freeze(this),n.seal(this)},e.BaseStatic.call(e.Facade),e.Facade.prototype=Object.create(e.Base.prototype),e.Facade.prototype.constructor=e.Facade,"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):"undefined"!=typeof t.mixitup&&"function"==typeof t.mixitup||(t.mixitup=e),e.BaseStatic.call(e.constructor),e.NAME="mixitup",e.CORE_VERSION="3.3.
1651"}(window);
166;
167
168/* mixitup-multifilter.min.js */
169/**!
170 * MixItUp MultiFilter v3.3.4
171 * A UI-builder for powerful multidimensional filtering
172 * Build 6bbb142d-9851-4ca8-b6d4-f760362d93ec
173 *
174 * Requires mixitup.js >= v^3.1.2
175 *
176 * @copyright Copyright 2014-2018 KunkaLabs Limited.
177 * @author    KunkaLabs Limited.
178 * @link      https://www.kunkalabs.com/mixitup-multifilter/
179 *
180 * @license   Commercial use requires a commercial license.
181 *            https://www.kunkalabs.com/mixitup-multifilter/licenses/
182 *
183 *            Non-commercial use permitted under same terms as  license.
184 *            http://creativecommons.org/licenses/by-nc/3.0/
185 */
186!function(u){"use strict";var e=function(u){var t,i=u.h;if(t=[["A",/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g],["AA",/[\uA732]/g],["AE",/[\u00C6\u01FC\u01E2]/g],["AO",/[\uA734]/g],["AU",/[\uA736]/g],["AV",/[\uA738\uA73A]/g],["AY",/[\uA73C]/g],["B",/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g],["C",/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g],["D",/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g],["DZ",/[\u01F1\u01C4]/g],["Dz",/[\u01F2\u01C5]/g],["E",/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g],["F",/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g],["G",/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g],["H",/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g],["I",/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g],["J",/[\u004A\u24BF\uFF2A\u0134\u0248]/g],["K",/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g],["L",/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g],["LJ",/[\u01C7]/g],["Lj",/[\u01C8]/g],["M",/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g],["N",/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g],["NJ",/[\u01CA]/g],["Nj",/[\u01CB]/g],["O",/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g],["OI",/[\u01A2]/g],["OO",/[\uA74E]/g],["OU",/[\u0222]/g],["P",/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g],["Q",/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g],["R",/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g],["S",/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u
vendor: 21,066 bytes, lines 186-443
186015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g],["T",/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g],["TZ",/[\uA728]/g],["U",/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g],["V",/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g],["VY",/[\uA760]/g],["W",/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g],["X",/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g],["Y",/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g],["Z",/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g],["a",/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g],["aa",/[\uA733]/g],["ae",/[\u00E6\u01FD\u01E3]/g],["ao",/[\uA735]/g],["au",/[\uA737]/g],["av",/[\uA739\uA73B]/g],["ay",/[\uA73D]/g],["b",/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g],["c",/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g],["d",/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g],["dz",/[\u01F3\u01C6]/g],["e",/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g],["f",/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g],["g",/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g],["h",/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g],["hv",/[\u0195]/g],["i",/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g],["j",/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g],["k",/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g],["l",/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g],["lj",/[\u01C9]/g],["m",/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g],["n",/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g],["nj",/[\u01CC]/g],["o",/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g],["oi",/[\u01A3]/g],["ou",/[\u0223]/g],["oo",/[\uA74F]/g],["p",/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g],["q",/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g],["r",/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g],["s",/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g],["t",/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g],["tz",/[\uA729]/g],["u",/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g],["v",/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g],["vy",/[\uA761]/g],["w",/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g],["x",/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g],["y",/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g],["z",/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g]],!u.CORE_VERSION||!i.compareVersions(e.REQUIRE_CORE_VERSION,u.CORE_VERSION))throw new Error("[MixItUp Multifilter] MixItUp Multifilter v"+e.EXTENSION_VERSION+" requires at least MixItUp v"+e.REQUIRE_CORE_VERSION);u.ConfigCallbacks.registerAction("afterConstruct","multifilter",function(){this.onParseFilterGroups=null}),u.ConfigMultifilter=function(){this.enable=!1,this.logicWithinGroup="or",this.logicBetweenGroups="and",this.minSearchLength=3,this.parseOn="change",this.keyupThrottleDuration=350,i.seal(this)},u.Config.registerAction("beforeConstruct","multifilter",function(){this.multifilter=new u.ConfigMultifilter}),u.MultifilterFormEventTracker=function(){this.form=null,this.totalBound=0,this.totalHandled=0,i.seal(this)},u.FilterGroupDom=function(){this.el=null,this.form=null,i.seal(this)},u.FilterGroup=function(){this.name="",this.dom=new u.FilterGroupDom,this.activeSelectors=[],this.activeFilters=[],this.activeToggles=[],this.handler=null,this.mixer=null,this.logic="or",this.parseOn="change",this.keyupTimeout=-1,i.seal(this)},i.extend(u.FilterGroup.prototype,{init:function(u,e){var t=this,i=u.getAttribute("data-logic");t.dom.el=u,this.name=t.dom.el.getAttribute("data-filter-group")||"",t.cacheDom(),t.dom.form&&t.enableButtons(),t.mixer=e,(i&&"and"===i.toLowerCase()||"and"===e.config.multifilter.logicWithinGroup)&&(t.logic="and"),t.bindEvents()},cacheDom:function(){var u=this;u.dom.form=i.closestParent(u.dom.el,"form",!0)},enableButtons:function(){var u=this,e=u.dom.form.querySelectorAll('button[type="submit"]:disabled'),t=null,i=-1;for(i=0;t=e[i];i++)t.disabled&&(t.disabled=!1)},bindEvents:function(){var u=this;u.handler=function(e){switch(e.type){case"reset":case"submit":u.handleFormEvent(e);break;default:u["handle"+i.pascalCase(e.type)](e)}},i.on(u.dom.el,"click",u.handler),i.on(u.dom.el,"change",u.handler),i.on(u.dom.el,"keyup",u.handler),u.dom.form&&(i.on(u.dom.form,"reset",u.handler),i.on(u.dom.form,"submit",u.handler))},unbindEvents:function(){var u=this;i.off(u.dom.el,"click",u.handler),i.off(u.dom.el,"change",u.handler),i.off(u.dom.el,"keyup",u.handler),u.dom.form&&(i.off(u.dom.form,"reset",u.handler),i.off(u.dom.form,"submit",u.handler)),u.handler=null},handleClick:function(u){var e=this,t=e.mixer,r=null,l=i.closestParent(u.target,"[data-filter], [data-toggle]",!0),o="",n=-1,E="";l&&((o=e.mixer.config.selectors.control)&&!l.matches(o)||(u.stopPropagation(),t.lastClicked||(t.lastClicked=l),"function"==typeof t.config.callbacks.onMixClick&&(r=t.config.callbacks.onMixClick.call(t.lastClicked,t.state,u,e),r===!1)||(l.matches("[data-filter]")?(E=l.getAttribute("data-filter"),e.activeToggles=[],e.activeSelectors=e.activeFilters=[E]):l.matches("[data-toggle]")&&(E=l.getAttribute("data-toggle"),e.activeFilters=[],(n=e.activeToggles.indexOf(E))>-1?e.activeToggles.splice(n,1):e.activeToggles.push(E),"and"===e.logic?e.activeSelectors=[e.activeToggles]:e.activeSelectors=e.activeToggles),e.updateControls(),"change"===e.mixer.config.multifilter.parseOn&&e.mixer.parseFilterGroups())))},handleChange:function(u){var e=this,t=u.target;switch(u.stopPropagation(),t.type){case"text":case"search":case"email":case"select-one":case"radio":e.getSingleValue(t);break;case"checkbox":case"select-multiple":e.getMultipleValues(t)}"change"===e.mixer.config.multifilter.parseOn&&e.mixer.parseFilterGroups()},handleKeyup:function(u){var e=this,t=u.target;if(!(["text","search","email"].indexOf(t.type)<0)){if("change"!==e.mixer.config.multifilter.parseOn)return void e.mixer.getSingleValue(t);clearTimeout(e.keyupTimeout),e.keyupTimeout=setTimeout(function(){e.getSingleValue(t),e.mixer.parseFilterGroups()},e.mixer.config.multifilter.keyupThrottleDuration)}},handleFormEvent:function(e){var t=this,i=null,r=null,l=-1;if("submit"===e.type&&e.preventDefault(),"reset"===e.type&&(t.activeFilters=t.activeToggles=t.activeSelectors=[],t.updateControls()),t.mixer.multifilterFormEventTracker)i=t.mixer.multifilterFormEventTracker;else for(i=t.mixer.multifilterFormEventTracker=new u.MultifilterFormEventTracker,i.form=e.target,l=0;r=t.mixer.filterGroups[l];l++)r.dom.form===e.target&&i.totalBound++;e.target===i.form&&(i.totalHandled++,i.totalHandled===i.totalBound&&(t.mixer.multifilterFormEventTracker=null,"submit"!==e.type&&"change"!==t.mixer.config.multifilter.parseOn||t.mixer.parseFilterGroups()))},getSingleValue:function(u){var e=this,i=null,r="",l="",o="",n=-1;if(u.type.match(/text|search|email/g)){if(r=u.getAttribute("data-search-attribute"),!r)throw new Error("[MixItUp MultiFilter] A valid `data-search-attribute` must be present on text inputs");if(u.value.length<e.mixer.config.multifilter.minSearchLength)return void(e.activeSelectors=e.activeFilters=e.activeToggles=[""]);for(o=u.value.toLowerCase().trim(),n=0;i=t[n];n++)o=o.replace(i[1],i[0]);o=o.replace(/\W+/g," "),l="["+r+'*="'+o+'"]'}else l=u.value;"string"==typeof u.value&&(e.activeSelectors=e.activeToggles=e.activeFilters=l?[l]:[])},getMultipleValues:function(u){var e=this,t=[],i="",r=null,l=null,o=-1;switch(u.type){case"checkbox":i='input[type="checkbox"]';break;case"select-multiple":i="option"}for(l=e.dom.el.querySelectorAll(i),o=0;r=l[o];o++)(r.checked||r.selected)&&r.value&&t.push(r.value);e.activeFilters=[],e.activeToggles=t,"and"===e.logic?e.activeSelectors=[t]:e.activeSelectors=t},updateControls:function(u){var e=this,t=null,i="",r="",l="",o=-1;for(i=e.mixer.config.selectors.control.trim(),r=["[data-filter]"+i,"[data-toggle]"+i].join(", "),u=u||e.dom.el.querySelectorAll(r),o=0;t=u[o];o++)l=Boolean(t.getAttribute("data-toggle"))?"toggle":"filter",e.updateControl(t,l)},updateControl:function(u,e){var t=this,r=u.getAttribute("data-"+e),l=t.activeToggles.concat(t.activeFilters),o="";o=i.getClassname(t.mixer.config.classNames,e,t.mixer.config.classNames.modifierActive),l.indexOf(r)>-1?i.addClass(u,o):i.removeClass(u,o)},updateUi:function(){var u=this,e=u.dom.el.querySelectorAll("[data-filter], [data-toggle]"),t=u.dom.el.querySelectorAll('input[type="radio"], input[type="checkbox"], option'),i=u.activeToggles.concat(u.activeFilters),r=!1,l=null,o=-1;for(e.length&&u.updateControls(e,!0),o=0;l=t[o];o++)switch(r=i.indexOf(l.value)>-1,l.tagName.toLowerCase()){case"option":l.selected=r;break;case"input":l.checked=r}}}),u.MixerDom.registerAction("afterConstruct","multifilter",function(){this.filterGroups=[]}),u.Mixer.registerAction("afterConstruct","multifilter",function(){this.filterGroups=[],this.filterGroupsHash={},this.multifilterFormEventTracker=null}),u.Mixer.registerAction("afterCacheDom","multifilter",function(){var e=this,t=null;if(e.config.multifilter.enable){switch(e.config.controls.scope){case"local":t=e.dom.container;break;case"global":t=e.dom.document;break;default:throw new Error(u.messages.ERROR_CONFIG_INVALID_CONTROLS_SCOPE)}e.dom.filterGroups=t.querySelectorAll("[data-filter-group]")}}),u.Mixer.registerAction("beforeInitControls","multifilter",function(){var u=this;u.config.multifilter.enable&&(u.config.controls.live=!0)}),u.Mixer.registerAction("afterSanitizeConfig","multifilter",function(){var u=this;u.config.multifilter.logicBetweenGroups=u.config.multifilter.logicBetweenGroups.toLowerCase().trim(),u.config.multifilter.logicWithinGroup=u.config.multifilter.logicWithinGroup.toLowerCase().trim()}),u.Mixer.registerAction("afterAttach","multifilter",function(){var u=this;u.dom.filterGroups.length&&u.indexFilterGroups()}),u.Mixer.registerAction("afterUpdateControls","multifilter",function(){var u=this,e=null,t=-1;for(t=0;e=u.filterGroups[t];t++)e.updateControls()}),u.Mixer.registerAction("beforeDestroy","multifilter",function(){var u=this,e=null,t=-1;for(t=0;e=u.filterGroups[t];t++)e.unbindEvents()}),u.Mixer.extend({indexFilterGroups:function(){var e=this,t=null,i=null,r=-1;for(r=0;i=e.dom.filterGroups[r];r++)if(t=new u.FilterGroup,t.init(i,e),e.filterGroups.push(t),t.name){if("undefined"!=typeof e.filterGroupsHash[t.name])throw new Error('[MixItUp MultiFilter] A filter group with name "'+t.name+'" already exists');e.filterGroupsHash[t.name]=t}},parseParseFilterGroupsArgs:function(e){var t=this,r=new u.UserInstruction,l=null,o=-1;for(r.animate=t.config.animation.enable,r.command=new u.CommandFilter,o=0;o<e.length;o++)l=e[o],"boolean"==typeof l?r.animate=l:"function"==typeof l&&(r.callback=l);return i.freeze(r),r},getFilterGroupPaths:function(){var u=this,e=null,t=null,r=null,l=[],o=[],n=[],E=-1;for(E=0;E<u.filterGroups.length;E++)(r=u.filterGroups[E].activeSelectors).length&&(l.push(r),n.push(0));return e=function(){var u=null,e=[],t=-1;for(t=0;t<l.length;t++)u=l[t][n[t]],Array.isArray(u)&&(u=u.join("")),e.push(u);e=i.clean(e),o.push(e)},t=function(u){u=u||0;for(var i=l[u];n[u]<i.length;)u<l.length-1?t(u+1):e(),n[u]++;n[u]=0},l.length?(t(),o):""},buildSelectorFromPaths:function(u){var e=this,t=null,i=[],r="",l="",o=-1;if(!u.length)return"";if("or"===e.config.multifilter.logicBetweenGroups&&(l=", "),u.length>1){for(o=0;o<u.length;o++)t=u[o],r=t.join(l),i.indexOf(r)<0&&i.push(r);return i.join(", ")}return u[0].join(l)},parseFilterGroups:function(){var u=this,e=u.parseFilterArgs(arguments),t=u.getFilterGroupPaths(),i=u.buildSelectorFromPaths(t),r=null,l={};return""===i&&(i=u.config.controls.toggleDefault),e.command.selector=i,l.filter=e.command,"function"==typeof(r=u.config.callbacks.onParseFilterGroups)&&(l=r(l)),u.multimix(l,e.animate,e.callback)},setFilterGroupSelectors:function(u,e){var t=this,i=null;if(e=Array.isArray(e)?e:[e],"undefined"==typeof(i=t.filterGroupsHash[u]))throw new Error('[MixItUp MultiFilter] No filter group could be found with the name "'+u+'"');i.activeToggles=e.slice(),"and"===i.logic?i.activeSelectors=[i.activeToggles]:i.activeSelectors=i.activeToggles,i.updateUi(i.activeToggles)},getFilterGroupSelectors:function(u){var e=this,t=null;if("undefined"==typeof(t=e.filterGroupsHash[u]))throw new Error('[MixItUp MultiFilter] No filter group could be found with the name "'+u+'"');return t.activeToggles.slice()}}),u.Facade.registerAction("afterConstruct","multifilter",function(u){this.parseFilterGroups=u.parseFilterGroups.bind(u),this.setFilterGroupSelectors=u.setFilterGroupSelectors.bind(u),this.getFilterGroupSelectors=u.getFilterGroupSelectors.bind(u)})};if(e.TYPE="mixitup-extension",e.NAME="mixitup-multifilter",e.EXTENSION_VERSION="3.3.4",e.REQUIRE_CORE_VERSION="^3.1.2","object"==typeof exports&&"object"==typeof module)module.exports=e;else if("function"==typeof define&&define.amd)define(function(){return e});else{if(!u.mixitup||"function"!=typeof u.mixitup)throw new Error("[MixItUp MultiFilter] MixItUp core not found");e(u.mixitup)}}(window);
187
188;
189
190/* jquery.scrollme.js */
191// - upgrade 321
192
193function classToData () {
194	$('.animateme').each(function() {
195
196		//var classes = $(this).attr('class');
197		//console.log(classes)
198
199		var dataClasses = $(this).attr('class');
200
201		var array321 = dataClasses.split(" ");
202		var text = "";
203		var i = 0;
204		for (i = 0; i < array321.length; ++i) {
205
206			var arrayItem = array321[i];
207
208			if(arrayItem.indexOf('data-') > -1){
209
210				array2 = arrayItem.split(";");
211
212
213				dataName = array2[0];
214				dataValue = array2[1];
215
216				text = text + dataName + "=" + dataValue + ",";
217				$(this).attr(dataName,dataValue);
218			   }
219
220		}
221
222	});
223}
224
225
226// ----------------------------------------------------------------------------------------------------
227// ScrollMe
228// A jQuery plugin for adding simple scrolling effects to web pages
229// http://scrollme.nckprsn.com
230// ----------------------------------------------------------------------------------------------------
231
232var scrollme = ( function( $ )
233{
234	// ----------------------------------------------------------------------------------------------------
235	// ScrollMe object
236
237	var _this = {};
238
239	// ----------------------------------------------------------------------------------------------------
240	// Properties
241
242	var $document = $( document );
243	var $window = $( window );
244
245	_this.body_height = 0;
246
247	_this.viewport_height = 0;
248
249	_this.viewport_top = 0;
250	_this.viewport_bottom = 0;
251
252	_this.viewport_top_previous = -1;
253
254	_this.elements = [];
255	_this.elements_in_view = [];
256
257	_this.property_defaults =
258	{
259		'opacity' : 1,
260		'translatex' : 0,
261		'translatey' : 0,
262		'translatez' : 0,
263		'rotatex' : 0,
264		'rotatey' : 0,
265		'rotatez' : 0,
266		'scale' : 1,
267		'scalex' : 1,
268		'scaley' : 1,
269		'scalez' : 1
270	};
271
272	_this.scrollme_selector = '.scrollme';
273	_this.animateme_selector = '.animateme';
274
275	_this.update_interval = 10;
276
277	// Easing functions
278
279	_this.easing_functions =
280	{
281		'linear' : function( x )
282		{
283			return x;
284		},
285
286		'easeout' : function( x )
287		{
288			return x * x * x;
289		},
290
291		'easein' : function( x )
292		{
293			x = 1 - x;
294			return 1 - ( x * x * x );
295		},
296
297		'easeinout' : function( x )
298		{
299			if( x < 0.5 )
300			{
301				return ( 4 * x * x * x );
302			}
303			else
304			{
305				x = 1 - x;
306				return 1 - ( 4 * x * x * x ) ;
307			}
308		}
309	};
310
311	// Document events to bind initialisation to
312
313	_this.init_events =
314	[
315		'load',
316		'DOMContentLoaded',
317		'page:load', // Turbolinks
318		'page:change' // Turbolinks
319	];
320
321	// ----------------------------------------------------------------------------------------------------
322	// Initialisation conditions
323
324	_this.init_if = function() { return true; }
325
326	// ----------------------------------------------------------------------------------------------------
327	// Initialisation
328
329	_this.init = function()
330	{
331		// Cancel if initialisation conditions not met
332
333		if( !_this.init_if() ) return false;
334
335		// Load all elements to animate
336
337		_this.init_elements();
338
339		// Get element & viewport sizes
340
341		_this.on_resize();
342
343		// Recalculate heights & positions on resize and rotate
344
345		$window.on( 'resize orientationchange' , function(){ _this.on_resize(); } );
346
347		// Recalculate heights & positions when page is fully loaded + a bit just in case
348
349		$window.on('load', function(){ setTimeout( function(){ _this.on_resize(); } , 100 ) });
350
351		// Start animating
352
353		setInterval( _this.update , _this.update_interval );
354
355		return true;
356	}
357 	// ----------------------------------------------------------------------------------------------------
358
359	// destroy
360
361	_this.destroy = function()
362	{
363    clearInterval(_this.animateInterval);
364    $window.off( 'resize orientationchange' ,  _this.cbOnResize );
365      _this.elements = [];
366    _this.elements_in_view = [];
367  }
368
369	// ----------------------------------------------------------------------------------------------------
370	// Get list and pre-load animated elements
371
372	_this.init_elements = function()
373	{
374		// For each reference element
375
376		$( _this.scrollme_selector ).each( function()
377		{
378			var element = {};
379
380			element.element = $( this );
381
382			var effects = [];
383
384			// For each animated element
385
386			$( this ).find( _this.animateme_selector ).addBack( _this.animateme_selector ).each( function()
387			{
388				// Get effect details
389
390				var effect = {};
391
392				effect.element = $( this );
393
394				effect.when = effect.element.data( 'when' );
395				effect.from = effect.element.data( 'from' );
396				effect.to = effect.element.data( 'to' );
397
398				if( effect.element.is( '[data-crop]' ) )
399				{
400					effect.crop = effect.element.data( 'crop' );
401				}
402				else
403				{
404					effect.crop = false;
405				}
406
407				if( effect.element.is( '[data-easing]' ) )
408				{
409					effect.easing = _this.easing_functions[ effect.element.data( 'easing' ) ]
410				}
411				else
412				{
413					effect.easing = _this.easing_functions[ 'easeout' ];
414				}
415
416				// Get animated properties
417
418				var properties = {};
419
420				if( effect.element.is( '[data-opacity]' ) )    properties.opacity    = effect.element.data( 'opacity' );
421				if( effect.element.is( '[data-translatex]' ) ) properties.translatex = effect.element.data( 'translatex' );
422				if( effect.element.is( '[data-translatey]' ) ) properties.translatey = effect.element.data( 'translatey' );
423				if( effect.element.is( '[data-translatez]' ) ) properties.translatez = effect.element.data( 'translatez' );
424				if( effect.element.is( '[data-rotatex]' ) )    properties.rotatex    = effect.element.data( 'rotatex' );
425				if( effect.element.is( '[data-rotatey]' ) )    properties.rotatey    = effect.element.data( 'rotatey' );
426				if( effect.element.is( '[data-rotatez]' ) )    properties.rotatez    = effect.element.data( 'rotatez' );
427				if( effect.element.is( '[data-scale]' ) )      properties.scale      = effect.element.data( 'scale' );
428				if( effect.element.is( '[data-scalex]' ) )     properties.scalex     = effect.element.data( 'scalex' );
429				if( effect.element.is( '[data-scaley]' ) )     properties.scaley     = effect.element.data( 'scaley' );
430				if( effect.element.is( '[data-scalez]' ) )     properties.scalez     = effect.element.data( 'scalez' );
431
432				effect.properties = properties;
433
434				effects.push( effect );
435			});
436
437			element.effects = effects;
438
439			_this.elements.push( element );
440		});
441	}
442
443	// ----------------------------------------------------------------------------------------------------
444	// Update elements
445
446	_this.update = function()
447	{
448		window.requestAnimationFrame( function()
449		{
450			_this.update_viewport_position();
451
452			if( _this.viewport_top_previous != _this.viewport_top )
453			{
454				_this.update_elements_in_view();
455				_this.animate();
456			}
457
458			_this.viewport_top_previous = _this.viewport_top;
459		});
460	}
461
462	// ----------------------------------------------------------------------------------------------------
463	// Animate stuff
464
465	_this.animate = function()
466	{
467		// For each element in viewport
468
469		var elements_in_view_length = _this.elements_in_view.length;
470
471		for( var i=0 ; i<elements_in_view_length ; i++ )
472		{
473			var element = _this.elements_in_view[i];
474
475			// For each effect
476
477			var effects_length = element.effects.length;
478
479			for( var e=0 ; e<effects_length ; e++ )
480			{
481				var effect = element.effects[e];
482
483				// Get effect animation boundaries
484
485				switch( effect.when )
486				{
487					case 'view' : // Maintained for backwards compatibility
488					case 'span' :
489						var start = element.top - _this.viewport_height;
490						var end = element.bottom;
491						break;
492
493					case 'exit' :
494						var start = element.bottom - _this.viewport_height;
495						var end = element.bottom;
496						break;
497
498					default :
499						var start = element.top - _this.viewport_height;
500						var end = element.top;
501						break;
502				}
503
504				// Crop boundaries
505
506				if( effect.crop )
507				{
508					if( start < 0 ) start = 0;
509					if( end > ( _this.body_height - _this.viewport_height ) ) end = _this.body_height - _this.viewport_height;
510				}
511
512				// Get scroll position of reference selector
513
514				var scroll = ( _this.viewport_top - start ) / ( end - start );
515
516				// Get relative scroll position for effect
517
518				var from = effect[ 'from' ];
519				var to = effect[ 'to' ];
520
521				var length = to - from;
522
523				var scroll_relative = ( scroll - from ) / length;
524
525				// Apply easing
526
527				var scroll_eased = effect.easing( scroll_relative );
528
529				// Get new value for each property
530
531				var opacity    = _this.animate_value( scroll , scroll_eased , from , to , effect , 'opacity' );
532				var translatey = _this.animate_value( scroll , scroll_eased , from , to , effect , 'translatey' );
533				var translatex = _this.animate_value( scroll , scroll_eased , from , to , effect , 'translatex' );
534				var translatez = _this.animate_value( scroll , scroll_eased , from , to , effect , 'translatez' );
535				var rotatex    = _this.animate_value( scroll , scroll_eased , from , to , effect , 'rotatex' );
536				var rotatey    = _this.animate_value( scroll , scroll_eased , from , to , effect , 'rotatey' );
537				var rotatez    = _this.animate_value( scroll , scroll_eased , from , to , effect , 'rotatez' );
538				var scale      = _this.animate_value( scroll , scroll_eased , from , to , effect , 'scale' );
539				var scalex     = _this.animate_value( scroll , scroll_eased , from , to , effect , 'scalex' );
540				var scaley     = _this.animate_value( scroll , scroll_eased , from , to , effect , 'scaley' );
541				var scalez     = _this.animate_value( scroll , scroll_eased , from , to , effect , 'scalez' );
542
543				// Override scale values
544
545				if( 'scale' in effect.properties )
546				{
547					scalex = scale;
548					scaley = scale;
549					scalez = scale;
550				}
551
552				// Update properties
553
554				effect.element.css(
555				{
556					'opacity' : opacity,
557					'transform' : 'translate3d( '+translatex+'px , '+translatey+'px , '+translatez+'px ) rotateX( '+rotatex+'deg ) rotateY( '+rotatey+'deg ) rotateZ( '+rotatez+'deg ) scale3d( '+scalex+' , '+scaley+' , '+scalez+' )'
558				} );
559			}
560		}
561	}
562
563	// ----------------------------------------------------------------------------------------------------
564	// Calculate property values
565
566	_this.animate_value = function( scroll , scroll_eased , from , to , effect , property )
567	{
568		var value_default = _this.property_defaults[ property ];
569
570		// Return default value if property is not animated
571
572		if( !( property in effect.properties ) ) return value_default;
573
574		var value_target = effect.properties[ property ];
575
576		var forwards = ( to > from ) ? true : false;
577
578		// Return boundary value if outside effect boundaries
579
580		if( scroll < from && forwards ) { return value_default; }
581		if( scroll > to && forwards ) { return value_target; }
582
583		if( scroll > from && !forwards ) { return value_default; }
584		if( scroll < to && !forwards ) { return value_target; }
585
586		// Calculate new property value
587
588		var new_value = value_default + ( scroll_eased * ( value_target - value_default ) );
589
590		// Round as required
591
592		switch( property )
593		{
594			case 'opacity'    : new_value = new_value.toFixed(2); break;
595			case 'translatex' : new_value = new_value.toFixed(0); break;
596			case 'translatey' : new_value = new_value.toFixed(0); break;
597			case 'translatez' : new_value = new_value.toFixed(0); break;
598			case 'rotatex'    : new_value = new_value.toFixed(1); break;
599			case 'rotatey'    : new_value = new_value.toFixed(1); break;
600			case 'rotatez'    : new_value = new_value.toFixed(1); break;
601			case 'scale'      : new_value = new_value.toFixed(3); break;
602			default : break;
603		}
604
605		// Done
606
607		return new_value;
608	}
609
610	// ----------------------------------------------------------------------------------------------------
611	// Update viewport position
612
613	_this.update_viewport_position = function()
614	{
615		_this.viewport_top = $window.scrollTop();
616		_this.viewport_bottom = _this.viewport_top + _this.viewport_height;
617	}
618
619	// ----------------------------------------------------------------------------------------------------
620	// Update list of elements in view
621
622	_this.update_elements_in_view = function()
623	{
624		_this.elements_in_view = [];
625
626		var elements_length = _this.elements.length;
627
628		for( var i=0 ; i<elements_length ; i++ )
629		{
630			if ( ( _this.elements[i].top < _this.viewport_bottom ) && ( _this.elements[i].bottom > _this.viewport_top ) )
631			{
632				_this.elements_in_view.push( _this.elements[i] );
633			}
634		}
635	}
636
637	// ----------------------------------------------------------------------------------------------------
638	// Stuff to do on resize
639
640	_this.on_resize = function()
641	{
642		// Update viewport/element data
643
644		_this.update_viewport();
645		_this.update_element_heights();
646
647		// Update display
648
649		_this.update_viewport_position();
650		_this.update_elements_in_view();
651		_this.animate();
652	}
653
654	// ----------------------------------------------------------------------------------------------------
655	// Update viewport parameters
656
657	_this.update_viewport = function()
658	{
659		_this.body_height = $document.height();
660		_this.viewport_height = $window.height();
661	}
662
663	// ----------------------------------------------------------------------------------------------------
664	// Update height of animated elements
665
666	_this.update_element_heights = function()
667	{
668		var elements_length = _this.elements.length;
669
670		for( var i=0 ; i<elements_length ; i++ )
671		{
672			var element_height = _this.elements[i].element.outerHeight();
673			var position = _this.elements[i].element.offset();
674
675			_this.elements[i].height = element_height;
676			_this.elements[i].top = position.top;
677			_this.elements[i].bottom = position.top + element_height;
678		}
679	}
680
681	// ----------------------------------------------------------------------------------------------------
682	// Bind initialisation
683
684	$document.one( _this.init_events.join( ' ' ) , function(){ classToData(); _this.init(); });
685
686	// ----------------------------------------------------------------------------------------------------
687
688	return _this;
689
690	// ----------------------------------------------------------------------------------------------------
691
692})( jQuery );
693
694;
695
696/* js-animate.js */
697// Pomocná funkce pro získání hodnoty z class name
698function getValueFromClass(element, attribute) {
699    const classes = element.className.split(' ');
700    for (const className of classes) {
701        if (className.startsWith(attribute + ';')) { 
702            return className.split(';')[1];
703        }
704    }
705    return null; 
706}
707
708// Funkce pro kontrolu, zda se element blíží k viewportu
709function isApproachingViewport(element) {
710    const rect = element.getBoundingClientRect();
711    const windowHeight = window.innerHeight || document.documentElement.clientHeight; 
712    
713    // Přidáme dvojnásobek výšky viewportu jako buffer zónu
714    return (
715        rect.top >= -(windowHeight * 2) &&
716        rect.bottom <= windowHeight * 3
717    );
718}
719
720// Funkce pro výpočet, jak moc je element vycentrovaný
721function getDistanceFromCenter(element) {
722    const rect = element.getBoundingClientRect();
723    const windowHeight = window.innerHeight;
724    
725    // Vypočítáme střed elementu a střed viewportu
726    const elementCenter = rect.top + (rect.height / 2);
727    const viewportCenter = windowHeight / 2;
728    
729    return elementCenter - viewportCenter;
730}
731
732// Set pro sledování inicializovaných elementů
733const initializedElements = new Set();
734
735
736const parallaxElements = window.innerWidth >= 0 ? document.querySelectorAll('.js-animate') : [];
737
738// Proměnná pro sledování, zda je naplánovaná animace
739let ticking = false;
740
741// Funkce pro výpočet parallax efektu
742function updateParallax() {
743    parallaxElements.forEach(element => {
744        if (!isApproachingViewport(element)) {
745            return;
746        }
747        
748        if (!initializedElements.has(element)) {
749            element.classList.add('is-show');
750            const opacity = getValueFromClass(element, 'data-opacity');
751            if (opacity === '0') {
752                element.style.opacity = '0';
753            }
754            initializedElements.add(element);
755        }
756        
757        const speed = getValueFromClass(element, 'data-speed');
758        const direction = getValueFromClass(element, 'data-direction') || 'vertical';
759        const stopAt = getValueFromClass(element, 'data-to');
760        const startFrom = getValueFromClass(element, 'data-from');
761        const opacity = getValueFromClass(element, 'data-opacity');
762        
763        if (!speed) return;
764        
765        const distanceFromCenter = getDistanceFromCenter(element);
766        let movement = distanceFromCenter * parseFloat(speed) * 0.1;
767        
768        if (startFrom === '0' && distanceFromCenter > 0) {
769            movement = 0;
770        }
771        
772        if (stopAt === '0' && distanceFromCenter < 0) {
773            movement = 0;
774        }
775        
776        // Upravený výpočet opacity
777        if (opacity !== null) {
778            const windowHeight = window.innerHeight;
779            const normalizedDistance = Math.abs(distanceFromCenter) / (windowHeight / 4);
780            let opacityValue = Math.max(0, Math.min(1, 1 - normalizedDistance));
781            
782            // Pro data-opacity;0
783            if (opacity === '0') {
784                // Pokud máme data-to;0 a jsme pod středem obrazovky,
785                // zachováme plnou viditelnost
786                if (stopAt === '0' && distanceFromCenter < 0) {
787                    opacityValue = 1;
788                }
789                element.style.opacity = opacityValue;
790            } 
791            // Pro data-opacity;1
792            else if (opacity === '1') {
793                element.style.opacity = 1 - opacityValue;
794            }
795        }
796        
797        if (direction === 'horizontal') {
798            element.style.transform = `translate3d(${movement}px, 0px, 0px)`;
799        } else {
800            element.style.transform = `translate3d(0px, ${movement}px, 0px)`;
801        }
802    });
803    
804    // Resetujeme ticking na false, aby mohl být vyvolán další requestAnimationFrame
805    ticking = false;
806}
807
808// OptimalizovanĂ˝ scroll handler s vyuĹľitĂ­m requestAnimationFrame
809function onScroll() {
810    if (!ticking) {
811        // Požádáme o vykreslení v dalším animačním snímku
812        requestAnimationFrame(updateParallax);
813        ticking = true;
814    }
815}
816
817// Přidání event listenerů s passive: true
818window.addEventListener('scroll', onScroll, { passive: true });
819window.addEventListener('resize', onScroll, { passive: true });
820
821// Přidáme také event listener pro touchmove pro mobilní zařízení
822window.addEventListener('touchmove', onScroll, { passive: true });
823
824// Inicializace při načtení stránky
825window.addEventListener('load', () => {
826    // Inicializujeme všechny elementy, které jsou blízko viewportu
827    updateParallax();
828}, { passive: true });
829
830// Pro případ, že jsou obrázky načteny až po události 'load'
831window.addEventListener('DOMContentLoaded', () => {
832    // Kontrola po kompletnĂ­m naÄŤtenĂ­ DOM
833    updateParallax();
834}, { passive: true });
835;
836
837/* scrollablesequence.js */
838// Registrace ServiceWorkeru
839if ('serviceWorker' in navigator) {
840    navigator.serviceWorker.register('/sw.js').then(registration => {
841        //console.log('ServiceWorker registered:', registration);
842    }).catch(error => {
843        //console.log('ServiceWorker registration failed:', error);
844    });
845}
846
847const requestAnimationFrame = window.requestAnimationFrame || 
848    window.mozRequestAnimationFrame || 
849    window.webkitRequestAnimationFrame || 
850    window.msRequestAnimationFrame; 
851
852class EventEmitter {
853    listeners = {}
854    
855    addListener(eventName, fn) {
856        this.listeners[eventName] = this.listeners[eventName] || [];
857        this.listeners[eventName].push(fn);
858        return this;
859    }
860
861    on(eventName, fn) {
862        return this.addListener(eventName, fn);
863    }
864
865    once(eventName, fn) {
866        this.listeners[eventName] = this.listeners[eventName] || [];
867        const onceWrapper = () => {
868            fn();
869            this.off(eventName, onceWrapper);
870        }
871        this.listeners[eventName].push(onceWrapper);
872        return this;
873    }
874
875    off(eventName, fn) {
876        return this.removeListener(eventName, fn);
877    }
878
879    removeListener(eventName, fn) {
880        let lis = this.listeners[eventName];
881        if (!lis) return this;
882        for(let i = lis.length; i > 0; i--) {
883            if (lis[i] === fn) {
884                lis.splice(i,1);
885                break;
886            }
887        }
888        return this;
889    }
890
891    emit(eventName, ...args) {
892        let fns = this.listeners[eventName];
893        if (!fns) return false;
894        fns.forEach((f) => {
895            f(...args);
896        });
897        return true;
898    }
899
900    listenerCount(eventName) {
901        let fns = this.listeners[eventName] || [];
902        return fns.length;
903    }
904
905    rawListeners(eventName) {
906        return this.listeners[eventName];
907    }
908}
909
910class Canvas {
911    constructor(e) {
912        this.images = e.images;
913        this.container = e.container;
914        this.cover = e.cover;
915        this.displayIndex = 0;
916    }
917
918    setup() {
919        this.canvas = document.createElement("canvas");
920        this.container.appendChild(this.canvas);
921        this.ctx = this.canvas.getContext('2d')
922
923        window.addEventListener('resize', () => this.resize());
924        this.resize();
925    }
926
927    renderIndex(e) {
928        if (this.images[e]) {
929            return this.drawImage(e);
930        }
931        
932        // Find closest loaded image
933        for (var t = Number.MAX_SAFE_INTEGER, r = e; r >= 0; r--)
934            if (this.images[r]) {
935                t = r;
936                break
937            }
938        for (var n = Number.MAX_SAFE_INTEGER, i = e, o = this.images.length; i < o; i++)
939            if (this.images[i]) {
940                n = i;
941                break
942            }
943        this.images[t] ? this.drawImage(t) : this.images[n] && this.drawImage(n)
944    }
945
946    drawImage(e) {
947        this.displayIndex = e;
948        this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
949        const x = Math.floor((this.canvas.width - this.images[this.displayIndex].naturalWidth) / 2);
950        const y = Math.floor((this.canvas.height - this.images[this.displayIndex].naturalHeight) / 2);
951        
952        if (this.cover) {
953            this.drawImageCover(this.ctx, this.images[this.displayIndex]);
954        } else {
955            this.ctx.drawImage(this.images[this.displayIndex], x, y);
956        }
957    }
958
959    resize() {
960        const w = this.container.clientWidth;
961        const h = this.container.clientHeight;
962        this.canvas.style.height = `${h}px`;
963        this.canvas.style.width = `${w}px`;
964        this.canvas.height = h;
965        this.canvas.width = w;
966
967        this.renderIndex(this.displayIndex);
968    }
969
970    drawImageCover(ctx, img, x, y, w, h, offsetX, offsetY) {
971        if (arguments.length === 2) {
972            x = y = 0;
973            w = ctx.canvas.width;
974            h = ctx.canvas.height;
975        }
976
977        offsetX = typeof offsetX === "number" ? offsetX : 0.5;
978        offsetY = typeof offsetY === "number" ? offsetY : 0.5;
979
980        if (offsetX < 0) offsetX = 0;
981        if (offsetY < 0) offsetY = 0;
982        if (offsetX > 1) offsetX = 1;
983        if (offsetY > 1) offsetY = 1;
984
985        var iw = img.width,
986            ih = img.height,
987            r = Math.min(w / iw, h / ih),
988            nw = iw * r,
989            nh = ih * r,
990            cx, cy, cw, ch, ar = 1;
991
992        if (nw < w) ar = w / nw;
993        if (Math.abs(ar - 1) < 1e-14 && nh < h) ar = h / nh;
994        nw *= ar;
995        nh *= ar;
996
997        cw = iw / (nw / w);
998        ch = ih / (nh / h);
999
1000        cx = (iw - cw) * offsetX;
1001        cy = (ih - ch) * offsetY;
1002
1003        if (cx < 0) cx = 0;
1004        if (cy < 0) cy = 0;
1005        if (cw > iw) cw = iw;
1006        if (ch > ih) ch = ih;
1007
1008        ctx.drawImage(img, cx, cy, cw, ch, x, y, w, h);
1009    }
1010}
1011
1012class ImgLoader extends EventEmitter {
1013    constructor(opts) {
1014        super();
1015        this.images = opts.imgsRef;
1016        this.imageNames = opts.images;
1017        this.imagesRoot = opts.imagesRoot;
1018        this.sequenceName = opts.sequenceName;
1019        this.sequenceLength = opts.images.length;
1020        this.priorityFrames = opts.priorityFrames;
1021        this.complete = false;
1022        this.loadIndex = 0;
1023        this.isLoading = false;
1024        this.loadDistance = opts.loadDistance || '100%';
1025        this.preloadCount = 5;
1026        this.totalImages = opts.images.length;
1027        this.loadedImages = 0;
1028        this.scrollWithElement = opts.scrollWith;
1029        this.loaderElement = document.querySelector(`.sequence-loader[data-sequence="${opts.sequenceName}"]`);
1030        this.progressElement = this.loaderElement?.querySelector('.sequence-loader-progress');
1031
1032        this.priorityQueue = this.createPriorityQueue();
1033        this.loadingQueue = this.createLoadingQueue();
1034
1035        if (!('connection' in navigator) || !navigator.connection.saveData) {
1036            this.preloadImages();
1037        }
1038    }
1039
1040    preloadImages() {
1041        for (let i = 0; i < this.preloadCount && i < this.imageNames.length; i++) {
1042            const img = new Image();
1043            img.importance = 'high';
1044            img.fetchPriority = 'high';
1045            img.src = `${this.imagesRoot}${this.imageNames[i]}?sequence=${this.sequenceName}`;
1046        }
1047    }
1048
1049    startLoading(containerElement) {
1050        if (this.isLoading) return;
1051        
1052        const loadDistanceStr = this.loadDistance.replace('%', '');
1053        const loadDistanceValue = parseInt(loadDistanceStr);
1054        const viewportHeight = window.innerHeight;
1055        const loadDistancePixels = viewportHeight * (loadDistanceValue / 100);
1056
1057        const checkDistance = () => {
1058            const element = this.scrollWithElement || containerElement;
1059            const rect = element.getBoundingClientRect();
1060            const distanceToTop = rect.top;
1061            
1062            if (distanceToTop <= loadDistancePixels && !this.isLoading) {
1063                this.isLoading = true;
1064                window.removeEventListener('scroll', checkDistance);
1065                
1066                if (this.priorityQueue.length > 0) {
1067                    this.loadImage(this.priorityQueue[0]);
1068                }
1069
1070                window.addEventListener('scroll', () => {
1071                    if (!this.complete) {
1072                        this.loadNextBatch();
1073                    }
1074                }, { passive: true });
1075
1076                this.loadNextBatch();
1077            }
1078        };
1079
1080        window.addEventListener('scroll', checkDistance, { passive: true });
1081        checkDistance();
1082    }
1083
1084    updateProgress() {
1085        this.loadedImages++;
1086        this.loadedImages = Math.min(this.loadedImages, this.totalImages);
1087        const progress = Math.round((this.loadedImages / this.totalImages) * 100);
1088
1089        if (this.progressElement) {
1090            this.progressElement.textContent = `${progress}%`;
1091            this.emit('LOADING_PROGRESS', progress);
1092
1093            if (this.loadedImages === this.totalImages) {
1094                setTimeout(() => {
1095                    this.loaderElement.style.opacity = '0';
1096                    setTimeout(() => {
1097                        this.loaderElement.style.display = 'none';
1098                    }, 300);
1099                }, 500);
1100            }
1101        }
1102    }
1103
1104    loadNextBatch(batchSize = 5) {
1105        for (let i = 0; i < batchSize; i++) {
1106            if (this.priorityQueue.length) {
1107                this.loadImage(this.priorityQueue.shift());
1108            } else if (this.loadingQueue.length) {
1109                this.loadImage(this.loadingQueue.shift());
1110            }
1111        }
1112    }
1113
1114    loadImage(e) {
1115    if (this.images[e]) {
1116        return;
1117    }
1118
1119    const img = new Image();
1120    const baseImagePath = this.imagesRoot + this.imageNames[e];
1121    const imagePath = `${baseImagePath}?sequence=${this.sequenceName}`;
1122    
1123    img.importance = e < this.preloadCount ? 'high' : 'auto';
1124    img.fetchPriority = e < this.preloadCount ? 'high' : 'auto';
1125    img.decoding = 'async';
1126
1127    img.onload = () => {
1128        this.images[e] = img;
1129        this.updateProgress();
1130        
1131        if (e === 0) {
1132            this.emit('FIRST_IMAGE_LOADED');
1133        }
1134        
1135        if (this.priorityQueue.length === 0 && !this.priorityImagesLoaded) {
1136            this.priorityImagesLoaded = true;
1137            this.emit('PRIORITY_IMAGES_LOADED');
1138        }
1139        
1140        if (this.priorityQueue.length === 0 && this.loadingQueue.length === 0) {
1141            this.complete = true;
1142            this.emit('IMAGES_LOADED');
1143        }
1144        
1145        this.loadNextBatch(1);
1146    };
1147
1148    img.onerror = (err) => {
1149        console.error('Error loading image:', err);
1150        this.loadNextBatch(1);
1151    };
1152
1153    // Důležitá změna - používáme imagePath s parametrem sequence
1154    img.src = imagePath;
1155}
1156
1157    createPriorityQueue() {
1158        const p = this.priorityFrames || [];
1159        if (!p.length) {
1160            p.push(0);
1161        }
1162        return p;
1163    }
1164
1165    createLoadingQueue() {
1166        const indices = Array.from({ length: this.sequenceLength }, (_, i) => i);
1167        return indices.filter(i => !this.priorityQueue.includes(i));
1168    }
1169}
1170
1171class ScrollSequence {
1172    constructor(opts) {
1173        this.opts = {
1174            container: 'body',
1175            starts: 'out',
1176            ends: 'out',
1177            imagesRoot: '',
1178            cover: false,
1179            ...opts
1180        };
1181        this.container = typeof opts.container === 'object' ?
1182            opts.container :
1183            document.querySelector(opts.container);
1184
1185        this.scrollWith = !opts.scrollWith ?
1186            this.container :
1187            typeof opts.scrollWith === 'object' ?
1188                opts.scrollWith :
1189                document.querySelector(opts.scrollWith);
1190
1191        this.images = Array(opts.images.length);
1192        this.imagesToLoad = opts.images;
1193        this.priorityFrames = opts.priorityFrames;
1194        
1195        // Autoplay functionality
1196        this.isAutoplay = opts.autoplay === true || opts.autoplay === 'true';
1197        this.autoplaySpeed = parseInt(opts.autoplaySpeed) || 100; // ms between frames
1198        this.playDirection = opts.playDirection || 'loop'; // 'loop' or 'pingpong'
1199        this.autoplayDirection = 1; // 1 for forward, -1 for backward
1200        this.currentAutoplayIndex = 0;
1201        this.autoplayInterval = null;
1202        this.isAutoplayPaused = false;
1203
1204        this.loader = new ImgLoader({
1205            imgsRef: this.images,
1206            images: this.imagesToLoad,
1207            imagesRoot: this.opts.imagesRoot,
1208            sequenceName: opts.sequenceName,
1209            priorityFrames: this.priorityFrames,
1210            loadDistance: this.opts.loadDistance,
1211            scrollWith: this.scrollWith  // Předáme scrollWith do ImgLoaderu
1212        });
1213
1214        this.canvas = new Canvas({
1215            container: this.container,
1216            images: this.images,
1217            cover: this.opts.cover
1218        });
1219
1220        window.addEventListener('load', () => {
1221            this.forceSmallScroll();
1222        });
1223
1224        window.addEventListener('pageshow', (event) => {
1225            if (event.persisted) {
1226                this.forceSmallScroll();
1227            }
1228        });
1229
1230        this.init();
1231    }
1232
1233    forceSmallScroll() {
1234        requestAnimationFrame(() => {
1235            const currentScroll = window.scrollY;
1236            window.scrollTo(0, currentScroll + 1);
1237            setTimeout(() => window.scrollTo(0, currentScroll), 10);
1238        });
1239    }
1240
1241    init() {
1242        this.canvas.setup();
1243        this.loader.once('FIRST_IMAGE_LOADED', () => {
1244            this.canvas.renderIndex(0);
1245            if (!this.isAutoplay) {
1246                this.forceSmallScroll();
1247            }
1248        });
1249        this.loader.once('PRIORITY_IMAGES_LOADED', () => {
1250            if (this.isAutoplay) {
1251                this.startAutoplay();
1252            } else {
1253                window.addEventListener('scroll', () => this.changeOnWindowScroll());
1254            }
1255        });
1256        this.loader.once('IMAGES_LOADED', () => {
1257            //console.log('Sequence Loaded');
1258        });
1259        this.loader.startLoading(this.container);
1260    }
1261
1262    changeOnWindowScroll() {
1263        const step = 100 / (this.images.length - 1);
1264        const mapToIndex = Math.floor(this.percentScrolled / step);
1265        requestAnimationFrame(() => this.canvas.renderIndex(mapToIndex));
1266    }
1267
1268    startAutoplay() {
1269        if (this.autoplayInterval) {
1270            clearInterval(this.autoplayInterval);
1271        }
1272        
1273        this.autoplayInterval = setInterval(() => {
1274            if (!this.isAutoplayPaused && this.images.length > 0) {
1275                // Render current frame
1276                requestAnimationFrame(() => {
1277                    if (this.images[this.currentAutoplayIndex]) {
1278                        this.canvas.renderIndex(this.currentAutoplayIndex);
1279                    }
1280                });
1281                
1282                // Calculate next index based on play direction
1283                this.currentAutoplayIndex += this.autoplayDirection;
1284                
1285                // Handle loop boundaries based on playDirection
1286                if (this.playDirection === 'pingpong') {
1287                    // Ping-pong mode: bounce back and forth
1288                    if (this.currentAutoplayIndex >= this.images.length) {
1289                        this.currentAutoplayIndex = this.images.length - 2;
1290                        this.autoplayDirection = -1;
1291                    } else if (this.currentAutoplayIndex < 0) {
1292                        this.currentAutoplayIndex = 1;
1293                        this.autoplayDirection = 1;
1294                    }
1295                } else {
1296                    // Loop mode: restart from beginning after last frame
1297                    if (this.currentAutoplayIndex >= this.images.length) {
1298                        this.currentAutoplayIndex = 0;
1299                    } else if (this.currentAutoplayIndex < 0) {
1300                        this.currentAutoplayIndex = this.images.length - 1;
1301                    }
1302                }
1303            }
1304        }, this.autoplaySpeed);
1305    }
1306    
1307    stopAutoplay() {
1308        if (this.autoplayInterval) {
1309            clearInterval(this.autoplayInterval);
1310            this.autoplayInterval = null;
1311        }
1312    }
1313    
1314    pauseAutoplay() {
1315        this.isAutoplayPaused = true;
1316    }
1317    
1318    resumeAutoplay() {
1319        this.isAutoplayPaused = false;
1320    }
1321    
1322    setAutoplaySpeed(speed) {
1323        this.autoplaySpeed = speed;
1324        if (this.isAutoplay && this.autoplayInterval) {
1325            this.startAutoplay(); // Restart with new speed
1326        }
1327    }
1328
1329    get percentScrolled() {
1330        const { starts, ends } = this.opts;
1331        const el = this.scrollWith;
1332        const doc = document.documentElement;
1333        const clientOffsety = doc.scrollTop || window.pageYOffset;
1334        const elementHeight = el.clientHeight || el.offsetHeight;
1335        const clientHeight = doc.clientHeight;
1336        let target = el;
1337        let offsetY = 0;
1338        
1339        do {
1340            offsetY += target.offsetTop;
1341            target = target.offsetParent;
1342        } while (target && target !== window);
1343
1344        let u = (clientOffsety - offsetY);
1345        let d = (elementHeight + clientHeight);
1346
1347        if (starts === 'out') {
1348            u += clientHeight;
1349        } else if (starts === 'in') {
1350            d -= clientHeight;
1351        }
1352
1353        if (ends === 'in') {
1354            d -= clientHeight;
1355        }
1356
1357        const value = u / d * 100;
1358        return value > 100 ? 100 : value < 0 ? 0 : value;
1359    }
1360}
1361function makeSequenceData() {
1362    $('.makeSequence').each(function(index) {
1363        const $element = $(this);
1364        const classes = $element.attr('class').split(' ');
1365        
1366        // Objekt pro uložení konfigurace
1367        const config = {
1368            sequenceName: '',
1369            view: '',
1370            imagepath: '',
1371            filename: '',
1372            imageExtension: '',
1373            imagecount: 0,
1374            loadDistance: '100%',
1375            starts: '',
1376            ends: '',
1377            ratio: '',
1378            place: '',
1379            scrollWith: '',  // Přidáno pro podporu scrollWith
1380            autoplay: false,
1381            autoplaySpeed: 100,
1382            playDirection: 'loop',  // 'loop' nebo 'pingpong'
1383            // Responsivní varianty (mobile-first)
1384            'imagepath-sm': '', 'imagepath-md': '', 'imagepath-lg': '', 'imagepath-xl': '', 'imagepath-xxl': '',
1385            'filename-sm': '', 'filename-md': '', 'filename-lg': '', 'filename-xl': '', 'filename-xxl': '',
1386            'imagecount-sm': 0, 'imagecount-md': 0, 'imagecount-lg': 0, 'imagecount-xl': 0, 'imagecount-xxl': 0,
1387            'ratio-sm': '', 'ratio-md': '', 'ratio-lg': '', 'ratio-xl': '', 'ratio-xxl': ''
1388        };
1389        
1390        // Parsování hodnot přímo z tříd
1391        classes.forEach(className => {
1392            if (className.indexOf('data-') > -1) {
1393                const [key, value] = className.split(';');
1394                const configKey = key.replace('data-', '');
1395                
1396                switch(configKey) {
1397                    case 'sequencename':
1398                        config.sequenceName = value;
1399                        break;
1400                    case 'view':
1401                        config.view = value;
1402                        break;
1403                    case 'imagepath':
1404                        config.imagepath = value;
1405                        break;
1406                    case 'filename':
1407                        config.filename = value;
1408                        break;
1409                    case 'imageextension':
1410                        config.imageExtension = value;
1411                        break;
1412                    case 'imagecount':
1413                        config.imagecount = parseInt(value) - 1;
1414                        break;
1415                    case 'loaddistance':
1416                        config.loadDistance = value;
1417                        break;
1418                    case 'scrollwith':  // Přidáno pro podporu scrollWith
1419                        config.scrollWith = value;
1420                        break;
1421                    case 'starts':
1422                        config.starts = value;
1423                        break;
1424                    case 'ends':
1425                        config.ends = value;
1426                        break;
1427                    case 'ratio':
1428                        config.ratio = value;
1429                        break;
1430                    case 'imagepath-sm': case 'imagepath-md': case 'imagepath-lg': case 'imagepath-xl': case 'imagepath-xxl':
1431                        config[configKey] = value;
1432                        break;
1433                    case 'filename-sm': case 'filename-md': case 'filename-lg': case 'filename-xl': case 'filename-xxl':
1434                        config[configKey] = value;
1435                        break;
1436                    case 'imagecount-sm': case 'imagecount-md': case 'imagecount-lg': case 'imagecount-xl': case 'imagecount-xxl':
1437                        config[configKey] = parseInt(value) - 1;
1438                        break;
1439                    case 'ratio-sm': case 'ratio-md': case 'ratio-lg': case 'ratio-xl': case 'ratio-xxl':
1440                        config[configKey] = value;
1441                        break;
1442                    case 'place':
1443                        config.place = value;
1444                        break;
1445                    case 'autoplay':
1446                        config.autoplay = value === 'true';
1447                        break;
1448                    case 'autoplayspeed':
1449                        config.autoplaySpeed = parseInt(value) || 100;
1450                        break;
1451                    case 'playdirection':
1452                        config.playDirection = (value === 'pingpong' || value === 'loop') ? value : 'loop';
1453                        break;
1454                }
1455            }
1456        });
1457
1458        const canvasSequence = config.sequenceName + '-sequence';
1459        const canvasContainer = config.sequenceName + '-container';
1460        const displayType = config.place || 'background';
1461
1462        // Responsivní resolver (mobile-first)
1463        const breakpoints = [
1464            { name: 'xxl', min: 2560 },
1465            { name: 'xl', min: 1280 },
1466            { name: 'lg', min: 992 },
1467            { name: 'md', min: 768 },
1468            { name: 'sm', min: 576 }
1469        ];
1470        const currentWidth = $(window).width();
1471
1472        function resolveResponsive(baseProp) {
1473            for (const bp of breakpoints) {
1474                if (currentWidth >= bp.min && config[baseProp + '-' + bp.name]) {
1475                    return config[baseProp + '-' + bp.name];
1476                }
1477            }
1478            return config[baseProp];
1479        }
1480
1481        const resolvedImagePath = resolveResponsive('imagepath');
1482        const resolvedFilename = resolveResponsive('filename');
1483        const resolvedImageCount = resolveResponsive('imagecount');
1484        const resolvedRatio = resolveResponsive('ratio');
1485
1486        // Vytvoření HTML struktury
1487        let thisCanvasHTML;
1488        const activeRatio = resolvedRatio || config.ratio;
1489
1490        if (activeRatio) {
1491            thisCanvasHTML = `
1492                <div class="sequenceContainer ${canvasContainer} ${displayType}">
1493                    <div class="scrollSequenceContainer ${canvasSequence} ${displayType} image-box ratio-${activeRatio}">
1494                        <div class="sequence-loader" data-sequence="${config.sequenceName}">
1495                            <div class="sequence-loader-progress">0%</div>
1496                        </div>
1497                    </div>
1498                </div>`;
1499        } else {
1500            thisCanvasHTML = `
1501                <div class="sequenceContainer ${canvasContainer} ${displayType}">
1502                    <div class="scrollSequenceContainer ${canvasSequence} ${displayType}">
1503                        <div class="sequence-loader" data-sequence="${config.sequenceName}">
1504                            <div class="sequence-loader-progress">0%</div>
1505                        </div>
1506                    </div>
1507                </div>`;
1508        }
1509
1510        $element.prepend(thisCanvasHTML);
1511
1512        // Generování seznamu obrázků
1513        const images = Array.from({ length: resolvedImageCount + 1 }, (_, i) => 
1514            `${resolvedFilename}_${String(i).padStart(3, '0')}.${config.imageExtension}`
1515        );
1516
vendor: 7,942 bytes, lines 1517-1570
1517        // Breakpointy pro responsivní zobrazení
1518        const sm_number = 576,
1519              md_number = 768,
1520              lg_number = 992,
1521              xl_number = 1280;
1522
1523        function initScrollSequence() {
1524            const scrollWithElement = config.scrollWith || ('.' + canvasContainer);
1525
1526            return new ScrollSequence({
1527                container: '.' + canvasSequence,
1528                scrollWith: scrollWithElement,
1529                images: images,
1530                imagesRoot: resolvedImagePath,
1531                sequenceName: config.sequenceName,
1532                priorityFrames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
1533                cover: true,
1534                starts: config.starts || 'out',
1535                ends: config.ends || 'out',
1536                loadDistance: config.loadDistance,
1537                autoplay: config.autoplay,
1538                autoplaySpeed: config.autoplaySpeed,
1539                playDirection: config.playDirection
1540            });
1541        }
1542
1543        // Aplikace podle breakpointů
1544
1545        if (config.view === 'all') {
1546            initScrollSequence();
1547        } else if (config.view === 'sm' && currentWidth > sm_number) {
1548            initScrollSequence();
1549        } else if (config.view === 'md' && currentWidth > md_number) {
1550            initScrollSequence();
1551        } else if (config.view === 'lg' && currentWidth > lg_number) {
1552            initScrollSequence();
1553        } else if (config.view === 'xl' && currentWidth > xl_number) {
1554            initScrollSequence();
1555        }
1556
1557        // Najít nejbližší <section> a přidat jí třídu
1558        const closestSection = $element.closest('section');
1559        if (closestSection.length) {
1560            closestSection.addClass('sequenceContainerSectionIsHere');
1561        }
1562    });
1563}
1564
1565makeSequenceData();
1566
1567;
1568
1569/* lenis.js */
1570!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t||self).Lenis=e()}(this,function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function e(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},i.apply(this,arguments)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function n(){}n.prototype={on:function(t,e,i){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var o=this;function n(){o.off(t,n),e.apply(i,arguments)}return n._=e,this.on(t,n,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),o=0,n=i.length;o<n;o++)i[o].fn.apply(i[o].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),o=i[t],n=[];if(o&&e)for(var r=0,s=o.length;r<s;r++)o[r].fn!==e&&o[r].fn._!==e&&n.push(o[r]);return n.length?i[t]=n:delete i[t],this}};var r=n;n.TinyEmitter=r,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var s=function(t){var e={exports:{}};return function(t,e){t.exports=function(){var t=0;function e(e){return"__private_"+t+++"_"+e}function i(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}function o(){}o.prototype={on:function(t,e,i){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var o=this;function n(){o.off(t,n),e.apply(i,arguments)}return n._=e,this.on(t,n,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),o=0,n=i.length;o<n;o++)i[o].fn.apply(i[o].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),o=i[t],n=[];if(o&&e)for(var r=0,s=o.length;r<s;r++)o[r].fn!==e&&o[r].fn._!==e&&n.push(o[r]);return n.length?i[t]=n:delete i[t],this}};var n=o;n.TinyEmitter=o;var r,s="virtualscroll",l=e("options"),h=e("el"),a=e("emitter"),c=e("event"),u=e("touchStart"),d=e("bodyTouchAction");return function(){function t(t){var e=this;Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:void 0}),this._onWheel=function(t){var o=i(e,l)[l],n=i(e,c)[c];n.deltaX=t.wheelDeltaX||-1*t.deltaX,n.deltaY=t.wheelDeltaY||-1*t.deltaY,r.isFirefox&&1===t.deltaMode&&(n.deltaX*=o.firefoxMultiplier,n.deltaY*=o.firefoxMultiplier),n.deltaX*=o.mouseMultiplier,n.deltaY*=o.mouseMultiplier,e._notify(t)},this._onMouseWheel=function(t){var o=i(e,c)[c];o.deltaX=t.wheelDeltaX?t.wheelDeltaX:0,o.deltaY=t.wheelDeltaY?t.wheelDeltaY:t.wheelDelta,e._notify(t)},this._onTouchStart=function(t){var o=t.targetTouches?t.targetTouches[0]:t;i(e,u)[u].x=o.pageX,i(e,u)[u].y=o.pageY},this._onTouchMove=function(t){var o=i(e,l)[l];o.preventTouch&&!t.target.classList.contains(o.unpreventTouchClass)&&t.preventDefault();var n=i(e,c)[c],r=t.targetTouches?t.targetTouches[0]:t;n.deltaX=(r.pageX-i(e,u)[u].x)*o.touchMultiplier,n.deltaY=(r.pageY-i(e,u)[u].y)*o.touchMultiplier,i(e,u)[u].x=r.pageX,i(e,u)[u].y=r.pageY,e._notify(t)},this._onKeyDown=function(t){var o=i(e,c)[c];o.deltaX=o.deltaY=0;var n=window.innerHeight-40;switch(t.keyCode){case 37:case 38:o.deltaY=i(e,l)[l].keyStep;break;case 39:case 40:o.deltaY=-i(e,l)[l].keyStep;break;case 32:o.deltaY=n*(t.shiftKey?1:-1);break;default:return}e._notify(t)},i(this,h)[h]=window,t&&t.el&&(i(this,h)[h]=t.el,delete t.el),r||(r={hasWheelEvent:"onwheel"in document,hasMouseWheelEvent:"onmousewheel"in document,hasTouch:"ontouchstart"in document,hasTouchWin:navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1}),i(this,l)[l]=Object.assign({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",useKeyboard:!0,useTouch:!0},t),i(this,a)[a]=new n,i(this,c)[c]={y:0,x:0,deltaX:0,deltaY:0},i(this,u)[u]={x:null,y:null},i(this,d)[d]=null,void 0!==i(this,l)[l].passive&&(this.listenerOptions={passive:i(this,l)[l].passive})}var e=t.prototype;return e._notify=function(t){var e=i(this,c)[c];e.x+=e.deltaX,e.y+=e.deltaY,i(this,a)[a].emit(s,{x:e.x,y:e.y,deltaX:e.deltaX,deltaY:e.deltaY,originalEvent:t})},e._bind=function(){r.hasWheelEvent&&i(this,h)[h].addEventListener("wheel",this._onWheel,this.listenerOptions),r.hasMouseWheelEvent&&i(this,h)[h].addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),r.hasTouch&&i(this,l)[l].useTouch&&(i(this,h)[h].addEventListener("touchstart",this._onTouchStart,this.listenerOptions),i(this,h)[h].addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),r.hasPointer&&r.hasTouchWin&&(i(this,d)[d]=document.body.style.msTouchAction,document.body.style.msTouchAction="none",i(this,h)[h].addEventListener("MSPointerDown",this._onTouchStart,!0),i(this,h)[h].addEventListener("MSPointerMove",this._onTouchMove,!0)),r.hasKeyDown&&i(this,l)[l].useKeyboard&&document.addEventListener("keydown",this._onKeyDown)},e._unbind=function(){r.hasWheelEvent&&i(this,h)[h].removeEventListener("wheel",this._onWheel),r.hasMouseWheelEvent&&i(this,h)[h].removeEventListener("mousewheel",this._onMouseWheel),r.hasTouch&&(i(this,h)[h].removeEventListener("touchstart",this._onTouchStart),i(this,h)[h].removeEventListener("touchmove",this._onTouchMove)),r.hasPointer&&r.hasTouchWin&&(
1570document.body.style.msTouchAction=i(this,d)[d],i(this,h)[h].removeEventListener("MSPointerDown",this._onTouchStart,!0),i(this,h)[h].removeEventListener("MSPointerMove",this._onTouchMove,!0)),r.hasKeyDown&&i(this,l)[l].useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)},e.on=function(t,e){i(this,a)[a].on(s,t,e);var o=i(this,a)[a].e;o&&o[s]&&1===o[s].length&&this._bind()},e.off=function(t,e){i(this,a)[a].off(s,t,e);var o=i(this,a)[a].e;(!o[s]||o[s].length<=0)&&this._unbind()},e.destroy=function(){i(this,a)[a].off(),this._unbind()},t}()}()}(e),e.exports}();function l(t,e){var i=t%e;return(e>0&&i<0||e<0&&i>0)&&(i+=e),i}var h=["duration","easing"],a=/*#__PURE__*/function(){function t(){}var o=t.prototype;return o.to=function(t,e){var o=this,n=void 0===e?{}:e,r=n.duration,s=void 0===r?1:r,l=n.easing,a=void 0===l?function(t){return t}:l,c=function(t,e){if(null==t)return{};var i,o,n={},r=Object.keys(t);for(o=0;o<r.length;o++)e.indexOf(i=r[o])>=0||(n[i]=t[i]);return n}(n,h);this.target=t,this.fromKeys=i({},c),this.toKeys=i({},c),this.keys=Object.keys(i({},c)),this.keys.forEach(function(e){o.fromKeys[e]=t[e]}),this.duration=s,this.easing=a,this.currentTime=0,this.isRunning=!0},o.stop=function(){this.isRunning=!1},o.raf=function(t){var e=this;if(this.isRunning){this.currentTime=Math.min(this.currentTime+t,this.duration);var i=this.progress>=1?1:this.easing(this.progress);this.keys.forEach(function(t){var o=e.fromKeys[t];e.target[t]=o+(e.toKeys[t]-o)*i}),1===i&&this.stop()}},e(t,[{key:"progress",get:function(){return this.currentTime/this.duration}}]),t}();/*#__PURE__*/
1571return function(t){var i,n;function r(e){var i,o,n,r,l=void 0===e?{}:e,h=l.duration,c=void 0===h?1.2:h,u=l.easing,d=void 0===u?function(t){return Math.min(1,1.001-Math.pow(2,-10*t))}:u,p=l.smooth,f=void 0===p||p,v=l.mouseMultiplier,w=void 0===v?1:v,y=l.smoothTouch,m=void 0!==y&&y,g=l.touchMultiplier,b=void 0===g?2:g,T=l.direction,M=void 0===T?"vertical":T,S=l.gestureDirection,_=void 0===S?"vertical":S,O=l.infinite,E=void 0!==O&&O,W=l.wrapper,x=void 0===W?window:W,D=l.content,N=void 0===D?document.body:D;(r=t.call(this)||this).onWindowResize=function(){r.wrapperWidth=window.innerWidth,r.wrapperHeight=window.innerHeight},r.onWrapperResize=function(t){var e=t[0];if(e){var i=e.contentRect;r.wrapperWidth=i.width,r.wrapperHeight=i.height}},r.onContentResize=function(t){var e=t[0];if(e){var i=e.contentRect;r.contentWidth=i.width,r.contentHeight=i.height}},r.onVirtualScroll=function(t){var e=t.deltaY,i=t.deltaX,o=t.originalEvent;if(!("vertical"===r.gestureDirection&&0===e||"horizontal"===r.gestureDirection&&0===i)){var n=!!o.composedPath().find(function(t){return t.hasAttribute&&t.hasAttribute("data-lenis-prevent")});o.ctrlKey||n||(r.smooth=o.changedTouches?r.smoothTouch:r.options.smooth,r.stopped?o.preventDefault():r.smooth&&4!==o.buttons&&(r.smooth&&o.preventDefault(),r.targetScroll-="both"===r.gestureDirection?i+e:"horizontal"===r.gestureDirection?i:e,r.scrollTo(r.targetScroll)))}},r.onScroll=function(t){r.isScrolling&&r.smooth||(r.targetScroll=r.scroll=r.lastScroll=r.wrapperNode[r.scrollProperty],r.notify())},window.lenisVersion="0.2.28",r.options={duration:c,easing:d,smooth:f,mouseMultiplier:w,smoothTouch:m,touchMultiplier:b,direction:M,gestureDirection:_,infinite:E,wrapper:x,content:N},r.duration=c,r.easing=d,r.smooth=f,r.mouseMultiplier=w,r.smoothTouch=m,r.touchMultiplier=b,r.direction=M,r.gestureDirection=_,r.infinite=E,r.wrapperNode=x,r.contentNode=N,r.wrapperNode.addEventListener("scroll",r.onScroll),r.wrapperNode===window?(r.wrapperNode.addEventListener("resize",r.onWindowResize),r.onWindowResize()):(r.wrapperHeight=r.wrapperNode.offsetHeight,r.wrapperWidth=r.wrapperNode.offsetWidth,r.wrapperObserver=new ResizeObserver(r.onWrapperResize),r.wrapperObserver.observe(r.wrapperNode)),r.contentHeight=r.contentNode.offsetHeight,r.contentWidth=r.contentNode.offsetWidth,r.contentObserver=new ResizeObserver(r.onContentResize),r.contentObserver.observe(r.contentNode),r.targetScroll=r.scroll=r.lastScroll=r.wrapperNode[r.scrollProperty],r.animate=new a;var P=(null==(i=navigator)||null==(o=i.userAgentData)?void 0:o.platform)||(null==(n=navigator)?void 0:n.platform)||"unknown";
1571return r.virtualScroll=new s({el:r.wrapperNode,firefoxMultiplier:50,mouseMultiplier:r.mouseMultiplier*(P.includes("Win")||P.includes("Linux")?.84:.4),touchMultiplier:r.touchMultiplier,passive:!1,useKeyboard:!1,useTouch:!0}),r.virtualScroll.on(r.onVirtualScroll),r}n=t,(i=r).prototype=Object.create(n.prototype),i.prototype.constructor=i,o(i,n);var h=r.prototype;return h.start=function(){var t=this.wrapperNode;this.wrapperNode===window&&(t=document.documentElement),t.classList.remove("lenis-stopped"),this.stopped=!1},h.stop=function(){var t=this.wrapperNode;this.wrapperNode===window&&(t=document.documentElement),t.classList.add("lenis-stopped"),this.stopped=!0,this.animate.stop()},h.destroy=function(){var t;this.wrapperNode===window&&this.wrapperNode.removeEventListener("resize",this.onWindowResize),this.wrapperNode.removeEventListener("scroll",this.onScroll),this.virtualScroll.destroy(),null==(t=this.wrapperObserver)||t.disconnect(),this.contentObserver.disconnect()},h.raf=function(t){var e=t-(this.now||0);this.now=t,!this.stopped&&this.smooth&&(this.lastScroll=this.scroll,this.animate.raf(.001*e),this.scroll===this.targetScroll&&(this.lastScroll=this.scroll),this.isScrolling&&(this.setScroll(this.scroll),this.notify()),this.isScrolling=this.scroll!==this.targetScroll)},h.setScroll=function(t){var e=this.infinite?l(t,this.limit):t;"horizontal"===this.direction?this.wrapperNode.scrollTo(e,0):this.wrapperNode.scrollTo(0,e)},h.notify=function(){var t=this.infinite?l(this.scroll,this.limit):this.scroll;this.emit("scroll",{scroll:t,limit:this.limit,velocity:this.velocity,direction:0===this.velocity?0:this.velocity>0?1:-1,progress:t/this.limit})},h.scrollTo=function(t,e){var i=void 0===e?{}:e,o=i.offset,n=void 0===o?0:o,r=i.immediate,s=void 0!==r&&r,l=i.duration,h=void 0===l?this.duration:l,a=i.easing,c=void 0===a?this.easing:a;if(null!=t&&!this.stopped){var u;if("number"==typeof t)u=t;else if("top"===t||"#top"===t)u=0;else if("bottom"===t)u=this.limit;else{var d;if("string"==typeof t)d=document.querySelector(t);else{if(null==t||!t.nodeType)return;d=t}if(!d)return;var p=0;if(this.wrapperNode!==window){var f=this.wrapperNode.getBoundingClientRect();p="horizontal"===this.direction?f.left:f.top}var v=d.getBoundingClientRect();u=("horizontal"===this.direction?v.left:v.top)+this.scroll-p}u+=n,this.targetScroll=this.infinite?u:Math.max(0,Math.min(u,this.limit)),!this.smooth||s?(this.animate.stop(),this.scroll=this.lastScroll=this.targetScroll,this.setScroll(this.targetScroll)):this.animate.to(this,{duration:h,easing:c,scroll:this.targetScroll})}},e(r,[{key:"scrollProperty",get:function(){return this.wrapperNode===window?"horizontal"===this.direction?"scrollX":"scrollY":"horizontal"===this.direction?"scrollLeft":"scrollTop"}},{key:"limit",get:function(){return"horizontal"===this.direction?this.contentWidth-this.wrapperWidth:this.contentHeight-this.wrapperHeight}},{key:"velocity",get:function(){return this.scroll-this.lastScroll}}]),r}(r)});
1572;
1573
1574/* search-whisperer.js */
1575(function ($) {
1576  'use strict';
1577
1578  var DEBOUNCE_MS  = 250;
1579  var MIN_CHARS    = 2;
1580  var SUGGEST_URL = '/search-suggest.php';
1581  var HINT_HTML    = '<span class="sw-hint">Nevíte si rady? Zkuste hledat: <a href="/novinky">novinky</a>, <a href="/produkty">produkty</a>, <a href="/kontakt">kontakt</a>...</span>';
1582
1583  var _timer       = null;
1584  var _activeIndex = -1;
1585  var _results     = [];
1586  var _lastXhr     = null;
1587
1588// ── Helpers ──────────────────────────────────────────────────────────────────
1589
1590  function escAttr(str) {
1591    return $('<span>').text(str).html()
1592      .replace(/"/g, '&quot;');
1593  }
1594
1595  function escHtml(str) {
1596    return $('<span>').text(str).html();
1597  }
1598
1599  function getDropdown($input) {
1600    return $input.closest('form').find('.sw-dropdown');
1601  }
1602
1603  // ── Render ───────────────────────────────────────────────────────────────────
1604
1605  function renderDropdown($input, data) {
1606    var $dropdown = getDropdown($input);
1607    _results     = data || [];
1608    _activeIndex = -1;
1609
1610    if (!_results.length) {
1611      $dropdown.hide().empty();
1612      return;
1613    }
1614
1615    var html = '';
1616    $.each(_results, function (i, item) {
1617      html += '<a class="sw-item" href="' + escAttr(item.url) + '" data-index="' + i + '">';
1618      html += '<span class="sw-item__title">' + escHtml(item.title) + '</span>';
1619      html += '</a>';
1620    });
1621
1622    $dropdown.html(html).show();
1623  }
1624
1625  function hideDropdown($input) {
1626    getDropdown($input).hide().empty();
1627    _activeIndex = -1;
1628    _results     = [];
1629  }
1630
1631  // ── Keyboard navigation ───────────────────────────────────────────────────────
1632
1633  function moveActive($input, delta) {
1634    var $dropdown = getDropdown($input);
1635    var $items    = $dropdown.find('.sw-item');
1636    if (!$items.length) return;
1637
1638    _activeIndex = (_activeIndex + delta + $items.length) % $items.length;
1639    $items.removeClass('sw-item--active');
1640    $items.eq(_activeIndex).addClass('sw-item--active');
1641  }
1642
1643  // ── Fetch ─────────────────────────────────────────────────────────────────────
1644
1645  function fetch($input) {
1646    var q = $.trim($input.val());
1647
1648    if (q.length < MIN_CHARS) {
1649      hideDropdown($input);
1650      return;
1651    }
1652
1653    if (_lastXhr) {
1654      _lastXhr.abort();
1655      _lastXhr = null;
1656    }
1657
1658    _lastXhr = $.getJSON(SUGGEST_URL, { q: q })
1659      .done(function (data) {
1660        if ($.trim($input.val()) === q) {
1661          renderDropdown($input, data);
1662        }
1663      })
1664      .fail(function (xhr) {
1665        if (xhr.statusText !== 'abort') {
1666          hideDropdown($input);
1667        }
1668      });
1669  }
1670
1671  // ── Wire up ───────────────────────────────────────────────────────────────────
1672
1673  $(document).ready(function () {
1674
1675    /* Input events */
1676    $(document).on('input', '.searchInput', function () {
1677      var $input = $(this);
1678      clearTimeout(_timer);
1679      _timer = setTimeout(function () { fetch($input); }, DEBOUNCE_MS);
1680    });
1681
1682    /* Keyboard navigation */
1683    $(document).on('keydown', '.searchInput', function (e) {
1684      var $input    = $(this);
1685      var $dropdown = getDropdown($input);
1686
1687      if (!$dropdown.is(':visible')) return;
1688
1689      switch (e.key) {
1690        case 'ArrowDown':
1691          e.preventDefault();
1692          moveActive($input, 1);
1693          break;
1694
1695        case 'ArrowUp':
1696          e.preventDefault();
1697          moveActive($input, -1);
1698          break;
1699
1700        case 'Enter':
1701          if (_activeIndex >= 0 && _results[_activeIndex]) {
1702            e.preventDefault();
1703            window.location.href = _results[_activeIndex].url;
1704          }
1705          hideDropdown($input);
1706          break;
1707
1708        case 'Escape':
1709          hideDropdown($input);
1710          e.stopPropagation();
1711          break;
1712      }
1713    });
1714
1715    /* Close on outside click */
1716    $(document).on('click', function (e) {
1717      if (!$(e.target).closest('.sw-wrap').length) {
1718        $('.sw-dropdown').hide().empty();
1719        _activeIndex = -1;
1720        _results     = [];
1721      }
1722    });
1723
1724    /* Block submit and show hint when query is too short */
1725    $(document).on('submit', 'form[name="searchForm"]', function (e) {
1726      var $input = $(this).find('.searchInput');
1727      if ($.trim($input.val()).length < MIN_CHARS) {
1728        e.preventDefault();
1729        var $dropdown = getDropdown($input);
1730        $dropdown.html(HINT_HTML).show();
1731        $input.focus();
1732      }
1733    });
1734
1735    /* Focus input when search opens, clear dropdown when it closes */
1736    $(document).on('click', '.search-toggler', function () {
1737      setTimeout(function () {
1738        var $input = $('.searchInput');
1739        if ($input.is(':visible')) {
1740          $input.focus();
1741        } else {
1742          hideDropdown($input);
1743        }
1744      }, 350);
1745    });
1746
1747  });
1748
1749}(jQuery));
1750
1751;
1752
1753/* script-all.js */
1754// Early navbar brand fill-white check (before load)
1755document.addEventListener("DOMContentLoaded", function () {
1756  var firstSection = document.querySelector("#main > section:first-child");
1757  if (!firstSection) return;
1758  var isTextWhite = firstSection.classList.contains("text-white") ||
1759    (firstSection.firstElementChild && firstSection.firstElementChild.classList.contains("text-white"));
1760  var isDark = firstSection.classList.contains("bg-dark") || firstSection.classList.contains("bg-black");
1761  var isPt0 = firstSection.classList.contains("pt-0");
1762  if (isPt0 && isTextWhite && isDark) {
1763    var brand = document.querySelector(".desktop-navbar:not(.on-end) .navbar-brand");
1764    if (brand) brand.classList.add("fill-white");
1765    var nav = document.querySelector(".desktop-navbar:not(.on-end)");
1766    if (nav) { nav.classList.add("bg-transparent", "text-white"); nav.classList.remove("bg-white"); }
1767  }
1768});
1769
1770// Wrap all tables in responsive div
1771document.addEventListener("DOMContentLoaded", function () {
1772  document.querySelectorAll("table").forEach(function (table) {
1773    if (table.parentElement.classList.contains("table-responsive")) return;
1774    const wrapper = document.createElement("div");
1775    wrapper.className = "table-responsive rounded retigoAutoTable";
1776    table.parentNode.insertBefore(wrapper, table);
1777    wrapper.appendChild(table);
1778  });
1779});
1780
1781
1782// Partner search (servisni tabulky)
1783document.addEventListener("DOMContentLoaded", function () {
1784  var searchInput = document.getElementById("searchPartner");
1785  if (!searchInput) return;
1786
1787  function removeDiacritics(str) {
1788    return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
1789  }
1790
1791  function getSections() {
1792    var sections = [];
1793    var container = searchInput.parentElement;
1794    var children = container.children;
1795
1796    for (var i = 0; i < children.length; i++) {
1797      var el = children[i];
1798      var hasTable = el.tagName === "TABLE" || el.querySelector("table");
1799      if (hasTable) {
1800        var heading = children[i - 1];
1801        if (heading && heading !== searchInput && heading.tagName !== "SCRIPT") {
1802          sections.push({ heading: heading, table: el });
1803        }
1804      }
1805    }
1806    return sections;
1807  }
1808
1809  function highlightText(el, query) {
1810    var nodes = el.querySelectorAll("td, strong, a, span");
1811    if (!nodes.length) nodes = [el];
1812    nodes.forEach(function (node) {
1813      // Remove old highlights
1814      node.querySelectorAll("mark.search-highlight").forEach(function (mark) {
1815        var parent = mark.parentNode;
1816        parent.replaceChild(document.createTextNode(mark.textContent), mark);
1817        parent.normalize();
1818      });
1819    });
1820    if (!query) return;
1821    var walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, null, false);
1822    var textNodes = [];
1823    while (walker.nextNode()) textNodes.push(walker.currentNode);
1824    textNodes.forEach(function (textNode) {
1825      var text = textNode.textContent;
1826      var normalized = removeDiacritics(text.toLowerCase());
1827      var idx = normalized.indexOf(query);
1828      if (idx === -1) return;
1829      var frag = document.createDocumentFragment();
1830      var lastIdx = 0;
1831      while (idx !== -1) {
1832        frag.appendChild(document.createTextNode(text.substring(lastIdx, idx)));
1833        var mark = document.createElement("mark");
1834        mark.className = "search-highlight";
1835        mark.textContent = text.substring(idx, idx + query.length);
1836        frag.appendChild(mark);
1837        lastIdx = idx + query.length;
1838        idx = normalized.indexOf(query, lastIdx);
1839      }
1840      frag.appendChild(document.createTextNode(text.substring(lastIdx)));
1841      textNode.parentNode.replaceChild(frag, textNode);
1842    });
1843  }
1844
1845  function filterAndHighlight() {
1846    var query = removeDiacritics(searchInput.value.toLowerCase().trim());
1847    var sections = getSections();
1848
1849    sections.forEach(function (section) {
1850      highlightText(section.heading, query);
1851      highlightText(section.table, query);
1852      if (!query) {
1853        section.heading.style.display = "";
1854        section.table.style.display = "";
1855        return;
1856      }
1857      var heading = removeDiacritics(section.heading.textContent.toLowerCase());
1858      var content = removeDiacritics(section.table.textContent.toLowerCase());
1859      if (heading.indexOf(query) !== -1 || content.indexOf(query) !== -1) {
1860        section.heading.style.display = "";
1861        section.table.style.display = "";
1862      } else {
1863        section.heading.style.display = "none";
1864        section.table.style.display = "none";
1865      }
1866    });
1867
1868    var url = new URL(window.location);
1869    if (searchInput.value.trim()) {
1870      url.searchParams.set("searchPartner", searchInput.value.trim());
1871    } else {
1872      url.searchParams.delete("searchPartner");
1873    }
1874    history.replaceState(null, "", url);
1875  }
1876
1877  searchInput.addEventListener("input", filterAndHighlight);
1878
1879  // Read query from URL on load
1880  var urlQuery = new URLSearchParams(window.location.search).get("searchPartner");
1881  if (urlQuery) {
1882    searchInput.value = urlQuery;
1883    filterAndHighlight();
1884    // Scroll to first div in the section
1885    var section = searchInput.closest("section");
1886    if (section) {
1887      var firstDiv = section.querySelector("div");
1888      if (firstDiv) {
1889        firstDiv.scrollIntoView({ behavior: "smooth", block: "start" });
1890      }
1891    }
1892  }
1893});
1894
1895// Mobile language select (from .languageRetigo submenu)
1896document.addEventListener("DOMContentLoaded", function () {
1897  var mobileMenu = document.querySelector(".mobile-menu");
1898  if (!mobileMenu) return;
1899
1900  var langLink = mobileMenu.querySelector(".languageRetigo");
1901  if (!langLink) return;
1902
1903  var langLi = langLink.closest("li");
1904  if (!langLi) return;
1905
1906  var submenu = langLi.querySelector("ul");
1907  if (!submenu) return;
1908
1909  // Build select
1910  var select = document.createElement("select");
1911  select.className = "languageRetigo-select form-control";
1912
1913  // Current language as first option
1914  var currentOpt = document.createElement("option");
1915  currentOpt.value = langLink.getAttribute("href") || "";
1916  currentOpt.textContent = langLink.textContent.trim();
1917  currentOpt.selected = true;
1918  select.appendChild(currentOpt);
1919
1920  // Submenu items as options
1921  var subLinks = submenu.querySelectorAll("a");
1922  subLinks.forEach(function (a) {
1923    var opt = document.createElement("option");
1924    opt.value = a.getAttribute("href") || "";
1925    opt.textContent = a.textContent.trim();
1926    select.appendChild(opt);
1927  });
1928
1929  // Navigate on change
1930  select.addEventListener("change", function () {
1931    if (this.value) {
1932      window.location.href = this.value;
1933    }
1934  });
1935
1936  // Wrap in .languageRetigoCover
1937  var cover = document.createElement("div");
1938  cover.className = "languageRetigoCover";
1939  cover.appendChild(select);
1940
1941  // Create .mobileMenuFooter
1942  var footer = document.createElement("div");
1943  footer.className = "mobileMenuFooter";
1944  footer.appendChild(cover);
1945
1946  // Insert after last .nav-wrap in .mobile-menu-body
1947  var menuBody = mobileMenu.querySelector(".mobile-menu-body");
1948  if (menuBody) {
1949    menuBody.appendChild(footer);
1950  }
1951
1952  // Move social menu items to footer
1953  var socialLinks = mobileMenu.querySelectorAll(".socialMenuItem");
1954  if (socialLinks.length) {
1955    var socialCover = document.createElement("div");
1956    socialCover.className = "socialMenuItemCover";
1957    socialLinks.forEach(function (link) {
1958      var li = link.closest("li");
1959      socialCover.appendChild(link);
1960      if (li) li.style.display = "none";
1961    });
1962    footer.appendChild(socialCover);
1963  }
1964
1965  // Hide original language li from menu
1966  langLi.style.display = "none";
1967});
1968
1969// Constants and utility functions
1970const EMAIL_REGEX = /^[\w.-]+@[\w.-]+\.[a-z]{2,6}$/i;
1971
1972// Polyfills and prototypes
1973if (!String.prototype.trim) {
1974  String.prototype.trim = function () {
1975    return this.replace(/^\s+|\s+$/g, "");
1976  };
1977}
1978
1979const lenis = new Lenis({
1980  duration: 1.2,
1981  easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
1982  direction: "vertical",
1983  gestureDirection: "vertical",
1984  smooth: true,
1985  mouseMultiplier: 1.5,
1986  smoothTouch: false,
1987  touchMultiplier: 2,
1988  infinite: false,
1989});
1990
1991function raf(time) {
1992  lenis.raf(time);
1993  requestAnimationFrame(raf);
1994}
1995requestAnimationFrame(raf);
1996
1997// Pause Lenis when user swipes horizontally inside a tiny-slider on touch devices
1998(function () {
1999  var touchStartX = 0;
2000  var touchStartY = 0;
2001  var lenisStopped = false;
2002
2003  document.addEventListener("touchstart", function (e) {
2004    if (!e.target.closest(".tns-outer")) return;
2005    touchStartX = e.touches[0].clientX;
2006    touchStartY = e.touches[0].clientY;
2007    lenisStopped = false;
2008  }, { passive: true });
2009
2010  document.addEventListener("touchmove", function (e) {
2011    if (!e.target.closest(".tns-outer")) return;
2012    var dx = Math.abs(e.touches[0].clientX - touchStartX);
2013    var dy = Math.abs(e.touches[0].clientY - touchStartY);
2014    if (!lenisStopped && dx > dy) {
2015      lenis.stop();
2016      lenisStopped = true;
2017    }
2018  }, { passive: true });
2019
2020  document.addEventListener("touchend", function () {
2021    if (lenisStopped) {
2022      lenis.start();
2023      lenisStopped = false;
2024    }
2025  }, { passive: true });
2026
2027  document.addEventListener("touchcancel", function () {
2028    if (lenisStopped) {
2029      lenis.start();
2030      lenisStopped = false;
2031    }
2032  }, { passive: true });
2033})();
2034
2035function smoothScroll(target) {
2036  const isTouchDevice =
2037    "ontouchstart" in window || navigator.maxTouchPoints > 0;
2038
2039  if (isTouchDevice) {
2040    if (typeof target === "number") {
2041      window.scrollTo({
2042        top: 0,
2043        behavior: "smooth",
2044      });
2045    } else {
2046      target.scrollIntoView({
2047        behavior: "smooth",
2048      });
2049    }
2050  } else {
2051    lenis.scrollTo(target, {
2052      offset: 0,
2053      duration: 5,
2054    });
2055  }
2056}
2057
2058Number.prototype.formatMoney = function (
2059  decimals = 0,
2060  decimal = ",",
2061  thousand = " ",
2062) {
2063  const n = Math.abs(this);
2064  const sign = this < 0 ? "-" : "";
2065  const num = parseFloat(n).toFixed(decimals);
2066  const [intPart, decPart] = num.split(".");
2067  const formattedInt = intPart.replace(
2068    /(\d)(?=(\d{3})+(?!\d))/g,
2069    `$1${thousand}`,
2070  );
2071  return `${sign}${formattedInt}${decPart ? decimal + decPart : ""}`;
2072};
2073
2074// Nová jednoduchá funkce pro sledování scrollu a změnu barev
2075function initSectionColorTransition() {
2076  const sections = document.querySelectorAll(".changeSectionColor");
2077
2078  // Pokud nejsou žádné sekce s třídou changeSectionColor, ukončíme
2079  if (sections.length === 0) return;
2080
2081  let currentActiveIndex = 0;
2082
2083  let lastDefinedColor = "#ffffff"; // Uchováváme poslední definovanou barvu
2084
2085  // Funkce pro získání barvy ze sekce (z class)
2086  function getSectionColor(section) {
2087    const classList = section.className;
2088    const colorMatch = classList.match(/data-sectionColor;([a-fA-F0-9]{6})/);
2089
2090    if (colorMatch && colorMatch[1]) {
2091      return "#" + colorMatch[1];
2092    }
2093
2094    return null; // Vrátíme null místo fallback barvy
2095  }
2096
2097  // Funkce pro aplikaci barvy na všechny sekce
2098  function applyColor(sectionIndex) {
2099    if (
2100      sectionIndex !== currentActiveIndex &&
2101      sectionIndex >= 0 &&
2102      sectionIndex < sections.length
2103    ) {
2104      currentActiveIndex = sectionIndex;
2105      const sectionColor = getSectionColor(sections[currentActiveIndex]);
2106
2107      // Pokud má sekce definovanou barvu, aktualizujeme lastDefinedColor
2108      if (sectionColor !== null) {
2109        lastDefinedColor = sectionColor;
2110      }
2111      // Jinak používáme poslední definovanou barvu (lastDefinedColor zůstává stejná)
2112
2113      // Aplikujeme aktuální lastDefinedColor na všechny sekce
2114      sections.forEach((section) => {
2115        section.style.setProperty(
2116          "background-color",
2117          lastDefinedColor,
2118          "important",
2119        );
2120      });
2121    }
2122  }
2123
2124  // HlavnĂ­ funkce pro detekci aktivnĂ­ sekce
2125  function detectActiveSection() {
2126    const windowHeight = window.innerHeight;
2127    const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
2128
2129    // Threshold: 50% výšky viewportu
2130    const threshold = windowHeight * 0.5;
2131
2132    // Projdeme všechny sekce a najdeme tu, která je nejvíce viditelná
2133    let bestMatch = currentActiveIndex; // Zachováme současný index jako výchozí
2134    let bestVisibility = 0;
2135    let foundVisibleSection = false;
2136
2137    sections.forEach((section, index) => {
2138      const rect = section.getBoundingClientRect();
2139      const sectionTop = rect.top;
2140      const sectionBottom = rect.bottom;
2141
2142      // Vypočítáme, kolik procent sekce je viditelných
2143      let visibleHeight = 0;
2144
2145      if (sectionTop < 0 && sectionBottom > 0) {
2146        // Sekce začíná nad viewportem
2147        visibleHeight = Math.min(sectionBottom, windowHeight);
2148      } else if (sectionTop >= 0 && sectionTop < windowHeight) {
2149        // Sekce začíná ve viewportu
2150        visibleHeight = Math.min(sectionBottom, windowHeight) - sectionTop;
2151      }
2152
2153      // Pokud je viditelná alespoň polovina threshold, může být aktivní
2154      if (visibleHeight >= threshold) {
2155        foundVisibleSection = true;
2156        const visibility = visibleHeight / windowHeight;
2157        if (visibility > bestVisibility) {
2158          bestVisibility = visibility;
2159          bestMatch = index;
2160        }
2161      }
2162    });
2163
2164    // Aplikujeme barvu pouze pokud jsme našli viditelnou sekci
2165    if (foundVisibleSection) {
2166      applyColor(bestMatch);
2167    }
2168    // Pokud žádná sekce není dostatečně viditelná, zachováme současnou barvu
2169  }
2170
2171  // Inicializace - najdeme prvnĂ­ sekci s definovanou barvou
2172  let initialColorSet = false;
2173  for (let i = 0; i < sections.length; i++) {
2174    const color = getSectionColor(sections[i]);
2175    if (color !== null) {
2176      lastDefinedColor = color;
2177      initialColorSet = true;
2178      break;
2179    }
2180  }
2181
2182  // Pokud žádná sekce nemá definovanou barvu, použijeme výchozí
2183  if (!initialColorSet) {
2184    lastDefinedColor = "#ffffff";
2185  }
2186
2187  // Aplikujeme počáteční barvu na všechny sekce
2188  sections.forEach((section) => {
2189    section.style.setProperty(
2190      "background-color",
2191      lastDefinedColor,
2192      "important",
2193    );
2194  });
2195
2196  // SpustĂ­me detekci aktivnĂ­ sekce hned po inicializaci
2197  detectActiveSection();
2198
2199  // Throttled scroll handler s unikátním názvem proměnné
2200  let colorTransitionTicking = false;
2201  function onColorTransitionScroll() {
2202    if (!colorTransitionTicking) {
2203      requestAnimationFrame(() => {
2204        detectActiveSection();
2205        colorTransitionTicking = false;
2206      });
2207      colorTransitionTicking = true;
2208    }
2209  }
2210
2211  // Event listenery
2212  window.addEventListener("scroll", onColorTransitionScroll);
2213  window.addEventListener("resize", detectActiveSection);
2214}
2215 
2216// SpustĂ­me po naÄŤtenĂ­ DOMu
2217document.addEventListener("DOMContentLoaded", initSectionColorTransition);
2218
2219// Sticky menu
2220const updateActiveNavigation = () => {
2221  const scrollTop = $(window).scrollTop();
2222  const windowHeight = $(window).height();
2223  const windowBottom = scrollTop + windowHeight;
2224
2225  const $navLinks = $('.sticky-section-nav a[href^="#"]');
2226  let activeSection = null;
2227  let maxVisibleArea = 0;
2228
2229  $navLinks.each(function () {
2230    const href = $(this).attr("href");
2231    const $section = $(href);
2232
2233    if ($section.length) {
2234      const sectionTop = $section.offset().top;
2235      const sectionBottom = sectionTop + $section.height();
2236
2237      const visibleTop = Math.max(sectionTop, scrollTop);
2238      const visibleBottom = Math.min(sectionBottom, windowBottom);
2239      const visibleArea = Math.max(0, visibleBottom - visibleTop);
2240
2241      if (visibleArea > 0 && visibleArea > maxVisibleArea) {
2242        maxVisibleArea = visibleArea;
2243        activeSection = href;
2244      }
2245    }
2246  });
2247
2248  $(".sticky-section-nav li").removeClass("active");
2249
2250  if (activeSection) {
2251    $('.sticky-section-nav a[href="' + activeSection + '"]')
2252      .parent("li")
2253      .addClass("active");
2254    $(".sticky-section-nav-select").val(activeSection);
2255  }
2256};
2257
2258// Horizontal Scroller Class
2259class VerticalToHorizontalScroller {
2260  constructor(sectionSelector) {
2261    this.section = document.querySelector(sectionSelector);
2262    if (!this.section) return;
2263
2264    this.wrapper = this.section.querySelector(".horizontal-scroll-wrapper");
2265    this.container = this.section.querySelector(".items-container");
2266    this.panels = this.section.querySelectorAll('[id*="pageItemContent"]');
2267    this.progressDots = document.querySelectorAll(
2268      ".progress-indicator .progress-dot",
2269    );
2270    this.progressIndicator = document.querySelector(".progress-indicator");
2271    this.scrollHint = document.querySelector(".scroll-hint");
2272
2273    this.isActive = false;
2274    this.startOffset = 0;
2275    this.scrollDistance = 0;
2276    this.endOffset = 0;
2277
2278    this.init();
2279  }
2280
2281  init() {
2282    this.calculateDimensions();
2283    this.setupScrollListener();
2284    this.setupResizeListener();
2285
2286    // Initial check
2287    this.handleScroll();
2288  }
2289
2290  isEnabled() {
2291    return (
2292      !this.section.classList.contains("horizontal-lg") ||
2293      window.innerWidth > 768
2294    );
2295  }
2296
2297  calculateDimensions() {
2298    if (!this.isEnabled()) {
2299      this.section.style.height = "auto";
2300      this.resetVerticalLayout();
2301      return;
2302    }
2303
2304    // Calculate scroll distance needed for all panels
2305    this.scrollDistance = (this.panels.length - 1) * window.innerHeight;
2306
2307    // Set section height to: viewport height + scroll distance
2308    // This creates the scroll space needed for horizontal scrolling
2309    const sectionHeight = window.innerHeight + this.scrollDistance;
2310    this.section.style.height = `${sectionHeight}px`;
2311
2312    // Store section boundaries for easier access
2313    this.sectionTop = this.section.offsetTop;
2314    this.sectionBottom = this.sectionTop + this.section.offsetHeight;
2315  }
2316
2317  setupScrollListener() {
2318    let ticking = false;
2319
2320    window.addEventListener("scroll", () => {
2321      if (!ticking) {
2322        requestAnimationFrame(() => {
2323          this.handleScroll();
2324          ticking = false;
2325        });
2326        ticking = true;
2327      }
2328    });
2329  }
2330
2331  setupResizeListener() {
2332    window.addEventListener("resize", () => {
2333      this.calculateDimensions();
2334      this.handleScroll();
2335    });
2336  }
2337
2338  handleScroll() {
2339    if (!this.isEnabled()) {
2340      this.resetVerticalLayout();
2341      return;
2342    }
2343
2344    const scrollTop = window.pageYOffset;
2345    const sectionTop = this.section.offsetTop;
2346    const sectionBottom = sectionTop + this.section.offsetHeight;
2347    const containerHeight = this.container.offsetHeight;
2348
2349    // If the bottom of the container would go past the section, pin it to the bottom
2350    if (scrollTop + containerHeight >= sectionBottom) {
2351      // Pin to bottom of section
2352      this.container.style.position = "absolute";
2353      this.container.style.top =
2354        this.section.offsetHeight - containerHeight + "px";
2355      this.container.style.left = "0";
2356      this.container.style.zIndex = "10";
2357      // Keep last panel visible
2358      const lastPanelTranslate = -(this.panels.length - 1) * 100;
2359      this.container.style.transform = `translateX(${lastPanelTranslate}vw)`;
2360      this.updateProgressIndicators(1);
2361      // Hide UI elements
2362      if (this.progressIndicator)
2363        this.progressIndicator.classList.remove("active");
2364      if (this.scrollHint) this.scrollHint.classList.remove("active");
2365      return;
2366    }
2367
2368    // Check if section top has reached the top of the window
2369    if (scrollTop >= sectionTop && scrollTop < sectionBottom) {
2370      // We're in the horizontal scrolling zone - section is at top of window
2371      this.activateHorizontalScroll();
2372
2373      // Calculate progress through the horizontal section (0 to 1)
2374      // Progress starts when section top hits window top
2375      const progress = (scrollTop - sectionTop) / this.scrollDistance;
2376      const clampedProgress = Math.min(Math.max(progress, 0), 1);
2377
2378      // Calculate horizontal translation
2379      const translateX = -clampedProgress * (this.panels.length - 1) * 100;
2380
2381      // Apply smooth transform
2382      this.container.style.transform = `translateX(${translateX}vw)`;
2383      this.updateProgressIndicators(clampedProgress);
2384    } else if (scrollTop < sectionTop) {
2385      // Before horizontal section reaches top - show first panel
2386      this.deactivateHorizontalScroll();
2387      this.container.style.transform = "translateX(0vw)";
2388      this.updateProgressIndicators(0);
2389    } else {
2390      // After horizontal section - keep last panel visible with fixed positioning
2391      this.deactivateHorizontalScrollKeepLastPanel();
2392      const lastPanelTranslate = -(this.panels.length - 1) * 100;
2393      this.container.style.transform = `translateX(${lastPanelTranslate}vw)`;
2394      this.updateProgressIndicators(1);
2395    }
2396  }
2397
2398  resetVerticalLayout() {
2399    this.container.style.position = "";
2400    this.container.style.top = "";
2401    this.container.style.left = "";
2402    this.container.style.zIndex = "";
2403    this.container.style.transform = "";
2404    if (this.progressIndicator)
2405      this.progressIndicator.classList.remove("active");
2406    if (this.scrollHint) this.scrollHint.classList.remove("active");
2407  }
2408
2409  activateHorizontalScroll() {
2410    // Pin the container to viewport
2411    this.container.style.position = "fixed";
2412    this.container.style.top = "0";
2413    this.container.style.left = "0";
2414    this.container.style.zIndex = "10";
2415    // Show UI elements
2416    if (this.progressIndicator) this.progressIndicator.classList.add("active");
2417    if (this.scrollHint) this.scrollHint.classList.add("active");
2418  }
2419
2420  deactivateHorizontalScrollKeepLastPanel() {
2421    // Keep container fixed to show last panel, don't return to absolute
2422    // This keeps the last panel visible as the user continues scrolling
2423    this.container.style.position = "fixed";
2424    this.container.style.top = "0";
2425    this.container.style.left = "0";
2426    this.container.style.zIndex = "10";
2427    // Hide UI elements
2428    if (this.progressIndicator)
2429      this.progressIndicator.classList.remove("active");
2430    if (this.scrollHint) this.scrollHint.classList.remove("active");
2431  }
2432
2433  deactivateHorizontalScroll() {
2434    // Return to absolute positioning within section
2435    this.container.style.position = "absolute";
2436    this.container.style.top = "0";
2437    this.container.style.left = "0";
2438    this.container.style.zIndex = "1";
2439    // Hide UI elements
2440    if (this.progressIndicator)
2441      this.progressIndicator.classList.remove("active");
2442    if (this.scrollHint) this.scrollHint.classList.remove("active");
2443  }
2444
2445  updateProgressIndicators(progress) {
2446    const totalPanels = this.panels.length;
2447    const currentPanelFloat = progress * (totalPanels - 1);
2448    const currentPanel = Math.round(currentPanelFloat);
2449
2450    this.progressDots.forEach((dot, index) => {
2451      dot.classList.toggle("active", index === currentPanel);
2452    });
2453  }
2454}
2455
2456// Enhanced responsive image handling - moved outside document.ready
2457const handleResponsiveImages = (isResize = false) => {
2458  const getImageSize = (width) => {
2459    if (width < 320) return "small";
2460    if (width < 640) return "medium";
2461    if (width < 1280) return "large";
2462    if (width >= 1280) return "full";
2463    return "full";
2464  };
2465
2466  const updateImageUrl = ($elem) => {
2467    // Always read from data-src to maintain original pattern
2468    const url = $elem.attr("data-src");
2469
2470    if (!url) return;
2471
2472    // Get width based on whether element is in image-box or standalone
2473    const width = $elem.closest(".image-box").length
2474      ? $elem.closest(".image-box").width()
2475      : $elem.width();
2476
2477    const size = getImageSize(width);
2478    let newUrl;
2479
2480    // Handle first type: path/{imageName}-small.webp
2481    if (
2482      url.includes("-small") ||
2483      url.includes("-medium") ||
2484      url.includes("-large") ||
2485      url.includes("-full")
2486    ) {
2487      newUrl = url.replace(/-(?:small|medium|large|full)/, `-${size}`);
2488    }
2489    // Handle second and third type: path/small/{imageName}.webp
2490    else if (
2491      url.includes("/small/") ||
2492      url.includes("/medium/") ||
2493      url.includes("/large/") ||
2494      url.includes("/full/")
2495    ) {
2496      newUrl = url.replace(/\/(small|medium|large|full)\//, `/${size}/`);
2497    }
2498
2499    if (newUrl) {
2500      if (isResize) {
2501        // On resize, update src or background-image if element is loaded
2502        if ($elem.is("img") && $elem.attr("src")) {
2503          $elem.attr("src", newUrl);
2504        } else if (
2505          $elem.hasClass("image-box") &&
2506          $elem.css("background-image") !== "none"
2507        ) {
2508          $elem.css("background-image", `url(${newUrl})`);
2509        }
2510      } else {
2511        // On initial load, update data-src or data-bg
2512        if ($elem.is("img")) {
2513          $elem.attr("data-src", newUrl);
2514        } else if ($elem.hasClass("image-box")) {
2515          $elem.attr("data-bg", newUrl);
2516        }
2517      }
2518    }
2519  };
2520
2521  // Handle all types of responsive images
2522  $('.image-box img[data-responsive="YES"]').each((_, img) =>
2523    updateImageUrl($(img)),
2524  );
2525  $('.image-box img[data-change-url="YES"]').each((_, img) =>
2526    updateImageUrl($(img)),
2527  );
2528  $(".image-box[data-bg]").each((_, box) => updateImageUrl($(box)));
2529  // Handle standalone responsive images
2530  $('img[data-responsive="YES"]')
2531    .not(".image-box img")
2532    .each((_, img) => updateImageUrl($(img)));
2533};
2534
2535// Count number
2536const easeOutQuart = (x) => {
2537  return 1 - Math.pow(1 - x, 4);
2538};
2539
2540const animateCount = (selector = '[class*="count-number-"]') => {
2541  $(selector).each(function () {
2542    const $element = $(this);
2543    const $parent = $element.closest("[data-count]");
2544
2545    // Check if we found parent with data-number and element is part of tracked element
2546    if (
2547      !$parent.length ||
2548      !$element.closest(".track, .track-always").hasClass("in-view") ||
2549      $element.text() !== "0"
2550    ) {
2551      return;
2552    }
2553
2554    const endValue = parseFloat($parent.data("count"));
2555    if (isNaN(endValue)) {
2556      return;
2557    }
2558
2559    const startValue = 0;
2560    const startTime = performance.now();
2561    const duration = parseInt($parent.data("speed")) || 2000;
2562    const fillPercentage = parseFloat($parent.data("fill")) || 0;
2563
2564    // Get the SVG circle element
2565    const $bar = $parent.find("svg .bar");
2566    let length = 0;
2567
2568    // Calculate circle length if SVG bar exists
2569    if ($bar.length > 0) {
2570      length = $bar[0].getTotalLength();
2571      // Reset the circle animation state
2572      $bar.css({
2573        transition: "none",
2574        "stroke-dasharray": "0 " + length,
2575      });
2576      // Force reflow to ensure the reset takes effect
2577      $bar[0].getBoundingClientRect();
2578    }
2579
2580    const update = (currentTime) => {
2581      const elapsed = currentTime - startTime;
2582      const progress = Math.min(elapsed / duration, 1);
2583      const easedProgress = easeOutQuart(progress);
2584
2585      // Update number
2586      const currentValue = startValue + (endValue - startValue) * easedProgress;
2587      $element.text(
2588        Number.isInteger(endValue)
2589          ? Math.round(currentValue)
2590          : currentValue.toFixed(2),
2591      );
2592
2593      // Update SVG circle if it exists
2594      if ($bar.length > 0) {
2595        const visibleLength = length * (fillPercentage / 100) * easedProgress;
2596        $bar.css("stroke-dasharray", `${visibleLength} ${length}`);
2597      }
2598
2599      if (progress < 1) {
2600        requestAnimationFrame(update);
2601      }
2602    };
2603
2604    // Start the animation
2605    requestAnimationFrame(update);
2606  });
2607};
2608
2609// Global variable to store horizontal scroller instance
2610let horizontalScroller = null;
2611
2612// Main initialization
2613$(document).ready(() => {
2614  $('[data-toggle="tooltip"]').tooltip();
2615  const header = $("header");
2616  const footer = $("footer");
2617  const main = $("#main");
2618
2619  // Initialize horizontal scroller
2620  if (document.querySelector(".horizontal-scroll-section")) {
2621    horizontalScroller = new VerticalToHorizontalScroller(
2622      ".horizontal-scroll-section",
2623    );
2624  }
2625
2626  // Invert page
2627  if ($(".invert-toggle").length) {
2628    $(".invert-toggle").click(function () {
2629      if ($("html").hasClass("inverted")) {
2630        $("html").removeClass("inverted");
2631        $('.invert-toggle > [class*="fa-"]')
2632          .removeClass("fa-sun-bright")
2633          .addClass("fa-moon");
2634      } else {
2635        $("html").addClass("inverted");
2636        $('.invert-toggle > [class*="fa-"]')
2637          .removeClass("fa-moon")
2638          .addClass("fa-sun-bright");
2639      }
2640    });
2641  }
2642
2643  // Scroll down functionality
2644  if ($(".scroll-down").length) {
2645    $(".scroll-down").click(function () {
2646      var $pageItem = $(this).closest('[id^="pageItemContent"]');
2647      var scrollTo = $pageItem.length
2648        ? $pageItem.offset().top + $pageItem.outerHeight()
2649        : $(this).closest("section").height();
2650      smoothScroll(scrollTo);
2651      return false;
2652    });
2653  }
2654
2655  // Scroll to top functionality
2656  if ($(".scroll-top").length) {
2657    $(".scroll-top").click(function () {
2658      smoothScroll(0);
2659      return false;
2660    });
2661  }
2662
2663  // Layout setup
2664  const setupLayout = () => {
2665    const headerHeight = header.outerHeight(true);
2666    const footerHeight = footer.outerHeight(true);
2667    const minHeight = header.hasClass("fixed-top")
2668      ? $(window).height() - footerHeight
2669      : $(window).height() - headerHeight - footerHeight;
2670
2671    main.css("min-height", minHeight);
2672  };
2673
2674  // Lazy video loading
2675  const setupLazyVideos = () => {
2676    const loadVideo = ($video) => {
2677      const $parent = $video.parent();
2678      if ($parent.hasClass("loaded")) return;
2679
2680      const src = $video.attr("data-src");
2681      $video.attr("src", src);
2682      $parent.addClass("loaded").trigger("load play");
2683    };
2684
2685    const checkAndLoadVideos = () => {
2686      $(".lazy-video").each((_, video) => {
2687        const $video = $(video);
2688        const videoTop = $video.offset().top;
2689        const viewBottom = $(window).scrollTop() + $(window).height();
2690
2691        if (videoTop <= viewBottom) {
2692          loadVideo($video);
2693        }
2694      });
2695    };
2696
2697    if ($(".lazy-video").length) {
2698      window.addEventListener("DOMContentLoaded", checkAndLoadVideos);
2699      $(window).on("scroll", checkAndLoadVideos);
2700    }
2701  };
2702
2703  // Scroll handling
2704  let lastScrollTop = 0;
2705
2706  const handleScroll = () => {
2707    const scrollTop = $(window).scrollTop();
2708    const desktopNav = $(".desktop-navbar:not(.on-end)");
2709    const brandImage = $(".desktop-navbar:not(.on-end) .navbar-brand");
2710    const fixMenu = $("section#menu.position-sticky");
2711    const actionNav = $(".action-navigation");
2712    const navbar = $("#custom-navbar");
2713    const firstSection = $("#main > section:first");
2714
2715    // Menu transformation
2716    if (navbar.hasClass("fixed-top")) {
2717      if (scrollTop > 10) {
2718        header.addClass("small-menu");
2719        desktopNav.removeClass("bg-transparent text-white").addClass("bg-white");
2720        actionNav.removeClass("text-white");
2721        brandImage.removeClass("fill-white");
2722      } 
2723      else
2724      {
2725        header.removeClass("small-menu");
2726        if ( firstSection.is(".pt-0.text-white") || firstSection.children(":first").is(".text-white") )
2727        {
2728          desktopNav.addClass("bg-transparent text-white").removeClass("bg-white");
2729          actionNav.addClass("text-white");
2730          if ( firstSection.is(".bg-dark") || firstSection.is(".bg-black") )
2731          {
2732            brandImage.addClass("fill-white");
2733          }
2734        } 
2735        else 
2736        {
2737          if ( firstSection.is(".pt-0.text-white") || firstSection.children(":first").is(".text-white") ) 
2738          {
2739            desktopNav.removeClass("bg-white");
2740            desktopNav.addClass("bg-transparent text-white");
2741            actionNav.addClass("text-white");
2742            if ( firstSection.is(".bg-dark") || firstSection.is(".bg-black") )
2743            {
2744              brandImage.addClass("fill-white");
2745            }
2746          } else {
2747            desktopNav.removeClass("bg-transparent text-white");
2748            if ( firstSection.is(".bg-transparent.pt-0") )
2749            {
2750              desktopNav.removeClass("bg-white");
2751              desktopNav.addClass("bg-transparent");
2752            }
2753            else {
2754              desktopNav.addClass("bg-white");
2755            }
2756            actionNav.removeClass("text-white");
2757            if ( firstSection.is(".bg-dark") || firstSection.is(".bg-black") )
2758            {
2759              brandImage.removeClass("fill-white");
2760            }
2761          }
2762        }
2763      }
2764    }
2765
2766    if (scrollTop > lastScrollTop && scrollTop > 100) {
2767      navbar.addClass("navbar-hidden");
2768    } else if (scrollTop < lastScrollTop) {
2769      navbar.removeClass("navbar-hidden");
2770    }
2771
2772    if (scrollTop > lastScrollTop && scrollTop > 100) {
2773      navbar.addClass("navbar-hidden");
2774      fixMenu.addClass("top-no-header");
2775    } else if (scrollTop < lastScrollTop) {
2776      navbar.removeClass("navbar-hidden");
2777      fixMenu.removeClass("top-no-header");
2778    }
2779
2780    lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
2781
2782    // Track elements in view
2783    if ($(".track,.track-always").length) {
2784      const windowBottom = scrollTop + $(window).height();
2785
2786      $(".track,.track-always").each((_, elem) => {
2787        const $elem = $(elem);
2788        const elemTop = $elem.offset().top;
2789        const elemBottom = elemTop + $elem.height();
2790        const centerInView =
2791          (elemTop + elemBottom) / 2 >= scrollTop &&
2792          (elemTop + elemBottom) / 2 <= windowBottom;
2793
2794        if ($elem.is(".track-always")) {
2795          $elem.toggleClass("in-view", centerInView);
2796        } else if (!$elem.hasClass("in-view") && centerInView) {
2797          $elem.addClass("in-view");
2798        }
2799      });
2800    }
2801
2802    animateCount();
2803    updateActiveNavigation();
2804  };
2805
2806  // Event handlers
2807  const setupEventHandlers = () => {
2808    // Toggle handlers
2809    $(".menu-toggler, .search-toggler").on("click", function (e) {
2810      e.preventDefault();
2811      const type = this.className.match(/(menu|search)-toggler/)[1];
2812      const isOpen = $("body").hasClass(`${type}-open`);
2813
2814      $("body").toggleClass(`modal-open ${type}-open`, !isOpen);
2815      $("html").toggleClass("modal-open", !isOpen);
2816    });
2817
2818    // Submenu handling
2819    $(".has-submenu > .submenu-toggler").click(function () {
2820      $(this).parent().find("> .submenu").toggleClass("show");
2821    });
2822
2823    // Plus icon: toggle .active on .enroll within the same parent
2824    $("body").on("click", ".plus-icon", function () {
2825      const $parent = $(this).parent();
2826      const $enroll = $parent.find(".enroll").first();
2827      $enroll.toggleClass("active");
2828      $(this).toggleClass("active", $enroll.hasClass("active"));
2829    });
2830
2831    // External links
2832    $("a").each(function () {
2833      const isExternal =
2834        (!new RegExp("/" + window.location.host + "/").test(this.href) &&
2835          !this.href.startsWith("tel:") &&
2836          !this.href.startsWith("mailto:")) ||
2837        this.href.includes("/data/");
2838
2839      if (isExternal) {
2840        $(this).attr({
2841          target: "_blank",
2842          rel: "noopener noreferrer",
2843        });
2844      }
2845    });
2846
2847    $('a[href*="#"]:not([href="#"]), .nav-btn').click(function (e) {
2848      if ($(this).parent().is(".carousel")) return;
2849
2850      const href = this.getAttribute("href");
2851      const hash = href.includes("#") ? href.split("#")[1] : "";
2852      const path = href.includes("#") ? href.split("#")[0] : href;
2853      const currentPath = window.location.pathname;
2854
2855      if (hash && (path === "" || path === currentPath)) {
2856        e.preventDefault();
2857        const target = document.getElementById(hash);
2858        if (target) {
2859          lenis.scrollTo(target, { offset: 0 });
2860          history.pushState(null, null, "#" + hash);
2861        }
2862      }
2863    });
2864
2865    // Handle smooth scroll on page load
2866    if (window.location.hash) {
2867      const hash = window.location.hash.substring(1);
2868      const target = document.getElementById(hash);
2869
2870      if (target) {
2871        window.scrollTo(0, 0);
2872        setTimeout(() => {
2873          lenis.scrollTo(target, { offset: 0 });
2874        }, 300);
2875      }
2876    }
2877  };
2878
2879  // Initialize everything
2880  setupLayout();
2881  handleResponsiveImages();
2882  setupLazyVideos();
2883  setupEventHandlers();
2884
2885  // Bind scroll handler
2886  $(window).on("scroll", handleScroll);
2887
2888  // Handle window resize
2889  $(window).on("resize", () => {
2890    setupLayout();
2891    handleResponsiveImages(true);
2892    // Recalculate horizontal scroller dimensions if it exists
2893    if (horizontalScroller) {
2894      horizontalScroller.calculateDimensions();
2895      horizontalScroller.handleScroll();
2896    }
2897    if ($(window).width() > 768) {
2898      $("body").removeClass("modal-open mobile-open");
2899      $("body").removeClass("menu-open");
2900      $("html").removeClass("modal-open");
2901    }
2902  });
2903
2904  // Remove loader
2905  $(".overlay-loader").fadeOut("slow");
2906});
2907
2908// Initialize on load
2909$(window).on("load", () => {
2910  const windowHeight = $(window).height();
2911  const scrollTop = $(window).scrollTop();
2912  const windowBottom = scrollTop + windowHeight;
2913
2914  // First update data-src/data-bg attributes
2915  handleResponsiveImages(false);
2916
2917  // Then initialize lazy loading
2918  new MiniLazyload({
2919    rootMargin: "500px",
2920    threshold: 0.5,
2921  });
2922
2923  // Handle fixed header
2924  const navHeight = $(".navbar").outerHeight(true);
2925  const firstSection = $("#main > section:first");
2926  const desktopNav = $(".desktop-navbar:not(.on-end)");
2927  const brandImage = $(".desktop-navbar:not(.on-end) .navbar-brand");
2928  const actionNav = $(".action-navigation");
2929  const header = $("header");
2930
2931  $("#main").css(
2932    "padding-top",
2933    $("#main").children(":first").is(".pt-0") ? 0 : navHeight,
2934  );
2935
2936  if (scrollTop > 10) {
2937    header.addClass("small-menu");
2938    desktopNav.removeClass("bg-transparent text-white").addClass("bg-white");
2939    actionNav.removeClass("text-white");
2940    brandImage.removeClass("fill-white");
2941  } else {
2942    header.removeClass("small-menu");
2943    if (
2944      firstSection.is(".pt-0.text-white") ||
2945      firstSection.children(":first").is(".text-white")
2946    ) {
2947      desktopNav.addClass("bg-transparent text-white").removeClass("bg-white");
2948      actionNav.addClass("text-white");
2949      if (
2950        firstSection.is(".bg-dark") ||
2951        firstSection.is(".bg-black")
2952      ) {
2953        brandImage.addClass("fill-white");
2954      }
2955    } else {
2956      if (firstSection.is(".pt-0.text-white") || firstSection.children(":first").is(".text-white") ) 
2957      {
2958          desktopNav.addClass("bg-transparent text-white");
2959          desktopNav.removeClass("bg-white");
2960          actionNav.addClass("text-white");
2961        if ( firstSection.is(".bg-dark") || firstSection.is(".bg-black") ) 
2962        {
2963          brandImage.addClass("fill-white");
2964        }
2965      } else {
2966        desktopNav.removeClass("bg-transparent text-white");
2967        if ( firstSection.is(".bg-transparent.pt-0") )
2968        {
2969          desktopNav.removeClass("bg-white");
2970          desktopNav.addClass("bg-transparent");
2971        }
2972        else {
2973          desktopNav.addClass("bg-white");
2974        }
2975        actionNav.removeClass("text-white");
2976        brandImage.removeClass("fill-white");
2977      }
2978    }
2979  }
2980
2981  $(".track,.track-always").each((_, elem) => {
2982    const $elem = $(elem);
2983    const elemTop = $elem.offset().top;
2984    const centerInView = elemTop <= windowBottom;
2985    if (centerInView) {
2986      $elem.addClass("in-view");
2987    }
2988  });
2989
2990  animateCount();
2991
2992  // Handle popups
2993  const $popups = $('[id*="popup-"]');
2994  if ($popups.length) {
2995    $popups.on("click", () => $.cookie("cta-cookie", "open", { expires: 1 }));
2996    if ($.cookie("cta-cookie") !== "open") {
2997      $popups.modal();
2998    }
2999  }
3000});
3001
3002// Sticky section nav — responsive select (< 992px)
3003$(document).ready(function () {
3004  var $nav = $(".sticky-section-nav");
3005  if (!$nav.length) return;
3006
3007  var $wrapper = $('<div class="row no-gutters bg-secondary-2 d-lg-none"><div class="col-auto ml-auto p-2"></div></div>');
3008  var $sel = $('<select class="sticky-section-nav-select"></select>');
3009  $wrapper.find(".col-auto").append($sel);
3010
3011  $nav.find("li").each(function () {
3012    var $a   = $(this).find("a");
3013    var href = $a.attr("href");
3014    var text = $a.attr("title") || $a.text();
3015    var $opt = $("<option>").val(href).text(text);
3016    if ($(this).hasClass("active")) $opt.prop("selected", true);
3017    $sel.append($opt);
3018  });
3019
3020  $sel.on("change", function () {
3021    var $target = $($(this).val());
3022    if ($target.length) {
3023      $("html, body").animate({ scrollTop: $target.offset().top }, 400);
3024    }
3025  });
3026
3027  $nav.before($wrapper);
3028});
3029
3030// Add "in-view" class to .on-hover-show-text elements when visible on mobile
3031(function () {
3032  if (window.innerWidth > 991.98) return;
3033
3034  var elements = document.querySelectorAll(".on-hover-show-text");
3035  if (!elements.length) return;
3036
3037  var observer = new IntersectionObserver(function (entries) {
3038    entries.forEach(function (entry) {
3039      if (entry.isIntersecting) {
3040        entry.target.classList.add("in-view");
3041      } else {
3042        entry.target.classList.remove("in-view");
3043      }
3044    });
3045  }, { threshold: 0.75 });
3046
3047  elements.forEach(function (el) {
3048    observer.observe(el);
3049  });
3050})();
3051
3052;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.