HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/spire-checkout.komma-mediadesign.nl/wwwroot/js/site/core.js
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

/*!
 * Selectr 2.4.0
 * http://mobius.ovh/docs/selectr
 *
 * Released under the MIT license
 */
!function (e, t) {
    "function" == typeof define && define.amd ? define([], t("Selectr")) : "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) ? module.exports = t("Selectr") : e.Selectr = t("Selectr");
}(this, function (e) {
    "use strict";
    function t(e, t) {
        return e.hasOwnProperty(t) && (!0 === e[t] || e[t].length);
    }function i(e, t, i) {
        e.parentNode ? e.parentNode.parentNode || t.appendChild(e.parentNode) : t.appendChild(e), a.removeClass(e, "excluded"), i || (e.innerHTML = e.textContent);
    }var s = { defaultSelected: !0, width: "auto", disabled: !1, searchable: !0, clearable: !1, sortSelected: !1, allowDeselect: !1, closeOnScroll: !1, nativeDropdown: !1, placeholder: "Select an option...", taggable: !1, tagPlaceholder: "Enter a tag..." },
        n = function n() {};n.prototype = { on: function on(e, t) {
            this._events = this._events || {}, this._events[e] = this._events[e] || [], this._events[e].push(t);
        }, off: function off(e, t) {
            this._events = this._events || {}, e in this._events != !1 && this._events[e].splice(this._events[e].indexOf(t), 1);
        }, emit: function emit(e) {
            if (this._events = this._events || {}, e in this._events != !1) for (var t = 0; t < this._events[e].length; t++) {
                this._events[e][t].apply(this, Array.prototype.slice.call(arguments, 1));
            }
        } }, n.mixin = function (e) {
        for (var t = ["on", "off", "emit"], i = 0; i < t.length; i++) {
            "function" == typeof e ? e.prototype[t[i]] = n.prototype[t[i]] : e[t[i]] = n.prototype[t[i]];
        }return e;
    };var a = { extend: function extend(e, t) {
            t = t || {};var i;for (i in e) {
                e.hasOwnProperty(i) && (t.hasOwnProperty(i) || (t[i] = e[i]));
            }return t;
        }, each: function each(e, t, i) {
            if ("[object Object]" === Object.prototype.toString.call(e)) for (var s in e) {
                Object.prototype.hasOwnProperty.call(e, s) && t.call(i, s, e[s], e);
            } else for (var n = 0, a = e.length; n < a; n++) {
                t.call(i, n, e[n], e);
            }
        }, createElement: function createElement(e, t) {
            var i = document,
                s = i.createElement(e);if (t && "[object Object]" === Object.prototype.toString.call(t)) {
                var n;for (n in t) {
                    if (n in s) s[n] = t[n];else if ("html" === n) s.innerHTML = t[n];else if ("text" === n) {
                        var a = i.createTextNode(t[n]);s.appendChild(a);
                    } else s.setAttribute(n, t[n]);
                }
            }return s;
        }, hasClass: function hasClass(e, t) {
            if (e) return e.classList ? e.classList.contains(t) : !!e.className && !!e.className.match(new RegExp("(\\s|^)" + t + "(\\s|$)"));
        }, addClass: function addClass(e, t) {
            a.hasClass(e, t) || (e.classList ? e.classList.add(t) : e.className = e.className.trim() + " " + t);
        }, removeClass: function removeClass(e, t) {
            a.hasClass(e, t) && (e.classList ? e.classList.remove(t) : e.className = e.className.replace(new RegExp("(^|\\s)" + t.split(" ").join("|") + "(\\s|$)", "gi"), " "));
        }, closest: function closest(e, t) {
            return e && e !== document.body && (t(e) ? e : a.closest(e.parentNode, t));
        }, isInt: function isInt(e) {
            return "number" == typeof e && isFinite(e) && Math.floor(e) === e;
        }, debounce: function debounce(e, t, i) {
            var s;return function () {
                var n = this,
                    a = arguments,
                    l = i && !s;clearTimeout(s), s = setTimeout(function () {
                    s = null, i || e.apply(n, a);
                }, t), l && e.apply(n, a);
            };
        }, rect: function rect(e, t) {
            var i = window,
                s = e.getBoundingClientRect(),
                n = t ? i.pageXOffset : 0,
                a = t ? i.pageYOffset : 0;return { bottom: s.bottom + a, height: s.height, left: s.left + n, right: s.right + n, top: s.top + a, width: s.width };
        }, includes: function includes(e, t) {
            return e.indexOf(t) > -1;
        }, truncate: function truncate(e) {
            for (; e.firstChild;) {
                e.removeChild(e.firstChild);
            }
        } },
        l = function l() {
        if (this.items.length) {
            var e = document.createDocumentFragment();if (this.config.pagination) {
                var t = this.pages.slice(0, this.pageIndex);a.each(t, function (t, s) {
                    a.each(s, function (t, s) {
                        i(s, e, this.customOption);
                    }, this);
                }, this);
            } else a.each(this.items, function (t, s) {
                i(s, e, this.customOption);
            }, this);e.childElementCount && (a.removeClass(this.items[this.navIndex], "active"), this.navIndex = e.querySelector(".selectr-option").idx, a.addClass(this.items[this.navIndex], "active")), this.tree.appendChild(e);
        }
    },
        o = function o(e) {
        var t = e.target;this.container.contains(t) || !this.opened && !a.hasClass(this.container, "notice") || this.close();
    },
        h = function h(e, t) {
        t = t || e;var i = this.customOption ? this.config.renderOption(t) : e.textContent,
            s = a.createElement("li", { class: "selectr-option", html: i, role: "treeitem", "aria-selected": !1 });return s.idx = e.idx, this.items.push(s), e.defaultSelected && this.defaultSelected.push(e.idx), e.disabled && (s.disabled = !0, a.addClass(s, "disabled")), s;
    },
        c = function c() {
        this.requiresPagination = this.config.pagination && this.config.pagination > 0, t(this.config, "width") && (a.isInt(this.config.width) ? this.width = this.config.width + "px" : "auto" === this.config.width ? this.width = "100%" : a.includes(this.config.width, "%") && (this.width = this.config.width)), this.container = a.createElement("div", { class: "selectr-container" }), this.config.customClass && a.addClass(this.container, this.config.customClass), this.mobileDevice ? a.addClass(this.container, "selectr-mobile") : a.addClass(this.container, "selectr-desktop"), this.el.tabIndex = -1, this.config.nativeDropdown || this.mobileDevice ? a.addClass(this.el, "selectr-visible") : a.addClass(this.el, "selectr-hidden"), this.selected = a.createElement("div", { class: "selectr-selected", disabled: this.disabled, tabIndex: 1, "aria-expanded": !1 }), this.label = a.createElement(this.el.multiple ? "ul" : "span", { class: "selectr-label" });var e = a.createElement("div", { class: "selectr-options-container" });if (this.tree = a.createElement("ul", { class: "selectr-options", role: "tree", "aria-hidden": !0, "aria-expanded": !1 }), this.notice = a.createElement("div", { class: "selectr-notice" }), this.el.setAttribute("aria-hidden", !0), this.disabled && (this.el.disabled = !0), this.el.multiple && (a.addClass(this.label, "selectr-tags"), a.addClass(this.container, "multiple"), this.tags = [], this.selectedValues = this.getSelectedProperties("value"), this.selectedIndexes = this.getSelectedProperties("idx")), this.selected.appendChild(this.label), this.config.clearable && (this.selectClear = a.createElement("button", { class: "selectr-clear", type: "button" }), this.container.appendChild(this.selectClear), a.addClass(this.container, "clearable")), this.config.taggable) {
            var i = a.createElement("li", { class: "input-tag" });this.input = a.createElement("input", { class: "selectr-tag-input", placeholder: this.config.tagPlaceholder, tagIndex: 0, autocomplete: "off", autocorrect: "off", autocapitalize: "off", spellcheck: "false", role: "textbox", type: "search" }), i.appendChild(this.input), this.label.appendChild(i), a.addClass(this.container, "taggable"), this.tagSeperators = [","], this.config.tagSeperators && (this.tagSeperators = this.tagSeperators.concat(this.config.tagSeperators));
        }this.config.searchable && (this.input = a.createElement("input", { class: "selectr-input", tagIndex: -1, autocomplete: "off", autocorrect: "off", autocapitalize: "off", spellcheck: "false", role: "textbox", type: "search" }), this.inputClear = a.createElement("button", { class: "selectr-input-clear", type: "button" }), this.inputContainer = a.createElement("div", { class: "selectr-input-container" }), this.inputContainer.appendChild(this.input), this.inputContainer.appendChild(this.inputClear), e.appendChild(this.inputContainer)), e.appendChild(this.notice), e.appendChild(this.tree), this.items = [], this.options = [], this.el.options.length && (this.options = [].slice.call(this.el.options));var s = !1,
            n = 0;if (this.el.children.length && a.each(this.el.children, function (e, t) {
            "OPTGROUP" === t.nodeName ? (s = a.createElement("ul", { class: "selectr-optgroup", role: "group", html: "<li class='selectr-optgroup--label'>" + t.label + "</li>" }), a.each(t.children, function (e, t) {
                t.idx = n, s.appendChild(h.call(this, t, s)), n++;
            }, this)) : (t.idx = n, h.call(this, t), n++);
        }, this), this.config.data && Array.isArray(this.config.data)) {
            this.data = [];var l,
                o = !1;s = !1, n = 0, a.each(this.config.data, function (e, i) {
                t(i, "children") ? (o = a.createElement("optgroup", { label: i.text }), s = a.createElement("ul", { class: "selectr-optgroup", role: "group", html: "<li class='selectr-optgroup--label'>" + i.text + "</li>" }), a.each(i.children, function (e, i) {
                    (l = new Option(i.text, i.value, !1, i.hasOwnProperty("selected") && !0 === i.selected)).disabled = t(i, "disabled"), this.options.push(l), o.appendChild(l), l.idx = n, s.appendChild(h.call(this, l, i)), this.data[n] = i, n++;
                }, this)) : ((l = new Option(i.text, i.value, !1, i.hasOwnProperty("selected") && !0 === i.selected)).disabled = t(i, "disabled"), this.options.push(l), l.idx = n, h.call(this, l, i), this.data[n] = i, n++);
            }, this);
        }this.setSelected(!0);var c;this.navIndex = 0;for (var r = 0; r < this.items.length; r++) {
            if (c = this.items[r], !a.hasClass(c, "disabled")) {
                a.addClass(c, "active"), this.navIndex = r;break;
            }
        }this.requiresPagination && (this.pageIndex = 1, this.paginate()), this.container.appendChild(this.selected), this.container.appendChild(e), this.placeEl = a.createElement("div", { class: "selectr-placeholder" }), this.setPlaceholder(), this.selected.appendChild(this.placeEl), this.disabled && this.disable(), this.el.parentNode.insertBefore(this.container, this.el), this.container.appendChild(this.el);
    },
        r = function r(e) {
        if (e = e || window.event, this.items.length && this.opened && a.includes([13, 38, 40], e.which)) {
            if (e.preventDefault(), 13 === e.which) return !(this.config.taggable && this.input.value.length > 0) && this.change(this.navIndex);var t,
                i = this.items[this.navIndex];switch (e.which) {case 38:
                    t = 0, this.navIndex > 0 && this.navIndex--;break;case 40:
                    t = 1, this.navIndex < this.items.length - 1 && this.navIndex++;}for (this.navigating = !0; a.hasClass(this.items[this.navIndex], "disabled") || a.hasClass(this.items[this.navIndex], "excluded");) {
                if (t ? this.navIndex++ : this.navIndex--, this.searching) {
                    if (this.navIndex > this.tree.lastElementChild.idx) {
                        this.navIndex = this.tree.lastElementChild.idx;break;
                    }if (this.navIndex < this.tree.firstElementChild.idx) {
                        this.navIndex = this.tree.firstElementChild.idx;break;
                    }
                }
            }var s = a.rect(this.items[this.navIndex]);t ? (0 === this.navIndex ? this.tree.scrollTop = 0 : s.top + s.height > this.optsRect.top + this.optsRect.height && (this.tree.scrollTop = this.tree.scrollTop + (s.top + s.height - (this.optsRect.top + this.optsRect.height))), this.navIndex === this.tree.childElementCount - 1 && this.requiresPagination && u.call(this)) : 0 === this.navIndex ? this.tree.scrollTop = 0 : s.top - this.optsRect.top < 0 && (this.tree.scrollTop = this.tree.scrollTop + (s.top - this.optsRect.top)), i && a.removeClass(i, "active"), a.addClass(this.items[this.navIndex], "active");
        } else this.navigating = !1;
    },
        d = function d(e) {
        var t,
            i = this,
            s = document.createDocumentFragment(),
            n = this.options[e.idx],
            l = this.data ? this.data[e.idx] : n,
            o = this.customSelected ? this.config.renderSelection(l) : n.textContent,
            h = a.createElement("li", { class: "selectr-tag", html: o }),
            c = a.createElement("button", { class: "selectr-tag-remove", type: "button" });if (h.appendChild(c), h.idx = e.idx, h.tag = n.value, this.tags.push(h), this.config.sortSelected) {
            var r = this.tags.slice();t = function t(e, _t) {
                e.replace(/(\d+)|(\D+)/g, function (e, i, s) {
                    _t.push([i || 1 / 0, s || ""]);
                });
            }, r.sort(function (e, s) {
                var n,
                    a,
                    l = [],
                    o = [];for (!0 === i.config.sortSelected ? (n = e.tag, a = s.tag) : "text" === i.config.sortSelected && (n = e.textContent, a = s.textContent), t(n, l), t(a, o); l.length && o.length;) {
                    var h = l.shift(),
                        c = o.shift(),
                        r = h[0] - c[0] || h[1].localeCompare(c[1]);if (r) return r;
                }return l.length - o.length;
            }), a.each(r, function (e, t) {
                s.appendChild(t);
            }), this.label.innerHTML = "";
        } else s.appendChild(h);this.config.taggable ? this.label.insertBefore(s, this.input.parentNode) : this.label.appendChild(s);
    },
        p = function p(e) {
        var t = !1;a.each(this.tags, function (i, s) {
            s.idx === e.idx && (t = s);
        }, this), t && (this.label.removeChild(t), this.tags.splice(this.tags.indexOf(t), 1));
    },
        u = function u() {
        var e = this.tree;if (e.scrollTop >= e.scrollHeight - e.offsetHeight && this.pageIndex < this.pages.length) {
            var t = document.createDocumentFragment();a.each(this.pages[this.pageIndex], function (e, s) {
                i(s, t, this.customOption);
            }, this), e.appendChild(t), this.pageIndex++, this.emit("selectr.paginate", { items: this.items.length, total: this.data.length, page: this.pageIndex, pages: this.pages.length });
        }
    },
        f = function f() {
        (this.config.searchable || this.config.taggable) && (this.input.value = null, this.searching = !1, this.config.searchable && a.removeClass(this.inputContainer, "active"), a.hasClass(this.container, "notice") && (a.removeClass(this.container, "notice"), a.addClass(this.container, "open"), this.input.focus()), a.each(this.items, function (e, t) {
            a.removeClass(t, "excluded"), this.customOption || (t.innerHTML = t.textContent);
        }, this));
    },
        g = function g(e, t) {
        var i = new RegExp(e, "i").exec(t.textContent);return !!i && t.textContent.replace(i[0], "<span class='selectr-match'>" + i[0] + "</span>");
    },
        v = function v(e, t) {
        if (t = t || {}, !e) throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if (this.el = e, "string" == typeof e && (this.el = document.querySelector(e)), null === this.el) throw new Error("The element you passed to Selectr can not be found.");if ("select" !== this.el.nodeName.toLowerCase()) throw new Error("The element you passed to Selectr is not a HTMLSelectElement.");this.render(t);
    };return v.prototype.render = function (e) {
        if (!this.rendered) {
            this.config = a.extend(s, e), this.originalType = this.el.type, this.originalIndex = this.el.tabIndex, this.defaultSelected = [], this.originalOptionCount = this.el.options.length, (this.config.multiple || this.config.taggable) && (this.el.multiple = !0), this.disabled = t(this.config, "disabled"), this.opened = !1, this.config.taggable && (this.config.searchable = !1), this.navigating = !1, this.mobileDevice = !1, /Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent) && (this.mobileDevice = !0), this.customOption = this.config.hasOwnProperty("renderOption") && "function" == typeof this.config.renderOption, this.customSelected = this.config.hasOwnProperty("renderSelection") && "function" == typeof this.config.renderSelection, n.mixin(this), c.call(this), this.bindEvents(), this.update(), this.optsRect = a.rect(this.tree), this.rendered = !0, this.el.multiple || (this.el.selectedIndex = this.selectedIndex);var i = this;setTimeout(function () {
                i.emit("selectr.init");
            }, 20);
        }
    }, v.prototype.getSelected = function () {
        return this.el.querySelectorAll("option:checked");
    }, v.prototype.getSelectedProperties = function (e) {
        var t = this.getSelected();return [].slice.call(t).map(function (t) {
            return t[e];
        }).filter(function (e) {
            return !!e;
        });
    }, v.prototype.bindEvents = function () {
        var e = this;if (this.events = {}, this.events.dismiss = o.bind(this), this.events.navigate = r.bind(this), this.events.reset = this.reset.bind(this), this.config.nativeDropdown || this.mobileDevice) {
            this.container.addEventListener("touchstart", function (t) {
                t.changedTouches[0].target === e.el && e.toggle();
            }), (this.config.nativeDropdown || this.mobileDevice) && this.container.addEventListener("click", function (t) {
                t.target === e.el && e.toggle();
            });var t = function t(e, _t2) {
                for (var i, s = [], n = e.slice(0), a = 0; a < _t2.length; a++) {
                    (i = n.indexOf(_t2[a])) > -1 ? n.splice(i, 1) : s.push(_t2[a]);
                }return [s, n];
            };this.el.addEventListener("change", function (i) {
                if (e.el.multiple) {
                    var s = e.getSelectedProperties("idx"),
                        n = t(e.selectedIndexes, s);a.each(n[0], function (t, i) {
                        e.select(i);
                    }, e), a.each(n[1], function (t, i) {
                        e.deselect(i);
                    }, e);
                } else e.el.selectedIndex > -1 && e.select(e.el.selectedIndex);
            });
        }this.config.nativeDropdown && this.container.addEventListener("keydown", function (t) {
            "Enter" === t.key && e.selected === document.activeElement && (e.toggle(), setTimeout(function () {
                e.el.focus();
            }, 200));
        }), this.selected.addEventListener("click", function (t) {
            e.disabled || e.toggle(), t.preventDefault();
        }), this.label.addEventListener("click", function (t) {
            a.hasClass(t.target, "selectr-tag-remove") && e.deselect(t.target.parentNode.idx);
        }), this.selectClear && this.selectClear.addEventListener("click", this.clear.bind(this)), this.tree.addEventListener("mousedown", function (e) {
            e.preventDefault();
        }), this.tree.addEventListener("click", function (t) {
            var i = a.closest(t.target, function (e) {
                return e && a.hasClass(e, "selectr-option");
            });i && (a.hasClass(i, "disabled") || (a.hasClass(i, "selected") ? (e.el.multiple || !e.el.multiple && e.config.allowDeselect) && e.deselect(i.idx) : e.select(i.idx), e.opened && !e.el.multiple && e.close()));
        }), this.tree.addEventListener("mouseover", function (t) {
            a.hasClass(t.target, "selectr-option") && (a.hasClass(t.target, "disabled") || (a.removeClass(e.items[e.navIndex], "active"), a.addClass(t.target, "active"), e.navIndex = [].slice.call(e.items).indexOf(t.target)));
        }), this.config.searchable && (this.input.addEventListener("focus", function (t) {
            e.searching = !0;
        }), this.input.addEventListener("blur", function (t) {
            e.searching = !1;
        }), this.input.addEventListener("keyup", function (t) {
            e.search(), e.config.taggable || (this.value.length ? a.addClass(this.parentNode, "active") : a.removeClass(this.parentNode, "active"));
        }), this.inputClear.addEventListener("click", function (t) {
            e.input.value = null, f.call(e), e.tree.childElementCount || l.call(e);
        })), this.config.taggable && this.input.addEventListener("keyup", function (t) {
            if (e.search(), e.config.taggable && this.value.length) {
                var i = this.value.trim();(13 === t.which || a.includes(e.tagSeperators, t.key)) && (a.each(e.tagSeperators, function (e, t) {
                    i = i.replace(t, "");
                }), e.add({ value: i, text: i, selected: !0 }, !0) ? (e.close(), f.call(e)) : (this.value = "", e.setMessage("That tag is already in use.")));
            }
        }), this.update = a.debounce(function () {
            e.opened && e.config.closeOnScroll && e.close(), e.width && (e.container.style.width = e.width), e.invert();
        }, 50), this.requiresPagination && (this.paginateItems = a.debounce(function () {
            u.call(this);
        }, 50), this.tree.addEventListener("scroll", this.paginateItems.bind(this))), document.addEventListener("click", this.events.dismiss), window.addEventListener("keydown", this.events.navigate), window.addEventListener("resize", this.update), window.addEventListener("scroll", this.update), this.el.form && this.el.form.addEventListener("reset", this.events.reset);
    }, v.prototype.setSelected = function (e) {
        if (this.config.data || this.el.multiple || !this.el.options.length || (0 === this.el.selectedIndex && (this.el.options[0].defaultSelected || this.config.defaultSelected || (this.el.selectedIndex = -1)), this.selectedIndex = this.el.selectedIndex, this.selectedIndex > -1 && this.select(this.selectedIndex)), this.config.multiple && "select-one" === this.originalType && !this.config.data && this.el.options[0].selected && !this.el.options[0].defaultSelected && (this.el.options[0].selected = !1), a.each(this.options, function (e, t) {
            t.selected && t.defaultSelected && this.select(t.idx);
        }, this), this.config.selectedValue && this.setValue(this.config.selectedValue), this.config.data) {
            !this.el.multiple && this.config.defaultSelected && this.el.selectedIndex < 0 && this.select(0);var i = 0;a.each(this.config.data, function (e, s) {
                t(s, "children") ? a.each(s.children, function (e, t) {
                    t.hasOwnProperty("selected") && !0 === t.selected && this.select(i), i++;
                }, this) : (s.hasOwnProperty("selected") && !0 === s.selected && this.select(i), i++);
            }, this);
        }
    }, v.prototype.destroy = function () {
        this.rendered && (this.emit("selectr.destroy"), "select-one" === this.originalType && (this.el.multiple = !1), this.config.data && (this.el.innerHTML = ""), a.removeClass(this.el, "selectr-hidden"), this.el.form && a.off(this.el.form, "reset", this.events.reset), a.off(document, "click", this.events.dismiss), a.off(document, "keydown", this.events.navigate), a.off(window, "resize", this.update), a.off(window, "scroll", this.update), this.container.parentNode.replaceChild(this.el, this.container), this.rendered = !1);
    }, v.prototype.change = function (e) {
        var t = this.items[e],
            i = this.options[e];i.disabled || (i.selected && a.hasClass(t, "selected") ? this.deselect(e) : this.select(e), this.opened && !this.el.multiple && this.close());
    }, v.prototype.select = function (e) {
        var t = this.items[e],
            i = [].slice.call(this.el.options),
            s = this.options[e];if (this.el.multiple) {
            if (a.includes(this.selectedIndexes, e)) return !1;if (this.config.maxSelections && this.tags.length === this.config.maxSelections) return this.setMessage("A maximum of " + this.config.maxSelections + " items can be selected.", !0), !1;this.selectedValues.push(s.value), this.selectedIndexes.push(e), d.call(this, t);
        } else {
            var n = this.data ? this.data[e] : s;this.label.innerHTML = this.customSelected ? this.config.renderSelection(n) : s.textContent, this.selectedValue = s.value, this.selectedIndex = e, a.each(this.options, function (t, i) {
                var s = this.items[t];t !== e && (s && a.removeClass(s, "selected"), i.selected = !1, i.removeAttribute("selected"));
            }, this);
        }a.includes(i, s) || this.el.add(s), t.setAttribute("aria-selected", !0), a.addClass(t, "selected"), a.addClass(this.container, "has-selected"), s.selected = !0, s.setAttribute("selected", ""), this.emit("selectr.change", s), this.emit("selectr.select", s);
    }, v.prototype.deselect = function (e, t) {
        var i = this.items[e],
            s = this.options[e];if (this.el.multiple) {
            var n = this.selectedIndexes.indexOf(e);this.selectedIndexes.splice(n, 1);var l = this.selectedValues.indexOf(s.value);this.selectedValues.splice(l, 1), p.call(this, i), this.tags.length || a.removeClass(this.container, "has-selected");
        } else {
            if (!t && !this.config.clearable && !this.config.allowDeselect) return !1;this.label.innerHTML = "", this.selectedValue = null, this.el.selectedIndex = this.selectedIndex = -1, a.removeClass(this.container, "has-selected");
        }this.items[e].setAttribute("aria-selected", !1), a.removeClass(this.items[e], "selected"), s.selected = !1, s.removeAttribute("selected"), this.emit("selectr.change", null), this.emit("selectr.deselect", s);
    }, v.prototype.setValue = function (e) {
        var t = Array.isArray(e);if (t || (e = e.toString().trim()), !this.el.multiple && t) return !1;a.each(this.options, function (i, s) {
            (t && a.includes(e.toString(), s.value) || s.value === e) && this.change(s.idx);
        }, this);
    }, v.prototype.getValue = function (e, t) {
        var i;if (this.el.multiple) e ? this.selectedIndexes.length && ((i = {}).values = [], a.each(this.selectedIndexes, function (e, t) {
            var s = this.options[t];i.values[e] = { value: s.value, text: s.textContent };
        }, this)) : i = this.selectedValues.slice();else if (e) {
            var s = this.options[this.selectedIndex];i = { value: s.value, text: s.textContent };
        } else i = this.selectedValue;return e && t && (i = JSON.stringify(i)), i;
    }, v.prototype.add = function (e, t) {
        if (e) {
            if (this.data = this.data || [], this.items = this.items || [], this.options = this.options || [], Array.isArray(e)) a.each(e, function (e, i) {
                this.add(i, t);
            }, this);else if ("[object Object]" === Object.prototype.toString.call(e)) {
                if (t) {
                    var i = !1;if (a.each(this.options, function (t, s) {
                        s.value.toLowerCase() === e.value.toLowerCase() && (i = !0);
                    }), i) return !1;
                }var s = a.createElement("option", e);return this.data.push(e), this.options.push(s), s.idx = this.options.length > 0 ? this.options.length - 1 : 0, h.call(this, s), e.selected && this.select(s.idx), s;
            }return this.setPlaceholder(), this.config.pagination && this.paginate(), !0;
        }
    }, v.prototype.remove = function (e) {
        var t = [];if (Array.isArray(e) ? a.each(e, function (i, s) {
            a.isInt(s) ? t.push(this.getOptionByIndex(s)) : "string" == typeof e && t.push(this.getOptionByValue(s));
        }, this) : a.isInt(e) ? t.push(this.getOptionByIndex(e)) : "string" == typeof e && t.push(this.getOptionByValue(e)), t.length) {
            var i;a.each(t, function (e, t) {
                i = t.idx, this.el.remove(t), this.options.splice(i, 1);var s = this.items[i].parentNode;s && s.removeChild(this.items[i]), this.items.splice(i, 1), a.each(this.options, function (e, t) {
                    t.idx = e, this.items[e].idx = e;
                }, this);
            }, this), this.setPlaceholder(), this.config.pagination && this.paginate();
        }
    }, v.prototype.removeAll = function () {
        this.clear(!0), a.each(this.el.options, function (e, t) {
            this.el.remove(t);
        }, this), a.truncate(this.tree), this.items = [], this.options = [], this.data = [], this.navIndex = 0, this.requiresPagination && (this.requiresPagination = !1, this.pageIndex = 1, this.pages = []), this.setPlaceholder();
    }, v.prototype.search = function (e) {
        if (!this.navigating) {
            e = e || this.input.value;var t = document.createDocumentFragment();if (this.removeMessage(), a.truncate(this.tree), e.length > 1) {
                if (a.each(this.options, function (s, n) {
                    var l = this.items[n.idx];a.includes(n.textContent.toLowerCase(), e.toLowerCase()) && !n.disabled ? (i(l, t, this.customOption), a.removeClass(l, "excluded"), this.customOption || (l.innerHTML = g(e, n))) : a.addClass(l, "excluded");
                }, this), t.childElementCount) {
                    var s = this.items[this.navIndex],
                        n = t.firstElementChild;a.removeClass(s, "active"), this.navIndex = n.idx, a.addClass(n, "active");
                } else this.config.taggable || this.setMessage("no results.");
            } else l.call(this);this.tree.appendChild(t);
        }
    }, v.prototype.toggle = function () {
        this.disabled || (this.opened ? this.close() : this.open());
    }, v.prototype.open = function () {
        var e = this;return !!this.options.length && (this.opened || this.emit("selectr.open"), this.opened = !0, this.mobileDevice || this.config.nativeDropdown ? (a.addClass(this.container, "native-open"), void (this.config.data && a.each(this.options, function (e, t) {
            this.el.add(t);
        }, this))) : (a.addClass(this.container, "open"), l.call(this), this.invert(), this.tree.scrollTop = 0, a.removeClass(this.container, "notice"), this.selected.setAttribute("aria-expanded", !0), this.tree.setAttribute("aria-hidden", !1), this.tree.setAttribute("aria-expanded", !0), void (this.config.searchable && !this.config.taggable && setTimeout(function () {
            e.input.focus(), e.input.tabIndex = 0;
        }, 10))));
    }, v.prototype.close = function () {
        if (this.opened && this.emit("selectr.close"), this.opened = !1, this.mobileDevice || this.config.nativeDropdown) a.removeClass(this.container, "native-open");else {
            var e = a.hasClass(this.container, "notice");this.config.searchable && !e && (this.input.blur(), this.input.tabIndex = -1, this.searching = !1), e && (a.removeClass(this.container, "notice"), this.notice.textContent = ""), a.removeClass(this.container, "open"), a.removeClass(this.container, "native-open"), this.selected.setAttribute("aria-expanded", !1), this.tree.setAttribute("aria-hidden", !0), this.tree.setAttribute("aria-expanded", !1), a.truncate(this.tree), f.call(this);
        }
    }, v.prototype.enable = function () {
        this.disabled = !1, this.el.disabled = !1, this.selected.tabIndex = this.originalIndex, this.el.multiple && a.each(this.tags, function (e, t) {
            t.lastElementChild.tabIndex = 0;
        }), a.removeClass(this.container, "selectr-disabled");
    }, v.prototype.disable = function (e) {
        e || (this.el.disabled = !0), this.selected.tabIndex = -1, this.el.multiple && a.each(this.tags, function (e, t) {
            t.lastElementChild.tabIndex = -1;
        }), this.disabled = !0, a.addClass(this.container, "selectr-disabled");
    }, v.prototype.reset = function () {
        this.disabled || (this.clear(), this.setSelected(!0), a.each(this.defaultSelected, function (e, t) {
            this.select(t);
        }, this), this.emit("selectr.reset"));
    }, v.prototype.clear = function (e) {
        if (this.el.multiple) {
            if (this.selectedIndexes.length) {
                var t = this.selectedIndexes.slice();a.each(t, function (e, t) {
                    this.deselect(t);
                }, this);
            }
        } else this.selectedIndex > -1 && this.deselect(this.selectedIndex, e);this.emit("selectr.clear");
    }, v.prototype.serialise = function (e) {
        var t = [];return a.each(this.options, function (e, i) {
            var s = { value: i.value, text: i.textContent };i.selected && (s.selected = !0), i.disabled && (s.disabled = !0), t[e] = s;
        }), e ? JSON.stringify(t) : t;
    }, v.prototype.serialize = function (e) {
        return this.serialise(e);
    }, v.prototype.setPlaceholder = function (e) {
        e = e || this.config.placeholder || this.el.getAttribute("placeholder"), this.options.length || (e = "No options available"), this.placeEl.innerHTML = e;
    }, v.prototype.paginate = function () {
        if (this.items.length) {
            var e = this;return this.pages = this.items.map(function (t, i) {
                return i % e.config.pagination == 0 ? e.items.slice(i, i + e.config.pagination) : null;
            }).filter(function (e) {
                return e;
            }), this.pages;
        }
    }, v.prototype.setMessage = function (e, t) {
        t && this.close(), a.addClass(this.container, "notice"), this.notice.textContent = e;
    }, v.prototype.removeMessage = function () {
        a.removeClass(this.container, "notice"), this.notice.innerHTML = "";
    }, v.prototype.invert = function () {
        var e = a.rect(this.selected),
            t = this.tree.parentNode.offsetHeight,
            i = window.innerHeight;e.top + e.height + t > i ? (a.addClass(this.container, "inverted"), this.isInverted = !0) : (a.removeClass(this.container, "inverted"), this.isInverted = !1), this.optsRect = a.rect(this.tree);
    }, v.prototype.getOptionByIndex = function (e) {
        return this.options[e];
    }, v.prototype.getOptionByValue = function (e) {
        for (var t = !1, i = 0, s = this.options.length; i < s; i++) {
            if (this.options[i].value.trim() === e.toString().trim()) {
                t = this.options[i];break;
            }
        }return t;
    }, v;
});
/*! Hammer.JS - v2.0.8 - 2016-04-23
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */
!function (a, b, c, d) {
    "use strict";
    function e(a, b, c) {
        return setTimeout(j(a, c), b);
    }function f(a, b, c) {
        return Array.isArray(a) ? (g(a, c[b], c), !0) : !1;
    }function g(a, b, c) {
        var e;if (a) if (a.forEach) a.forEach(b, c);else if (a.length !== d) for (e = 0; e < a.length;) {
            b.call(c, a[e], e, a), e++;
        } else for (e in a) {
            a.hasOwnProperty(e) && b.call(c, a[e], e, a);
        }
    }function h(b, c, d) {
        var e = "DEPRECATED METHOD: " + c + "\n" + d + " AT \n";return function () {
            var c = new Error("get-stack-trace"),
                d = c && c.stack ? c.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace",
                f = a.console && (a.console.warn || a.console.log);return f && f.call(a.console, e, d), b.apply(this, arguments);
        };
    }function i(a, b, c) {
        var d,
            e = b.prototype;d = a.prototype = Object.create(e), d.constructor = a, d._super = e, c && la(d, c);
    }function j(a, b) {
        return function () {
            return a.apply(b, arguments);
        };
    }function k(a, b) {
        return (typeof a === "undefined" ? "undefined" : _typeof(a)) == oa ? a.apply(b ? b[0] || d : d, b) : a;
    }function l(a, b) {
        return a === d ? b : a;
    }function m(a, b, c) {
        g(q(b), function (b) {
            a.addEventListener(b, c, !1);
        });
    }function n(a, b, c) {
        g(q(b), function (b) {
            a.removeEventListener(b, c, !1);
        });
    }function o(a, b) {
        for (; a;) {
            if (a == b) return !0;a = a.parentNode;
        }return !1;
    }function p(a, b) {
        return a.indexOf(b) > -1;
    }function q(a) {
        return a.trim().split(/\s+/g);
    }function r(a, b, c) {
        if (a.indexOf && !c) return a.indexOf(b);for (var d = 0; d < a.length;) {
            if (c && a[d][c] == b || !c && a[d] === b) return d;d++;
        }return -1;
    }function s(a) {
        return Array.prototype.slice.call(a, 0);
    }function t(a, b, c) {
        for (var d = [], e = [], f = 0; f < a.length;) {
            var g = b ? a[f][b] : a[f];r(e, g) < 0 && d.push(a[f]), e[f] = g, f++;
        }return c && (d = b ? d.sort(function (a, c) {
            return a[b] > c[b];
        }) : d.sort()), d;
    }function u(a, b) {
        for (var c, e, f = b[0].toUpperCase() + b.slice(1), g = 0; g < ma.length;) {
            if (c = ma[g], e = c ? c + f : b, e in a) return e;g++;
        }return d;
    }function v() {
        return ua++;
    }function w(b) {
        var c = b.ownerDocument || b;return c.defaultView || c.parentWindow || a;
    }function x(a, b) {
        var c = this;this.manager = a, this.callback = b, this.element = a.element, this.target = a.options.inputTarget, this.domHandler = function (b) {
            k(a.options.enable, [a]) && c.handler(b);
        }, this.init();
    }function y(a) {
        var b,
            c = a.options.inputClass;return new (b = c ? c : xa ? M : ya ? P : wa ? R : L)(a, z);
    }function z(a, b, c) {
        var d = c.pointers.length,
            e = c.changedPointers.length,
            f = b & Ea && d - e === 0,
            g = b & (Ga | Ha) && d - e === 0;c.isFirst = !!f, c.isFinal = !!g, f && (a.session = {}), c.eventType = b, A(a, c), a.emit("hammer.input", c), a.recognize(c), a.session.prevInput = c;
    }function A(a, b) {
        var c = a.session,
            d = b.pointers,
            e = d.length;c.firstInput || (c.firstInput = D(b)), e > 1 && !c.firstMultiple ? c.firstMultiple = D(b) : 1 === e && (c.firstMultiple = !1);var f = c.firstInput,
            g = c.firstMultiple,
            h = g ? g.center : f.center,
            i = b.center = E(d);b.timeStamp = ra(), b.deltaTime = b.timeStamp - f.timeStamp, b.angle = I(h, i), b.distance = H(h, i), B(c, b), b.offsetDirection = G(b.deltaX, b.deltaY);var j = F(b.deltaTime, b.deltaX, b.deltaY);b.overallVelocityX = j.x, b.overallVelocityY = j.y, b.overallVelocity = qa(j.x) > qa(j.y) ? j.x : j.y, b.scale = g ? K(g.pointers, d) : 1, b.rotation = g ? J(g.pointers, d) : 0, b.maxPointers = c.prevInput ? b.pointers.length > c.prevInput.maxPointers ? b.pointers.length : c.prevInput.maxPointers : b.pointers.length, C(c, b);var k = a.element;o(b.srcEvent.target, k) && (k = b.srcEvent.target), b.target = k;
    }function B(a, b) {
        var c = b.center,
            d = a.offsetDelta || {},
            e = a.prevDelta || {},
            f = a.prevInput || {};b.eventType !== Ea && f.eventType !== Ga || (e = a.prevDelta = { x: f.deltaX || 0, y: f.deltaY || 0 }, d = a.offsetDelta = { x: c.x, y: c.y }), b.deltaX = e.x + (c.x - d.x), b.deltaY = e.y + (c.y - d.y);
    }function C(a, b) {
        var c,
            e,
            f,
            g,
            h = a.lastInterval || b,
            i = b.timeStamp - h.timeStamp;if (b.eventType != Ha && (i > Da || h.velocity === d)) {
            var j = b.deltaX - h.deltaX,
                k = b.deltaY - h.deltaY,
                l = F(i, j, k);e = l.x, f = l.y, c = qa(l.x) > qa(l.y) ? l.x : l.y, g = G(j, k), a.lastInterval = b;
        } else c = h.velocity, e = h.velocityX, f = h.velocityY, g = h.direction;b.velocity = c, b.velocityX = e, b.velocityY = f, b.direction = g;
    }function D(a) {
        for (var b = [], c = 0; c < a.pointers.length;) {
            b[c] = { clientX: pa(a.pointers[c].clientX), clientY: pa(a.pointers[c].clientY) }, c++;
        }return { timeStamp: ra(), pointers: b, center: E(b), deltaX: a.deltaX, deltaY: a.deltaY };
    }function E(a) {
        var b = a.length;if (1 === b) return { x: pa(a[0].clientX), y: pa(a[0].clientY) };for (var c = 0, d = 0, e = 0; b > e;) {
            c += a[e].clientX, d += a[e].clientY, e++;
        }return { x: pa(c / b), y: pa(d / b) };
    }function F(a, b, c) {
        return { x: b / a || 0, y: c / a || 0 };
    }function G(a, b) {
        return a === b ? Ia : qa(a) >= qa(b) ? 0 > a ? Ja : Ka : 0 > b ? La : Ma;
    }function H(a, b, c) {
        c || (c = Qa);var d = b[c[0]] - a[c[0]],
            e = b[c[1]] - a[c[1]];return Math.sqrt(d * d + e * e);
    }function I(a, b, c) {
        c || (c = Qa);var d = b[c[0]] - a[c[0]],
            e = b[c[1]] - a[c[1]];return 180 * Math.atan2(e, d) / Math.PI;
    }function J(a, b) {
        return I(b[1], b[0], Ra) + I(a[1], a[0], Ra);
    }function K(a, b) {
        return H(b[0], b[1], Ra) / H(a[0], a[1], Ra);
    }function L() {
        this.evEl = Ta, this.evWin = Ua, this.pressed = !1, x.apply(this, arguments);
    }function M() {
        this.evEl = Xa, this.evWin = Ya, x.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
    }function N() {
        this.evTarget = $a, this.evWin = _a, this.started = !1, x.apply(this, arguments);
    }function O(a, b) {
        var c = s(a.touches),
            d = s(a.changedTouches);return b & (Ga | Ha) && (c = t(c.concat(d), "identifier", !0)), [c, d];
    }function P() {
        this.evTarget = bb, this.targetIds = {}, x.apply(this, arguments);
    }function Q(a, b) {
        var c = s(a.touches),
            d = this.targetIds;if (b & (Ea | Fa) && 1 === c.length) return d[c[0].identifier] = !0, [c, c];var e,
            f,
            g = s(a.changedTouches),
            h = [],
            i = this.target;if (f = c.filter(function (a) {
            return o(a.target, i);
        }), b === Ea) for (e = 0; e < f.length;) {
            d[f[e].identifier] = !0, e++;
        }for (e = 0; e < g.length;) {
            d[g[e].identifier] && h.push(g[e]), b & (Ga | Ha) && delete d[g[e].identifier], e++;
        }return h.length ? [t(f.concat(h), "identifier", !0), h] : void 0;
    }function R() {
        x.apply(this, arguments);var a = j(this.handler, this);this.touch = new P(this.manager, a), this.mouse = new L(this.manager, a), this.primaryTouch = null, this.lastTouches = [];
    }function S(a, b) {
        a & Ea ? (this.primaryTouch = b.changedPointers[0].identifier, T.call(this, b)) : a & (Ga | Ha) && T.call(this, b);
    }function T(a) {
        var b = a.changedPointers[0];if (b.identifier === this.primaryTouch) {
            var c = { x: b.clientX, y: b.clientY };this.lastTouches.push(c);var d = this.lastTouches,
                e = function e() {
                var a = d.indexOf(c);a > -1 && d.splice(a, 1);
            };setTimeout(e, cb);
        }
    }function U(a) {
        for (var b = a.srcEvent.clientX, c = a.srcEvent.clientY, d = 0; d < this.lastTouches.length; d++) {
            var e = this.lastTouches[d],
                f = Math.abs(b - e.x),
                g = Math.abs(c - e.y);if (db >= f && db >= g) return !0;
        }return !1;
    }function V(a, b) {
        this.manager = a, this.set(b);
    }function W(a) {
        if (p(a, jb)) return jb;var b = p(a, kb),
            c = p(a, lb);return b && c ? jb : b || c ? b ? kb : lb : p(a, ib) ? ib : hb;
    }function X() {
        if (!fb) return !1;var b = {},
            c = a.CSS && a.CSS.supports;return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function (d) {
            b[d] = c ? a.CSS.supports("touch-action", d) : !0;
        }), b;
    }function Y(a) {
        this.options = la({}, this.defaults, a || {}), this.id = v(), this.manager = null, this.options.enable = l(this.options.enable, !0), this.state = nb, this.simultaneous = {}, this.requireFail = [];
    }function Z(a) {
        return a & sb ? "cancel" : a & qb ? "end" : a & pb ? "move" : a & ob ? "start" : "";
    }function $(a) {
        return a == Ma ? "down" : a == La ? "up" : a == Ja ? "left" : a == Ka ? "right" : "";
    }function _(a, b) {
        var c = b.manager;return c ? c.get(a) : a;
    }function aa() {
        Y.apply(this, arguments);
    }function ba() {
        aa.apply(this, arguments), this.pX = null, this.pY = null;
    }function ca() {
        aa.apply(this, arguments);
    }function da() {
        Y.apply(this, arguments), this._timer = null, this._input = null;
    }function ea() {
        aa.apply(this, arguments);
    }function fa() {
        aa.apply(this, arguments);
    }function ga() {
        Y.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
    }function ha(a, b) {
        return b = b || {}, b.recognizers = l(b.recognizers, ha.defaults.preset), new ia(a, b);
    }function ia(a, b) {
        this.options = la({}, ha.defaults, b || {}), this.options.inputTarget = this.options.inputTarget || a, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = a, this.input = y(this), this.touchAction = new V(this, this.options.touchAction), ja(this, !0), g(this.options.recognizers, function (a) {
            var b = this.add(new a[0](a[1]));a[2] && b.recognizeWith(a[2]), a[3] && b.requireFailure(a[3]);
        }, this);
    }function ja(a, b) {
        var c = a.element;if (c.style) {
            var d;g(a.options.cssProps, function (e, f) {
                d = u(c.style, f), b ? (a.oldCssProps[d] = c.style[d], c.style[d] = e) : c.style[d] = a.oldCssProps[d] || "";
            }), b || (a.oldCssProps = {});
        }
    }function ka(a, c) {
        var d = b.createEvent("Event");d.initEvent(a, !0, !0), d.gesture = c, c.target.dispatchEvent(d);
    }var la,
        ma = ["", "webkit", "Moz", "MS", "ms", "o"],
        na = b.createElement("div"),
        oa = "function",
        pa = Math.round,
        qa = Math.abs,
        ra = Date.now;la = "function" != typeof Object.assign ? function (a) {
        if (a === d || null === a) throw new TypeError("Cannot convert undefined or null to object");for (var b = Object(a), c = 1; c < arguments.length; c++) {
            var e = arguments[c];if (e !== d && null !== e) for (var f in e) {
                e.hasOwnProperty(f) && (b[f] = e[f]);
            }
        }return b;
    } : Object.assign;var sa = h(function (a, b, c) {
        for (var e = Object.keys(b), f = 0; f < e.length;) {
            (!c || c && a[e[f]] === d) && (a[e[f]] = b[e[f]]), f++;
        }return a;
    }, "extend", "Use `assign`."),
        ta = h(function (a, b) {
        return sa(a, b, !0);
    }, "merge", "Use `assign`."),
        ua = 1,
        va = /mobile|tablet|ip(ad|hone|od)|android/i,
        wa = "ontouchstart" in a,
        xa = u(a, "PointerEvent") !== d,
        ya = wa && va.test(navigator.userAgent),
        za = "touch",
        Aa = "pen",
        Ba = "mouse",
        Ca = "kinect",
        Da = 25,
        Ea = 1,
        Fa = 2,
        Ga = 4,
        Ha = 8,
        Ia = 1,
        Ja = 2,
        Ka = 4,
        La = 8,
        Ma = 16,
        Na = Ja | Ka,
        Oa = La | Ma,
        Pa = Na | Oa,
        Qa = ["x", "y"],
        Ra = ["clientX", "clientY"];x.prototype = { handler: function handler() {}, init: function init() {
            this.evEl && m(this.element, this.evEl, this.domHandler), this.evTarget && m(this.target, this.evTarget, this.domHandler), this.evWin && m(w(this.element), this.evWin, this.domHandler);
        }, destroy: function destroy() {
            this.evEl && n(this.element, this.evEl, this.domHandler), this.evTarget && n(this.target, this.evTarget, this.domHandler), this.evWin && n(w(this.element), this.evWin, this.domHandler);
        } };var Sa = { mousedown: Ea, mousemove: Fa, mouseup: Ga },
        Ta = "mousedown",
        Ua = "mousemove mouseup";i(L, x, { handler: function handler(a) {
            var b = Sa[a.type];b & Ea && 0 === a.button && (this.pressed = !0), b & Fa && 1 !== a.which && (b = Ga), this.pressed && (b & Ga && (this.pressed = !1), this.callback(this.manager, b, { pointers: [a], changedPointers: [a], pointerType: Ba, srcEvent: a }));
        } });var Va = { pointerdown: Ea, pointermove: Fa, pointerup: Ga, pointercancel: Ha, pointerout: Ha },
        Wa = { 2: za, 3: Aa, 4: Ba, 5: Ca },
        Xa = "pointerdown",
        Ya = "pointermove pointerup pointercancel";a.MSPointerEvent && !a.PointerEvent && (Xa = "MSPointerDown", Ya = "MSPointerMove MSPointerUp MSPointerCancel"), i(M, x, { handler: function handler(a) {
            var b = this.store,
                c = !1,
                d = a.type.toLowerCase().replace("ms", ""),
                e = Va[d],
                f = Wa[a.pointerType] || a.pointerType,
                g = f == za,
                h = r(b, a.pointerId, "pointerId");e & Ea && (0 === a.button || g) ? 0 > h && (b.push(a), h = b.length - 1) : e & (Ga | Ha) && (c = !0), 0 > h || (b[h] = a, this.callback(this.manager, e, { pointers: b, changedPointers: [a], pointerType: f, srcEvent: a }), c && b.splice(h, 1));
        } });var Za = { touchstart: Ea, touchmove: Fa, touchend: Ga, touchcancel: Ha },
        $a = "touchstart",
        _a = "touchstart touchmove touchend touchcancel";i(N, x, { handler: function handler(a) {
            var b = Za[a.type];if (b === Ea && (this.started = !0), this.started) {
                var c = O.call(this, a, b);b & (Ga | Ha) && c[0].length - c[1].length === 0 && (this.started = !1), this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: za, srcEvent: a });
            }
        } });var ab = { touchstart: Ea, touchmove: Fa, touchend: Ga, touchcancel: Ha },
        bb = "touchstart touchmove touchend touchcancel";i(P, x, { handler: function handler(a) {
            var b = ab[a.type],
                c = Q.call(this, a, b);c && this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: za, srcEvent: a });
        } });var cb = 2500,
        db = 25;i(R, x, { handler: function handler(a, b, c) {
            var d = c.pointerType == za,
                e = c.pointerType == Ba;if (!(e && c.sourceCapabilities && c.sourceCapabilities.firesTouchEvents)) {
                if (d) S.call(this, b, c);else if (e && U.call(this, c)) return;this.callback(a, b, c);
            }
        }, destroy: function destroy() {
            this.touch.destroy(), this.mouse.destroy();
        } });var eb = u(na.style, "touchAction"),
        fb = eb !== d,
        gb = "compute",
        hb = "auto",
        ib = "manipulation",
        jb = "none",
        kb = "pan-x",
        lb = "pan-y",
        mb = X();V.prototype = { set: function set(a) {
            a == gb && (a = this.compute()), fb && this.manager.element.style && mb[a] && (this.manager.element.style[eb] = a), this.actions = a.toLowerCase().trim();
        }, update: function update() {
            this.set(this.manager.options.touchAction);
        }, compute: function compute() {
            var a = [];return g(this.manager.recognizers, function (b) {
                k(b.options.enable, [b]) && (a = a.concat(b.getTouchAction()));
            }), W(a.join(" "));
        }, preventDefaults: function preventDefaults(a) {
            var b = a.srcEvent,
                c = a.offsetDirection;if (this.manager.session.prevented) return void b.preventDefault();var d = this.actions,
                e = p(d, jb) && !mb[jb],
                f = p(d, lb) && !mb[lb],
                g = p(d, kb) && !mb[kb];if (e) {
                var h = 1 === a.pointers.length,
                    i = a.distance < 2,
                    j = a.deltaTime < 250;if (h && i && j) return;
            }return g && f ? void 0 : e || f && c & Na || g && c & Oa ? this.preventSrc(b) : void 0;
        }, preventSrc: function preventSrc(a) {
            this.manager.session.prevented = !0, a.preventDefault();
        } };var nb = 1,
        ob = 2,
        pb = 4,
        qb = 8,
        rb = qb,
        sb = 16,
        tb = 32;Y.prototype = { defaults: {}, set: function set(a) {
            return la(this.options, a), this.manager && this.manager.touchAction.update(), this;
        }, recognizeWith: function recognizeWith(a) {
            if (f(a, "recognizeWith", this)) return this;var b = this.simultaneous;return a = _(a, this), b[a.id] || (b[a.id] = a, a.recognizeWith(this)), this;
        }, dropRecognizeWith: function dropRecognizeWith(a) {
            return f(a, "dropRecognizeWith", this) ? this : (a = _(a, this), delete this.simultaneous[a.id], this);
        }, requireFailure: function requireFailure(a) {
            if (f(a, "requireFailure", this)) return this;var b = this.requireFail;return a = _(a, this), -1 === r(b, a) && (b.push(a), a.requireFailure(this)), this;
        }, dropRequireFailure: function dropRequireFailure(a) {
            if (f(a, "dropRequireFailure", this)) return this;a = _(a, this);var b = r(this.requireFail, a);return b > -1 && this.requireFail.splice(b, 1), this;
        }, hasRequireFailures: function hasRequireFailures() {
            return this.requireFail.length > 0;
        }, canRecognizeWith: function canRecognizeWith(a) {
            return !!this.simultaneous[a.id];
        }, emit: function emit(a) {
            function b(b) {
                c.manager.emit(b, a);
            }var c = this,
                d = this.state;qb > d && b(c.options.event + Z(d)), b(c.options.event), a.additionalEvent && b(a.additionalEvent), d >= qb && b(c.options.event + Z(d));
        }, tryEmit: function tryEmit(a) {
            return this.canEmit() ? this.emit(a) : void (this.state = tb);
        }, canEmit: function canEmit() {
            for (var a = 0; a < this.requireFail.length;) {
                if (!(this.requireFail[a].state & (tb | nb))) return !1;a++;
            }return !0;
        }, recognize: function recognize(a) {
            var b = la({}, a);return k(this.options.enable, [this, b]) ? (this.state & (rb | sb | tb) && (this.state = nb), this.state = this.process(b), void (this.state & (ob | pb | qb | sb) && this.tryEmit(b))) : (this.reset(), void (this.state = tb));
        }, process: function process(a) {}, getTouchAction: function getTouchAction() {}, reset: function reset() {} }, i(aa, Y, { defaults: { pointers: 1 }, attrTest: function attrTest(a) {
            var b = this.options.pointers;return 0 === b || a.pointers.length === b;
        }, process: function process(a) {
            var b = this.state,
                c = a.eventType,
                d = b & (ob | pb),
                e = this.attrTest(a);return d && (c & Ha || !e) ? b | sb : d || e ? c & Ga ? b | qb : b & ob ? b | pb : ob : tb;
        } }), i(ba, aa, { defaults: { event: "pan", threshold: 10, pointers: 1, direction: Pa }, getTouchAction: function getTouchAction() {
            var a = this.options.direction,
                b = [];return a & Na && b.push(lb), a & Oa && b.push(kb), b;
        }, directionTest: function directionTest(a) {
            var b = this.options,
                c = !0,
                d = a.distance,
                e = a.direction,
                f = a.deltaX,
                g = a.deltaY;return e & b.direction || (b.direction & Na ? (e = 0 === f ? Ia : 0 > f ? Ja : Ka, c = f != this.pX, d = Math.abs(a.deltaX)) : (e = 0 === g ? Ia : 0 > g ? La : Ma, c = g != this.pY, d = Math.abs(a.deltaY))), a.direction = e, c && d > b.threshold && e & b.direction;
        }, attrTest: function attrTest(a) {
            return aa.prototype.attrTest.call(this, a) && (this.state & ob || !(this.state & ob) && this.directionTest(a));
        }, emit: function emit(a) {
            this.pX = a.deltaX, this.pY = a.deltaY;var b = $(a.direction);b && (a.additionalEvent = this.options.event + b), this._super.emit.call(this, a);
        } }), i(ca, aa, { defaults: { event: "pinch", threshold: 0, pointers: 2 }, getTouchAction: function getTouchAction() {
            return [jb];
        }, attrTest: function attrTest(a) {
            return this._super.attrTest.call(this, a) && (Math.abs(a.scale - 1) > this.options.threshold || this.state & ob);
        }, emit: function emit(a) {
            if (1 !== a.scale) {
                var b = a.scale < 1 ? "in" : "out";a.additionalEvent = this.options.event + b;
            }this._super.emit.call(this, a);
        } }), i(da, Y, { defaults: { event: "press", pointers: 1, time: 251, threshold: 9 }, getTouchAction: function getTouchAction() {
            return [hb];
        }, process: function process(a) {
            var b = this.options,
                c = a.pointers.length === b.pointers,
                d = a.distance < b.threshold,
                f = a.deltaTime > b.time;if (this._input = a, !d || !c || a.eventType & (Ga | Ha) && !f) this.reset();else if (a.eventType & Ea) this.reset(), this._timer = e(function () {
                this.state = rb, this.tryEmit();
            }, b.time, this);else if (a.eventType & Ga) return rb;return tb;
        }, reset: function reset() {
            clearTimeout(this._timer);
        }, emit: function emit(a) {
            this.state === rb && (a && a.eventType & Ga ? this.manager.emit(this.options.event + "up", a) : (this._input.timeStamp = ra(), this.manager.emit(this.options.event, this._input)));
        } }), i(ea, aa, { defaults: { event: "rotate", threshold: 0, pointers: 2 }, getTouchAction: function getTouchAction() {
            return [jb];
        }, attrTest: function attrTest(a) {
            return this._super.attrTest.call(this, a) && (Math.abs(a.rotation) > this.options.threshold || this.state & ob);
        } }), i(fa, aa, { defaults: { event: "swipe", threshold: 10, velocity: .3, direction: Na | Oa, pointers: 1 }, getTouchAction: function getTouchAction() {
            return ba.prototype.getTouchAction.call(this);
        }, attrTest: function attrTest(a) {
            var b,
                c = this.options.direction;return c & (Na | Oa) ? b = a.overallVelocity : c & Na ? b = a.overallVelocityX : c & Oa && (b = a.overallVelocityY), this._super.attrTest.call(this, a) && c & a.offsetDirection && a.distance > this.options.threshold && a.maxPointers == this.options.pointers && qa(b) > this.options.velocity && a.eventType & Ga;
        }, emit: function emit(a) {
            var b = $(a.offsetDirection);b && this.manager.emit(this.options.event + b, a), this.manager.emit(this.options.event, a);
        } }), i(ga, Y, { defaults: { event: "tap", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 9, posThreshold: 10 }, getTouchAction: function getTouchAction() {
            return [ib];
        }, process: function process(a) {
            var b = this.options,
                c = a.pointers.length === b.pointers,
                d = a.distance < b.threshold,
                f = a.deltaTime < b.time;if (this.reset(), a.eventType & Ea && 0 === this.count) return this.failTimeout();if (d && f && c) {
                if (a.eventType != Ga) return this.failTimeout();var g = this.pTime ? a.timeStamp - this.pTime < b.interval : !0,
                    h = !this.pCenter || H(this.pCenter, a.center) < b.posThreshold;this.pTime = a.timeStamp, this.pCenter = a.center, h && g ? this.count += 1 : this.count = 1, this._input = a;var i = this.count % b.taps;if (0 === i) return this.hasRequireFailures() ? (this._timer = e(function () {
                    this.state = rb, this.tryEmit();
                }, b.interval, this), ob) : rb;
            }return tb;
        }, failTimeout: function failTimeout() {
            return this._timer = e(function () {
                this.state = tb;
            }, this.options.interval, this), tb;
        }, reset: function reset() {
            clearTimeout(this._timer);
        }, emit: function emit() {
            this.state == rb && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
        } }), ha.VERSION = "2.0.8", ha.defaults = { domEvents: !1, touchAction: gb, enable: !0, inputTarget: null, inputClass: null, preset: [[ea, { enable: !1 }], [ca, { enable: !1 }, ["rotate"]], [fa, { direction: Na }], [ba, { direction: Na }, ["swipe"]], [ga], [ga, { event: "doubletap", taps: 2 }, ["tap"]], [da]], cssProps: { userSelect: "none", touchSelect: "none", touchCallout: "none", contentZooming: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)" } };var ub = 1,
        vb = 2;ia.prototype = { set: function set(a) {
            return la(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this;
        }, stop: function stop(a) {
            this.session.stopped = a ? vb : ub;
        }, recognize: function recognize(a) {
            var b = this.session;if (!b.stopped) {
                this.touchAction.preventDefaults(a);var c,
                    d = this.recognizers,
                    e = b.curRecognizer;(!e || e && e.state & rb) && (e = b.curRecognizer = null);for (var f = 0; f < d.length;) {
                    c = d[f], b.stopped === vb || e && c != e && !c.canRecognizeWith(e) ? c.reset() : c.recognize(a), !e && c.state & (ob | pb | qb) && (e = b.curRecognizer = c), f++;
                }
            }
        }, get: function get(a) {
            if (a instanceof Y) return a;for (var b = this.recognizers, c = 0; c < b.length; c++) {
                if (b[c].options.event == a) return b[c];
            }return null;
        }, add: function add(a) {
            if (f(a, "add", this)) return this;var b = this.get(a.options.event);return b && this.remove(b), this.recognizers.push(a), a.manager = this, this.touchAction.update(), a;
        }, remove: function remove(a) {
            if (f(a, "remove", this)) return this;if (a = this.get(a)) {
                var b = this.recognizers,
                    c = r(b, a);-1 !== c && (b.splice(c, 1), this.touchAction.update());
            }return this;
        }, on: function on(a, b) {
            if (a !== d && b !== d) {
                var c = this.handlers;return g(q(a), function (a) {
                    c[a] = c[a] || [], c[a].push(b);
                }), this;
            }
        }, off: function off(a, b) {
            if (a !== d) {
                var c = this.handlers;return g(q(a), function (a) {
                    b ? c[a] && c[a].splice(r(c[a], b), 1) : delete c[a];
                }), this;
            }
        }, emit: function emit(a, b) {
            this.options.domEvents && ka(a, b);var c = this.handlers[a] && this.handlers[a].slice();if (c && c.length) {
                b.type = a, b.preventDefault = function () {
                    b.srcEvent.preventDefault();
                };for (var d = 0; d < c.length;) {
                    c[d](b), d++;
                }
            }
        }, destroy: function destroy() {
            this.element && ja(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
        } }, la(ha, { INPUT_START: Ea, INPUT_MOVE: Fa, INPUT_END: Ga, INPUT_CANCEL: Ha, STATE_POSSIBLE: nb, STATE_BEGAN: ob, STATE_CHANGED: pb, STATE_ENDED: qb, STATE_RECOGNIZED: rb, STATE_CANCELLED: sb, STATE_FAILED: tb, DIRECTION_NONE: Ia, DIRECTION_LEFT: Ja, DIRECTION_RIGHT: Ka, DIRECTION_UP: La, DIRECTION_DOWN: Ma, DIRECTION_HORIZONTAL: Na, DIRECTION_VERTICAL: Oa, DIRECTION_ALL: Pa, Manager: ia, Input: x, TouchAction: V, TouchInput: P, MouseInput: L, PointerEventInput: M, TouchMouseInput: R, SingleTouchInput: N, Recognizer: Y, AttrRecognizer: aa, Tap: ga, Pan: ba, Swipe: fa, Pinch: ca, Rotate: ea, Press: da, on: m, off: n, each: g, merge: ta, extend: sa, assign: la, inherit: i, bindFn: j, prefixed: u });var wb = "undefined" != typeof a ? a : "undefined" != typeof self ? self : {};wb.Hammer = ha, "function" == typeof define && define.amd ? define(function () {
        return ha;
    }) : "undefined" != typeof module && module.exports ? module.exports = ha : a[c] = ha;
}(window, document, "Hammer");
/* ==========================================================================
    Helper functions
 ========================================================================== */

/*
 * Simple isset method for this does not exist in javascript
 */
var isset = function isset(obj) {
    return typeof obj !== 'undefined' && obj !== null;
};

// IE8 support for indexOf
var inArray = function inArray(array, item) {
    for (var i = 0; i < array.length; i++) {
        if (array[i] === item) return 1;
    }
    return 0;
};

/*
 * Easing Functions - inspired from http://gizma.com/easing/
 * only considering the t value for the range [0, 1] => [0, 1]
 */
var EasingFunctions = {
    // no easing, no acceleration
    linear: function linear(t) {
        return t;
    },
    // accelerating from zero velocity
    easeInQuad: function easeInQuad(t) {
        return t * t;
    },
    // decelerating to zero velocity
    easeOutQuad: function easeOutQuad(t) {
        return t * (2 - t);
    },
    // acceleration until halfway, then deceleration
    easeInOutQuad: function easeInOutQuad(t) {
        return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
    },
    // accelerating from zero velocity
    easeInCubic: function easeInCubic(t) {
        return t * t * t;
    },
    // decelerating to zero velocity
    easeOutCubic: function easeOutCubic(t) {
        return --t * t * t + 1;
    },
    // acceleration until halfway, then deceleration
    easeInOutCubic: function easeInOutCubic(t) {
        return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
    },
    // accelerating from zero velocity
    easeInQuart: function easeInQuart(t) {
        return t * t * t * t;
    },
    // decelerating to zero velocity
    easeOutQuart: function easeOutQuart(t) {
        return 1 - --t * t * t * t;
    },
    // acceleration until halfway, then deceleration
    easeInOutQuart: function easeInOutQuart(t) {
        return t < .5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
    },
    // accelerating from zero velocity
    easeInQuint: function easeInQuint(t) {
        return t * t * t * t * t;
    },
    // decelerating to zero velocity
    easeOutQuint: function easeOutQuint(t) {
        return 1 + --t * t * t * t * t;
    },
    // acceleration until halfway, then deceleration
    easeInOutQuint: function easeInOutQuint(t) {
        return t < .5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;
    }
};

/*
 * Vanilla version of the $.getScript
 */
var getScript = function getScript(source, callback) {
    var script = document.createElement('script');
    script.async = 1;

    var scripts = document.getElementsByTagName('script');
    var prior = scripts[scripts.length - 1];

    script.onload = script.onreadystatechange = function (_, isAbort) {
        if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {
            script.onload = script.onreadystatechange = null;
            script = undefined;

            if (!isAbort) {
                if (callback) callback();
            }
        }
    };

    script.src = source;
    prior.parentNode.insertBefore(script, prior);
};

/*
 * Cookie helper class
 */
var Cookie = {
    set: function set(name, value, days) {
        var domain = void 0,
            domainParts = void 0,
            date = void 0,
            expires = void 0,
            host = void 0;

        if (days) {
            date = new Date();
            date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
            expires = "; expires=" + date.toGMTString();
        } else {
            expires = "";
        }

        host = location.host;
        if (host.split('.').length === 1) {
            // no "." in a domain - it's localhost or something similar
            document.cookie = name + "=" + value + expires + "; path=/";
        } else {
            // Remember the cookie on all sub domains.
            //
            // Start with trying to set cookie to the top domain.
            // (example: if user is on foo.com, try to set
            //  cookie to domain ".com")
            //
            // If the cookie will not be set, it means ".com"
            // is a top level domain and we need to
            // set the cookie to ".foo.com"
            domainParts = host.split('.');
            domainParts.shift();
            domain = '.komma-mediadesign.nl';

            // For development purpose, remove this when moving to production
            // domain = '.komma.pro';

            document.cookie = name + "=" + value + expires + "; path=/; domain=" + domain;

            // check if cookie was successfuly set to the given domain
            // (otherwise it was a Top-Level Domain)
            if (Cookie.get(name) == null || Cookie.get(name) != value) {
                // append "." to current domain
                domain = '.' + host;
                document.cookie = name + "=" + value + expires + "; path=/; domain=" + domain;
            }
        }
    },

    get: function get(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) === ' ') {
                c = c.substring(1, c.length);
            }

            if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    },

    erase: function erase(name) {
        Cookie.set(name, '', -1);
    }
};

/*
 * Javascript version of the number_format method of PHP
 */
var number_format = function number_format(number, decimals, dec_point, thousands_sep) {
    // Strip all characters but numerical ones.
    number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
    var n = !isFinite(+number) ? 0 : +number,
        prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
        sep = typeof thousands_sep === 'undefined' ? ',' : thousands_sep,
        dec = typeof dec_point === 'undefined' ? '.' : dec_point,
        s = '',
        toFixedFix = function toFixedFix(n, prec) {
        var k = Math.pow(10, prec);
        return '' + Math.round(n * k) / k;
    };
    // Fix for IE parseFloat(0.55).toFixed(0) = 0;
    s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
    if (s[0].length > 3) {
        s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
    }
    if ((s[1] || '').length < prec) {
        s[1] = s[1] || '';
        s[1] += new Array(prec - s[1].length + 1).join('0');
    }
    return s.join(dec);
};