PageSourceSearch

https://aichen-gutenburg.de/modules/mod_ok_slideshow/assets/js/ok.js

js aichen-gutenburg.de collected 2026-10-03 00:27:20 UTC 103,165 bytes, 2,153 lines download raw bytes

1(function ($) {
2    $(document).ready(function () {
3        //ok animation
4//function to detect if element in vieport
5                function okInWindow(s,t) {
6                    var scrollTop = $(window).scrollTop();
7                    var windowHeight = $(window).height();
8                    var currentEls = $(s);
9                    var result = [];
10                    currentEls.each(function () {
11                        var el = $(this);
12                        var offset = el.offset();
13                        if (t == 'end') {
14                            var trg = el.height();
15                        } else{
16                            if ($.isNumeric(t)) {
17                                var trg = t;
18                            } else {
19                                var trg = 0;
20                            };
21                        };
22                        if (windowHeight < trg)//avoid trigger start error when vieport smaller elements
23                         {
24                            var trg = 0;
25                        };
26                        if (scrollTop <= offset.top && (trg + offset.top) < (scrollTop + windowHeight))
27                            result.push(this);
28                    });
29                    return $(result);
30                }
31                $('.ok-animation').each(function (i) {
32                    var t = $(this).data('ok-trg');
33                    var boxInView = okInWindow($(this),t);
34                    var animation = $(this).data('ok-anim');
35                    var okDelay = $(this).data('ok-delay');
36                    setTimeout(function () {
37                        boxInView.addClass('ok-inview');
38                        boxInView.addClass(animation);
39                    }, okDelay);
40                });
41                $(window).scroll(function () {
42                    $('.ok-animation').each(function (i) {
43                        var t = $(this).data('ok-trg');
44                        var boxInView = okInWindow($(this),t);
45                        var animation = $(this).data('ok-anim');
46                        var okDelay = $(this).data('ok-delay');
47                        setTimeout(function () {
48                            boxInView.addClass('ok-inview');
49                            boxInView.addClass(animation);
50                        }, okDelay);
51                    });
52                });    
53            });
54})(jQuery);
55// uikit functions
56!function (t) {
57    if ("function" == typeof define && define.amd && define("uikit", function () {
58            var i = window.UIkit || t(window, window.jQuery, window.document);
59            return i.load = function (t, e, n, o) {
60                var s, a = t.split(","), r = [], l = (o.config && o.config.uikit && o.config.uikit.base ? o.config.uikit.base : "").replace(/\/+$/g, "");
61                if (!l)throw new Error("Please define base path to UIkit in the requirejs config.");
62                for (s = 0; s < a.length; s += 1) {
63                    var c = a[s].replace(/\./g, "/");
64                    r.push(l + "/components/" + c)
65                }
66                e(r, function () {
67                    n(i)
68                })
69            }, i
70        }), !window.jQuery)throw new Error("UIkit requires jQuery");
71    window && window.jQuery && t(window, window.jQuery, window.document)
72}(function (t, i, e) {
73    "use strict";
74    var n = {}, o = t.UIkit ? Object.create(t.UIkit) : void 0;
75    if (n.version = "2.21.0", n.noConflict = function () {
76            return o && (t.UIkit = o, i.UIkit = o, i.fn.uk = o.fn), n
77        }, n.prefix = function (t) {
78            return t
79        }, n.$ = i, n.$doc = n.$(document), n.$win = n.$(window), n.$html = n.$("html"), n.support = {}, n.support.transition = function () {
80            var t = function () {
81                var t, i = e.body || e.documentElement, n = {
82                    WebkitTransition: "webkitTransitionEnd",
83                    MozTransition: "transitionend",
84                    OTransition: "oTransitionEnd otransitionend",
85                    transition: "transitionend"
86                };
87                for (t in n)if (void 0 !== i.style[t])return n[t]
88            }();
89            return t && {end: t}
90        }(), n.support.animation = function () {
91            var t = function () {
92                var t, i = e.body || e.documentElement, n = {
93                    WebkitAnimation: "webkitAnimationEnd",
94                    MozAnimation: "animationend",
95                    OAnimation: "oAnimationEnd oanimationend",
96                    animation: "animationend"
97                };
98                for (t in n)if (void 0 !== i.style[t])return n[t]
99            }();
100            return t && {end: t}
101        }(), function () {
102            var i = 0;
103            t.requestAnimationFrame = t.requestAnimationFrame || t.webkitRequestAnimationFrame || function (e) {
104                var n = (new Date).getTime(), o = Math.max(0, 16 - (n - i)), s = t.setTimeout(function () {
105                    e(n + o)
106                }, o);
107                return i = n + o, s
108            }, t.cancelAnimationFrame || (t.cancelAnimationFrame = function (t) {
109                clearTimeout(t)
110            })
111        }(), n.support.touch = "ontouchstart"in document || t.DocumentTouch && document instanceof t.DocumentTouch || t.navigator.msPointerEnabled && t.navigator.msMaxTouchPoints > 0 || t.navigator.pointerEnabled && t.navigator.maxTouchPoints > 0 || !1, n.support.mutationobserver = t.MutationObserver || t.WebKitMutationObserver || null, n.Utils = {}, n.Utils.isFullscreen = function () {
112            return document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.fullscreenElement || !1
113        }, n.Utils.str2json = function (t, i) {
114            try {
115                return i ? JSON.parse(t.replace(/([\$\w]+)\s*:/g, function (t, i) {
116                    return '"' + i + '":'
117                }).replace(/'([^']+)'/g, function (t, i) {
118                    return '"' + i + '"'
119                })) : new Function("", "var json = " + t + "; return JSON.parse(JSON.stringify(json));")()
120            } catch (e) {
121                return !1
122            }
123        }, n.Utils.debounce = function (t, i, e) {
124            var n;
125            return function () {
126                var o = this, s = arguments, a = function () {
127                    n = null, e || t.apply(o, s)
128                }, r = e && !n;
129                clearTimeout(n), n = setTimeout(a, i), r && t.apply(o, s)
130            }
131        }, n.Utils.removeCssRules = function (t) {
132            var i, e, n, o, s, a, r, l, c, u;
133            t && setTimeout(function () {
134                try {
135                    for (u = document.styleSheets, o = 0, r = u.length; r > o; o++) {
136                        for (n = u[o], e = [], n.cssRules = n.cssRules, i = s = 0, l = n.cssRules.length; l > s; i = ++s)n.cssRules[i].type === CSSRule.STYLE_RULE && t.test(n.cssRules[i].selectorText) && e.unshift(i);
137                        for (a = 0, c = e.length; c > a; a++)n.deleteRule(e[a])
138                    }
139                } catch (h) {
140                }
141            }, 0)
142        }, n.Utils.isInView = function (t, e) {
143            var o = i(t);
144            if (!o.is(":visible"))return !1;
145            var s = n.$win.scrollLeft(), a = n.$win.scrollTop(), r = o.offset(), l = r.left, c = r.top;
146            return e = i.extend({
147                topoffset: 0,
148                leftoffset: 0
149            }, e), c + o.height() >
149= a && c - e.topoffset <= a + n.$win.height() && l + o.width() >= s && l - e.leftoffset <= s + n.$win.width() ? !0 : !1
150        }, n.Utils.checkDisplay = function (t, e) {
151            var o = n.$("[data-uk-margin], [data-uk-grid-match], [data-uk-grid-margin], [data-uk-check-display]", t || document);
152            return t && !o.length && (o = i(t)), o.trigger("display.uk.check"), e && ("string" != typeof e && (e = '[class*="uk-animation-"]'), o.find(e).each(function () {
153                var t = n.$(this), i = t.attr("class"), e = i.match(/uk\-animation\-(.+)/);
154                t.removeClass(e[0]).width(), t.addClass(e[0])
155            })), o
156        }, n.Utils.options = function (t) {
157            if (i.isPlainObject(t))return t;
158            var e = t ? t.indexOf("{") : -1, o = {};
159            if (-1 != e)try {
160                o = n.Utils.str2json(t.substr(e))
161            } catch (s) {
162            }
163            return o
164        }, n.Utils.animate = function (t, e) {
165            var o = i.Deferred();
166            return t = n.$(t), e = e, t.css("display", "none").addClass(e).one(n.support.animation.end, function () {
167                t.removeClass(e), o.resolve()
168            }).width(), t.css("display", ""), o.promise()
169        }, n.Utils.uid = function (t) {
170            return (t || "id") + (new Date).getTime() + "RAND" + Math.ceil(1e5 * Math.random())
171        }, n.Utils.template = function (t, i) {
172            for (var e, n, o, s, a = t.replace(/\n/g, "\\n").replace(/\{\{\{\s*(.+?)\s*\}\}\}/g, "{{!$1}}").split(/(\{\{\s*(.+?)\s*\}\})/g), r = 0, l = [], c = 0; r < a.length;) {
173                if (e = a[r], e.match(/\{\{\s*(.+?)\s*\}\}/))switch (r += 1, e = a[r], n = e[0], o = e.substring(e.match(/^(\^|\#|\!|\~|\:)/) ? 1 : 0), n) {
174                    case"~":
175                        l.push("for(var $i=0;$i<" + o + ".length;$i++) { var $item = " + o + "[$i];"), c++;
176                        break;
177                    case":":
178                        l.push("for(var $key in " + o + ") { var $val = " + o + "[$key];"), c++;
179                        break;
180                    case"#":
181                        l.push("if(" + o + ") {"), c++;
182                        break;
183                    case"^":
184                        l.push("if(!" + o + ") {"), c++;
185                        break;
186                    case"/":
187                        l.push("}"), c--;
188                        break;
189                    case"!":
190                        l.push("__ret.push(" + o + ");");
191                        break;
192                    default:
193                        l.push("__ret.push(escape(" + o + "));")
194                } else l.push("__ret.push('" + e.replace(/\'/g, "\\'") + "');");
195                r += 1
196            }
197            return s = new Function("$data", ["var __ret = [];", "try {", "with($data){", c ? '__ret = ["Not all blocks are closed correctly."]' : l.join(""), "};", "}catch(e){__ret = [e.message];}", 'return __ret.join("").replace(/\\n\\n/g, "\\n");', "function escape(html) { return String(html).replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');}"].join("\n")), i ? s(i) : s
198        }, n.Utils.events = {}, n.Utils.events.click = n.support.touch ? "tap" : "click", t.UIkit = n, n.fn = function (t, e) {
199            var o = arguments, s = t.match(/^([a-z\-]+)(?:\.([a-z]+))?/i), a = s[1], r = s[2];
200            return n[a] ? this.each(function () {
201                var t = i(this), s = t.data(a);
202                s || t.data(a, s = n[a](this, r ? void 0 : e)), r && s[r].apply(s, Array.prototype.slice.call(o, 1))
203            }) : (i.error("UIkit component [" + a + "] does not exist."), this)
204        }, i.UIkit = n, i.fn.uk = n.fn, n.langdirection = "rtl" == n.$html.attr("dir") ? "right" : "left", n.components = {}, n.component = function (t, e) {
205            var o = function (e, s) {
206                var a = this;
207                return this.UIkit = n, this.element = e ? n.$(e) : null, this.options = i.extend(!0, {}, this.defaults, s), this.plugins = {}, this.element && this.element.data(t, this), this.init(), (this.options.plugins.length ? this.options.plugins : Object.keys(o.plugins)).forEac
207h(function (t) {
208                    o.plugins[t].init && (o.plugins[t].init(a), a.plugins[t] = !0)
209                }), this.trigger("init.uk.component", [t, this]), this
210            };
211            return o.plugins = {}, i.extend(!0, o.prototype, {
212                defaults: {plugins: []}, boot: function () {
213                }, init: function () {
214                }, on: function (t, i, e) {
215                    return n.$(this.element || this).on(t, i, e)
216                }, one: function (t, i, e) {
217                    return n.$(this.element || this).one(t, i, e)
218                }, off: function (t) {
219                    return n.$(this.element || this).off(t)
220                }, trigger: function (t, i) {
221                    return n.$(this.element || this).trigger(t, i)
222                }, find: function (t) {
223                    return n.$(this.element ? this.element : []).find(t)
224                }, proxy: function (t, i) {
225                    var e = this;
226                    i.split(" ").forEach(function (i) {
227                        e[i] || (e[i] = function () {
228                            return t[i].apply(t, arguments)
229                        })
230                    })
231                }, mixin: function (t, i) {
232                    var e = this;
233                    i.split(" ").forEach(function (i) {
234                        e[i] || (e[i] = t[i].bind(e))
235                    })
236                }, option: function () {
237                    return 1 == arguments.length ? this.options[arguments[0]] || void 0 : (2 == arguments.length && (this.options[arguments[0]] = arguments[1]), void 0)
238                }
239            }, e), this.components[t] = o, this[t] = function () {
240                var e, o;
241                if (arguments.length)switch (arguments.length) {
242                    case 1:
243                        "string" == typeof arguments[0] || arguments[0].nodeType || arguments[0]instanceof jQuery ? e = i(arguments[0]) : o = arguments[0];
244                        break;
245                    case 2:
246                        e = i(arguments[0]), o = arguments[1]
247                }
248                return e && e.data(t) ? e.data(t) : new n.components[t](e, o)
249            }, n.domready && n.component.boot(t), o
250        }, n.plugin = function (t, i, e) {
251            this.components[t].plugins[i] = e
252        }, n.component.boot = function (t) {
253            n.components[t].prototype && n.components[t].prototype.boot && !n.components[t].booted && (n.components[t].prototype.boot.apply(n, []), n.components[t].booted = !0)
254        }, n.component.bootComponents = function () {
255            for (var t in n.components)n.component.boot(t)
256        }, n.domObservers = [], n.domready = !1, n.ready = function (t) {
257            n.domObservers.push(t), n.domready && t(document)
258        }, n.on = function (t, i, e) {
259            return t && t.indexOf("ready.uk.dom") > -1 && n.domready && i.apply(n.$doc), n.$doc.on(t, i, e)
260        }, n.one = function (t, i, e) {
261            return t && t.indexOf("ready.uk.dom") > -1 && n.domready ? (i.apply(n.$doc), n.$doc) : n.$doc.one(t, i, e)
262        }, n.trigger = function (t, i) {
263            return n.$doc.trigger(t, i)
264        }, n.domObserve = function (t, i) {
265            n.support.mutationobserver && (i = i || function () {
266            }, n.$(t).each(function () {
267                var t = this, e = n.$(t);
268                if (!e.data("observer"))try {
269                    var o = new n.support.mutationobserver(n.Utils.debounce(function () {
270                        i.apply(t, []), e.trigger("changed.uk.dom")
271                    }, 50));
272                    o.observe(t, {childList: !0, subtree: !0}), e.data("observer", o)
273                } catch (s) {
274                }
275            }))
276        }, n.init = function (t) {
277            t = t || document, n.domObservers.forEach(function (i) {
278                i(t)
279            })
280        }, n.on("domready.uk.dom", function () {
281            n.init(), n.domready && n.Utils.checkDisplay()
282        }), i(function () {
283            n.$body = n.$("body"), n.ready(function () {
284                n.domObserve("[data-uk-observe]")
285            }), n.on("changed.uk.dom", function (t) {
286                n.init(t.target), n.Utils.checkDisplay(t.target)
287            }), n.trigger("beforeready.uk.dom"), n.component.bootComponents(), setInterval(function () {
288                var t, i = {x: window.pageXOffset, y: window.pageYOffset}, e = function () {
289                    (i.x != window.pageXOffset || i.y != window.pageYOffset) && (t = {
290                        x: 0,
291                        y: 0
292                    }, window.pageXOffset != i.x && (t.x = window.pageXOffset > i.x ? 1 : -1), window.pageYOffset != i.y && (t.y = window.pageYOffset > i.y ? 1 : -1), i = {
293                        dir: t,
294                        x: window.pageXOffset,
295                        y: window.pageYOffset
296                    }, n.$doc.trigger("scrolling.uk.document", [i]))
297                };
298                return n.support.touch && n.$html.on("touchmove touchend MSPointerMove MSPointerUp pointermove pointerup", e), (i.x || i.y) && e(), e
299            }(), 15), n.trigger("domready.uk.dom"), n.support.touch && navigator.userAgent.match(/(iPad|iPhone|iPod)/g) && n.$win.on("load orientationchange resize", n.Utils.debounce(function () {
300                var t = function () {
301                    return i(".uk-height-viewport").css("height", window.innerHeight), t
302                };
303                return t()
304            }(), 100)), n.trigger("afterready.uk.dom"), n.domready = !0
305        }), n.$html.addClass(n.support.touch ? "uk-touch" : "uk-notouch"), n.support.touch) {
306        var s, a = !1, r = "uk-hover", l = ".uk-overlay, .uk-overlay-hover, .uk-overlay-toggle, .uk-animation-hover, .uk-has-hover";
307        n.$html.on("touchstart MSPointerDown pointerdown", l, function () {
308            a && i("." + r).removeClass(r), a = i(this).addClass(r)
309        }).on("touchend MSPointerUp pointerup", function (t) {
310            s = i(t.target).parents(l), a && a.not(s).removeClass(r)
311        })
312    }
313    return n
314}), function (t) {
315    function i(t, i, e, n) {
316        return Math.abs(t - i) >= Math.abs(e - n) ? t - i > 0 ? "Left" : "Right" : e - n > 0 ? "Up" : "Down"
317    }
318
319    function e() {
320        c = null, h.last && (h.el.trigger("longTap"), h = {})
321    }
322
323    function n() {
324        c && clearTimeout(c), c = null
325    }
326
327    function o() {
328        a && clearTimeout(a), r && clearTimeout(r), l && clearTimeout(l), c && clearTimeout(c), a = r = l = c = null, h = {}
329    }
330
331    function s(t) {
332        return t.pointerType == t.MSPOINTER_TYPE_TOUCH && t.isPrimary
333    }
334
335    if (!t.fn.swipeLeft) {
336        var a, r, l, c, u, h = {}, d = 750;
337        t(function () {
338            var f, p, m, g = 0, v = 0;
339            "MSGesture"in window && (u = new MSGesture, u.target = document.body), t(document).on("MSGestureEnd gestureend", function (t) {
340                var i = t.originalEvent.velocityX > 1 ? "Right" : t.originalEvent.velocityX < -1 ? "Left" : t.originalEvent.velocityY > 1 ? "Down" : t.originalEvent.velocityY < -1 ? "Up" : null;
341                i && (h.el.trigger("swipe"), h.el.trigger("swipe" + i))
342            }).on("touchstart MSPointerDown pointerdown", function (i) {
343                ("MSPointerDown" != i.type || s(i.originalEvent)) && (m = "MSPointerDown" == i.type || "pointerdown" == i.type ? i : i.originalEvent.touches[0], f = Date.now(), p = f - (h.last || f), h.el = t("tagName"in m.target ? m.target : m.target.parentNode), a && clearTimeout(a), h.x1 = m.pageX, h.y1 = m.pageY, p > 0 && 250 >= p && (h.isDoubleTap = !0), h.last = f, c = setTimeout(e, d), !u || "MSPointerDown" != i.type && "pointerdown" != i.type && "touchstart" != i.type || u.addPointer(i.originalEvent.pointerId))
344            }).on("touchmove MSPointerMove pointermove", function (t) {
345                ("MSPointerMove" != t.type || s(t.originalEvent)) && (m = "MSPointerMove" == t.type || "pointermove" == t.type ? t : t.originalEvent.touches[0], n(), h.x2 = m.pageX, h.y2 = m.pageY, g += Math.abs(h.x1 - h.x2), v += Math.abs(h.y1 - h.y2))
346            }).on("touchend MSPointerUp pointerup", function (e) {
347                ("MSPointerUp" != e.type || s(e.originalEvent)) && (n(), h.x2 && Math.abs(h.x1 - h.x2) > 30 || h.y2 && Math.abs(h.y1 - h.y2) > 30 ? l = setTimeout(function () {
348                    h.el.trigger("swipe"), h.el.trigger("swipe" + i(h.x1, h.x2, h.y1, h.y2)), h = {}
349                }, 0) : "last"in h && (isNaN(g) || 30 > g && 30 > v ? r = setTimeout(function () {
350                    var i = t.Event("tap");
351                    i.cancelTouch = o, h.el.trigger(i), h.isDoubleTap ? (h.el.trigger("doubleTap"), h = {}) : a = setTimeout(function () {
352                        a = null, h.el.trigger("singleTap"), h = {}
353                    }, 250)
354                }, 0) : h = {}, g = v = 0))
355            }).on("touchcancel MSPointerCancel", o), t(window).on("scroll", o)
356        }
356), ["swipe", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "doubleTap", "tap", "singleTap", "longTap"].forEach(function (i) {
357            t.fn[i] = function (e) {
358                return t(this).on(i, e)
359            }
360        })
361    }
362}(jQuery), function (t) {
363    "use strict";
364    var i = [];
365    t.component("stackMargin", {
366        defaults: {cls: "uk-margin-small-top"}, boot: function () {
367            t.ready(function (i) {
368                t.$("[data-uk-margin]", i).each(function () {
369                    var i, e = t.$(this);
370                    e.data("stackMargin") || (i = t.stackMargin(e, t.Utils.options(e.attr("data-uk-margin"))))
371                })
372            })
373        }, init: function () {
374            var e = this;
375            this.columns = this.element.children(), this.columns.length && (t.$win.on("resize orientationchange", function () {
376                var i = function () {
377                    e.process()
378                };
379                return t.$(function () {
380                    i(), t.$win.on("load", i)
381                }), t.Utils.debounce(i, 20)
382            }()), t.$html.on("changed.uk.dom", function () {
383                e.columns = e.element.children(), e.process()
384            }), this.on("display.uk.check", function () {
385                e.columns = e.element.children(), this.element.is(":visible") && this.process()
386            }.bind(this)), i.push(this))
387        }, process: function () {
388            return t.Utils.stackMargin(this.columns, this.options), this
389        }, revert: function () {
390            return this.columns.removeClass(this.options.cls), this
391        }
392    }), function () {
393        var i = [], e = function (t) {
394            if (t.is(":visible")) {
395                var i = t.parent().width(), e = t.data("width"), n = i / e, o = Math.floor(n * t.data("height"));
396                t.css({height: e > i ? o : t.data("height")})
397            }
398        };
399        t.component("responsiveElement", {
400            defaults: {}, boot: function () {
401                t.ready(function (i) {
402                    t.$("iframe.uk-responsive-width, [data-uk-responsive]", i).each(function () {
403                        var i, e = t.$(this);
404                        e.data("responsiveIframe") || (i = t.responsiveElement(e, {}))
405                    })
406                })
407            }, init: function () {
408                var t = this.element;
409                t.attr("width") && t.attr("height") && (t.data({
410                    width: t.attr("width"),
411                    height: t.attr("height")
412                }).on("display.uk.check", function () {
413                    e(t)
414                }), e(t), i.push(t))
415            }
416        }), t.$win.on("resize load", t.Utils.debounce(function () {
417            i.forEach(function (t) {
418                e(t)
419            })
420        }, 15))
421    }(), t.Utils.stackMargin = function (i, e) {
422        e = t.$.extend({cls: "uk-margin-small-top"}, e), e.cls = e.cls, i = t.$(i).removeClass(e.cls);
423        var n = !1, o = i.filter(":visible:first"), s = o.length ? o.position().top + o.outerHeight() - 1 : !1;
424        s !== !1 && i.each(function () {
425            var i = t.$(this);
426            i.is(":visible") && (n ? i.addClass(e.cls) : i.position().top >= s && (n = i.addClass(e.cls)))
427        })
428    }, t.Utils.matchHeights = function (i, e) {
429        i = t.$(i).css("min-height", ""), e = t.$.extend({row: !0}, e);
430        var n = function (i) {
431            if (!(i.length < 2)) {
432                var e = 0;
433                i.each(function () {
434                    e = Math.max(e, t.$(this).outerHeight())
435                }).each(function () {
436                    var i = t.$(this), n = e - ("border-box" == i.css("box-sizing") ? 0 : i.outerHeight() - i.height());
437                    i.css("min-height", n + "px")
438                })
439            }
440        };
441        e.row ? (i.first().width(), setTimeout(function () {
442            var e = !1, o = [];
443            i.each(function () {
444                var i = t.$(this), s = i.offset().top;
445                s != e && o.length && (n(t.$(o)), o = [], s = i.offset().top), o.push(i), e = s
446            }), o.length && n(t.$(o))
447        }, 0)) : n(i)
448    }
449}(UIkit), function (t) {
450    "use strict";
451    function i(i, e) {
452        e = t.$.extend({
453            duration: 1e3, transition: "easeOutExpo", offset: 0, complete: function () {
454            }
455        }, e);
456        var n = i.offset().top - e.offset, o = t.$doc.height(), s = window.innerHeight;
457        n + s > o && (n = o - s), t.$("html,body").stop().animate({scrollTop: n}, e.duration, e.transition).promise().done(e.complete)
458    }
459
460    t.component("smoothScroll", {
461        boot: function () {
462            t.$html.on("click.smooth-scroll.uikit", "[data-uk-smooth-scroll]", function () {
463                var i = t.$(this);
464                if (!i.data("smoothScroll")) {
465                    {
466                        t.smoothScroll(i, t.Utils.options(i.attr("data-uk-smooth-scroll")))
467                    }
468                    i.trigger("click")
469                }
470                return !1
471            })
472        }, init: function () {
473            var e = this;
474            this.on("click", function (n) {
475                n.preventDefault(), i(t.$(this.hash).length ? t.$(this.hash) : t.$("body"), e.options)
476            })
477        }
478    }), t.Utils.scrollToElement = i, t.$.easing.easeOutExpo || (t.$.easing.easeOutExpo = function (t, i, e, n, o) {
479        return i == o ? e + n : n * (-Math.pow(2, -10 * i / o) + 1) + e
480    })
481}(UIkit), function (t) {
482    "use strict";
483    var i = t.$win, e = t.$doc, n = [], o = function () {
484        for (var t = 0; t < n.length; t++)window.requestAnimationFrame.apply(window, [n[t].check])
485    };
486    t.component("scrollspy", {
487        defaults: {
488            target: !1,
489            cls: "uk-scrollspy-inview",
490            initcls: "uk-scrollspy-init-inview",
491            topoffset: 0,
492            leftoffset: 0,
493            repeat: !1,
494            delay: 0
495        }, boot: function () {
496            e.on("scrolling.uk.document", o), i.on("load resize orientationchange", t.Utils.debounce(o, 50)), t.ready(function (i) {
497                t.$("[data-uk-scrollspy]", i).each(function () {
498                    var i = t.$(this);
499                    if (!i.data("scrollspy")) {
500                        t.scrollspy(i, t.Utils.options(i.attr("data-uk-scrollspy")))
501                    }
502                })
503            })
504        }, init: function () {
505            var i, e = this, o = this.options.cls.split(/,/), s = function () {
506                var n = e.options.target ? e.element.find(e.options.target) : e.element, s = 1 === n.length ? 1 : 0, a = 0;
507                n.each(function () {
508                    var n = t.$(this), r = n.data("inviewstate"), l = t.Utils.isInView(n, e.options), c = n.data("ukScrollspyCls") || o[a].trim();
509                    !l || r || n.data("scrollspy-idle") || (i || (n.addClass(e.options.initcls), e.offset = n.offset(), i = !0, n.trigger("init.uk.scrollspy")), n.data("scrollspy-idle", setTimeout(function () {
510                        n.addClass("uk-scrollspy-inview").toggleClass(c).width(), n.trigger("inview.uk.scrollspy"), n.data("scrollspy-idle", !1), n.data("inviewstate", !0)
511                    }, e.options.delay * s)), s++), !l && r && e.options.repeat && (n.data("scrollspy-idle") && clearTimeout(n.data("scrollspy-idle")), n.removeClass("uk-scrollspy-inview").toggleClass(c), n.data("inviewstate", !1), n.trigger("outview.uk.scrollspy")), a = o[a + 1] ? a + 1 : 0
512                })
513            };
514            s(), this.check = s, n.push(this)
515        }
516    });
517    var s = [], a = function () {
518        for (var t = 0; t < s.length; t++)window.requestAnimationFrame.apply(window, [s[t].check])
519    };
520    t.component("scrollspynav", {
521        defaults: {
522            cls: "uk-active",
523            closest: !1,
524            topoffset: 0,
525            leftoffset: 0,
526            smoothscroll: !1
527        }, boot: function () {
528            e.on("scrolling.uk.document", a), i.on("resize orientationchange", t.Utils.debounce(a, 50)), t.ready(function (i) {
529                t.$("[data-uk-scrollspy-nav]", i).each(function () {
530                    var i = t.$(this);
531                    if (!i.data("scrollspynav")) {
532                        t.scrollspynav(i, t.Utils.options(i.attr("data-uk-scrollspy-nav")))
533                    }
534                })
535            })
536        }, init: function () {
537            var e, n = [], o = this.find("a[href^='#']").each(function () {
538                n.push(t.$(this).attr("href"))
539            }), a = t.$(n.join(",")), r = this.options.cls, l = this.options.closest || this.options.closest, c = this, u = function () {
540                e = [];
541                for (var n = 0; n < a.length; n++)t.Utils.isInView(a.eq(n), c.options) && e.push(a.eq(n));
542                if (e.length) {
543                    var s, u = i.scrollTop(), h = function () {
544                        for (var t = 0; t < e.length; t++)if (e[t].offset().top >= u)return e[t]
545                    }();
546                    if (!h)return;
547                    c.options.closest ? (o.closest(l).removeClass(r), s = o.filter("a[href='#" + h.attr("id") + "']").closest(l).addClass(r)) : s = o.removeClass(r).filter("a[href='#" + h.attr("id") + "']").addClass(r), c.element.trigger("inview.uk.scrollspynav", [h, s])
548                }
549            };
550            this.options.smoothscroll && t.smoothScroll && o.each(function () {
551                t.smoothScroll(this, c.options.smoothscroll)
552            }), u(), this.element.data("scrollspynav", this), this.check = u, s.push(this)
553        }
554    })
555}(UIkit), function (t) {
556    "use strict";
557    var i = [];
558    t.component("toggle", {
559        defaults: {target: !1, cls: "uk-hidden", animation: !1, duration: 200}, boot: function () {
560            t.ready(function (e) {
561                t.$("[data-uk-toggle]", e).each(function () {
562                    var i = t.$(this);
563                    if (!i.data("toggle")) {
564                        t.toggle(i, t.Utils.options(i.attr("data-uk-toggle")))
565                    }
566                }), setTimeout(function () {
567                    i.forEach(function (t) {
568                        t.getToggles()
569                    })
570                }, 0)
571            })
572        }, init: function () {
573            var t = this;
574            this.aria = -1 !== this.options.cls.indexOf("uk-hidden"), this.getToggles(), this.on("click", function (i) {
575                t.element.is('a[href="#"]') && i.preventDefault(), t.toggle()
576            }), i.push(this)
577        }, toggle: function () {
578            if (this.totoggle.length) {
579                if (this.options.animation && t.support.animation) {
580                    var i = this, e = this.options.animation.split(",");
581                    1 == e.length && (e[1] = e[0]), e[0] = e[0].trim(), e[1] = e[1].trim(), this.totoggle.css("animation-duration", this.options.duration + "ms"), this.totoggle.hasClass(this.options.cls) ? (this.totoggle.toggleClass(this.options.cls), this.totoggle.each(function () {
582                        t.Utils.animate(this, e[0]).then(function () {
583                            t.$(this).css("animation-duration", ""), t.Utils.checkDisplay(this)
584                        })
585                    })) : this.totoggle.each(function () {
586                        t.Utils.animate(this, e[1] + " uk-animation-reverse").then(function () {
587                            t.$(this).toggleClass(i.options.cls).css("animation-duration", ""), t.Utils.checkDisplay(this)
588                        }.bind(this))
589                    })
590                } else this.totoggle.toggleClass(this.options.cls), t.Utils.checkDisplay(this.totoggle);
591                this.updateAria()
592            }
593        }, getToggles: function () {
594            this.totoggle = this.options.target ? t.$(this.options.target) : [], this.updateAria()
595        }, updateAria: function () {
596            this.aria && this.totoggle.length && this.totoggle.each(function () {
597                t.$(this).attr("aria-hidden", t.$(this).hasClass("uk-hidden"))
598            })
599        }
600    })
601}(UIkit), function (t) {
602    "use strict";
603    t.component("alert", {
604        defaults: {fade: !0, duration: 200, trigger: ".uk-alert-close"}, boot: function () {
605            t.$html.on("click.alert.uikit", "[data-uk-alert]", function (i) {
606                var e = t.$(this);
607                if (!e.data("alert")) {
608                    var n = t.alert(e, t.Utils.options(e.attr("data-uk-alert")));
609                    t.$(i.target).is(n.options.trigger) && (i.preventDefault(), n.close())
610                }
611            })
612        }, init: function () {
613            var t = this;
614            this.on("click", this.options.trigger, function (i) {
615                i.preventDefault(), t.close()
616            })
617        }, close: function () {
618            var t = this.trigger("close.uk.alert"), i = function () {
619                this.trigger("closed.uk.alert").remove()
620            }.bind(this);
621            this.options.fade ? t.css("overflow", "hidden").css("max-height", t.height()).animate({
622                height: 0,
623                opacity: 0,
624                "padding-top": 0,
625                "padding-bottom": 0,
626                "margin-top": 0,
627                "margin-bottom": 0
628            }, this.options.duration, i) : i()
629        }
630    })
631}(UIkit), function (t) {
632    "use strict";
633    t.component("buttonRadio", {
634        defaults: {target: ".uk-button"}, boot: function () {
635            t.$html.on("click.buttonradio.uikit", "[data-uk-button-radio]", function (i) {
636                var e = t.$(this);
637                if (!e.data("buttonRadio")) {
638                    var n = t.buttonRadio(e, t.Utils.options(e.attr("data-uk-button-radio"))), o = t.$(i.target);
639                    o.is(n.options.target) && o.trigger("click")
640                }
641            })
642        }, init: function () {
643            var i = this;
644            this.find(i.options.target).attr("aria-checked", "false").filter(".uk-active").attr("aria-checked", "true"), this.on("click", this.options.target, function (e) {
645                var n = t.$(this);
646                n.is('a[href="#"]') && e.preventDefault(), i.find(i.options.target).not(n).removeClass("uk-active").blur(), n.addClass("uk-active"), i.find(i.options.target).not(n).attr("aria-checked", "false"), n.attr("aria-checked", "true"), i.trigger("change.uk.button", [n])
647            })
648        }, getSelected: function () {
649            return this.find(".uk-active")
650        }
651    }), t.component("buttonCheckbox", {
652        defaults: {target: ".uk-button"}, boot: function () {
653            t.$html.on("click.buttoncheckbox.uikit", "[data-uk-button-checkbox]", function (i) {
654                var e = t.$(this);
655                if (!e.data("buttonCheckbox")) {
656                    var n = t.buttonCheckbox(e, t.Utils.options(e.attr("data-uk-button-checkbox"))), o = t.$(i.target);
657                    o.is(n.options.target) && o.trigger("click")
658                }
659            })
660        }, init: function () {
661            var i = this;
662            this.find(i.options.target).attr("aria-checked", "false").filter(".uk-active").attr("aria-checked", "true"), this.on("click", this.options.target, function (e) {
663                var n = t.$(this);
664                n.is('a[href="#"]') && e.preventDefault(), n.toggleClass("uk-active").blur(), n.attr("aria-checked", n.hasClass("uk-active")), i.trigger("change.uk.button", [n])
665            })
666        }, getSelected: function () {
667            return this.find(".uk-active")
668        }
669    }), t.component("button", {
670        defaults: {}, boot: function () {
671            t.$html.on("click.button.uikit", "[data-uk-button]", function () {
672                var i = t.$(this);
673                if (!i.data("button")) {
674                    {
675                        t.button(i, t.Utils.options(i.attr("data-uk-button")))
676                    }
677                    i.trigger("click")
678                }
679            })
680        }, init: function () {
681            var t = this;
682            this.element.attr("aria-pressed", this.element.hasClass("uk-active")), this.on("click", function (i) {
683                t.element.is('a[href="#"]') && i.preventDefault(), t.toggle(
683), t.trigger("change.uk.button", [t.element.blur().hasClass("uk-active")])
684            })
685        }, toggle: function () {
686            this.element.toggleClass("uk-active"), this.element.attr("aria-pressed", this.element.hasClass("uk-active"))
687        }
688    })
689}(UIkit), function (t) {
690    "use strict";
691    var i, e = !1;
692    t.component("dropdown", {
693        defaults: {
694            mode: "hover",
695            remaintime: 800,
696            justify: !1,
697            boundary: t.$win,
698            delay: 0,
699            hoverDelayIdle: 250
700        }, remainIdle: !1, boot: function () {
701            var i = t.support.touch ? "click" : "mouseenter";
702            t.$html.on(i + ".dropdown.uikit", "[data-uk-dropdown]", function (e) {
703                var n = t.$(this);
704                if (!n.data("dropdown")) {
705                    var o = t.dropdown(n, t.Utils.options(n.attr("data-uk-dropdown")));
706                    ("click" == i || "mouseenter" == i && "hover" == o.options.mode) && o.element.trigger(i), o.element.find(".uk-dropdown").length && e.preventDefault()
707                }
708            })
709        }, init: function () {
710            var n = this;
711            this.dropdown = this.find(".uk-dropdown"), this.centered = this.dropdown.hasClass("uk-dropdown-center"), this.justified = this.options.justify ? t.$(this.options.justify) : !1, this.boundary = t.$(this.options.boundary), this.flipped = this.dropdown.hasClass("uk-dropdown-flip"), this.boundary.length || (this.boundary = t.$win), this.element.attr("aria-haspopup", "true"), this.element.attr("aria-expanded", this.element.hasClass("uk-open")), "click" == this.options.mode || t.support.touch ? this.on("click.uikit.dropdown", function (i) {
712                var e = t.$(i.target);
713                e.parents(".uk-dropdown").length || ((e.is("a[href='#']") || e.parent().is("a[href='#']") || n.dropdown.length && !n.dropdown.is(":visible")) && i.preventDefault(), e.blur()), n.element.hasClass("uk-open") ? (e.is("a:not(.js-uk-prevent)") || e.is(".uk-dropdown-close") || !n.dropdown.find(i.target).length) && n.hide() : n.show()
714            }) : this.on("mouseenter", function () {
715                n.remainIdle && clearTimeout(n.remainIdle), i && clearTimeout(i), e && e == n || (i = e && e != n ? setTimeout(function () {
716                    i = setTimeout(n.show.bind(n), n.options.delay)
717                }, n.options.hoverDelayIdle) : setTimeout(n.show.bind(n), n.options.delay))
718            }).on("mouseleave", function () {
719                i && clearTimeout(i), n.remainIdle = setTimeout(function () {
720                    e && e == n && n.hide()
721                }, n.options.remaintime)
722            }).on("click", function (i) {
723                var e = t.$(i.target);
724                n.remainIdle && clearTimeout(n.remainIdle), (e.is("a[href='#']") || e.parent().is("a[href='#']")) && i.preventDefault(), n.show()
725            })
726        }, show: function () {
727            t.$html.off("click.outer.dropdown"), e && e != this && e.hide(), i && clearTimeout(i), this.checkDimensions(), this.element.addClass("uk-open"), this.element.attr("aria-expanded", "true"), this.trigger("show.uk.dropdown", [this]), t.Utils.checkDisplay(this.dropdown, !0), e = this, this.registerOuterClick()
728        }, hide: function () {
729            this.element.removeClass("uk-open"), this.remainIdle && clearTimeout(this.remainIdle), this.remainIdle = !1, this.element.attr("aria-expanded", "false"), this.trigger("hide.uk.dropdown", [this]), e == this && (e = !1)
730        }, registerOuterClick: function () {
731            var n = this;
732            t.$html.off("click.outer.dropdown"), setTimeout(function () {
733                t.$html.on("click.outer.dropdown", function (o) {
734                    i && clearTimeout(i);
735                    var s = t.$(o.target);
736                    e != n || !s.is("a:not(.js-uk-prevent)") && !s.is(".uk-dropdown-close") && n.dropdown.find(o.target).length || (n.hide(), t.$html.off("click.outer.dropdown"))
737                })
738            }, 10)
739        }, checkDimensions: function () {
740            if (this.dropdown.length) {
741                this.justified && this.justified.length && this.dropdown.css("min-width", "");
742                var i = this, e = this.dropdown.css("margin-" + t.langdirection, ""), n = e.show().offset(), o = e.outerWidth(), s = this.boundary.width(), a = this.boundary.offset() ? this.boundary.offset().left : 0;
743                if (this.centered && (e.css("margin-" + t.langdirection, -1 * (parseFloat(o) / 2 - e.parent().width() / 2)), n = e.offset(), (o + n.left > s || n.left < 0) && (e.css("margin-" + t.langdirection, ""), n = e.offset())), this.justified && this.justified.length) {
744                    var r = this.justified.outerWidth();
745                    if (e.css("min-width", r), "right" == t.langdirection) {
746                        var l = s - (this.justified.offset().left + r), c = s - (e.offset().left + e.outerWidth());
747                        e.css("margin-right", l - c)
748                    } else e.css("margin-left", this.justified.offset().left - n.left);
749                    n = e.offset()
750                }
751                o + (n.left - a) > s && (e.addClass("uk-dropdown-flip"), n = e.offset()), n.left - a < 0 && (e.addClass("uk-dropdown-stack"), e.hasClass("uk-dropdown-flip") && (this.flipped || (e.removeClass("uk-dropdown-flip"), n = e.offset(), e.addClass("uk-dropdown-flip")), setTimeout(function () {
752                    (e.offset().left - a < 0 || !i.flipped && e.outerWidth() + (n.left - a) < s) && e.removeClass("uk-dropdown-flip")
753                }, 0)), this.trigger("stack.uk.dropdown", [this])), e.css("display", "")
754            }
755        }
756    })
757}(UIkit), function (t) {
758    "use strict";
759    var i = [];
760    t.component("gridMatchHeight", {
761        defaults: {target: !1, row: !0, ignorestacked: !1}, boot: function () {
762            t.ready(function (i) {
763                t.$("[data-uk-grid-match]", i).each(function () {
764                    var i, e = t.$(this);
765                    e.data("gridMatchHeight") || (i = t.gridMatchHeight(e, t.Utils.options(e.attr("data-uk-grid-match"))))
766                })
767            })
768        }, init: function () {
769            var e = this;
770            this.columns = this.element.children(), this.elements = this.options.target ? this.find(this.options.target) : this.columns, this.columns.length && (t.$win.on("load resize orientationchange", function () {
771                var i = function () {
772                    e.match()
773                };
774                return t.$(function () {
775                    i()
776                }), t.Utils.debounce(i, 50)
777            }()), t.$html.on("changed.uk.dom", function () {
778                e.columns = e.element.children(), e.elements = e.options.target ? e.find(e.options.target) : e.columns, e.match()
779            }), this.on("display.uk.check", function () {
780                this.element.is(":visible") && this.match()
781            }.bind(this)), i.push(this))
782        }, match: function () {
783            var i = this.columns.filter(":visible:first");
784            if (i.length) {
785                var e = Math.ceil(100 * parseFloat(i.css("width")) / parseFloat(i.parent().css("width"))) >= 100;
786                return e && !this.options.ignorestacked ? this.revert() : t.Utils.matchHeights(this.elements, this.options), this
787            }
788        }, revert: function () {
789            return this.elements.css("min-height", ""), this
790        }
791    }), t.component("gridMargin", {
792        defaults: {cls: "uk-grid-margin"}, boot: function () {
793            t.ready(function (i) {
794                t.$("[data-uk-grid-margin]", i).each(function () {
795                    var i, e = t.$(this);
796                    e.data("gridMargin") || (i = t.gridMargin(e, t.Utils.options(e.attr("data-uk-grid-margin"))))
797                })
798            })
799        }, init: function () {
800            t.stackMargin(this.element, this.options)
801        }
802    })
803}(UIkit), function (t) {
804    "use strict";
805    function i(i, e) {
806        return e ? ("object" == typeof i ? (i = i instanceof jQuery ? i : t.$(i), i.parent().length && (e.persist = i, e.persist.data("modalPersistParent", i.parent()))) : i = "string" == typeof i || "number" == typeof i ? t.$("<div></div>").html(i) : t.$("<div></div>").html("UIkit.modal Error: Unsupported data type: " + typeof i), i.appendTo(e.element.find(".uk-modal-dialog")), e) : void 0
807    }
808
809    var e, n = !1, o = 0, s = t.$html;
810    t.component("modal", {
811        defaults: {keyboard: !0, bgclose: !0, minScrollHeight: 150, center: !1, modal: !0},
812        scrollable: !1,
813        transition: !1,
814        init: function () {
815            if (e || (e = t.$("body")), this.element.length) {
816                var i = this;
817                this.paddingdir = "padding-" + ("left" == t.langdirection ? "right" : "left"), this.dialog = this.find(".uk-modal-dialog"), this.active = !1, this.element.attr("aria-hidden", this.element.hasClass("uk-open")), this.on("click", ".uk-modal-close", function (t) {
818                    t.preventDefault(), i.hide()
819                }).on("click", function (e) {
820                    var n = t.$(e.target);
821                    n[0] == i.element[0] && i.options.bgclose && i.hide()
822                })
823            }
824        },
825        toggle: function () {
826            return this[this.isActive() ? "hide" : "show"]()
827        },
828        show: function () {
829            if (this.element.length) {
830                if (!this.isActive())return this.options.modal && n && n.hide(!0), this.element.removeClass("uk-open").show(), this.resize(), this.options.modal && (n = this), this.active = !0, o++, this.element.addClass("uk-open"), s.addClass("uk-modal-page").height(), this.element.attr("aria-hidden", "false"), this.element.trigger("show.uk.modal"), t.Utils.checkDisplay(this.dialog, !0), this
831            }
832        },
833        hide: function (i) {
834            if (!i && t.support.transition) {
835                var e = this;
836                this.one(t.support.transition.end, function () {
837                    e._hide()
838                }).removeClass("uk-open")
839            } else this._hide();
840            return this
841        },
842        resize: function () {
843            var t = e.width();
844            if (this.scrollbarwidth = window.innerWidth - t, e.css(this.paddingdir, this.scrollbarwidth), this.element.css("overflow-y", this.scrollbarwidth ? "scroll" : "auto"), !this.updateScrollable() && this.options.center) {
845                var i = this.dialog.outerHeight(), n = parseInt(this.dialog.css("margin-top"), 10) + parseInt(this.dialog.css("margin-bottom"), 10);
846                i + n < window.innerHeight ? this.dialog.css({top: window.innerHeight / 2 - i / 2 - n}) : this.dialog.css({top: ""})
847            }
848        },
849        updateScrollable: function () {
850            var t = this.dialog.find(".uk-overflow-container:visible:first");
851            if (t.length) {
852                t.css("height", 0);
853                var i = Math.abs(parseInt(this.dialog.css("margin-top"), 10)), e = this.dialog.outerHeight(), n = window.innerHeight, o = n - 2 * (20 > i ? 20 : i) - e;
854                return t.css("height", o < this.options.minScrollHeight ? "" : o), !0
855            }
856            return !1
857        },
858        _hide: function () {
859            this.active = !1, o--, this.element.hide().removeClass("uk-open"), this.element.attr("aria-hidden", "true"), o || (s.removeClass("uk-modal-page"), e.css(this.paddingdir, "")), n === this && (n = !1), this.trigger("hide.uk.modal")
860        },
861        isActive: function () {
862            return this.active
863        }
864    }), t.component("modalTrigger", {
865        boot: function () {
866            t.$html.on("click.modal.uikit", "[data-uk-modal]", function (i) {
867                var e = t.$(this);
868                if (e.is("a") && i.preventDefault(), !e.data("modalTrigger")) {
869                    var n = t.modalTrigger(e, t.Utils.options(e.attr("data-uk-modal")));
870                    n.show()
871                }
872            }
872), t.$html.on("keydown.modal.uikit", function (t) {
873                n && 27 === t.keyCode && n.options.keyboard && (t.preventDefault(), n.hide())
874            }), t.$win.on("resize orientationchange", t.Utils.debounce(function () {
875                n && n.resize()
876            }, 150))
877        }, init: function () {
878            var i = this;
879            this.options = t.$.extend({target: i.element.is("a") ? i.element.attr("href") : !1}, this.options), this.modal = t.modal(this.options.target, this.options), this.on("click", function (t) {
880                t.preventDefault(), i.show()
881            }), this.proxy(this.modal, "show hide isActive")
882        }
883    }), t.modal.dialog = function (e, n) {
884        var o = t.modal(t.$(t.modal.dialog.template).appendTo("body"), n);
885        return o.on("hide.uk.modal", function () {
886            o.persist && (o.persist.appendTo(o.persist.data("modalPersistParent")), o.persist = !1), o.element.remove()
887        }), i(e, o), o
888    }, t.modal.dialog.template = '<div class="uk-modal"><div class="uk-modal-dialog" style="min-height:0;"></div></div>', t.modal.alert = function (i, e) {
889        e = t.$.extend(!0, {bgclose: !1, keyboard: !1, modal: !1, labels: t.modal.labels}, e);
890        var n = t.modal.dialog(['<div class="uk-margin uk-modal-content">' + String(i) + "</div>", '<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary uk-modal-close">' + e.labels.Ok + "</button></div>"].join(""), e);
891        n.on("show.uk.modal", function () {
892            setTimeout(function () {
893                n.element.find("button:first").focus()
894            }, 50)
895        }), n.show()
896    }, t.modal.confirm = function (i, e, n) {
897        e = t.$.isFunction(e) ? e : function () {
898        }, n = t.$.extend(!0, {bgclose: !1, keyboard: !1, modal: !1, labels: t.modal.labels}, n);
899        var o = t.modal.dialog(['<div class="uk-margin uk-modal-content">' + String(i) + "</div>", '<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary js-modal-confirm">' + n.labels.Ok + '</button> <button class="uk-button uk-modal-close">' + n.labels.Cancel + "</button></div>"].join(""), n);
900        o.element.find(".js-modal-confirm").on("click", function () {
901            e(), o.hide()
902        }), o.on("show.uk.modal", function () {
903            setTimeout(function () {
904                o.element.find("button:first").focus()
905            }, 50)
906        }), o.show()
907    }, t.modal.prompt = function (i, e, n, o) {
908        n = t.$.isFunction(n) ? n : function () {
909        }, o = t.$.extend(!0, {bgclose: !1, keyboard: !1, modal: !1, labels: t.modal.labels}, o);
910        var s = t.modal.dialog([i ? '<div class="uk-modal-content uk-form">' + String(i) + "</div>" : "", '<div class="uk-margin-small-top uk-modal-content uk-form"><p><input type="text" class="uk-width-1-1"></p></div>', '<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary js-modal-ok">' + o.labels.Ok + '</button> <button class="uk-button uk-modal-close">' + o.labels.Cancel + "</button></div>"].join(""), o), a = s.element.find("input[type='text']").val(e || "").on("keyup", function (t) {
911            13 == t.keyCode && s.element.find(".js-modal-ok").trigger("click")
912        });
913        s.element.find(".js-modal-ok").on("click", function () {
914            n(a.val()) !== !1 && s.hide()
915        }), s.on("show.uk.modal", function () {
916            setTimeout(function () {
917                a.focus()
918            }, 50)
919        }), s.show()
920    }, t.modal.blockUI = function (i, e) {
921        var n = t.modal.dialog(['<div class="uk-margin uk-modal-content">' + String(i || '<div class="uk-text-center">...</div>') + "</div>"].join(""), t.$.extend({
922            bgclose: !1,
923            keyboard: !1,
924            modal: !1
925        }, e));
926        return n.content = n.element.find(".uk-modal-content:first"), n.show(), n
927    }, t.modal.labels = {Ok: "Ok", Cancel: "Cancel"}
928}(UIkit), function (t) {
929    "use strict";
930    function i(i) {
931        var e = t.$(i), n = "auto";
932        if (e.is(":visible"))n = e.outerHeight(); else {
933            var o = {position: e.css("position"), visibility: e.css("visibility"), display: e.css("display")};
934            n = e.css({position: "absolute", visibility: "hidden", display: "block"}).outerHeight(), e.css(o)
935        }
936        return n
937    }
938
939    t.component("nav", {
940        defaults: {toggle: ">li.uk-parent > a[href='#']", lists: ">li.uk-parent > ul", multiple: !1},
941        boot: function () {
942            t.ready(function (i) {
943                t.$("[data-uk-nav]", i).each(function () {
944                    var i = t.$(this);
945                    if (!i.data("nav")) {
946                        t.nav(i, t.Utils.options(i.attr("data-uk-nav")))
947                    }
948                })
949            })
950        },
951        init: function () {
952            var i = this;
953            this.on("click.uikit.nav", this.options.toggle, function (e) {
954                e.preventDefault();
955                var n = t.$(this);
956                i.open(n.parent()[0] == i.element[0] ? n : n.parent("li"))
957            }), this.find(this.options.lists).each(function () {
958                var e = t.$(this), n = e.parent(), o = n.hasClass("uk-active");
959                e.wrap('<div style="overflow:hidden;height:0;position:relative;"></div>'), n.data("list-container", e.parent()[o ? "removeClass" : "addClass"]("uk-hidden")), n.attr("aria-expanded", n.hasClass("uk-open")), o && i.open(n, !0)
960            })
961        },
962        open: function (e, n) {
963            var o = this, s = this.element, a = t.$(e), r = a.data("list-container");
964            this.options.multiple || s.children(".uk-open").not(e).each(function () {
965                var i = t.$(this);
966                i.data("list-container") && i.data("list-container").stop().animate({height: 0}, function () {
967                    t.$(this).parent().removeClass("uk-open").end().addClass("uk-hidden")
968                })
969            }), a.toggleClass("uk-open"), a.attr("aria-expanded", a.hasClass("uk-open")), r && (a.hasClass("uk-open") && r.removeClass("uk-hidden"), n ? (r.stop().height(a.hasClass("uk-open") ? "auto" : 0), a.hasClass("uk-open") || r.addClass("uk-hidden"), this.trigger("display.uk.check")) : r.stop().animate({height: a.hasClass("uk-open") ? i(r.find("ul:first")) : 0}, function () {
970                a.hasClass("uk-open") ? r.css("height", "") : r.addClass("uk-hidden"), o.trigger("display.uk.check")
971            }))
972        }
973    })
974}(UIkit), function (t) {
975    "use strict";
976    var i = {x: window.scrollX, y: window.scrollY}, e = (t.$win, t.$doc, t.$html), n = {
977        show: function (n) {
978            if (n = t.$(n), n.length) {
979                var o = t.$("body"), s = n.find(".uk-offcanvas-bar:first"), a = "right" == t.langdirection, r = s.hasClass("uk-offcanvas-bar-flip") ? -1 : 1, l = r * (a ? -1 : 1);
980                i = {
981                    x: window.pageXOffset,
982                    y: window.pageYOffset
983                }, n.addClass("uk-active"), o.css({
984                    width: window.innerWidth,
985                    height: window.innerHeight
986                }).addClass("uk-offcanvas-page"), o.css(a ? "margin-right" : "margin-left", (a ? -1 : 1) * s.outerWidth() * l).width(), e.css("margin-top", -1 * i.y), s.addClass("uk-offcanvas-bar-show"), this._initElement(n), s.trigger("show.uk.offcanvas", [n, s]), n.attr("aria-hidden", "false")
987            }
988        }, hide: function (n) {
989            var o = t.$("body"), s = t.$(".uk-offcanvas.uk-active"), a = "right" == t.langdirection, r = s.find(".uk-offcanvas-bar:first"), l = function () {
990                o.removeClass("uk-offcanvas-page").css({
991                    width: "",
992                    height: "",
993                    "margin-left": "",
994                    "margin-right": ""
995                }), s.removeClass("uk-active"), r.removeClass("uk-offcanvas-bar-show"), e.css("margin-top", ""), window.scrollTo(i.x, i.y), r.trigger("hide.uk.offcanvas", [s, r]), s.attr("aria-hidden", "true")
996            };
997            s.length && (t.support.transition && !n ? (o.one(t.support.transition.end, function () {
998                l()
999            }).css(a ? "margin-right" : "margin-left", ""), setTimeout(function () {
1000                r.removeClass("uk-offcanvas-bar-show")
1001            }, 0)) : l())
1002        }, _initElement: function (i) {
1003            i.data("OffcanvasInit") || (i.on("click.uk.offcanvas swipeRight.uk.offcanvas swipeLeft.uk.offcanvas", function (i) {
1004                var e = t.$(i.target);
1005                if (!i.type.match(/swipe/) && !e.hasClass("uk-offcanvas-close")) {
1006                    if (e.hasClass("uk-offcanvas-bar"))return;
1007                    if (e.parents(".uk-offcanvas-bar:first").length)return
1008                }
1009                i.stopImmediatePropagation(), n.hide()
1010            }), i.on("click", "a[href^='#']", function () {
1011                var i = t.$(this), e = i.attr("href");
1012                "#" != e && (t.$doc.one("hide.uk.offcanvas", function () {
1013                    var n;
1014                    try {
1015                        n = t.$(e)
1016                    } catch (o) {
1017                        n = ""
1018                    }
1019                    n.length || (n = t.$('[name="' + e.replace("#", "") + '"]')), n.length && i.attr("data-uk-smooth-scroll") && t.Utils.scrollToElement ? t.Utils.scrollToElement(n, t.Utils.options(i.attr("data-uk-smooth-scroll") || "{}")) : window.location.href = e
1020                }), n.hide())
1021            }), i.data("OffcanvasInit", !0))
1022        }
1023    };
1024    t.component("offcanvasTrigger", {
1025        boot: function () {
1026            e.on("click.offcanvas.uikit", "[data-uk-offcanvas]", function (i) {
1027                i.preventDefault();
1028                var e = t.$(this);
1029                if (!e.data("offcanvasTrigger")) {
1030                    {
1031                        t.offcanvasTrigger(e, t.Utils.options(e.attr("data-uk-offcanvas")))
1032                    }
1033                    e.trigger("click")
1034                }
1035            }
1035), e.on("keydown.uk.offcanvas", function (t) {
1036                27 === t.keyCode && n.hide()
1037            })
1038        }, init: function () {
1039            var i = this;
1040            this.options = t.$.extend({target: i.element.is("a") ? i.element.attr("href") : !1}, this.options), this.on("click", function (t) {
1041                t.preventDefault(), n.show(i.options.target)
1042            })
1043        }
1044    }), t.offcanvas = n
1045}(UIkit), function (t) {
1046    "use strict";
1047    function i(i, e, n) {
1048        var o, s = t.$.Deferred(), a = i, r = i;
1049        return n[0] === e[0] ? (s.resolve(), s.promise()) : ("object" == typeof i && (a = i[0], r = i[1] || i[0]), o = function () {
1050            e && e.hide().removeClass("uk-active " + r + " uk-animation-reverse"), n.addClass(a).one(t.support.animation.end, function () {
1051                n.removeClass("" + a).css({opacity: "", display: ""}), s.resolve(), e && e.css({
1052                    opacity: "",
1053                    display: ""
1054                })
1055            }.bind(this)).show()
1056        }, n.css("animation-duration", this.options.duration + "ms"), e && e.length ? (e.css("animation-duration", this.options.duration + "ms"), e.css("display", "none").addClass(r + " uk-animation-reverse").one(t.support.animation.end, function () {
1057            o()
1058        }.bind(this)).css("display", "")) : (n.addClass("uk-active"), o()), s.promise())
1059    }
1060
1061    var e;
1062    t.component("switcher", {
1063        defaults: {connect: !1, toggle: ">*", active: 0, animation: !1, duration: 200},
1064        animating: !1,
1065        boot: function () {
1066            t.ready(function (i) {
1067                t.$("[data-uk-switcher]", i).each(function () {
1068                    var i = t.$(this);
1069                    if (!i.data("switcher")) {
1070                        t.switcher(i, t.Utils.options(i.attr("data-uk-switcher")))
1071                    }
1072                })
1073            })
1074        },
1075        init: function () {
1076            var i = this;
1077            if (this.on("click.uikit.switcher", this.options.toggle, function (t) {
1078                    t.preventDefault(), i.show(this)
1079                }), this.options.connect) {
1080                this.connect = t.$(this.options.connect), this.connect.find(".uk-active").removeClass(".uk-active"), this.connect.length && (this.connect.children().attr("aria-hidden", "true"), this.connect.on("click", "[data-uk-switcher-item]", function (e) {
1081                    e.preventDefault();
1082                    var n = t.$(this).attr("data-uk-switcher-item");
1083                    if (i.index != n)switch (n) {
1084                        case"next":
1085                        case"previous":
1086                            i.show(i.index + ("next" == n ? 1 : -1));
1087                            break;
1088                        default:
1089                            i.show(parseInt(n, 10))
1090                    }
1091                }).on("swipeRight swipeLeft", function (t) {
1092                    t.preventDefault(), window.getSelection().toString() || i.show(i.index + ("swipeLeft" == t.type ? 1 : -1))
1093                }));
1094                var e = this.find(this.options.toggle), n = e.filter(".uk-active");
1095                if (n.length)this.show(n, !1); else {
1096                    if (this.options.active === !1)return;
1097                    n = e.eq(this.options.active), this.show(n.length ? n : e.eq(0), !1)
1098                }
1099                e.not(n).attr("aria-expanded", "false"), n.attr("aria-expanded", "true"), this.on("changed.uk.dom", function () {
1100                    i.connect = t.$(i.options.connect)
1101                })
1102            }
1103        },
1104        show: function (n, o) {
1105            if (!this.animating) {
1106                if (isNaN(n))n = t.$(n); else {
1107                    var s = this.find(this.options.toggle);
1108                    n = 0 > n ? s.length - 1 : n, n = s.eq(s[n] ? n : 0)
1109                }
1110                var a = this, s = this.find(this.options.toggle), r = t.$(n), l = e[this.options.animation] || function (t, n) {
1111                        if (!a.options.animation)return e.none.apply(a);
1112                        var o = a.options.animation.split(",");
1113                        return 1 == o.length && (o[1] = o[0]), o[0] = o[0].trim(), o[1] = o[1].trim(), i.apply(a, [o, t, n])
1114                    };
1115                o !== !1 && t.support.animation || (l = e.none), r.hasClass("uk-disabled") || (s.attr("aria-expanded", "false"), r.attr("aria-expanded", "true"), s.filter(".uk-active").removeClass("uk-active"), r.addClass("uk-active"), this.options.connect && this.connect.length && (this.index = this.find(this.options.toggle).index(r), -1 == this.index && (this.index = 0), this.connect.each(function () {
1116                    var i = t.$(this), e = t.$(i.children()), n = t.$(e.filter(".uk-active")), o = t.$(e.eq(a.index));
1117                    a.animating = !0, l.apply(a, [n, o]).then(function () {
1118                        n.removeClass("uk-active"), o.addClass("uk-active"), n.attr("aria-hidden", "true"), o.attr("aria-hidden", "false"), t.Utils.checkDisplay(o, !0), a.animating = !1
1119                    })
1120                })), this.trigger("show.uk.switcher", [r]))
1121            }
1122        }
1123    }), e = {
1124        none: function () {
1125            var i = t.$.Deferred();
1126            return i.resolve(), i.promise()
1127        }, fade: function (t, e) {
1128            return i.apply(this, ["uk-animation-fade", t, e])
1129        }, "slide-bottom": function (t, e) {
1130            return i.apply(this, ["uk-animation-slide-bottom", t, e])
1131        }, "slide-top": function (t, e) {
1132            return i.apply(this, ["uk-animation-slide-top", t, e])
1133        }, "slide-vertical": function (t, e) {
1134            var n = ["uk-animation-slide-top", "uk-animation-slide-bottom"];
1135            return t && t.index() > e.index() && n.reverse(), i.apply(this, [n, t, e])
1136        }, "slide-left": function (t, e) {
1137            return i.apply(this, ["uk-animation-slide-left", t, e])
1138        }, "slide-right": function (t, e) {
1139            return i.apply(this, ["uk-animation-slide-right", t, e])
1140        }, "slide-horizontal": function (t, e) {
1141            var n = ["uk-animation-slide-right", "uk-animation-slide-left"];
1142            return t && t.index() > e.index() && n.reverse(), i.apply(this, [n, t, e])
1143        }, scale: function (t, e) {
1144            return i.apply(this, ["uk-animation-scale-up", t, e])
1145        }
1146    }, t.switcher.animations = e
1147}(UIkit), function (t) {
1148    "use strict";
1149    t.component("tab", {
1150        defaults: {
1151            target: ">li:not(.uk-tab-responsive, .uk-disabled)",
1152            connect: !1,
1153            active: 0,
1154            animation: !1,
1155            duration: 200
1156        }, boot: function () {
1157            t.ready(function (i) {
1158                t.$("[data-uk-tab]", i).each(function () {
1159                    var i = t.$(this);
1160                    if (!i.data("tab")) {
1161                        t.tab(i, t.Utils.options(i.attr("data-uk-tab")))
1162                    }
1163                })
1164            })
1165        }, init: function () {
1166            var i = this;
1167            this.current = !1, this.on("click.uikit.tab", this.options.target, function (e) {
1168                if (e.preventDefault(), !i.switcher || !i.switcher.animating) {
1169                    var n = i.find(i.options.target).not(this);
1170                    n.removeClass("uk-active").blur(), i.trigger("change.uk.tab", [t.$(this).addClass("uk-active"), i.current]), i.current = t.$(this), i.options.connect || (n.attr("aria-expanded", "false"), t.$(this).attr("aria-expanded", "true"))
1171                }
1172            }), this.options.connect && (this.connect = t.$(this.options.connect)), this.responsivetab = t.$('<li class="uk-tab-responsive uk-active"><a></a></li>').append('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>'), this.responsivetab.dropdown = this.responsivetab.find(".uk-dropdown"), this.responsivetab.lst = this.responsivetab.dropdown.find("ul"), this.responsivetab.caption = this.responsivetab.find("a:first"), this.element.hasClass("uk-tab-bottom") && this.responsivetab.dropdown.addClass("uk-dropdown-up"), this.responsivetab.lst.on("click.uikit.tab", "a", function (e) {
1173                e.preventDefault(), e.stopPropagation();
1174                var n = t.$(this);
1175                i.element.children("li:not(.uk-tab-responsive)").eq(n.data("index")).trigger("click")
1176            }), this.on("show.uk.switcher change.uk.tab", function (t, e) {
1177                i.responsivetab.caption.html(e.text())
1178            }), this.element.append(this.responsivetab), this.options.connect && (this.switcher = t.switcher(this.element, {
1179                toggle: ">li:not(.uk-tab-responsive)",
1180                connect: this.options.connect,
1181                active: this.options.active,
1182                animation: this.options.animation,
1183                duration: this.options.duration
1184            })), t.dropdown(this.responsivetab, {mode: "click"}), i.trigger("change.uk.tab", [this.element.find(this.options.target).not(".uk-tab-responsive").filter(".uk-active")]), this.check(), t.$win.on("resize orientationchange", t.Utils.debounce(function () {
1185                i.element.is(":visible") && i.check()
1186            }, 100)), this.on("display.uk.check", function () {
1187                i.element.is(":visible") && i.check()
1188            })
1189        }, check: function () {
1190            var i = this.element.children("li:not(.uk-tab-responsive)").removeClass("uk-hidden");
1191            if (!i.length)return this.responsivetab.addClass("uk-hidden"), void 0;
1192            var e, n, o, s = i.eq(0).offset().top + Math.ceil(i.eq(0).height() / 2), a = !1;
1193            if (this.responsivetab.lst.empty(), i.each(function () {
1194                    t.$(this).offset().top > s && (a = !0)
1195                }), a)for (var r = 0; r < i.length; r++)e = t.$(i.eq(r)), n = e.find("a"), "none" == e.css("float") || e.attr("uk-dropdown") || (e.hasClass("uk-disabled") || (o = e[0].outerHTML.replace("<a ", '<a data-index="' + r + '" '), this.responsivetab.lst.append(o)), e.addClass("uk-hidden"));
1196            this.responsivetab[this.responsivetab.lst.children("li").length ? "removeClass" : "addClass"]("uk-hidden")
1197        }
1198    })
1199}(UIkit), function (t) {
1200    "use strict";
1201    t.component("cover", {
1202        defaults: {automute: !0}, boot: function () {
1203            t.ready(function (i) {
1204                t.$("[data-uk-cover]", i).each(function () {
1205                    var i = t.$(this);
1206                    if (!i.data("cover")) {
1207                        t.cover(i, t.Utils.options(i.attr("data-uk-cover")))
1208                    }
1209                })
1210            })
1211        }, init: function () {
1212            if (this.parent = this.element.parent(), t.$win.on("load resize orientationchange", t.Utils.debounce(function () {
1213                    this.check()
1214                }.bind(this), 100)), this.on("display.uk.check", function () {
1215                    this.element.is(":visible") && this.check()
1216                }.bind(this)), this.check(), this.element.is("iframe") && this.options.automute) {
1217                var i = this.element.attr("src");
1218                this.element.attr("src", "").on("load", function () {
1219                    this.contentWindow.postMessage('{ "event": "command", "func": "mute", "method":"setVolume", "value":0}', "*")
1220                }).attr("src", [i, i.indexOf("?") > -1 ? "&" : "?", "enablejsapi=1&api=1"].join(""))
1221            }
1222        }, check: function () {
1223            this.element.css({width: "", height: ""}), this.dimension = {
1224                w: this.element.width(),
1225                h: this.element.height()
1226            }, this.element.attr("width") && !isNaN(this.element.attr("width")) && (this.dimension.w = this.element.attr("width")), this.element.attr("height") && !isNaN(this.element.attr("height")) && (this.dimension.h = this.element.attr("height")), this.ratio = this.dimension.w / this.dimension.h;
1227            var t, i, e = this.parent.width(), n = this.parent.height();
1228            e / this.ratio < n ? (t = Math.ceil(n * this.ratio), i = n) : (t = e, i = Math.ceil(e / this.ratio)), this.element.css({
1229                width: t,
1230                height: i
1231            })
1232        }
1233    })
1234}(UIkit);
1235
1236(function(addon) {
1237
1238    var component;
1239
1240    if (window.UIkit) {
1241        component = addon(UIkit);
1242    }
1243
1244    if (typeof define == "function" && define.amd) {
1245        define("uikit-slideshow", ["uikit"], function() {
1246            return component || addon(UIkit);
1247        });
1248    }
1249
1250})(function(UI) {
1251
1252    "use strict";
1253
1254    var Animations, playerId = 0;
1255
1256    UI.component('slideshow', {
1257
1258        defaults: {
1259            animation          : "fade",
1260            duration           : 500,
1261            height             : "auto",
1262            start              : 0,
1263            autoplay           : false,
1264            autoplayInterval   : 7000,
1265            videoautoplay      : true,
1266            videomute          : true,
1267            slices             : 15,
1268            pauseOnHover       : true,
1269            kenburns           : false,
1270            kenburnsanimations : [
1271                'uk-animation-middle-left',
1272                'uk-animation-top-right',
1273                'uk-animation-bottom-left',
1274                'uk-animation-top-center',
1275                '', // middle-center
1276                'uk-animation-bottom-right'
1277            ]
1278        },
1279
1280        current  : false,
1281        interval : null,
1282        hovering : false,
1283
1284        boot: function() {
1285
1286            // init code
1287            UI.ready(function(context) {
1288
1289                UI.$('[data-uk-slideshow]', context).each(function() {
1290
1291                    var slideshow = UI.$(this);
1292
1293                    if (!slideshow.data("slideshow")) {
1294                        UI.slideshow(slideshow, UI.Utils.options(slideshow.attr("data-uk-slideshow")));
1295                    }
1296                });
1297            });
1298        },
1299
1300        init: function() {
1301
1302            var $this = this, canvas, kbanimduration;
1303
1304            this.container     = this.element.hasClass('uk-slideshow') ? this.element : UI.$(this.find('.uk-slideshow'));
1305            this.slides        = this.container.children();
1306            this.slidesCount   = this.slides.length;
1307            this.current       = this.options.start;
1308            this.animating     = false;
1309            this.triggers      = this.find('[data-uk-slideshow-item]');
1310            this.fixFullscreen = navigator.userAgent.match(/(iPad|iPhone|iPod)/g) && this.container.hasClass('uk-slideshow-fullscreen'); // viewport unit fix for height:100vh - should be fixed in iOS 8
1311
1312            if (this.options.kenburns) {
1313
1314                kbanimduration = this.options.kenburns === true ? '15s': this.options.kenburns;
1315
1316                if (!String(kbanimduration).match(/(ms|s)$/)) {
1317                    kbanimduration += 'ms';
1318                }
1319
1320                if (typeof(this.options.kenburnsanimations) == 'string') {
1321                    this.options.kenburnsanimations = this.options.kenburnsanimations.split(',');
1322                }
1323            }
1324
1325            this.slides.each(function(index) {
1326
1327                var slide = UI.$(this),
1328                    media = slide.children('img,video,iframe').eq(0);
1329
1330                slide.data('media', media);
1331                slide.data('sizer', media);
1332
1333                if (media.length) {
1334
1335                    var placeholder;
1336
1337                    switch(media[0].nodeName) {
1338                        case 'IMG':
1339
1340                            var cover = UI.$('<div class="uk-cover-background uk-position-cover"></div>').css({'background-image':'url('+ media.attr('src') + ')'});
1341
1342                            media.css({'width': '100%','height': 'auto'});
1343                            slide.prepend(cover).data('cover', cover);
1344                            break;
1345
1346                        case 'IFRAME':
1347
1348                            var src = media[0].src, iframeId = 'sw-'+(++playerId);
1349
1350                            media
1351                                .attr('src', '').on('load', function(){
1352
1353                                    if (index !== $this.current || (index == $this.current && !$this.options.videoautoplay)) {
1354                                        $this.pausemedia(media);
1355                                    }
1356
1357                                    if ($this.options.videomute) {
1358
1359                                        $this.mutemedia(media);
1360
1361                                        var inv = setInterval((function(ic) {
1362                                            return function() {
1363                                                $this.mutemedia(media);
1364                                                if (++ic >= 4) clearInterval(inv);
1365                                            }
1366                                        })(0), 250);
1367                                    }
1368
1369                                })
1370                                .data('slideshow', $this)  // add self-reference for the vimeo-ready listener
1371                                .attr('data-player-id', iframeId)  // add frameId for the vimeo-ready listener
1372                                .attr('src', [src, (src.indexOf('?') > -1 ? '&':'?'), 'enablejsapi=1&api=1&player_id='+iframeId].join(''))
1373                                .addClass('uk-position-absolute');
1374
1375                            // disable pointer events
1376                            if(!UI.support.touch) media.css('pointer-events', 'none');
1377
1378                            placeholder = true;
1379
1380                            if (UI.cover) {
1381                                UI.cover(media);
1382                                media.attr('data-uk-cover', '{}');
1383                            }
1384
1385                            break;
1386
1387                        case 'VIDEO':
1388                            media.addClass('uk-cover-object uk-position-absolute');
1389                            placeholder = true;
1390
1391                            if ($this.options.videomute) $this.mutemedia(media);
1392                    }
1393
1394                    if (placeholder) {
1395
1396                        canvas  = UI.$('<canvas></canvas>').attr({'width': media[0].width, 'height': media[0].height});
1397                        var img = UI.$('<img style="width:100%;height:auto;">').attr('src', canvas[0].toDataURL());
1398
1399                        slide.prepend(img);
1400                        slide.data('sizer', img);
1401                    }
1402
1403                } else {
1404                    slide.data('sizer', slide);
1405                }
1406
1407                if ($this.hasKenBurns(slide)) {
1408
1409                    slide.data('cover').css({
1410                        '-webkit-animation-duration': kbanimduration,
1411                        'animation-duration': kbanimduration
1412                    });
1413                }
1414            });
1415
1416            this.on("click.uikit.slideshow", '[data-uk-slideshow-item]', function(e) {
1417
1418                e.preventDefault();
1419
1420                var slide = UI.$(this).attr('data-uk-slideshow-item');
1421
1422                if ($this.current == slide) return;
1423
1424                switch(slide) {
1425                    case 'next':
1426                    case 'previous':
1427                        $this[slide=='next' ? 'next':'previous']();
1428                        break;
1429                    default:
1430                        $this.show(parseInt(slide, 10));
1431                }
1432
1433                $this.stop();
1434            });
1435
1436            // Set start slide
1437            this.slides.attr('aria-hidden', 'true').eq(this.current).addClass('uk-active').attr('aria-hidden', 'false');
1438            this.triggers.filter('[data-uk-slideshow-item="'+this.current+'"]').addClass('uk-active');
1439
1440            UI.$win.on("resize load", UI.Utils.debounce(function() {
1441                $this.resize();
1442
1443                if ($this.fixFullscreen) {
1444                    $this.container.css('height', window.innerHeight);
1445                    $this.slides.css('height', window.innerHeight);
1446                }
1447            }, 100));
1448
1449            // chrome image load fix
1450            setTimeout(function(){
1451                $this.resize();
1452            }, 80);
1453
1454            // Set autoplay
1455            if (this.options.autoplay) {
1456                this.start();
1457            }
1458
1459            if (this.options.videoautoplay && this.slides.eq(this.current).data('media')) {
1460                this.playmedia(this.slides.eq(this.current).data('media'));
1461            }
1462
1463            if (this.options.kenburns) {
1464                this.applyKenBurns(this.slides.eq(this.current));
1465            }
1466
1467            this.container.on({
1468                mouseenter: function() { if ($this.options.pauseOnHover) $this.hovering = true;  },
1469                mouseleave: function() { $this.hovering = false; }
1470            });
1471
1472            this.on('swipeRight swipeLeft', function(e) {
1473                $this[e.type=='swipeLeft' ? 'next' : 'previous']();
1474            });
1475
1476            this.on('display.uk.check', function(){
1477                if ($this.element.is(":visible")) {
1478
1479                    $this.resize();
1480
1481                    if ($this.fixFullscreen) {
1482                        $this.container.css('height', window.innerHeight);
1483                        $this.slides.css('height', window.innerHeight);
1484                    }
1485                }
1486            });
1487        },
1488
1489
1490        resize: function() {
1491
1492            if (this.container.hasClass('uk-slideshow-fullscreen')) return;
1493
1494            var height = this.options.height;
1495
1496            if (this.options.height === 'auto') {
1497
1498                height = 0;
1499
1500                this.slides.css('height', '').each(function() {
1501                    height = Math.max(height, UI.$(this).height());
1502                });
1503            }
1504
1505            this.container.css('height', height);
1506            this.slides.css('height', height);
1507        },
1508
1509        show: function(index, direction) {
1510
1511            if (this.animating || this.current == index) return;
1512
1513            this.animating = true;
1514
1515            var $this        = this,
1516                current      = this.slides.eq(this.current),
1517                next         = this.slides.eq(index),
1518                dir          = direction ? direction : this.current < index ? -1 : 1,
1519                currentmedia = current.data('media'),
1520                animation    = Animations[this.options.animation] ? this.options.animation : 'fade',
1521                nextmedia    = next.data('media'),
1522                finalize     = function() {
1523
1524                    if (!$this.animating) return;
1525
1526                    if (currentmedia && currentmedia.is('video,iframe')) {
1527                        $this.pausemedia(currentmedia);
1528                    }
1529
1530                    if (nextmedia && nextmedia.is('video,iframe')) {
1531                        $this.playmedia(nextmedia);
1532                    }
1533
1534                    next.addClass("uk-active").attr('aria-hidden', 'false');
1535                    current.removeClass("uk-active").attr('aria-hidden', 'true');
1536
1537                    $this.animating = false;
1538                    $this.current   = index;
1539
1540                    UI.Utils.checkDisplay(next, '[class*="uk-animation-"]:not(.uk-cover-background.uk-position-cover)');
1541
1542                    $this.trigger('show.uk.slideshow', [next]);
1543                };
1544
1545            $this.applyKenBurns(next);
1546
1547            // animation fallback
1548            if (!UI.support.animation) {
1549                animation = 'none';
1550            }
1551
1552            current = UI.$(current);
1553            next    = UI.$(next);
1554
1555            Animations[animation].apply(this, [current, next, dir]).then(finalize);
1556
1557            $this.triggers.removeClass('uk-active');
1558            $this.triggers.filter('[data-uk-slideshow-item="'+index+'"]').addClass('uk-active');
1559        },
1560
1561        applyKenBurns: function(slide) {
1562
1563            if (!this.hasKenBurns(slide)) {
1564                return;
1565            }
1566
1567            var animations = this.options.kenburnsanimations,
1568                index      = this.kbindex || 0;
1569
1570
1571            slide.data('cover').attr('class', 'uk-cover-background uk-position-cover').width();
1572            slide.data('cover').addClass(['uk-animation-scale', 'uk-animation-reverse', animations[index].trim()].join(' '));
1573
1574            this.kbindex = animations[index + 1] ? (index+1):0;
1575        },
1576
1577        hasKenBurns: function(slide) {
1578            return (this.options.kenburns && slide.data('cover'));
1579        },
1580
1581        next: function() {
1582            this.show(this.slides[this.current + 1] ? (this.current + 1) : 0);
1583        },
1584
1585        previous: function() {
1586            this.show(this.slides[this.current - 1] ? (this.current - 1) : (this.slides.length - 1));
1587        },
1588
1589        start: function() {
1590
1591            this.stop();
1592
1593            var $this = this;
1594
1595            this.interval = setInterval(function() {
1596                if (!$this.hovering) $this.next();
1597            }, this.options.autoplayInterval);
1598
1599        },
1600
1601        stop: function() {
1602            if (this.interval) clearInterval(this.interval);
1603        },
1604
1605        playmedia: function(media) {
1606
1607            if (!(media && media[0])) return;
1608
1609            switch(media[0].nodeName) {
1610                case 'VIDEO':
1611
1612                    if (!this.options.videomute) {
1613                        media[0].muted = false;
1614                    }
1615
1616                    media[0].play();
1617                    break;
1618                case 'IFRAME':
1619
1620                    if (!this.options.videomute) {
1621                        media[0].contentWindow.postMessage('{ "event": "command", "func": "unmute", "method":"setVolume", "value":1}', '*');
1622                    }
1623
1624                    media[0].contentWindow.postMessage('{ "event": "command", "func": "playVideo", "method":"play"}', '*');
1625                    break;
1626            }
1627        },
1628
1629        pausemedia: function(media) {
1630
1631            switch(media[0].nodeName) {
1632                case 'VIDEO':
1633                    media[0].pause();
1634                    break;
1635                case 'IFRAME':
1636                    media[0].contentWindow.postMessage('{ "event": "command", "func": "pauseVideo", "method":"pause"}', '*');
1637                    break;
1638            }
1639        },
1640
1641        mutemedia: function(media) {
1642
1643            switch(media[0].nodeName) {
1644                case 'VIDEO':
1645                    media[0].muted = true;
1646                    break;
1647                case 'IFRAME':
1648                    media[0].contentWindow.postMessage('{ "event": "command", "func": "mute", "method":"setVolume", "value":0}', '*');
1649                    break;
1650            }
1651        }
1652    });
1653
1654    Animations = {
1655
1656        'none': function() {
1657
1658            var d = UI.$.Deferred();
1659            d.resolve();
1660            return d.promise();
1661        },
1662
1663        'scroll': function(current, next, dir) {
1664
1665            var d = UI.$.Deferred();
1666
1667            current.css('animation-duration', this.options.duration+'ms');
1668            next.css('animation-duration', this.options.duration+'ms');
1669
1670            next.css('opacity', 1).one(UI.support.animation.end, function() {
1671
1672                current.removeClass(dir === 1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
1673                next.css('opacity', '').removeClass(dir === 1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
1674                d.resolve();
1675
1676            }.bind(this));
1677
1678            current.addClass(dir == 1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
1679            next.addClass(dir == 1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
1680            next.width(); // force redraw
1681
1682            return d.promise();
1683        },
1684
1685        'swipe': function(current, next, dir) {
1686
1687            var d = UI.$.Deferred();
1688
1689            current.css('animation-duration', this.options.duration+'ms');
1690            next.css('animation-duration', this.options.duration+'ms');
1691
1692            next.css('opacity', 1).one(UI.support.animation.end, function() {
1693
1694                current.removeClass(dir === 1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
1695                next.css('opacity', '').removeClass(dir === 1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
1696                d.resolve();
1697
1698            }.bind(this));
1699
1700            current.addClass(dir == 1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
1701            next.addClass(dir == 1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
1702            next.width(); // force redraw
1703
1704            return d.promise();
1705        },
1706
1707        'scale': function(current, next, dir) {
1708
1709            var d = UI.$.Deferred();
1710
1711            current.css('animation-duration', this.options.duration+'ms');
1712            next.css('animation-duration', this.options.duration+'ms');
1713
1714            next.css('opacity', 1);
1715
1716            current.one(UI.support.animation.end, function() {
1717
1718                current.removeClass('uk-slideshow-scale-out');
1719                next.css('opacity', '');
1720                d.resolve();
1721
1722            }.bind(this));
1723
1724            current.addClass('uk-slideshow-scale-out');
1725            current.width(); // force redraw
1726
1727            return d.promise();
1728        },
1729
1730        'fade': function(current, next, dir) {
1731
1732            var d = UI.$.Deferred();
1733
1734            current.css('animation-duration', this.options.duration+'ms');
1735            next.css('animation-duration', this.options.duration+'ms');
1736
1737            next.css('opacity', 1);
1738
1739            current.one(UI.support.animation.end, function() {
1740
1741                current.removeClass('uk-slideshow-fade-out');
1742                next.css('opacity', '');
1743                d.resolve();
1744
1745            }.bind(this));
1746
1747            current.addClass('uk-slideshow-fade-out');
1748            current.width(); // force redraw
1749
1750            return d.promise();
1751        }
1752    };
1753
1754    UI.slideshow.animations = Animations;
1755
1756    // Listen for messages from the vimeo player
1757    window.addEventListener('message', function onMessageReceived(e) {
1758
1759        var data = e.data, iframe;
1760
1761        if (typeof(data) == 'string') {
1762
1763            try {
1764                data = JSON.parse(data);
1765            } catch(err) {
1766                data = {};
1767            }
1768        }
1769
1770        if (e.origin && e.origin.indexOf('vimeo') > -1 && data.event == 'ready' && data.player_id) {
1771            iframe = UI.$('[data-player-id="'+ data.player_id+'"]');
1772
1773            if (iframe.length) {
1774                iframe.data('slideshow').mutemedia(iframe);
1775            }
1776        }
1777    }, false);
1778
1779});
1780(function(addon) {
1781
1782    var component;
1783
1784    if (window.UIkit) {
1785        component = addon(UIkit);
1786    }
1787
1788    if (typeof define == "function" && define.amd) {
1789        define("uikit-slideshow-fx", ["uikit"], function() {
1790            return component || addon(UIkit);
1791        });
1792    }
1793
1794})(function(UI) {
1795
1796    "use strict";
1797
1798    var Animations = UI.slideshow.animations;
1799
1800    UI.$.extend(UI.slideshow.animations, {
1801        'slice': function(current, next, dir, fromfx) {
1802
1803            if (!current.data('cover')) {
1804                return Animations.fade.apply(this, arguments);
1805            }
1806
1807            var d = UI.$.Deferred();
1808
1809            var sliceWidth = Math.ceil(this.element.width() / this.options.slices),
1810                bgimage    = next.data('cover').css('background-image'),
1811                ghost      = UI.$('<li></li>').css({
1812                    top    : 0,
1813                    left   : 0,
1814                    width  : this.container.width(),
1815                    height : this.container.height(),
1816                    opacity: 1,
1817                    zIndex : 15
1818                }),
1819                ghostWidth  = ghost.width(),
1820                ghostHeight = ghost.height(),
1821                pos         = fromfx == 'slice-up' ? ghostHeight:'0',
1822                bar;
1823
1824            for (var i = 0; i < this.options.slices; i++) {
1825
1826                if (fromfx == 'slice-up-down') {
1827                    pos = ((i % 2) + 2) % 2==0 ? '0':ghostHeight;
1828                }
1829
1830                var width    = (i == this.options.slices-1) ? sliceWidth : sliceWidth,
1831                    clipto   = ('rect(0px, '+(width*(i+1))+'px, '+ghostHeight+'px, '+(sliceWidth*i)+'px)'),
1832                    clipfrom;
1833
1834                //slice-down - default
1835                clipfrom = ('rect(0px, '+(width*(i+1))+'px, 0px, '+(sliceWidth*i)+'px)');
1836
1837                if (fromfx == 'slice-up' || (fromfx == 'slice-up-down' && ((i % 2) + 2) % 2==0 )) {
1838                    clipfrom = ('rect('+ghostHeight+'px, '+(width*(i+1))+'px, '+ghostHeight+'px, '+(sliceWidth*i)+'px)');
1839                }
1840
1841                bar = UI.$('<div class="uk-cover-background"></div>').css({
1842                    'position'           : 'absolute',
1843                    'top'                : 0,
1844                    'left'               : 0,
1845                    'width'              : ghostWidth,
1846                    'height'             : ghostHeight,
1847                    'background-image'   : bgimage,
1848                    'clip'               : clipfrom,
1849                    'opacity'            : 0,
1850                    'transition'         : 'all '+this.options.duration+'ms ease-in-out '+(i*60)+'ms',
1851                    '-webkit-transition' : 'all '+this.options.duration+'ms ease-in-out '+(i*60)+'ms'
1852
1853                }).data('clip', clipto);
1854
1855                ghost.append(bar);
1856            }
1857
1858            this.container.append(ghost);
1859
1860            ghost.children().last().on(UI.support.transition.end, function() {
1861                ghost.remove();
1862                d.resolve();
1863            });
1864
1865            ghost.width();
1866
1867            ghost.children().each(function() {
1868                var bar = UI.$(this);
1869
1870                bar.css({
1871                    'clip': bar.data('clip'),
1872                    'opacity': 1
1873                });
1874            });
1875
1876            return d.promise();
1877        },
1878
1879        'slice-up': function(current, next, dir) {
1880            return Animations.slice.apply(this, [current, next, dir, 'slice-up']);
1881        },
1882
1883        'slice-down': function(current, next, dir) {
1884            return Animations.slice.apply(this, [current, next, dir, 'slice-down']);
1885        },
1886
1887        'slice-up-down': function(current, next, dir) {
1888            return Animations.slice.apply(this, [current, next, dir, 'slice-up-down']);
1889        },
1890
1891        'fold': function(current, next, dir) {
1892
1893            if (!next.data('cover')) {
1894                return Animations.fade.apply(this, arguments);
1895            }
1896
1897            var d = UI.$.Deferred();
1898
1899            var sliceWidth = Math.ceil(this.element.width() / this.options.slices),
1900                bgimage    = next.data('cover').css('background-image'),
1901                ghost      = UI.$('<li></li>').css({
1902                    width  : next.width(),
1903                    height : next.height(),
1904                    opacity: 1,
1905                    zIndex : 15
1906                }),
1907                ghostWidth  = next.width(),
1908                ghostHeight = next.height(),
1909                bar;
1910
1911            for (var i = 0;
1911 i < this.options.slices; i++) {
1912
1913                bar = UI.$('<div class="uk-cover-background"></div>').css({
1914                    'position'           : 'absolute',
1915                    'top'                : 0,
1916                    'left'               : 0,
1917                    'width'              : ghostWidth,
1918                    'height'             : ghostHeight,
1919                    'background-image'   : bgimage,
1920                    'transform-origin'   : (sliceWidth*i)+'px 0 0',
1921                    'clip'               : ('rect(0px, '+(sliceWidth*(i+1))+'px, '+ghostHeight+'px, '+(sliceWidth*i)+'px)'),
1922                    'opacity'            : 0,
1923                    'transform'          : 'scaleX(0.000001)',
1924                    'transition'         : 'all '+this.options.duration+'ms ease-in-out '+(100+i*60)+'ms',
1925                    '-webkit-transition' : 'all '+this.options.duration+'ms ease-in-out '+(100+i*60)+'ms'
1926                });
1927
1928                ghost.prepend(bar);
1929            }
1930
1931            this.container.append(ghost);
1932
1933            ghost.width();
1934
1935            ghost.children().first().on(UI.support.transition.end, function() {
1936                ghost.remove();
1937                d.resolve();
1938            }).end().css({
1939                'transform': 'scaleX(1)',
1940                'opacity': 1
1941            });
1942
1943            return d.promise();
1944        },
1945
1946        'puzzle': function(current, next, dir) {
1947
1948            if (!next.data('cover')) {
1949                return Animations.fade.apply(this, arguments);
1950            }
1951
1952            var d = UI.$.Deferred(), $this = this;
1953
1954            var boxCols   = Math.round(this.options.slices/2),
1955                boxWidth  = Math.round(next.width()/boxCols),
1956                boxRows   = Math.round(next.height()/boxWidth),
1957                boxHeight = Math.round(next.height()/boxRows)+1,
1958                bgimage   = next.data('cover').css('background-image'),
1959                ghost     = UI.$('<li></li>').css({
1960                    width   : this.container.width(),
1961                    height  : this.container.height(),
1962                    opacity : 1,
1963                    zIndex  : 15
1964                }),
1965                ghostWidth  = this.container.width(),
1966                ghostHeight = this.container.height(),
1967                box, rect, width;
1968
1969            for (var rows = 0; rows < boxRows; rows++) {
1970
1971                for (var cols = 0; cols < boxCols; cols++) {
1972
1973                    width  = (cols == boxCols-1) ? (boxWidth + 2) : boxWidth;
1974
1975                    rect = [
1976                        (boxHeight * rows)       +'px', // top
1977                        (width  * (cols+1))      +'px', // right
1978                        (boxHeight * (rows + 1)) +'px', // bottom
1979                        (boxWidth  * cols)       +'px'  // left
1980                    ];
1981
1982                    box = UI.$('<div class="uk-cover-background"></div>').css({
1983                        'position'          : 'absolute',
1984                        'top'               : 0,
1985                        'left'              : 0,
1986                        'opacity'           : 0,
1987                        'width'             : ghostWidth,
1988                        'height'            : ghostHeight,
1989                        'background-image'  : bgimage,
1990                        'clip'              : ('rect('+rect.join(',')+')'),
1991                        '-webkit-transform' : 'translateZ(0)', // fixes webkit opacity flickering bug
1992                        'transform'         : 'translateZ(0)'          // fixes moz opacity flickering bug
1993                    });
1994
1995                    ghost.append(box);
1996                }
1997            }
1998
1999            this.container.append(ghost);
2000
2001            var boxes = shuffle(ghost.children());
2002
2003            boxes.each(function(i) {
2004                UI.$(this).css({
2005                    'transition': 'all '+$this.options.duration+'ms ease-in-out '+(50+i*25)+'ms',
2006                    '-webkit-transition': 'all '+$this.options.duration+'ms ease-in-out '+(50+i*25)+'ms'
2007                });
2008            }).last().on(UI.support.transition.end, function() {
2009                ghost.remove();
2010                d.resolve();
2011            });
2012
2013            ghost.width();
2014
2015            boxes.css({'opacity': 1});
2016
2017            return d.promise();
2018        },
2019
2020        'boxes': function(current, next, dir, fromfx) {
2021
2022            if (!next.data('cover')) {
2023                return Animations.fade.apply(this, arguments);
2024            }
2025
2026            var d = UI.$.Deferred();
2027
2028            var boxCols   = Math.round(this.options.slices/2),
2029                boxWidth  = Math.round(next.width()/boxCols),
2030                boxRows   = Math.round(next.height()/boxWidth),
2031                boxHeight = Math.round(next.height()/boxRows)+1,
2032                bgimage   = next.data('cover').css('background-image'),
2033                ghost     = UI.$('<li></li>').css({
2034                    width   : next.width(),
2035                    height  : next.height(),
2036                    opacity : 1,
2037                    zIndex  : 15
2038                }),
2039                ghostWidth  = next.width(),
2040                ghostHeight = next.height(),
2041                box, rect, width, cols;
2042
2043            for (var rows = 0; rows < boxRows; rows++) {
2044
2045                for (cols = 0; cols < boxCols; cols++) {
2046
2047                    width  = (cols == boxCols-1) ? (boxWidth + 2) : boxWidth;
2048
2049                    rect = [
2050                        (boxHeight * rows)       +'px', // top
2051                        (width  * (cols+1))      +'px', // right
2052                        (boxHeight * (rows + 1)) +'px', // bottom
2053                        (boxWidth  * cols)       +'px'  // left
2054                    ];
2055
2056                    box = UI.$('<div class="uk-cover-background"></div>').css({
2057                        'position'          : 'absolute',
2058                        'top'               : 0,
2059                        'left'              : 0,
2060                        'opacity'           : 1,
2061                        'width'             : ghostWidth,
2062                        'height'            : ghostHeight,
2063                        'background-image'  : bgimage,
2064                        'transform-origin'  : rect[3]+' '+rect[0]+' 0',
2065                        'clip'              : ('rect('+rect.join(',')+')'),
2066                        '-webkit-transform' : 'scale(0.0000000000000001)',
2067                        'transform'         : 'scale(0.0000000000000001)'
2068                    });
2069
2070                    ghost.append(box);
2071                }
2072            }
2073
2074            this.container.append(ghost);
2075
2076            var rowIndex = 0, colIndex = 0, timeBuff = 0, box2Darr = [[]], boxes = ghost.children(), prevCol;
2077
2078            if (fromfx == 'boxes-reverse') {
2079                boxes = [].reverse.apply(boxes);
2080            }
2081
2082            boxes.each(function() {
2083
2084                box2Darr[rowIndex][colIndex] = UI.$(this);
2085                colIndex++;
2086
2087                if(colIndex == boxCols) {
2088                    rowIndex++;
2089                    colIndex = 0;
2090                    box2Darr[rowIndex] = [];
2091                }
2092            });
2093
2094            for (cols = 0, prevCol = 0; cols < (boxCols * boxRows); cols++) {
2095
2096                prevCol = cols;
2097
2098                for (var row = 0; row < boxRows; row++) {
2099
2100                    if (prevCol >= 0 && prevCol < boxCols) {
2101
2102                        box2Darr[row][prevCol].css({
2103                            'transition': 'all '+this.options.duration+'ms linear '+(50+timeBuff)+'ms',
2104                            '-webkit-transition': 'all '+this.options.duration+'ms linear '+(50+timeBuff)+'ms'
2105                        });
2106                    }
2107                    prevCol--;
2108                }
2109                timeBuff += 100;
2110            }
2111
2112            boxes.last().on(UI.support.transition.end, function() {
2113                ghost.remove();
2114                d.resolve();
2115            });
2116
2117            ghost.width();
2118
2119            boxes.css({
2120                '-webkit-transform': 'scale(1)',
2121                'transform': 'scale(1)'
2122            });
2123
2124            return d.promise();
2125        },
2126
2127        'boxes-reverse': function(current, next, dir) {
2128            return Animations.boxes.apply(this, [current, next, dir, 'boxes-reverse']);
2129        },
2130
2131        'random-fx': function(){
2132
2133            var animations = ['slice-up', 'fold', 'puzzle', 'slice-down', 'boxes', 'slice-up-down', 'boxes-reverse'];
2134
2135            this.fxIndex = (this.fxIndex === undefined ? -1 : this.fxIndex) + 1;
2136
2137            if (!animations[this.fxIndex]) this.fxIndex = 0;
2138
2139            return Animations[animations[this.fxIndex]].apply(this, arguments);
2140        }
2141    });
2142
2143
2144    // helper functions
2145
2146    // Shuffle an array
2147    var shuffle = function(arr) {
2148        for (var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x) {}
2149        return arr;
2150    };
2151
2152    return UI.slideshow.animations;
2153});

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.