")
.addClass(p.dropdownClass)
.addClass(l)
.hide()
.appendTo(o)),
(s = e("
").addClass(p.dropdownContentClass).appendTo(r)),
c.settings.copyClassesToDropdown && r.addClass(d),
t.css({
width: g[0].style.width,
}),
c.plugins.names.length &&
((u = "plugin-" + c.plugins.names.join(" plugin-")),
t.addClass(u),
r.addClass(u)),
(null === p.maxItems || p.maxItems > 1) &&
c.tagType === x &&
g.attr("multiple", "multiple"),
c.settings.placeholder && n.attr("placeholder", p.placeholder),
!c.settings.splitOn && c.settings.delimiter)
) {
var b = c.settings.delimiter.replace(
/[-\/\\^$*+?.()|[\]{}]/g,
"\\$&"
);
c.settings.splitOn = new RegExp("\\s*" + b + "+\\s*");
}
g.attr("autocorrect") &&
n.attr("autocorrect", g.attr("autocorrect")),
g.attr("autocapitalize") &&
n.attr("autocapitalize", g.attr("autocapitalize")),
(c.$wrapper = t),
(c.$control = i),
(c.$control_input = n),
(c.$dropdown = r),
(c.$dropdown_content = s),
r.on("mouseenter", "[data-selectable]", function () {
return c.onOptionHover.apply(c, arguments);
}),
r.on("mousedown click", "[data-selectable]", function () {
return c.onOptionSelect.apply(c, arguments);
}),
I(i, "mousedown", "*:not(input)", function () {
return c.onItemSelect.apply(c, arguments);
}),
_(n),
i.on({
mousedown: function () {
return c.onMouseDown.apply(c, arguments);
},
click: function () {
return c.onClick.apply(c, arguments);
},
}),
n.on({
mousedown: function (e) {
e.stopPropagation();
},
keydown: function () {
return c.onKeyDown.apply(c, arguments);
},
keyup: function () {
return c.onKeyUp.apply(c, arguments);
},
keypress: function () {
return c.onKeyPress.apply(c, arguments);
},
resize: function () {
c.positionDropdown.apply(c, []);
},
blur: function () {
return c.onBlur.apply(c, arguments);
},
focus: function () {
return (c.ignoreBlur = !1), c.onFocus.apply(c, arguments);
},
paste: function () {
return c.onPaste.apply(c, arguments);
},
}),
m.on("keydown" + f, function (e) {
(c.isCmdDown = e[a ? "metaKey" : "ctrlKey"]),
(c.isCtrlDown = e[a ? "altKey" : "ctrlKey"]),
(c.isShiftDown = e.shiftKey);
}),
m.on("keyup" + f, function (e) {
e.keyCode === w && (c.isCtrlDown = !1),
e.keyCode === v && (c.isShiftDown = !1),
e.keyCode === y && (c.isCmdDown = !1);
}),
m.on("mousedown" + f, function (e) {
if (c.isFocused) {
if (
e.target === c.$dropdown[0] ||
e.target.parentNode === c.$dropdown[0]
)
return !1;
c.$control.has(e.target).length ||
e.target === c.$control[0] ||
c.blur(e.target);
}
}),
h.on(["scroll" + f, "resize" + f].join(" "), function () {
c.isOpen && c.positionDropdown.apply(c, arguments);
}),
h.on("mousemove" + f, function () {
c.ignoreHover = !1;
}),
(this.revertSettings = {
$children: g.children().detach(),
tabindex: g.attr("tabindex"),
}),
g.attr("tabindex", -1).hide().after(c.$wrapper),
e.isArray(p.items) && (c.setValue(p.items), delete p.items),
T &&
g.on("invalid" + f, function (e) {
e.preventDefault(), (c.isInvalid = !0), c.refreshState();
}),
c.updateOriginalInput(),
c.refreshItems(),
c.refreshState(),
c.updatePlaceholder(),
(c.isSetup = !0),
g.is(":disabled") && c.disable(),
c.on("change", this.onChange),
g.data("selectize", c),
g.addClass("selectized"),
c.trigger("initialize"),
p.preload === !0 && c.onSearchChange("");
},
setupTemplates: function () {
var t = this,
i = t.settings.labelField,
n = t.settings.optgroupLabelField,
r = {
optgroup: function (e) {
return '
' + e.html + "
";
},
optgroup_header: function (e, t) {
return '";
},
option: function (e, t) {
return '
' + t(e[i]) + "
";
},
item: function (e, t) {
return '
' + t(e[i]) + "
";
},
option_create: function (e, t) {
return (
'
Add ' +
t(e.input) +
"…
"
);
},
};
t.settings.render = e.extend({}, r, t.settings.render);
},
setupCallbacks: function () {
var e,
t,
i = {
initialize: "onInitialize",
change: "onChange",
item_add: "onItemAdd",
item_remove: "onItemRemove",
clear: "onClear",
option_add: "onOptionAdd",
option_remove: "onOptionRemove",
option_clear: "onOptionClear",
optgroup_add: "onOptionGroupAdd",
optgroup_remove: "onOptionGroupRemove",
optgroup_clear: "onOptionGroupClear",
dropdown_open: "onDropdownOpen",
dropdown_close: "onDropdownClose",
type: "onType",
load: "onLoad",
focus: "onFocus",
blur: "onBlur",
};
for (e in i)
i.hasOwnProperty(e) &&
((t = this.settings[i[e]]), t && this.on(e, t));
},
onClick: function (e) {
var t = this;
t.isFocused || (t.focus(), e.preventDefault());
},
onMouseDown: function (t) {
var i = this,
n = t.isDefaultPrevented();
if ((e(t.target), i.isFocused)) {
if (t.target !== i.$control_input[0])
return (
"single" === i.settings.mode
? i.isOpen
? i.close()
: i.open()
: n || i.setActiveItem(null),
!1
);
} else
n ||
window.setTimeout(function () {
i.focus();
}, 0);
},
onChange: function () {
this.$input.trigger("change");
},
onPaste: function (t) {
var i = this;
i.isFull() || i.isInputHidden || i.isLocked
? t.preventDefault()
: i.settings.splitOn &&
setTimeout(function () {
for (
var t = e
.trim(i.$control_input.val() || "")
.split(i.settings.splitOn),
n = 0,
r = t.length;
r > n;
n++
)
i.createItem(t[n]);
}, 0);
},
onKeyPress: function (e) {
if (this.isLocked) return e && e.preventDefault();
var t = String.fromCharCode(e.keyCode || e.which);
return this.settings.create &&
"multi" === this.settings.mode &&
t === this.settings.delimiter
? (this.createItem(), e.preventDefault(), !1)
: void 0;
},
onKeyDown: function (e) {
var t = (e.target === this.$control_input[0], this);
if (t.isLocked) return void (e.keyCode !== b && e.preventDefault());
switch (e.keyCode) {
case s:
if (t.isCmdDown) return void t.selectAll();
break;
case l:
return void (
t.isOpen &&
(e.preventDefault(), e.stopPropagation(), t.close())
);
case h:
if (!e.ctrlKey || e.altKey) break;
case f:
if (!t.isOpen && t.hasOptions) t.open();
else if (t.$activeOption) {
t.ignoreHover = !0;
var i = t.getAdjacentOption(t.$activeOption, 1);
i.length && t.setActiveOption(i, !0, !0);
}
return void e.preventDefault();
case c:
if (!e.ctrlKey || e.altKey) break;
case u:
if (t.$activeOption) {
t.ignoreHover = !0;
var n = t.getAdjacentOption(t.$activeOption, -1);
n.length && t.setActiveOption(n, !0, !0);
}
return void e.preventDefault();
case o:
return void (
t.isOpen &&
t.$activeOption &&
(t.onOptionSelect({
currentTarget: t.$activeOption,
}),
e.preventDefault())
);
case d:
return void t.advanceSelection(-1, e);
case p:
return void t.advanceSelection(1, e);
case b:
return (
t.settings.selectOnTab &&
t.isOpen &&
t.$activeOption &&
(t.onOptionSelect({
currentTarget: t.$activeOption,
}),
t.isFull() || e.preventDefault()),
void (
t.settings.create &&
t.createItem() &&
e.preventDefault()
)
);
case m:
case g:
return void t.deleteSelection(e);
}
return (!t.isFull() && !t.isInputHidden) ||
(a ? e.metaKey : e.ctrlKey)
? void 0
: void e.preventDefault();
},
onKeyUp: function (e) {
var t = this;
if (t.isLocked) return e && e.preventDefault();
var i = t.$control_input.val() || "";
t.lastValue !== i &&
((t.lastValue = i),
t.onSearchChange(i),
t.refreshOptions(),
t.trigger("type", i));
},
onSearchChange: function (e) {
var t = this,
i = t.settings.load;
i &&
(t.loadedSearches.hasOwnProperty(e) ||
((t.loadedSearches[e] = !0),
t.load(function (n) {
i.apply(t, [e, n]);
})));
},
onFocus: function (e) {
var t = this,
i = t.isFocused;
return t.isDisabled
? (t.blur(), e && e.preventDefault(), !1)
: void (
t.ignoreFocus ||
((t.isFocused = !0),
"focus" === t.settings.preload && t.onSearchChange(""),
i || t.trigger("focus"),
t.$activeItems.length ||
(t.showInput(),
t.setActiveItem(null),
t.refreshOptions(!!t.settings.openOnFocus)),
t.refreshState())
);
},
onBlur: function (e, t) {
var i = this;
if (i.isFocused && ((i.isFocused = !1), !i.ignoreFocus)) {
if (
!i.ignoreBlur &&
document.activeElement === i.$dropdown_content[0]
)
return (i.ignoreBlur = !0), void i.onFocus(e);
var n = function () {
i.close(),
i.setTextboxValue(""),
i.setActiveItem(null),
i.setActiveOption(null),
i.setCaret(i.items.length),
i.refreshState(),
(t || document.body).focus(),
(i.ignoreFocus = !1),
i.trigger("blur");
};
(i.ignoreFocus = !0),
i.settings.create && i.settings.createOnBlur
? i.createItem(null, !1, n)
: n();
}
},
onOptionHover: function (e) {
this.ignoreHover || this.setActiveOption(e.currentTarget, !1);
},
onOptionSelect: function (t) {
var i,
n,
r = this;
t.preventDefault && (t.preventDefault(), t.stopPropagation()),
(n = e(t.currentTarget)),
n.hasClass("create")
? r.createItem(null, function () {
r.settings.closeAfterSelect && r.close();
})
: ((i = n.attr("data-value")),
"undefined" != typeof i &&
((r.lastQuery = null),
r.setTextboxValue(""),
r.addItem(i),
r.settings.closeAfterSelect
? r.close()
: !r.settings.hideSelected &&
t.type &&
/mouse/.test(t.type) &&
r.setActiveOption(r.getOption(i))));
},
onItemSelect: function (e) {
var t = this;
t.isLocked ||
("multi" === t.settings.mode &&
(e.preventDefault(), t.setActiveItem(e.currentTarget, e)));
},
load: function (e) {
var t = this,
i = t.$wrapper.addClass(t.settings.loadingClass);
t.loading++,
e.apply(t, [
function (e) {
(t.loading = Math.max(t.loading - 1, 0)),
e &&
e.length &&
(t.addOption(e),
t.refreshOptions(t.isFocused && !t.isInputHidden)),
t.loading || i.removeClass(t.settings.loadingClass),
t.trigger("load", e);
},
]);
},
setTextboxValue: function (e) {
var t = this.$control_input,
i = t.val() !== e;
i && (t.val(e).triggerHandler("update"), (this.lastValue = e));
},
getValue: function () {
return this.tagType === x && this.$input.attr("multiple")
? this.items
: this.items.join(this.settings.delimiter);
},
setValue: function (e, t) {
var i = t ? [] : ["change"];
$(this, i, function () {
this.clear(), this.addItems(e, t);
});
},
setActiveItem: function (t, i) {
var n,
r,
a,
s,
o,
l,
d,
u,
c = this;
if ("single" !== c.settings.mode) {
if (((t = e(t)), !t.length))
return (
e(c.$activeItems).removeClass("active"),
(c.$activeItems = []),
void (c.isFocused && c.showInput())
);
if (
((n = i && i.type.toLowerCase()),
"mousedown" === n && c.isShiftDown && c.$activeItems.length)
) {
for (
u = c.$control.children(".active:last"),
s = Array.prototype.indexOf.apply(
c.$control[0].childNodes,
[u[0]]
),
o = Array.prototype.indexOf.apply(
c.$control[0].childNodes,
[t[0]]
),
s > o && ((d = s), (s = o), (o = d)),
r = s;
o >= r;
r++
)
(l = c.$control[0].childNodes[r]),
-1 === c.$activeItems.indexOf(l) &&
(e(l).addClass("active"), c.$activeItems.push(l));
i.preventDefault();
} else
("mousedown" === n && c.isCtrlDown) ||
("keydown" === n && this.isShiftDown)
? t.hasClass("active")
? ((a = c.$activeItems.indexOf(t[0])),
c.$activeItems.splice(a, 1),
t.removeClass("active"))
: c.$activeItems.push(t.addClass("active")[0])
: (e(c.$activeItems).removeClass("active"),
(c.$activeItems = [t.addClass("active")[0]]));
c.hideInput(), this.isFocused || c.focus();
}
},
setActiveOption: function (t, i, n) {
var r,
a,
s,
o,
l,
d = this;
d.$activeOption && d.$activeOption.removeClass("active"),
(d.$activeOption = null),
(t = e(t)),
t.length &&
((d.$activeOption = t.addClass("active")),
(i || !k(i)) &&
((r = d.$dropdown_content.height()),
(a = d.$activeOption.outerHeight(!0)),
(i = d.$dropdown_content.scrollTop() || 0),
(s =
d.$activeOption.offset().top -
d.$dropdown_content.offset().top +
i),
(o = s),
(l = s - r + a),
s + a > r + i
? d.$dropdown_content.stop().animate(
{
scrollTop: l,
},
n ? d.settings.scrollDuration : 0
)
: i > s &&
d.$dropdown_content.stop().animate(
{
scrollTop: o,
},
n ? d.settings.scrollDuration : 0
)));
},
selectAll: function () {
var e = this;
"single" !== e.settings.mode &&
((e.$activeItems = Array.prototype.slice.apply(
e.$control.children(":not(input)").addClass("active")
)),
e.$activeItems.length && (e.hideInput(), e.close()),
e.focus());
},
hideInput: function () {
var e = this;
e.setTextboxValue(""),
e.$control_input.css({
opacity: 0,
position: "absolute",
left: e.rtl ? 1e4 : -1e4,
}),
(e.isInputHidden = !0);
},
showInput: function () {
this.$control_input.css({
opacity: 1,
position: "relative",
left: 0,
}),
(this.isInputHidden = !1);
},
focus: function () {
var e = this;
e.isDisabled ||
((e.ignoreFocus = !0),
e.$control_input[0].focus(),
window.setTimeout(function () {
(e.ignoreFocus = !1), e.onFocus();
}, 0));
},
blur: function (e) {
this.$control_input[0].blur(), this.onBlur(null, e);
},
getScoreFunction: function (e) {
return this.sifter.getScoreFunction(e, this.getSearchOptions());
},
getSearchOptions: function () {
var e = this.settings,
t = e.sortField;
return (
"string" == typeof t &&
(t = [
{
field: t,
},
]),
{
fields: e.searchField,
conjunction: e.searchConjunction,
sort: t,
}
);
},
search: function (t) {
var i,
n,
r,
a = this,
s = a.settings,
o = this.getSearchOptions();
if (
s.score &&
((r = a.settings.score.apply(this, [t])), "function" != typeof r)
)
throw new Error(
'Selectize "score" setting must be a function that returns a function'
);
if (
(t !== a.lastQuery
? ((a.lastQuery = t),
(n = a.sifter.search(
t,
e.extend(o, {
score: r,
})
)),
(a.currentResults = n))
: (n = e.extend(!0, {}, a.currentResults)),
s.hideSelected)
)
for (i = n.items.length - 1; i >= 0; i--)
-1 !== a.items.indexOf(S(n.items[i].id)) &&
n.items.splice(i, 1);
return n;
},
refreshOptions: function (t) {
var i, r, a, s, o, l, d, u, c, p, f, h, m, g, v, y;
"undefined" == typeof t && (t = !0);
var w = this,
b = e.trim(w.$control_input.val()),
x = w.search(b),
C = w.$dropdown_content,
T = w.$activeOption && S(w.$activeOption.attr("data-value"));
for (
s = x.items.length,
"number" == typeof w.settings.maxOptions &&
(s = Math.min(s, w.settings.maxOptions)),
o = {},
l = [],
i = 0;
s > i;
i++
)
for (
d = w.options[x.items[i].id],
u = w.render("option", d),
c = d[w.settings.optgroupField] || "",
p = e.isArray(c) ? c : [c],
r = 0,
a = p && p.length;
a > r;
r++
)
(c = p[r]),
w.optgroups.hasOwnProperty(c) || (c = ""),
o.hasOwnProperty(c) || ((o[c] = []), l.push(c)),
o[c].push(u);
for (
this.settings.lockOptgroupOrder &&
l.sort(function (e, t) {
var i = w.optgroups[e].$order || 0,
n = w.optgroups[t].$order || 0;
return i - n;
}),
f = [],
i = 0,
s = l.length;
s > i;
i++
)
(c = l[i]),
w.optgroups.hasOwnProperty(c) && o[c].length
? ((h = w.render("optgroup_header", w.optgroups[c]) || ""),
(h += o[c].join("")),
f.push(
w.render(
"optgroup",
e.extend({}, w.optgroups[c], {
html: h,
})
)
))
: f.push(o[c].join(""));
if (
(C.html(f.join("")),
w.settings.highlight && x.query.length && x.tokens.length)
)
for (i = 0, s = x.tokens.length; s > i; i++)
n(C, x.tokens[i].regex);
if (!w.settings.hideSelected)
for (i = 0, s = w.items.length; s > i; i++)
w.getOption(w.items[i]).addClass("selected");
(m = w.canCreate(b)),
m &&
(C.prepend(
w.render("option_create", {
input: b,
})
),
(y = e(C[0].childNodes[0]))),
(w.hasOptions = x.items.length > 0 || m),
w.hasOptions
? (x.items.length > 0
? ((v = T && w.getOption(T)),
v && v.length
? (g = v)
: "single" === w.settings.mode &&
w.items.length &&
(g = w.getOption(w.items[0])),
(g && g.length) ||
(g =
y && !w.settings.addPrecedence
? w.getAdjacentOption(y, 1)
: C.find("[data-selectable]:first")))
: (g = y),
w.setActiveOption(g),
t && !w.isOpen && w.open())
: (w.setActiveOption(null), t && w.isOpen && w.close());
},
addOption: function (t) {
var i,
n,
r,
a = this;
if (e.isArray(t))
for (i = 0, n = t.length; n > i; i++) a.addOption(t[i]);
else
(r = a.registerOption(t)) &&
((a.userOptions[r] = !0),
(a.lastQuery = null),
a.trigger("option_add", r, t));
},
registerOption: function (e) {
var t = S(e[this.settings.valueField]);
return !t || this.options.hasOwnProperty(t)
? !1
: ((e.$order = e.$order || ++this.order),
(this.options[t] = e),
t);
},
registerOptionGroup: function (e) {
var t = S(e[this.settings.optgroupValueField]);
return t
? ((e.$order = e.$order || ++this.order),
(this.optgroups[t] = e),
t)
: !1;
},
addOptionGroup: function (e, t) {
(t[this.settings.optgroupValueField] = e),
(e = this.registerOptionGroup(t)) &&
this.trigger("optgroup_add", e, t);
},
removeOptionGroup: function (e) {
this.optgroups.hasOwnProperty(e) &&
(delete this.optgroups[e],
(this.renderCache = {}),
this.trigger("optgroup_remove", e));
},
clearOptionGroups: function () {
(this.optgroups = {}),
(this.renderCache = {}),
this.trigger("optgroup_clear");
},
updateOption: function (t, i) {
var n,
r,
a,
s,
o,
l,
d,
u = this;
if (
((t = S(t)),
(a = S(i[u.settings.valueField])),
null !== t && u.options.hasOwnProperty(t))
) {
if ("string" != typeof a)
throw new Error("Value must be set in option data");
(d = u.options[t].$order),
a !== t &&
(delete u.options[t],
(s = u.items.indexOf(t)),
-1 !== s && u.items.splice(s, 1, a)),
(i.$order = i.$order || d),
(u.options[a] = i),
(o = u.renderCache.item),
(l = u.renderCache.option),
o && (delete o[t], delete o[a]),
l && (delete l[t], delete l[a]),
-1 !== u.items.indexOf(a) &&
((n = u.getItem(t)),
(r = e(u.render("item", i))),
n.hasClass("active") && r.addClass("active"),
n.replaceWith(r)),
(u.lastQuery = null),
u.isOpen && u.refreshOptions(!1);
}
},
removeOption: function (e, t) {
var i = this;
e = S(e);
var n = i.renderCache.item,
r = i.renderCache.option;
n && delete n[e],
r && delete r[e],
delete i.userOptions[e],
delete i.options[e],
(i.lastQuery = null),
i.trigger("option_remove", e),
i.removeItem(e, t);
},
clearOptions: function () {
var e = this;
(e.loadedSearches = {}),
(e.userOptions = {}),
(e.renderCache = {}),
(e.options = e.sifter.items = {}),
(e.lastQuery = null),
e.trigger("option_clear"),
e.clear();
},
getOption: function (e) {
return this.getElementWithValue(
e,
this.$dropdown_content.find("[data-selectable]")
);
},
getAdjacentOption: function (t, i) {
var n = this.$dropdown.find("[data-selectable]"),
r = n.index(t) + i;
return r >= 0 && r < n.length ? n.eq(r) : e();
},
getElementWithValue: function (t, i) {
if (((t = S(t)), "undefined" != typeof t && null !== t))
for (var n = 0, r = i.length; r > n; n++)
if (i[n].getAttribute("data-value") === t) return e(i[n]);
return e();
},
getItem: function (e) {
return this.getElementWithValue(e, this.$control.children());
},
addItems: function (t, i) {
for (
var n = e.isArray(t) ? t : [t], r = 0, a = n.length;
a > r;
r++
)
(this.isPending = a - 1 > r), this.addItem(n[r], i);
},
addItem: function (t, i) {
var n = i ? [] : ["change"];
$(this, n, function () {
var n,
r,
a,
s,
o,
l = this,
d = l.settings.mode;
return (
(t = S(t)),
-1 !== l.items.indexOf(t)
? void ("single" === d && l.close())
: void (
l.options.hasOwnProperty(t) &&
("single" === d && l.clear(),
("multi" === d && l.isFull()) ||
((n = e(l.render("item", l.options[t]))),
(o = l.isFull()),
l.items.splice(l.caretPos, 0, t),
l.insertAtCaret(n),
(!l.isPending || (!o && l.isFull())) &&
l.refreshState(),
l.isSetup &&
((a = l.$dropdown_content.find("[data-selectable]")),
l.isPending ||
((r = l.getOption(t)),
(s = l.getAdjacentOption(r, 1).attr("data-value")),
l.refreshOptions(l.isFocused && "single" !== d),
s && l.setActiveOption(l.getOption(s))),
!a.length || l.isFull()
? l.close()
: l.positionDropdown(),
l.updatePlaceholder(),
l.trigger("item_add", t, n),
l.updateOriginalInput({
silent: i,
}))))
)
);
});
},
removeItem: function (e, t) {
var i,
n,
r,
a = this;
(i = "object" == typeof e ? e : a.getItem(e)),
(e = S(i.attr("data-value"))),
(n = a.items.indexOf(e)),
-1 !== n &&
(i.remove(),
i.hasClass("active") &&
((r = a.$activeItems.indexOf(i[0])),
a.$activeItems.splice(r, 1)),
a.items.splice(n, 1),
(a.lastQuery = null),
!a.settings.persist &&
a.userOptions.hasOwnProperty(e) &&
a.removeOption(e, t),
n < a.caretPos && a.setCaret(a.caretPos - 1),
a.refreshState(),
a.updatePlaceholder(),
a.updateOriginalInput({
silent: t,
}),
a.positionDropdown(),
a.trigger("item_remove", e, i));
},
createItem: function (t, i) {
var n = this,
r = n.caretPos;
t = t || e.trim(n.$control_input.val() || "");
var a = arguments[arguments.length - 1];
if (
("function" != typeof a && (a = function () {}),
"boolean" != typeof i && (i = !0),
!n.canCreate(t))
)
return a(), !1;
n.lock();
var s =
"function" == typeof n.settings.create
? this.settings.create
: function (e) {
var t = {};
return (
(t[n.settings.labelField] = e),
(t[n.settings.valueField] = e),
t
);
},
o = O(function (e) {
if ((n.unlock(), !e || "object" != typeof e)) return a();
var t = S(e[n.settings.valueField]);
return "string" != typeof t
? a()
: (n.setTextboxValue(""),
n.addOption(e),
n.setCaret(r),
n.addItem(t),
n.refreshOptions(i && "single" !== n.settings.mode),
void a(e));
}),
l = s.apply(this, [t, o]);
return "undefined" != typeof l && o(l), !0;
},
refreshItems: function () {
(this.lastQuery = null),
this.isSetup && this.addItem(this.items),
this.refreshState(),
this.updateOriginalInput();
},
refreshState: function () {
var e,
t = this;
t.isRequired &&
(t.items.length && (t.isInvalid = !1),
t.$control_input.prop("required", e)),
t.refreshClasses();
},
refreshClasses: function () {
var t = this,
i = t.isFull(),
n = t.isLocked;
t.$wrapper.toggleClass("rtl", t.rtl),
t.$control
.toggleClass("focus", t.isFocused)
.toggleClass("disabled", t.isDisabled)
.toggleClass("required", t.isRequired)
.toggleClass("invalid", t.isInvalid)
.toggleClass("locked", n)
.toggleClass("full", i)
.toggleClass("not-full", !i)
.toggleClass("input-active", t.isFocused && !t.isInputHidden)
.toggleClass("dropdown-active", t.isOpen)
.toggleClass("has-options", !e.isEmptyObject(t.options))
.toggleClass("has-items", t.items.length > 0),
t.$control_input.data("grow", !i && !n);
},
isFull: function () {
return (
null !== this.settings.maxItems &&
this.items.length >= this.settings.maxItems
);
},
updateOriginalInput: function (e) {
var t,
i,
n,
r,
a = this;
if (((e = e || {}), a.tagType === x)) {
for (n = [], t = 0, i = a.items.length; i > t; t++)
(r = a.options[a.items[t]][a.settings.labelField] || ""),
n.push(
'
"
);
n.length ||
this.$input.attr("multiple") ||
n.push('
'),
a.$input.html(n.join(""));
} else
a.$input.val(a.getValue()),
a.$input.attr("value", a.$input.val());
a.isSetup && (e.silent || a.trigger("change", a.$input.val()));
},
updatePlaceholder: function () {
if (this.settings.placeholder) {
var e = this.$control_input;
this.items.length
? e.removeAttr("placeholder")
: e.attr("placeholder", this.settings.placeholder),
e.triggerHandler("update", {
force: !0,
});
}
},
open: function () {
var e = this;
e.isLocked ||
e.isOpen ||
("multi" === e.settings.mode && e.isFull()) ||
(e.focus(),
(e.isOpen = !0),
e.refreshState(),
e.$dropdown.css({
visibility: "hidden",
display: "block",
}),
e.positionDropdown(),
e.$dropdown.css({
visibility: "visible",
}),
e.trigger("dropdown_open", e.$dropdown));
},
close: function () {
var e = this,
t = e.isOpen;
"single" === e.settings.mode && e.items.length && e.hideInput(),
(e.isOpen = !1),
e.$dropdown.hide(),
e.setActiveOption(null),
e.refreshState(),
t && e.trigger("dropdown_close", e.$dropdown);
},
positionDropdown: function () {
var e = this.$control,
t =
"body" === this.settings.dropdownParent
? e.offset()
: e.position();
(t.top += e.outerHeight(!0)),
this.$dropdown.css({
width: e.outerWidth(),
top: t.top,
left: t.left,
});
},
clear: function (e) {
var t = this;
t.items.length &&
(t.$control.children(":not(input)").remove(),
(t.items = []),
(t.lastQuery = null),
t.setCaret(0),
t.setActiveItem(null),
t.updatePlaceholder(),
t.updateOriginalInput({
silent: e,
}),
t.refreshState(),
t.showInput(),
t.trigger("clear"));
},
insertAtCaret: function (t) {
var i = Math.min(this.caretPos, this.items.length);
0 === i
? this.$control.prepend(t)
: e(this.$control[0].childNodes[i]).before(t),
this.setCaret(i + 1);
},
deleteSelection: function (t) {
var i,
n,
r,
a,
s,
o,
l,
d,
u,
c = this;
if (
((r = t && t.keyCode === m ? -1 : 1),
(a = z(c.$control_input[0])),
c.$activeOption &&
!c.settings.hideSelected &&
(l = c
.getAdjacentOption(c.$activeOption, -1)
.attr("data-value")),
(s = []),
c.$activeItems.length)
) {
for (
u = c.$control.children(
".active:" + (r > 0 ? "last" : "first")
),
o = c.$control.children(":not(input)").index(u),
r > 0 && o++,
i = 0,
n = c.$activeItems.length;
n > i;
i++
)
s.push(e(c.$activeItems[i]).attr("data-value"));
t && (t.preventDefault(), t.stopPropagation());
} else
(c.isFocused || "single" === c.settings.mode) &&
c.items.length &&
(0 > r && 0 === a.start && 0 === a.length
? s.push(c.items[c.caretPos - 1])
: r > 0 &&
a.start === c.$control_input.val().length &&
s.push(c.items[c.caretPos]));
if (
!s.length ||
("function" == typeof c.settings.onDelete &&
c.settings.onDelete.apply(c, [s]) === !1)
)
return !1;
for ("undefined" != typeof o && c.setCaret(o); s.length; )
c.removeItem(s.pop());
return (
c.showInput(),
c.positionDropdown(),
c.refreshOptions(!0),
l && ((d = c.getOption(l)), d.length && c.setActiveOption(d)),
!0
);
},
advanceSelection: function (e, t) {
var i,
n,
r,
a,
s,
o,
l = this;
0 !== e &&
(l.rtl && (e *= -1),
(i = e > 0 ? "last" : "first"),
(n = z(l.$control_input[0])),
l.isFocused && !l.isInputHidden
? ((a = l.$control_input.val().length),
(s = 0 > e ? 0 === n.start && 0 === n.length : n.start === a),
s && !a && l.advanceCaret(e, t))
: ((o = l.$control.children(".active:" + i)),
o.length &&
((r = l.$control.children(":not(input)").index(o)),
l.setActiveItem(null),
l.setCaret(e > 0 ? r + 1 : r))));
},
advanceCaret: function (e, t) {
var i,
n,
r = this;
0 !== e &&
((i = e > 0 ? "next" : "prev"),
r.isShiftDown
? ((n = r.$control_input[i]()),
n.length &&
(r.hideInput(),
r.setActiveItem(n),
t && t.preventDefault()))
: r.setCaret(r.caretPos + e));
},
setCaret: function (t) {
var i = this;
if (
((t =
"single" === i.settings.mode
? i.items.length
: Math.max(0, Math.min(i.items.length, t))),
!i.isPending)
) {
var n, r, a, s;
for (
a = i.$control.children(":not(input)"), n = 0, r = a.length;
r > n;
n++
)
(s = e(a[n]).detach()),
t > n ? i.$control_input.before(s) : i.$control.append(s);
}
i.caretPos = t;
},
lock: function () {
this.close(), (this.isLocked = !0), this.refreshState();
},
unlock: function () {
(this.isLocked = !1), this.refreshState();
},
disable: function () {
var e = this;
e.$input.prop("disabled", !0),
e.$control_input.prop("disabled", !0).prop("tabindex", -1),
(e.isDisabled = !0),
e.lock();
},
enable: function () {
var e = this;
e.$input.prop("disabled", !1),
e.$control_input
.prop("disabled", !1)
.prop("tabindex", e.tabIndex),
(e.isDisabled = !1),
e.unlock();
},
destroy: function () {
var t = this,
i = t.eventNS,
n = t.revertSettings;
t.trigger("destroy"),
t.off(),
t.$wrapper.remove(),
t.$dropdown.remove(),
t.$input
.html("")
.append(n.$children)
.removeAttr("tabindex")
.removeClass("selectized")
.attr({
tabindex: n.tabindex,
})
.show(),
t.$control_input.removeData("grow"),
t.$input.removeData("selectize"),
e(window).off(i),
e(document).off(i),
e(document.body).off(i),
delete t.$input[0].selectize;
},
render: function (e, t) {
var i,
n,
r = "",
a = !1,
s = this,
o = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
return (
("option" === e || "item" === e) &&
((i = S(t[s.settings.valueField])), (a = !!i)),
a &&
(k(s.renderCache[e]) || (s.renderCache[e] = {}),
s.renderCache[e].hasOwnProperty(i))
? s.renderCache[e][i]
: ((r = s.settings.render[e].apply(this, [t, F])),
("option" === e || "option_create" === e) &&
(r = r.replace(o, "<$1 data-selectable")),
"optgroup" === e &&
((n = t[s.settings.optgroupValueField] || ""),
(r = r.replace(o, '<$1 data-group="' + E(F(n)) + '"'))),
("option" === e || "item" === e) &&
(r = r.replace(
o,
'<$1 data-value="' + E(F(i || "")) + '"'
)),
a && (s.renderCache[e][i] = r),
r)
);
},
clearCache: function (e) {
var t = this;
"undefined" == typeof e
? (t.renderCache = {})
: delete t.renderCache[e];
},
canCreate: function (e) {
var t = this;
if (!t.settings.create) return !1;
var i = t.settings.createFilter;
return (
e.length &&
("function" != typeof i || i.apply(t, [e])) &&
("string" != typeof i || new RegExp(i).test(e)) &&
(!(i instanceof RegExp) || i.test(e))
);
},
}),
(L.count = 0),
(L.defaults = {
options: [],
optgroups: [],
plugins: [],
delimiter: ",",
splitOn: null,
persist: !0,
diacritics: !0,
create: !1,
createOnBlur: !1,
createFilter: null,
highlight: !0,
openOnFocus: !0,
maxOptions: 1e3,
maxItems: null,
hideSelected: null,
addPrecedence: !1,
selectOnTab: !1,
preload: !1,
allowEmptyOption: !1,
closeAfterSelect: !1,
scrollDuration: 60,
loadThrottle: 300,
loadingClass: "loading",
dataAttr: "data-data",
optgroupField: "optgroup",
valueField: "value",
labelField: "text",
optgroupLabelField: "label",
optgroupValueField: "value",
lockOptgroupOrder: !1,
sortField: "$order",
searchField: ["text"],
searchConjunction: "and",
mode: null,
wrapperClass: "selectize-control",
inputClass: "selectize-input",
dropdownClass: "selectize-dropdown",
dropdownContentClass: "selectize-dropdown-content",
dropdownParent: null,
copyClassesToDropdown: !0,
render: {},
}),
(e.fn.selectize = function (t) {
var i = e.fn.selectize.defaults,
n = e.extend({}, i, t),
r = n.dataAttr,
a = n.labelField,
s = n.valueField,
o = n.optgroupField,
l = n.optgroupLabelField,
d = n.optgroupValueField,
u = {},
c = function (t, i) {
var o,
l,
d,
u,
c = t.attr(r);
if (c)
for (
i.options = JSON.parse(c), o = 0, l = i.options.length;
l > o;
o++
)
i.items.push(i.options[o][s]);
else {
var p = e.trim(t.val() || "");
if (!n.allowEmptyOption && !p.length) return;
for (d = p.split(n.delimiter), o = 0, l = d.length; l > o; o++)
(u = {}), (u[a] = d[o]), (u[s] = d[o]), i.options.push(u);
i.items = d;
}
},
p = function (t, i) {
var c,
p,
f,
h,
m = i.options,
g = function (e) {
var t = r && e.attr(r);
return "string" == typeof t && t.length
? JSON.parse(t)
: null;
},
v = function (t, r) {
t = e(t);
var l = S(t.attr("value"));
if (l || n.allowEmptyOption)
if (u.hasOwnProperty(l)) {
if (r) {
var d = u[l][o];
d
? e.isArray(d)
? d.push(r)
: (u[l][o] = [d, r])
: (u[l][o] = r);
}
} else {
var c = g(t) || {};
(c[a] = c[a] || t.text()),
(c[s] = c[s] || l),
(c[o] = c[o] || r),
(u[l] = c),
m.push(c),
t.is(":selected") && i.items.push(l);
}
},
y = function (t) {
var n, r, a, s, o;
for (
t = e(t),
a = t.attr("label"),
a &&
((s = g(t) || {}),
(s[l] = a),
(s[d] = a),
i.optgroups.push(s)),
o = e("option", t),
n = 0,
r = o.length;
r > n;
n++
)
v(o[n], a);
};
for (
i.maxItems = t.attr("multiple") ? null : 1,
h = t.children(),
c = 0,
p = h.length;
p > c;
c++
)
(f = h[c].tagName.toLowerCase()),
"optgroup" === f ? y(h[c]) : "option" === f && v(h[c]);
};
return this.each(function () {
if (!this.selectize) {
var r,
a = e(this),
s = this.tagName.toLowerCase(),
o = a.attr("placeholder") || a.attr("data-placeholder");
o ||
n.allowEmptyOption ||
(o = a.children('option[value=""]').text());
var l = {
placeholder: o,
options: [],
optgroups: [],
items: [],
};
"select" === s ? p(a, l) : c(a, l),
(r = new L(a, e.extend(!0, {}, i, l, t)));
}
});
}),
(e.fn.selectize.defaults = L.defaults),
(e.fn.selectize.support = {
validity: T,
}),
L.define("drag_drop", function (t) {
if (!e.fn.sortable)
throw new Error(
'The "drag_drop" plugin requires jQuery UI "sortable".'
);
if ("multi" === this.settings.mode) {
var i = this;
(i.lock = (function () {
var e = i.lock;
return function () {
var t = i.$control.data("sortable");
return t && t.disable(), e.apply(i, arguments);
};
})()),
(i.unlock = (function () {
var e = i.unlock;
return function () {
var t = i.$control.data("sortable");
return t && t.enable(), e.apply(i, arguments);
};
})()),
(i.setup = (function () {
var t = i.setup;
return function () {
t.apply(this, arguments);
var n = i.$control.sortable({
items: "[data-value]",
forcePlaceholderSize: !0,
disabled: i.isLocked,
start: function (e, t) {
t.placeholder.css("width", t.helper.css("width")),
n.css({
overflow: "visible",
});
},
stop: function () {
n.css({
overflow: "hidden",
});
var t = i.$activeItems ? i.$activeItems.slice() : null,
r = [];
n.children("[data-value]").each(function () {
r.push(e(this).attr("data-value"));
}),
i.setValue(r),
i.setActiveItem(t);
},
});
};
})());
}
}),
L.define("dropdown_header", function (t) {
var i = this;
(t = e.extend(
{
title: "Untitled",
headerClass: "selectize-dropdown-header",
titleRowClass: "selectize-dropdown-header-title",
labelClass: "selectize-dropdown-header-label",
closeClass: "selectize-dropdown-header-close",
html: function (e) {
return (
''
);
},
},
t
)),
(i.setup = (function () {
var n = i.setup;
return function () {
n.apply(i, arguments),
(i.$dropdown_header = e(t.html(t))),
i.$dropdown.prepend(i.$dropdown_header);
};
})());
}),
L.define("optgroup_columns", function (t) {
var i = this;
(t = e.extend(
{
equalizeWidth: !0,
equalizeHeight: !0,
},
t
)),
(this.getAdjacentOption = function (t, i) {
var n = t.closest("[data-group]").find("[data-selectable]"),
r = n.index(t) + i;
return r >= 0 && r < n.length ? n.eq(r) : e();
}),
(this.onKeyDown = (function () {
var e = i.onKeyDown;
return function (t) {
var n, r, a, s;
return !this.isOpen || (t.keyCode !== d && t.keyCode !== p)
? e.apply(this, arguments)
: ((i.ignoreHover = !0),
(s = this.$activeOption.closest("[data-group]")),
(n = s.find("[data-selectable]").index(this.$activeOption)),
(s =
t.keyCode === d
? s.prev("[data-group]")
: s.next("[data-group]")),
(a = s.find("[data-selectable]")),
(r = a.eq(Math.min(a.length - 1, n))),
void (r.length && this.setActiveOption(r)));
};
})());
var n = function () {
var e,
t = n.width,
i = document;
return (
"undefined" == typeof t &&
((e = i.createElement("div")),
(e.innerHTML =
'
'),
(e = e.firstChild),
i.body.appendChild(e),
(t = n.width = e.offsetWidth - e.clientWidth),
i.body.removeChild(e)),
t
);
},
r = function () {
var r, a, s, o, l, d, u;
if (
((u = e("[data-group]", i.$dropdown_content)),
(a = u.length),
a && i.$dropdown_content.width())
) {
if (t.equalizeHeight) {
for (s = 0, r = 0; a > r; r++)
s = Math.max(s, u.eq(r).height());
u.css({
height: s,
});
}
t.equalizeWidth &&
((d = i.$dropdown_content.innerWidth() - n()),
(o = Math.round(d / a)),
u.css({
width: o,
}),
a > 1 &&
((l = d - o * (a - 1)),
u.eq(a - 1).css({
width: l,
})));
}
};
(t.equalizeHeight || t.equalizeWidth) &&
(P.after(this, "positionDropdown", r),
P.after(this, "refreshOptions", r));
}),
L.define("remove_button", function (t) {
if ("single" !== this.settings.mode) {
t = e.extend(
{
label: "×",
title: "Remove",
className: "remove",
append: !0,
},
t
);
var i = this,
n =
'
' +
t.label +
"",
r = function (e, t) {
var i = e.search(/(<\/[^>]+>\s*)$/);
return e.substring(0, i) + t + e.substring(i);
};
this.setup = (function () {
var a = i.setup;
return function () {
if (t.append) {
var s = i.settings.render.item;
i.settings.render.item = function (e) {
return r(s.apply(this, arguments), n);
};
}
a.apply(this, arguments),
this.$control.on("click", "." + t.className, function (t) {
if ((t.preventDefault(), !i.isLocked)) {
var n = e(t.currentTarget).parent();
i.setActiveItem(n),
i.deleteSelection() && i.setCaret(i.items.length);
}
});
};
})();
}
}),
L.define("restore_on_backspace", function (e) {
var t = this;
(e.text =
e.text ||
function (e) {
return e[this.settings.labelField];
}),
(this.onKeyDown = (function () {
var i = t.onKeyDown;
return function (t) {
var n, r;
return t.keyCode === m &&
"" === this.$control_input.val() &&
!this.$activeItems.length &&
((n = this.caretPos - 1), n >= 0 && n < this.items.length)
? ((r = this.options[this.items[n]]),
this.deleteSelection(t) &&
(this.setTextboxValue(e.text.apply(this, [r])),
this.refreshOptions(!0)),
void t.preventDefault())
: i.apply(this, arguments);
};
})());
}),
L
);
});
var err_list = {
c_required: {
msg: "This value is required",
},
c_integer: {
msg: "Only Integer values allowed",
},
c_integer_coma_allowed: {
msg: "Only Integer and ',' are allowed",
},
};
$(window).load(function () {
$("body").addClass("loaded"),
$("h1").css("color", "#444444"),
$("body").trigger("pageLoaderEnd");
}),
$(document).ready(function () {}),
!(function (e) {
e.fn.viewportChecker = function (t) {
var i = {
classToAdd: "visible",
classToRemove: "invisible",
classToAddForFullView: "full-visible",
removeClassAfterAnimation: !1,
offset: 100,
repeat: !1,
invertBottomOffset: !0,
callbackFunction: function (e, t) {},
scrollHorizontal: !1,
scrollBox: window,
};
e.extend(i, t);
var n = this,
r = {
height: e(i.scrollBox).height(),
width: e(i.scrollBox).width(),
},
a =
-1 != navigator.userAgent.toLowerCase().indexOf("webkit") ||
-1 != navigator.userAgent.toLowerCase().indexOf("windows phone")
? "body"
: "html";
return (
(this.checkElements = function () {
var t, s;
i.scrollHorizontal
? ((t = e(a).scrollLeft()), (s = t + r.width))
: ((t = e(a).scrollTop()), (s = t + r.height)),
n.each(function () {
var n = e(this),
a = {},
o = {};
if (
(n.data("vp-add-class") &&
(o.classToAdd = n.data("vp-add-class")),
n.data("vp-remove-class") &&
(o.classToRemove = n.data("vp-remove-class")),
n.data("vp-add-class-full-view") &&
(o.classToAddForFullView = n.data(
"vp-add-class-full-view"
)),
n.data("vp-keep-add-class") &&
(o.removeClassAfterAnimation = n.data(
"vp-remove-after-animation"
)),
n.data("vp-offset") && (o.offset = n.data("vp-offset")),
n.data("vp-repeat") && (o.repeat = n.data("vp-repeat")),
n.data("vp-scrollHorizontal") &&
(o.scrollHorizontal = n.data("vp-scrollHorizontal")),
n.data("vp-invertBottomOffset") &&
(o.scrollHorizontal = n.data("vp-invertBottomOffset")),
e.extend(a, i),
e.extend(a, o),
!n.data("vp-animated") || a.repeat)
) {
String(a.offset).indexOf("%") > 0 &&
(a.offset = (parseInt(a.offset) / 100) * r.height);
var l = a.scrollHorizontal ? n.offset().left : n.offset().top,
d = a.scrollHorizontal ? l + n.width() : l + n.height(),
u = Math.round(l) + a.offset,
c = a.scrollHorizontal ? u + n.width() : u + n.height();
a.invertBottomOffset && (c -= 2 * a.offset),
s > u && c > t
? (n.removeClass(a.classToRemove),
n.addClass(a.classToAdd),
a.callbackFunction(n, "add"),
s >= d && l >= t
? n.addClass(a.classToAddForFullView)
: n.removeClass(a.classToAddForFullView),
n.data("vp-animated", !0),
a.removeClassAfterAnimation &&
n.one(
"webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",
function () {
n.removeClass(a.classToAdd);
}
))
: n.hasClass(a.classToAdd) &&
a.repeat &&
(n.removeClass(
a.classToAdd + " " + a.classToAddForFullView
),
a.callbackFunction(n, "remove"),
n.data("vp-animated", !1));
}
});
}),
("ontouchstart" in window || "onmsgesturechange" in window) &&
e(document).bind(
"touchmove MSPointerMove pointermove",
this.checkElements
),
e(i.scrollBox).bind("load scroll", this.checkElements),
e(window).resize(function (t) {
(r = {
height: e(i.scrollBox).height(),
width: e(i.scrollBox).width(),
}),
n.checkElements();
}),
this.checkElements(),
this
);
};
})(jQuery),
!(function (e, t, i, n) {
function r(t, i, n, r) {
var a = {
duration: 1,
animation: null,
iterate: 1,
delay: 0,
timing: "linear",
keep: !1,
};
(this.prefixes = ["", "-moz-", "-o-animation-", "-webkit-"]),
(this.element = e(t)),
(this.bare = t),
(this.queue = []),
(this.listening = !1);
var s = "function" == typeof n ? n : r;
switch (i) {
case "blur":
(a = {
amount: 3,
duration: 0.5,
focusAfter: null,
}),
(this.options = e.extend(a, n)),
this._blur(s);
break;
case "focus":
this._focus();
break;
case "rotate":
(a = {
degrees: 15,
duration: 0.5,
}),
(this.options = e.extend(a, n)),
this._rotate(s);
break;
case "cleanse":
this.cleanse();
break;
default:
(this.options = e.extend(a, i)), this.init(s);
}
}
(r.prototype = {
init: function (t) {
var i = this;
"[object Array]" ===
Object.prototype.toString.call(i.options.animation)
? e.merge(i.queue, i.options.animation)
: i.queue.push(i.options.animation),
i.cleanse(),
i.animate(t);
},
animate: function (e) {
this.element.addClass("animated"),
this.element.addClass(this.queue[0]),
this.element.data("animo", this.queue[0]);
for (var t = this.prefixes.length; t--; )
this.element.css(
this.prefixes[t] + "animation-duration",
this.options.duration + "s"
),
this.element.css(
this.prefixes[t] + "animation-delay",
this.options.delay + "s"
),
this.element.css(
this.prefixes[t] + "animation-iteration-count",
this.options.iterate
),
this.element.css(
this.prefixes[t] + "animation-timing-function",
this.options.timing
);
var i = this,
n = e;
i.queue.length > 1 && (n = null),
this._end(
"AnimationEnd",
function () {
i.element.hasClass(i.queue[0]) &&
(i.options.keep || i.cleanse(),
i.queue.shift(),
i.queue.length && i.animate(e));
},
n
);
},
cleanse: function () {
this.element.removeClass("animated"),
this.element.removeClass(this.queue[0]),
this.element.removeClass(this.element.data("animo"));
for (var e = this.prefixes.length; e--; )
this.element.css(this.prefixes[e] + "animation-duration", ""),
this.element.css(this.prefixes[e] + "animation-delay", ""),
this.element.css(
this.prefixes[e] + "animation-iteration-count",
""
),
this.element.css(
this.prefixes[e] + "animation-timing-function",
""
),
this.element.css(this.prefixes[e] + "transition", ""),
this.element.css(this.prefixes[e] + "transform", ""),
this.element.css(this.prefixes[e] + "filter", "");
},
_blur: function (i) {
if (this.element.is("img")) {
var n =
"svg_" +
((16777216 * (1 + Math.random())) | 0)
.toString(16)
.substring(1),
r =
"filter_" +
((16777216 * (1 + Math.random())) | 0)
.toString(16)
.substring(1);
e("body").append(
'
'
);
for (var a = this.prefixes.length; a--; )
this.element.css(
this.prefixes[a] + "filter",
"blur(" + this.options.amount + "px)"
),
this.element.css(
this.prefixes[a] + "transition",
this.options.duration + "s all linear"
);
this.element.css("filter", "url(#" + r + ")"),
this.element.data("svgid", n);
} else {
for (
var s = this.element.css("color"), a = this.prefixes.length;
a--;
)
this.element.css(
this.prefixes[a] + "transition",
"all " + this.options.duration + "s linear"
);
this.element.css(
"text-shadow",
"0 0 " + this.options.amount + "px " + s
),
this.element.css("color", "transparent");
}
this._end("TransitionEnd", null, i);
var o = this;
if (this.options.focusAfter)
var l = t.setTimeout(function () {
o._focus(), (l = t.clearTimeout(l));
}, 1e3 * this.options.focusAfter);
},
_focus: function () {
var t = this.prefixes.length;
if (this.element.is("img")) {
for (; t--; )
this.element.css(this.prefixes[t] + "filter", ""),
this.element.css(this.prefixes[t] + "transition", "");
var i = e("#" + this.element.data("svgid"));
i.remove();
} else {
for (; t--; ) this.element.css(this.prefixes[t] + "transition", "");
this.element.css("text-shadow", ""), this.element.css("color", "");
}
},
_rotate: function (e) {
for (var t = this.prefixes.length; t--; )
this.element.css(
this.prefixes[t] + "transition",
"all " + this.options.duration + "s linear"
),
this.element.css(
this.prefixes[t] + "transform",
"rotate(" + this.options.degrees + "deg)"
);
this._end("TransitionEnd", null, e);
},
_end: function (e, t, i) {
var n = this,
r = e.toLowerCase() + " webkit" + e + " o" + e + " MS" + e;
this.element.bind(r, function () {
n.element.unbind(r),
"function" == typeof t && t(),
"function" == typeof i && i(n);
});
},
}),
(e.fn.animo = function (e, t, i) {
return this.each(function () {
new r(this, e, t, i);
});
});
})(jQuery, window, document),
(jQuery.easing.jswing = jQuery.easing.swing),
jQuery.extend(jQuery.easing, {
def: "easeOutQuad",
swing: function (e, t, i, n, r) {
return jQuery.easing[jQuery.easing.def](e, t, i, n, r);
},
easeInQuad: function (e, t, i, n, r) {
return n * (t /= r) * t + i;
},
easeOutQuad: function (e, t, i, n, r) {
return -n * (t /= r) * (t - 2) + i;
},
easeInOutQuad: function (e, t, i, n, r) {
return (t /= r / 2) < 1
? (n / 2) * t * t + i
: (-n / 2) * (--t * (t - 2) - 1) + i;
},
easeInCubic: function (e, t, i, n, r) {
return n * (t /= r) * t * t + i;
},
easeOutCubic: function (e, t, i, n, r) {
return n * ((t = t / r - 1) * t * t + 1) + i;
},
easeInOutCubic: function (e, t, i, n, r) {
return (t /= r / 2) < 1
? (n / 2) * t * t * t + i
: (n / 2) * ((t -= 2) * t * t + 2) + i;
},
easeInQuart: function (e, t, i, n, r) {
return n * (t /= r) * t * t * t + i;
},
easeOutQuart: function (e, t, i, n, r) {
return -n * ((t = t / r - 1) * t * t * t - 1) + i;
},
easeInOutQuart: function (e, t, i, n, r) {
return (t /= r / 2) < 1
? (n / 2) * t * t * t * t + i
: (-n / 2) * ((t -= 2) * t * t * t - 2) + i;
},
easeInQuint: function (e, t, i, n, r) {
return n * (t /= r) * t * t * t * t + i;
},
easeOutQuint: function (e, t, i, n, r) {
return n * ((t = t / r - 1) * t * t * t * t + 1) + i;
},
easeInOutQuint: function (e, t, i, n, r) {
return (t /= r / 2) < 1
? (n / 2) * t * t * t * t * t + i
: (n / 2) * ((t -= 2) * t * t * t * t + 2) + i;
},
easeInSine: function (e, t, i, n, r) {
return -n * Math.cos((t / r) * (Math.PI / 2)) + n + i;
},
easeOutSine: function (e, t, i, n, r) {
return n * Math.sin((t / r) * (Math.PI / 2)) + i;
},
easeInOutSine: function (e, t, i, n, r) {
return (-n / 2) * (Math.cos((Math.PI * t) / r) - 1) + i;
},
easeInExpo: function (e, t, i, n, r) {
return 0 == t ? i : n * Math.pow(2, 10 * (t / r - 1)) + i;
},
easeOutExpo: function (e, t, i, n, r) {
return t == r ? i + n : n * (-Math.pow(2, (-10 * t) / r) + 1) + i;
},
easeInOutExpo: function (e, t, i, n, r) {
return 0 == t
? i
: t == r
? i + n
: (t /= r / 2) < 1
? (n / 2) * Math.pow(2, 10 * (t - 1)) + i
: (n / 2) * (-Math.pow(2, -10 * --t) + 2) + i;
},
easeInCirc: function (e, t, i, n, r) {
return -n * (Math.sqrt(1 - (t /= r) * t) - 1) + i;
},
easeOutCirc: function (e, t, i, n, r) {
return n * Math.sqrt(1 - (t = t / r - 1) * t) + i;
},
easeInOutCirc: function (e, t, i, n, r) {
return (t /= r / 2) < 1
? (-n / 2) * (Math.sqrt(1 - t * t) - 1) + i
: (n / 2) * (Math.sqrt(1 - (t -= 2) * t) + 1) + i;
},
easeInElastic: function (e, t, i, n, r) {
var a = 1.70158,
s = 0,
o = n;
if (0 == t) return i;
if (1 == (t /= r)) return i + n;
if ((s || (s = 0.3 * r), o < Math.abs(n))) {
o = n;
var a = s / 4;
} else var a = (s / (2 * Math.PI)) * Math.asin(n / o);
return (
-(
o *
Math.pow(2, 10 * (t -= 1)) *
Math.sin(((t * r - a) * (2 * Math.PI)) / s)
) + i
);
},
easeOutElastic: function (e, t, i, n, r) {
var a = 1.70158,
s = 0,
o = n;
if (0 == t) return i;
if (1 == (t /= r)) return i + n;
if ((s || (s = 0.3 * r), o < Math.abs(n))) {
o = n;
var a = s / 4;
} else var a = (s / (2 * Math.PI)) * Math.asin(n / o);
return (
o *
Math.pow(2, -10 * t) *
Math.sin(((t * r - a) * (2 * Math.PI)) / s) +
n +
i
);
},
easeInOutElastic: function (e, t, i, n, r) {
var a = 1.70158,
s = 0,
o = n;
if (0 == t) return i;
if (2 == (t /= r / 2)) return i + n;
if ((s || (s = r * (0.3 * 1.5)), o < Math.abs(n))) {
o = n;
var a = s / 4;
} else var a = (s / (2 * Math.PI)) * Math.asin(n / o);
return 1 > t
? -0.5 *
(o *
Math.pow(2, 10 * (t -= 1)) *
Math.sin(((t * r - a) * (2 * Math.PI)) / s)) +
i
: o *
Math.pow(2, -10 * (t -= 1)) *
Math.sin(((t * r - a) * (2 * Math.PI)) / s) *
0.5 +
n +
i;
},
easeInBack: function (e, t, i, n, r, a) {
return (
void 0 == a && (a = 1.70158), n * (t /= r) * t * ((a + 1) * t - a) + i
);
},
easeOutBack: function (e, t, i, n, r, a) {
return (
void 0 == a && (a = 1.70158),
n * ((t = t / r - 1) * t * ((a + 1) * t + a) + 1) + i
);
},
easeInOutBack: function (e, t, i, n, r, a) {
return (
void 0 == a && (a = 1.70158),
(t /= r / 2) < 1
? (n / 2) * (t * t * (((a *= 1.525) + 1) * t - a)) + i
: (n / 2) * ((t -= 2) * t * (((a *= 1.525) + 1) * t + a) + 2) + i
);
},
easeInBounce: function (e, t, i, n, r) {
return n - jQuery.easing.easeOutBounce(e, r - t, 0, n, r) + i;
},
easeOutBounce: function (e, t, i, n, r) {
return (t /= r) < 1 / 2.75
? n * (7.5625 * t * t) + i
: 2 / 2.75 > t
? n * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + i
: 2.5 / 2.75 > t
? n * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + i
: n * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + i;
},
easeInOutBounce: function (e, t, i, n, r) {
return r / 2 > t
? 0.5 * jQuery.easing.easeInBounce(e, 2 * t, 0, n, r) + i
: 0.5 * jQuery.easing.easeOutBounce(e, 2 * t - r, 0, n, r) +
0.5 * n +
i;
},
}),
jQuery.extend(jQuery.easing, {
easeInOutMaterial: function (e, t, i, n, r) {
return (t /= r / 2) < 1
? (n / 2) * t * t + i
: (n / 4) * ((t -= 2) * t * t + 2) + i;
},
}),
jQuery.Velocity
? console.log(
"Velocity is already loaded. You may be needlessly importing Velocity again; note that Materialize includes Velocity."
)
: (!(function (e) {
function t(e) {
var t = e.length,
n = i.type(e);
return "function" === n || i.isWindow(e)
? !1
: 1 === e.nodeType && t
? !0
: "array" === n ||
0 === t ||
("number" == typeof t && t > 0 && t - 1 in e);
}
if (!e.jQuery) {
var i = function (e, t) {
return new i.fn.init(e, t);
};
(i.isWindow = function (e) {
return null != e && e == e.window;
}),
(i.type = function (e) {
return null == e
? e + ""
: "object" == typeof e || "function" == typeof e
? r[s.call(e)] || "object"
: typeof e;
}),
(i.isArray =
Array.isArray ||
function (e) {
return "array" === i.type(e);
}),
(i.isPlainObject = function (e) {
var t;
if (!e || "object" !== i.type(e) || e.nodeType || i.isWindow(e))
return !1;
try {
if (
e.constructor &&
!a.call(e, "constructor") &&
!a.call(e.constructor.prototype, "isPrototypeOf")
)
return !1;
} catch (n) {
return !1;
}
for (t in e);
return void 0 === t || a.call(e, t);
}),
(i.each = function (e, i, n) {
var r,
a = 0,
s = e.length,
o = t(e);
if (n) {
if (o)
for (; s > a && ((r = i.apply(e[a], n)), r !== !1); a++);
else
for (a in e) if (((r = i.apply(e[a], n)), r === !1)) break;
} else if (o)
for (; s > a && ((r = i.call(e[a], a, e[a])), r !== !1); a++);
else
for (a in e)
if (((r = i.call(e[a], a, e[a])), r === !1)) break;
return e;
}),
(i.data = function (e, t, r) {
if (void 0 === r) {
var a = e[i.expando],
s = a && n[a];
if (void 0 === t) return s;
if (s && t in s) return s[t];
} else if (void 0 !== t) {
var a = e[i.expando] || (e[i.expando] = ++i.uuid);
return (n[a] = n[a] || {}), (n[a][t] = r), r;
}
}),
(i.removeData = function (e, t) {
var r = e[i.expando],
a = r && n[r];
a &&
i.each(t, function (e, t) {
delete a[t];
});
}),
(i.extend = function () {
var e,
t,
n,
r,
a,
s,
o = arguments[0] || {},
l = 1,
d = arguments.length,
u = !1;
for (
"boolean" == typeof o &&
((u = o), (o = arguments[l] || {}), l++),
"object" != typeof o &&
"function" !== i.type(o) &&
(o = {}),
l === d && ((o = this), l--);
d > l;
l++
)
if (null != (a = arguments[l]))
for (r in a)
(e = o[r]),
(n = a[r]),
o !== n &&
(u && n && (i.isPlainObject(n) || (t = i.isArray(n)))
? (t
? ((t = !1), (s = e && i.isArray(e) ? e : []))
: (s = e && i.isPlainObject(e) ? e : {}),
(o[r] = i.extend(u, s, n)))
: void 0 !== n && (o[r] = n));
return o;
}),
(i.queue = function (e, n, r) {
function a(e, i) {
var n = i || [];
return (
null != e &&
(t(Object(e))
? !(function (e, t) {
for (
var i = +t.length, n = 0, r = e.length;
i > n;
)
e[r++] = t[n++];
if (i !== i)
for (; void 0 !== t[n]; ) e[r++] = t[n++];
return (e.length = r), e;
})(n, "string" == typeof e ? [e] : e)
: [].push.call(n, e)),
n
);
}
if (e) {
n = (n || "fx") + "queue";
var s = i.data(e, n);
return r
? (!s || i.isArray(r)
? (s = i.data(e, n, a(r)))
: s.push(r),
s)
: s || [];
}
}),
(i.dequeue = function (e, t) {
i.each(e.nodeType ? [e] : e, function (e, n) {
t = t || "fx";
var r = i.queue(n, t),
a = r.shift();
"inprogress" === a && (a = r.shift()),
a &&
("fx" === t && r.unshift("inprogress"),
a.call(n, function () {
i.dequeue(n, t);
}));
});
}),
(i.fn = i.prototype =
{
init: function (e) {
if (e.nodeType) return (this[0] = e), this;
throw new Error("Not a DOM node.");
},
offset: function () {
var t = this[0].getBoundingClientRect
? this[0].getBoundingClientRect()
: {
top: 0,
left: 0,
};
return {
top:
t.top +
(e.pageYOffset || document.scrollTop || 0) -
(document.clientTop || 0),
left:
t.left +
(e.pageXOffset || document.scrollLeft || 0) -
(document.clientLeft || 0),
};
},
position: function () {
function e() {
for (
var e = this.offsetParent || document;
e &&
"html" === !e.nodeType.toLowerCase &&
"static" === e.style.position;
)
e = e.offsetParent;
return e || document;
}
var t = this[0],
e = e.apply(t),
n = this.offset(),
r = /^(?:body|html)$/i.test(e.nodeName)
? {
top: 0,
left: 0,
}
: i(e).offset();
return (
(n.top -= parseFloat(t.style.marginTop) || 0),
(n.left -= parseFloat(t.style.marginLeft) || 0),
e.style &&
((r.top += parseFloat(e.style.borderTopWidth) || 0),
(r.left += parseFloat(e.style.borderLeftWidth) || 0)),
{
top: n.top - r.top,
left: n.left - r.left,
}
);
},
});
var n = {};
(i.expando = "velocity" + new Date().getTime()), (i.uuid = 0);
for (
var r = {},
a = r.hasOwnProperty,
s = r.toString,
o =
"Boolean Number String Function Array Date RegExp Object Error".split(
" "
),
l = 0;
l < o.length;
l++
)
r["[object " + o[l] + "]"] = o[l].toLowerCase();
(i.fn.init.prototype = i.fn),
(e.Velocity = {
Utilities: i,
});
}
})(window),
(function (e) {
"object" == typeof module && "object" == typeof module.exports
? (module.exports = e())
: "function" == typeof define && define.amd
? define(e)
: e();
})(function () {
return (function (e, t, i, n) {
function r(e) {
for (var t = -1, i = e ? e.length : 0, n = []; ++t < i; ) {
var r = e[t];
r && n.push(r);
}
return n;
}
function a(e) {
return (
m.isWrapped(e)
? (e = [].slice.call(e))
: m.isNode(e) && (e = [e]),
e
);
}
function s(e) {
var t = p.data(e, "velocity");
return null === t ? n : t;
}
function o(e) {
return function (t) {
return Math.round(t * e) * (1 / e);
};
}
function l(e, i, n, r) {
function a(e, t) {
return 1 - 3 * t + 3 * e;
}
function s(e, t) {
return 3 * t - 6 * e;
}
function o(e) {
return 3 * e;
}
function l(e, t, i) {
return ((a(t, i) * e + s(t, i)) * e + o(t)) * e;
}
function d(e, t, i) {
return 3 * a(t, i) * e * e + 2 * s(t, i) * e + o(t);
}
function u(t, i) {
for (var r = 0; m > r; ++r) {
var a = d(i, e, n);
if (0 === a) return i;
var s = l(i, e, n) - t;
i -= s / a;
}
return i;
}
function c() {
for (var t = 0; w > t; ++t) T[t] = l(t * b, e, n);
}
function p(t, i, r) {
var a,
s,
o = 0;
do
(s = i + (r - i) / 2),
(a = l(s, e, n) - t),
a > 0 ? (r = s) : (i = s);
while (Math.abs(a) > v && ++o < y);
return s;
}
function f(t) {
for (var i = 0, r = 1, a = w - 1; r != a && T[r] <= t; ++r)
i += b;
--r;
var s = (t - T[r]) / (T[r + 1] - T[r]),
o = i + s * b,
l = d(o, e, n);
return l >= g ? u(t, o) : 0 == l ? o : p(t, i, i + b);
}
function h() {
(k = !0), (e != i || n != r) && c();
}
var m = 4,
g = 0.001,
v = 1e-7,
y = 10,
w = 11,
b = 1 / (w - 1),
x = "Float32Array" in t;
if (4 !== arguments.length) return !1;
for (var C = 0; 4 > C; ++C)
if (
"number" != typeof arguments[C] ||
isNaN(arguments[C]) ||
!isFinite(arguments[C])
)
return !1;
(e = Math.min(e, 1)),
(n = Math.min(n, 1)),
(e = Math.max(e, 0)),
(n = Math.max(n, 0));
var T = x ? new Float32Array(w) : new Array(w),
k = !1,
S = function (t) {
return (
k || h(),
e === i && n === r
? t
: 0 === t
? 0
: 1 === t
? 1
: l(f(t), i, r)
);
};
S.getControlPoints = function () {
return [
{
x: e,
y: i,
},
{
x: n,
y: r,
},
];
};
var F = "generateBezier(" + [e, i, n, r] + ")";
return (
(S.toString = function () {
return F;
}),
S
);
}
function d(e, t) {
var i = e;
return (
m.isString(e)
? w.Easings[e] || (i = !1)
: (i =
m.isArray(e) && 1 === e.length
? o.apply(null, e)
: m.isArray(e) && 2 === e.length
? b.apply(null, e.concat([t]))
: m.isArray(e) && 4 === e.length
? l.apply(null, e)
: !1),
i === !1 &&
(i = w.Easings[w.defaults.easing] ? w.defaults.easing : y),
i
);
}
function u(e) {
if (e) {
var t = new Date().getTime(),
i = w.State.calls.length;
i > 1e4 && (w.State.calls = r(w.State.calls));
for (var a = 0; i > a; a++)
if (w.State.calls[a]) {
var o = w.State.calls[a],
l = o[0],
d = o[2],
f = o[3],
h = !!f,
g = null;
f || (f = w.State.calls[a][3] = t - 16);
for (
var v = Math.min((t - f) / d.duration, 1),
y = 0,
b = l.length;
b > y;
y++
) {
var C = l[y],
k = C.element;
if (s(k)) {
var S = !1;
if (
d.display !== n &&
null !== d.display &&
"none" !== d.display
) {
if ("flex" === d.display) {
var F = [
"-webkit-box",
"-moz-box",
"-ms-flexbox",
"-webkit-flex",
];
p.each(F, function (e, t) {
x.setPropertyValue(k, "display", t);
});
}
x.setPropertyValue(k, "display", d.display);
}
d.visibility !== n &&
"hidden" !== d.visibility &&
x.setPropertyValue(k, "visibility", d.visibility);
for (var E in C)
if ("element" !== E) {
var P,
O = C[E],
A = m.isString(O.easing)
? w.Easings[O.easing]
: O.easing;
if (1 === v) P = O.endValue;
else {
var $ = O.endValue - O.startValue;
if (
((P = O.startValue + $ * A(v, d, $)),
!h && P === O.currentValue)
)
continue;
}
if (((O.currentValue = P), "tween" === E)) g = P;
else {
if (x.Hooks.registered[E]) {
var I = x.Hooks.getRoot(E),
z = s(k).rootPropertyValueCache[I];
z && (O.rootPropertyValue = z);
}
var M = x.setPropertyValue(
k,
E,
O.currentValue +
(0 === parseFloat(P) ? "" : O.unitType),
O.rootPropertyValue,
O.scrollData
);
x.Hooks.registered[E] &&
(s(k).rootPropertyValueCache[I] = x
.Normalizations.registered[I]
? x.Normalizations.registered[I](
"extract",
null,
M[1]
)
: M[1]),
"transform" === M[0] && (S = !0);
}
}
d.mobileHA &&
s(k).transformCache.translate3d === n &&
((s(k).transformCache.translate3d =
"(0px, 0px, 0px)"),
(S = !0)),
S && x.flushTransformCache(k);
}
}
d.display !== n &&
"none" !== d.display &&
(w.State.calls[a][2].display = !1),
d.visibility !== n &&
"hidden" !== d.visibility &&
(w.State.calls[a][2].visibility = !1),
d.progress &&
d.progress.call(
o[1],
o[1],
v,
Math.max(0, f + d.duration - t),
f,
g
),
1 === v && c(a);
}
}
w.State.isTicking && T(u);
}
function c(e, t) {
if (!w.State.calls[e]) return !1;
for (
var i = w.State.calls[e][0],
r = w.State.calls[e][1],
a = w.State.calls[e][2],
o = w.State.calls[e][4],
l = !1,
d = 0,
u = i.length;
u > d;
d++
) {
var c = i[d].element;
if (
(t ||
a.loop ||
("none" === a.display &&
x.setPropertyValue(c, "display", a.display),
"hidden" === a.visibility &&
x.setPropertyValue(c, "visibility", a.visibility)),
a.loop !== !0 &&
(p.queue(c)[1] === n ||
!/\.velocityQueueEntryFlag/i.test(p.queue(c)[1])) &&
s(c))
) {
(s(c).isAnimating = !1), (s(c).rootPropertyValueCache = {});
var f = !1;
p.each(x.Lists.transforms3D, function (e, t) {
var i = /^scale/.test(t) ? 1 : 0,
r = s(c).transformCache[t];
s(c).transformCache[t] !== n &&
new RegExp("^\\(" + i + "[^.]").test(r) &&
((f = !0), delete s(c).transformCache[t]);
}),
a.mobileHA &&
((f = !0), delete s(c).transformCache.translate3d),
f && x.flushTransformCache(c),
x.Values.removeClass(c, "velocity-animating");
}
if (!t && a.complete && !a.loop && d === u - 1)
try {
a.complete.call(r, r);
} catch (h) {
setTimeout(function () {
throw h;
}, 1);
}
o && a.loop !== !0 && o(r),
s(c) &&
a.loop === !0 &&
!t &&
(p.each(s(c).tweensContainer, function (e, t) {
/^rotate/.test(e) &&
360 === parseFloat(t.endValue) &&
((t.endValue = 0), (t.startValue = 360)),
/^backgroundPosition/.test(e) &&
100 === parseFloat(t.endValue) &&
"%" === t.unitType &&
((t.endValue = 0), (t.startValue = 100));
}),
w(c, "reverse", {
loop: !0,
delay: a.delay,
})),
a.queue !== !1 && p.dequeue(c, a.queue);
}
w.State.calls[e] = !1;
for (var m = 0, g = w.State.calls.length; g > m; m++)
if (w.State.calls[m] !== !1) {
l = !0;
break;
}
l === !1 &&
((w.State.isTicking = !1),
delete w.State.calls,
(w.State.calls = []));
}
var p,
f = (function () {
if (i.documentMode) return i.documentMode;
for (var e = 7; e > 4; e--) {
var t = i.createElement("div");
if (
((t.innerHTML =
""),
t.getElementsByTagName("span").length)
)
return (t = null), e;
}
return n;
})(),
h = (function () {
var e = 0;
return (
t.webkitRequestAnimationFrame ||
t.mozRequestAnimationFrame ||
function (t) {
var i,
n = new Date().getTime();
return (
(i = Math.max(0, 16 - (n - e))),
(e = n + i),
setTimeout(function () {
t(n + i);
}, i)
);
}
);
})(),
m = {
isString: function (e) {
return "string" == typeof e;
},
isArray:
Array.isArray ||
function (e) {
return (
"[object Array]" === Object.prototype.toString.call(e)
);
},
isFunction: function (e) {
return (
"[object Function]" === Object.prototype.toString.call(e)
);
},
isNode: function (e) {
return e && e.nodeType;
},
isNodeList: function (e) {
return (
"object" == typeof e &&
/^\[object (HTMLCollection|NodeList|Object)\]$/.test(
Object.prototype.toString.call(e)
) &&
e.length !== n &&
(0 === e.length ||
("object" == typeof e[0] && e[0].nodeType > 0))
);
},
isWrapped: function (e) {
return e && (e.jquery || (t.Zepto && t.Zepto.zepto.isZ(e)));
},
isSVG: function (e) {
return t.SVGElement && e instanceof t.SVGElement;
},
isEmptyObject: function (e) {
for (var t in e) return !1;
return !0;
},
},
g = !1;
if (
(e.fn && e.fn.jquery
? ((p = e), (g = !0))
: (p = t.Velocity.Utilities),
8 >= f && !g)
)
throw new Error(
"Velocity: IE8 and below require jQuery to be loaded before Velocity."
);
if (7 >= f) return void (jQuery.fn.velocity = jQuery.fn.animate);
var v = 400,
y = "swing",
w = {
State: {
isMobile:
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
),
isAndroid: /Android/i.test(navigator.userAgent),
isGingerbread: /Android 2\.3\.[3-7]/i.test(
navigator.userAgent
),
isChrome: t.chrome,
isFirefox: /Firefox/i.test(navigator.userAgent),
prefixElement: i.createElement("div"),
prefixMatches: {},
scrollAnchor: null,
scrollPropertyLeft: null,
scrollPropertyTop: null,
isTicking: !1,
calls: [],
},
CSS: {},
Utilities: p,
Redirects: {},
Easings: {},
Promise: t.Promise,
defaults: {
queue: "",
duration: v,
easing: y,
begin: n,
complete: n,
progress: n,
display: n,
visibility: n,
loop: !1,
delay: !1,
mobileHA: !0,
_cacheValues: !0,
},
init: function (e) {
p.data(e, "velocity", {
isSVG: m.isSVG(e),
isAnimating: !1,
computedStyle: null,
tweensContainer: null,
rootPropertyValueCache: {},
transformCache: {},
});
},
hook: null,
mock: !1,
version: {
major: 1,
minor: 2,
patch: 2,
},
debug: !1,
};
t.pageYOffset !== n
? ((w.State.scrollAnchor = t),
(w.State.scrollPropertyLeft = "pageXOffset"),
(w.State.scrollPropertyTop = "pageYOffset"))
: ((w.State.scrollAnchor =
i.documentElement || i.body.parentNode || i.body),
(w.State.scrollPropertyLeft = "scrollLeft"),
(w.State.scrollPropertyTop = "scrollTop"));
var b = (function () {
function e(e) {
return -e.tension * e.x - e.friction * e.v;
}
function t(t, i, n) {
var r = {
x: t.x + n.dx * i,
v: t.v + n.dv * i,
tension: t.tension,
friction: t.friction,
};
return {
dx: r.v,
dv: e(r),
};
}
function i(i, n) {
var r = {
dx: i.v,
dv: e(i),
},
a = t(i, 0.5 * n, r),
s = t(i, 0.5 * n, a),
o = t(i, n, s),
l = (1 / 6) * (r.dx + 2 * (a.dx + s.dx) + o.dx),
d = (1 / 6) * (r.dv + 2 * (a.dv + s.dv) + o.dv);
return (i.x = i.x + l * n), (i.v = i.v + d * n), i;
}
return function n(e, t, r) {
var a,
s,
o,
l = {
x: -1,
v: 0,
tension: null,
friction: null,
},
d = [0],
u = 0,
c = 1e-4,
p = 0.016;
for (
e = parseFloat(e) || 500,
t = parseFloat(t) || 20,
r = r || null,
l.tension = e,
l.friction = t,
a = null !== r,
a ? ((u = n(e, t)), (s = (u / r) * p)) : (s = p);
(o = i(o || l, s)),
d.push(1 + o.x),
(u += 16),
Math.abs(o.x) > c && Math.abs(o.v) > c;
);
return a
? function (e) {
return d[(e * (d.length - 1)) | 0];
}
: u;
};
})();
(w.Easings = {
linear: function (e) {
return e;
},
swing: function (e) {
return 0.5 - Math.cos(e * Math.PI) / 2;
},
spring: function (e) {
return 1 - Math.cos(4.5 * e * Math.PI) * Math.exp(6 * -e);
},
}),
p.each(
[
["ease", [0.25, 0.1, 0.25, 1]],
["ease-in", [0.42, 0, 1, 1]],
["ease-out", [0, 0, 0.58, 1]],
["ease-in-out", [0.42, 0, 0.58, 1]],
["easeInSine", [0.47, 0, 0.745, 0.715]],
["easeOutSine", [0.39, 0.575, 0.565, 1]],
["easeInOutSine", [0.445, 0.05, 0.55, 0.95]],
["easeInQuad", [0.55, 0.085, 0.68, 0.53]],
["easeOutQuad", [0.25, 0.46, 0.45, 0.94]],
["easeInOutQuad", [0.455, 0.03, 0.515, 0.955]],
["easeInCubic", [0.55, 0.055, 0.675, 0.19]],
["easeOutCubic", [0.215, 0.61, 0.355, 1]],
["easeInOutCubic", [0.645, 0.045, 0.355, 1]],
["easeInQuart", [0.895, 0.03, 0.685, 0.22]],
["easeOutQuart", [0.165, 0.84, 0.44, 1]],
["easeInOutQuart", [0.77, 0, 0.175, 1]],
["easeInQuint", [0.755, 0.05, 0.855, 0.06]],
["easeOutQuint", [0.23, 1, 0.32, 1]],
["easeInOutQuint", [0.86, 0, 0.07, 1]],
["easeInExpo", [0.95, 0.05, 0.795, 0.035]],
["easeOutExpo", [0.19, 1, 0.22, 1]],
["easeInOutExpo", [1, 0, 0, 1]],
["easeInCirc", [0.6, 0.04, 0.98, 0.335]],
["easeOutCirc", [0.075, 0.82, 0.165, 1]],
["easeInOutCirc", [0.785, 0.135, 0.15, 0.86]],
],
function (e, t) {
w.Easings[t[0]] = l.apply(null, t[1]);
}
);
var x = (w.CSS = {
RegEx: {
isHex: /^#([A-f\d]{3}){1,2}$/i,
valueUnwrap: /^[A-z]+\((.*)\)$/i,
wrappedValueAlreadyExtracted:
/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,
valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi,
},
Lists: {
colors: [
"fill",
"stroke",
"stopColor",
"color",
"backgroundColor",
"borderColor",
"borderTopColor",
"borderRightColor",
"borderBottomColor",
"borderLeftColor",
"outlineColor",
],
transformsBase: [
"translateX",
"translateY",
"scale",
"scaleX",
"scaleY",
"skewX",
"skewY",
"rotateZ",
],
transforms3D: [
"transformPerspective",
"translateZ",
"scaleZ",
"rotateX",
"rotateY",
],
},
Hooks: {
templates: {
textShadow: ["Color X Y Blur", "black 0px 0px 0px"],
boxShadow: ["Color X Y Blur Spread", "black 0px 0px 0px 0px"],
clip: ["Top Right Bottom Left", "0px 0px 0px 0px"],
backgroundPosition: ["X Y", "0% 0%"],
transformOrigin: ["X Y Z", "50% 50% 0px"],
perspectiveOrigin: ["X Y", "50% 50%"],
},
registered: {},
register: function () {
for (var e = 0; e < x.Lists.colors.length; e++) {
var t =
"color" === x.Lists.colors[e]
? "0 0 0 1"
: "255 255 255 1";
x.Hooks.templates[x.Lists.colors[e]] = [
"Red Green Blue Alpha",
t,
];
}
var i, n, r;
if (f)
for (i in x.Hooks.templates) {
(n = x.Hooks.templates[i]), (r = n[0].split(" "));
var a = n[1].match(x.RegEx.valueSplit);
"Color" === r[0] &&
(r.push(r.shift()),
a.push(a.shift()),
(x.Hooks.templates[i] = [r.join(" "), a.join(" ")]));
}
for (i in x.Hooks.templates) {
(n = x.Hooks.templates[i]), (r = n[0].split(" "));
for (var e in r) {
var s = i + r[e],
o = e;
x.Hooks.registered[s] = [i, o];
}
}
},
getRoot: function (e) {
var t = x.Hooks.registered[e];
return t ? t[0] : e;
},
cleanRootPropertyValue: function (e, t) {
return (
x.RegEx.valueUnwrap.test(t) &&
(t = t.match(x.RegEx.valueUnwrap)[1]),
x.Values.isCSSNullValue(t) && (t = x.Hooks.templates[e][1]),
t
);
},
extractValue: function (e, t) {
var i = x.Hooks.registered[e];
if (i) {
var n = i[0],
r = i[1];
return (
(t = x.Hooks.cleanRootPropertyValue(n, t)),
t.toString().match(x.RegEx.valueSplit)[r]
);
}
return t;
},
injectValue: function (e, t, i) {
var n = x.Hooks.registered[e];
if (n) {
var r,
a,
s = n[0],
o = n[1];
return (
(i = x.Hooks.cleanRootPropertyValue(s, i)),
(r = i.toString().match(x.RegEx.valueSplit)),
(r[o] = t),
(a = r.join(" "))
);
}
return i;
},
},
Normalizations: {
registered: {
clip: function (e, t, i) {
switch (e) {
case "name":
return "clip";
case "extract":
var n;
return (
x.RegEx.wrappedValueAlreadyExtracted.test(i)
? (n = i)
: ((n = i.toString().match(x.RegEx.valueUnwrap)),
(n = n ? n[1].replace(/,(\s+)?/g, " ") : i)),
n
);
case "inject":
return "rect(" + i + ")";
}
},
blur: function (e, t, i) {
switch (e) {
case "name":
return w.State.isFirefox ? "filter" : "-webkit-filter";
case "extract":
var n = parseFloat(i);
if (!n && 0 !== n) {
var r = i.toString().match(/blur\(([0-9]+[A-z]+)\)/i);
n = r ? r[1] : 0;
}
return n;
case "inject":
return parseFloat(i) ? "blur(" + i + ")" : "none";
}
},
opacity: function (e, t, i) {
if (8 >= f)
switch (e) {
case "name":
return "filter";
case "extract":
var n = i.toString().match(/alpha\(opacity=(.*)\)/i);
return (i = n ? n[1] / 100 : 1);
case "inject":
return (
(t.style.zoom = 1),
parseFloat(i) >= 1
? ""
: "alpha(opacity=" +
parseInt(100 * parseFloat(i), 10) +
")"
);
}
else
switch (e) {
case "name":
return "opacity";
case "extract":
return i;
case "inject":
return i;
}
},
},
register: function () {
9 >= f ||
w.State.isGingerbread ||
(x.Lists.transformsBase = x.Lists.transformsBase.concat(
x.Lists.transforms3D
));
for (var e = 0; e < x.Lists.transformsBase.length; e++)
!(function () {
var t = x.Lists.transformsBase[e];
x.Normalizations.registered[t] = function (e, i, r) {
switch (e) {
case "name":
return "transform";
case "extract":
return s(i) === n || s(i).transformCache[t] === n
? /^scale/i.test(t)
? 1
: 0
: s(i).transformCache[t].replace(/[()]/g, "");
case "inject":
var a = !1;
switch (t.substr(0, t.length - 1)) {
case "translate":
a = !/(%|px|em|rem|vw|vh|\d)$/i.test(r);
break;
case "scal":
case "scale":
w.State.isAndroid &&
s(i).transformCache[t] === n &&
1 > r &&
(r = 1),
(a = !/(\d)$/i.test(r));
break;
case "skew":
a = !/(deg|\d)$/i.test(r);
break;
case "rotate":
a = !/(deg|\d)$/i.test(r);
}
return (
a || (s(i).transformCache[t] = "(" + r + ")"),
s(i).transformCache[t]
);
}
};
})();
for (var e = 0; e < x.Lists.colors.length; e++)
!(function () {
var t = x.Lists.colors[e];
x.Normalizations.registered[t] = function (e, i, r) {
switch (e) {
case "name":
return t;
case "extract":
var a;
if (x.RegEx.wrappedValueAlreadyExtracted.test(r))
a = r;
else {
var s,
o = {
black: "rgb(0, 0, 0)",
blue: "rgb(0, 0, 255)",
gray: "rgb(128, 128, 128)",
green: "rgb(0, 128, 0)",
red: "rgb(255, 0, 0)",
white: "rgb(255, 255, 255)",
};
/^[A-z]+$/i.test(r)
? (s = o[r] !== n ? o[r] : o.black)
: x.RegEx.isHex.test(r)
? (s =
"rgb(" +
x.Values.hexToRgb(r).join(" ") +
")")
: /^rgba?\(/i.test(r) || (s = o.black),
(a = (s || r)
.toString()
.match(x.RegEx.valueUnwrap)[1]
.replace(/,(\s+)?/g, " "));
}
return (
8 >= f ||
3 !== a.split(" ").length ||
(a += " 1"),
a
);
case "inject":
return (
8 >= f
? 4 === r.split(" ").length &&
(r = r.split(/\s+/).slice(0, 3).join(" "))
: 3 === r.split(" ").length && (r += " 1"),
(8 >= f ? "rgb" : "rgba") +
"(" +
r
.replace(/\s+/g, ",")
.replace(/\.(\d)+(?=,)/g, "") +
")"
);
}
};
})();
},
},
Names: {
camelCase: function (e) {
return e.replace(/-(\w)/g, function (e, t) {
return t.toUpperCase();
});
},
SVGAttribute: function (e) {
var t = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";
return (
(f || (w.State.isAndroid && !w.State.isChrome)) &&
(t += "|transform"),
new RegExp("^(" + t + ")$", "i").test(e)
);
},
prefixCheck: function (e) {
if (w.State.prefixMatches[e])
return [w.State.prefixMatches[e], !0];
for (
var t = ["", "Webkit", "Moz", "ms", "O"],
i = 0,
n = t.length;
n > i;
i++
) {
var r;
if (
((r =
0 === i
? e
: t[i] +
e.replace(/^\w/, function (e) {
return e.toUpperCase();
})),
m.isString(w.State.prefixElement.style[r]))
)
return (w.State.prefixMatches[e] = r), [r, !0];
}
return [e, !1];
},
},
Values: {
hexToRgb: function (e) {
var t,
i = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
return (
(e = e.replace(i, function (e, t, i, n) {
return t + t + i + i + n + n;
})),
(t = n.exec(e)),
t
? [
parseInt(t[1], 16),
parseInt(t[2], 16),
parseInt(t[3], 16),
]
: [0, 0, 0]
);
},
isCSSNullValue: function (e) {
return (
0 == e ||
/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)
);
},
getUnitType: function (e) {
return /^(rotate|skew)/i.test(e)
? "deg"
: /(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(
e
)
? ""
: "px";
},
getDisplayType: function (e) {
var t = e && e.tagName.toString().toLowerCase();
return /^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(
t
)
? "inline"
: /^(li)$/i.test(t)
? "list-item"
: /^(tr)$/i.test(t)
? "table-row"
: /^(table)$/i.test(t)
? "table"
: /^(tbody)$/i.test(t)
? "table-row-group"
: "block";
},
addClass: function (e, t) {
e.classList
? e.classList.add(t)
: (e.className += (e.className.length ? " " : "") + t);
},
removeClass: function (e, t) {
e.classList
? e.classList.remove(t)
: (e.className = e.className
.toString()
.replace(
new RegExp(
"(^|\\s)" + t.split(" ").join("|") + "(\\s|$)",
"gi"
),
" "
));
},
},
getPropertyValue: function (e, i, r, a) {
function o(e, i) {
function r() {
d && x.setPropertyValue(e, "display", "none");
}
var l = 0;
if (8 >= f) l = p.css(e, i);
else {
var d = !1;
if (
(/^(width|height)$/.test(i) &&
0 === x.getPropertyValue(e, "display") &&
((d = !0),
x.setPropertyValue(
e,
"display",
x.Values.getDisplayType(e)
)),
!a)
) {
if (
"height" === i &&
"border-box" !==
x
.getPropertyValue(e, "boxSizing")
.toString()
.toLowerCase()
) {
var u =
e.offsetHeight -
(parseFloat(
x.getPropertyValue(e, "borderTopWidth")
) || 0) -
(parseFloat(
x.getPropertyValue(e, "borderBottomWidth")
) || 0) -
(parseFloat(x.getPropertyValue(e, "paddingTop")) ||
0) -
(parseFloat(x.getPropertyValue(e, "paddingBottom")) ||
0);
return r(), u;
}
if (
"width" === i &&
"border-box" !==
x
.getPropertyValue(e, "boxSizing")
.toString()
.toLowerCase()
) {
var c =
e.offsetWidth -
(parseFloat(
x.getPropertyValue(e, "borderLeftWidth")
) || 0) -
(parseFloat(
x.getPropertyValue(e, "borderRightWidth")
) || 0) -
(parseFloat(x.getPropertyValue(e, "paddingLeft")) ||
0) -
(parseFloat(x.getPropertyValue(e, "paddingRight")) ||
0);
return r(), c;
}
}
var h;
(h =
s(e) === n
? t.getComputedStyle(e, null)
: s(e).computedStyle
? s(e).computedStyle
: (s(e).computedStyle = t.getComputedStyle(e, null))),
"borderColor" === i && (i = "borderTopColor"),
(l =
9 === f && "filter" === i
? h.getPropertyValue(i)
: h[i]),
("" === l || null === l) && (l = e.style[i]),
r();
}
if ("auto" === l && /^(top|right|bottom|left)$/i.test(i)) {
var m = o(e, "position");
("fixed" === m ||
("absolute" === m && /top|left/i.test(i))) &&
(l = p(e).position()[i] + "px");
}
return l;
}
var l;
if (x.Hooks.registered[i]) {
var d = i,
u = x.Hooks.getRoot(d);
r === n &&
(r = x.getPropertyValue(e, x.Names.prefixCheck(u)[0])),
x.Normalizations.registered[u] &&
(r = x.Normalizations.registered[u]("extract", e, r)),
(l = x.Hooks.extractValue(d, r));
} else if (x.Normalizations.registered[i]) {
var c, h;
(c = x.Normalizations.registered[i]("name", e)),
"transform" !== c &&
((h = o(e, x.Names.prefixCheck(c)[0])),
x.Values.isCSSNullValue(h) &&
x.Hooks.templates[i] &&
(h = x.Hooks.templates[i][1])),
(l = x.Normalizations.registered[i]("extract", e, h));
}
if (!/^[\d-]/.test(l))
if (s(e) && s(e).isSVG && x.Names.SVGAttribute(i))
if (/^(height|width)$/i.test(i))
try {
l = e.getBBox()[i];
} catch (m) {
l = 0;
}
else l = e.getAttribute(i);
else l = o(e, x.Names.prefixCheck(i)[0]);
return (
x.Values.isCSSNullValue(l) && (l = 0),
w.debug >= 2 && console.log("Get " + i + ": " + l),
l
);
},
setPropertyValue: function (e, i, n, r, a) {
var o = i;
if ("scroll" === i)
a.container
? (a.container["scroll" + a.direction] = n)
: "Left" === a.direction
? t.scrollTo(n, a.alternateValue)
: t.scrollTo(a.alternateValue, n);
else if (
x.Normalizations.registered[i] &&
"transform" === x.Normalizations.registered[i]("name", e)
)
x.Normalizations.registered[i]("inject", e, n),
(o = "transform"),
(n = s(e).transformCache[i]);
else {
if (x.Hooks.registered[i]) {
var l = i,
d = x.Hooks.getRoot(i);
(r = r || x.getPropertyValue(e, d)),
(n = x.Hooks.injectValue(l, n, r)),
(i = d);
}
if (
(x.Normalizations.registered[i] &&
((n = x.Normalizations.registered[i]("inject", e, n)),
(i = x.Normalizations.registered[i]("name", e))),
(o = x.Names.prefixCheck(i)[0]),
8 >= f)
)
try {
e.style[o] = n;
} catch (u) {
w.debug &&
console.log(
"Browser does not support [" + n + "] for [" + o + "]"
);
}
else
s(e) && s(e).isSVG && x.Names.SVGAttribute(i)
? e.setAttribute(i, n)
: (e.style[o] = n);
w.debug >= 2 &&
console.log("Set " + i + " (" + o + "): " + n);
}
return [o, n];
},
flushTransformCache: function (e) {
function t(t) {
return parseFloat(x.getPropertyValue(e, t));
}
var i = "";
if (
(f || (w.State.isAndroid && !w.State.isChrome)) &&
s(e).isSVG
) {
var n = {
translate: [t("translateX"), t("translateY")],
skewX: [t("skewX")],
skewY: [t("skewY")],
scale:
1 !== t("scale")
? [t("scale"), t("scale")]
: [t("scaleX"), t("scaleY")],
rotate: [t("rotateZ"), 0, 0],
};
p.each(s(e).transformCache, function (e) {
/^translate/i.test(e)
? (e = "translate")
: /^scale/i.test(e)
? (e = "scale")
: /^rotate/i.test(e) && (e = "rotate"),
n[e] &&
((i += e + "(" + n[e].join(" ") + ") "), delete n[e]);
});
} else {
var r, a;
p.each(s(e).transformCache, function (t) {
return (
(r = s(e).transformCache[t]),
"transformPerspective" === t
? ((a = r), !0)
: (9 === f && "rotateZ" === t && (t = "rotate"),
void (i += t + r + " "))
);
}),
a && (i = "perspective" + a + " " + i);
}
x.setPropertyValue(e, "transform", i);
},
});
x.Hooks.register(),
x.Normalizations.register(),
(w.hook = function (e, t, i) {
var r = n;
return (
(e = a(e)),
p.each(e, function (e, a) {
if ((s(a) === n && w.init(a), i === n))
r === n && (r = w.CSS.getPropertyValue(a, t));
else {
var o = w.CSS.setPropertyValue(a, t, i);
"transform" === o[0] && w.CSS.flushTransformCache(a),
(r = o);
}
}),
r
);
});
var C = function () {
function e() {
return o ? E.promise || null : l;
}
function r() {
function e(e) {
function c(e, t) {
var i = n,
r = n,
s = n;
return (
m.isArray(e)
? ((i = e[0]),
(!m.isArray(e[1]) && /^[\d-]/.test(e[1])) ||
m.isFunction(e[1]) ||
x.RegEx.isHex.test(e[1])
? (s = e[1])
: ((m.isString(e[1]) &&
!x.RegEx.isHex.test(e[1])) ||
m.isArray(e[1])) &&
((r = t ? e[1] : d(e[1], o.duration)),
e[2] !== n && (s = e[2])))
: (i = e),
t || (r = r || o.easing),
m.isFunction(i) && (i = i.call(a, k, T)),
m.isFunction(s) && (s = s.call(a, k, T)),
[i || 0, r, s]
);
}
function f(e, t) {
var i, n;
return (
(n = (t || "0")
.toString()
.toLowerCase()
.replace(/[%A-z]+$/, function (e) {
return (i = e), "";
})),
i || (i = x.Values.getUnitType(e)),
[n, i]
);
}
function v() {
var e = {
myParent: a.parentNode || i.body,
position: x.getPropertyValue(a, "position"),
fontSize: x.getPropertyValue(a, "fontSize"),
},
n =
e.position === M.lastPosition &&
e.myParent === M.lastParent,
r = e.fontSize === M.lastFontSize;
(M.lastParent = e.myParent),
(M.lastPosition = e.position),
(M.lastFontSize = e.fontSize);
var o = 100,
l = {};
if (r && n)
(l.emToPx = M.lastEmToPx),
(l.percentToPxWidth = M.lastPercentToPxWidth),
(l.percentToPxHeight = M.lastPercentToPxHeight);
else {
var d = s(a).isSVG
? i.createElementNS(
"http://www.w3.org/2000/svg",
"rect"
)
: i.createElement("div");
w.init(d),
e.myParent.appendChild(d),
p.each(
["overflow", "overflowX", "overflowY"],
function (e, t) {
w.CSS.setPropertyValue(d, t, "hidden");
}
),
w.CSS.setPropertyValue(d, "position", e.position),
w.CSS.setPropertyValue(d, "fontSize", e.fontSize),
w.CSS.setPropertyValue(d, "boxSizing", "content-box"),
p.each(
[
"minWidth",
"maxWidth",
"width",
"minHeight",
"maxHeight",
"height",
],
function (e, t) {
w.CSS.setPropertyValue(d, t, o + "%");
}
),
w.CSS.setPropertyValue(d, "paddingLeft", o + "em"),
(l.percentToPxWidth = M.lastPercentToPxWidth =
(parseFloat(
x.getPropertyValue(d, "width", null, !0)
) || 1) / o),
(l.percentToPxHeight = M.lastPercentToPxHeight =
(parseFloat(
x.getPropertyValue(d, "height", null, !0)
) || 1) / o),
(l.emToPx = M.lastEmToPx =
(parseFloat(x.getPropertyValue(d, "paddingLeft")) ||
1) / o),
e.myParent.removeChild(d);
}
return (
null === M.remToPx &&
(M.remToPx =
parseFloat(x.getPropertyValue(i.body, "fontSize")) ||
16),
null === M.vwToPx &&
((M.vwToPx = parseFloat(t.innerWidth) / 100),
(M.vhToPx = parseFloat(t.innerHeight) / 100)),
(l.remToPx = M.remToPx),
(l.vwToPx = M.vwToPx),
(l.vhToPx = M.vhToPx),
w.debug >= 1 &&
console.log("Unit ratios: " + JSON.stringify(l), a),
l
);
}
if (o.begin && 0 === k)
try {
o.begin.call(h, h);
} catch (b) {
setTimeout(function () {
throw b;
}, 1);
}
if ("scroll" === P) {
var C,
S,
F,
O = /^x$/i.test(o.axis) ? "Left" : "Top",
A = parseFloat(o.offset) || 0;
o.container
? m.isWrapped(o.container) || m.isNode(o.container)
? ((o.container = o.container[0] || o.container),
(C = o.container["scroll" + O]),
(F = C + p(a).position()[O.toLowerCase()] + A))
: (o.container = null)
: ((C =
w.State.scrollAnchor[w.State["scrollProperty" + O]]),
(S =
w.State.scrollAnchor[
w.State[
"scrollProperty" + ("Left" === O ? "Top" : "Left")
]
]),
(F = p(a).offset()[O.toLowerCase()] + A)),
(l = {
scroll: {
rootPropertyValue: !1,
startValue: C,
currentValue: C,
endValue: F,
unitType: "",
easing: o.easing,
scrollData: {
container: o.container,
direction: O,
alternateValue: S,
},
},
element: a,
}),
w.debug &&
console.log("tweensContainer (scroll): ", l.scroll, a);
} else if ("reverse" === P) {
if (!s(a).tweensContainer)
return void p.dequeue(a, o.queue);
"none" === s(a).opts.display &&
(s(a).opts.display = "auto"),
"hidden" === s(a).opts.visibility &&
(s(a).opts.visibility = "visible"),
(s(a).opts.loop = !1),
(s(a).opts.begin = null),
(s(a).opts.complete = null),
y.easing || delete o.easing,
y.duration || delete o.duration,
(o = p.extend({}, s(a).opts, o));
var $ = p.extend(!0, {}, s(a).tweensContainer);
for (var I in $)
if ("element" !== I) {
var z = $[I].startValue;
($[I].startValue = $[I].currentValue = $[I].endValue),
($[I].endValue = z),
m.isEmptyObject(y) || ($[I].easing = o.easing),
w.debug &&
console.log(
"reverse tweensContainer (" +
I +
"): " +
JSON.stringify($[I]),
a
);
}
l = $;
} else if ("start" === P) {
var $;
s(a).tweensContainer &&
s(a).isAnimating === !0 &&
($ = s(a).tweensContainer),
p.each(g, function (e, t) {
if (
RegExp("^" + x.Lists.colors.join("$|^") + "$").test(e)
) {
var i = c(t, !0),
r = i[0],
a = i[1],
s = i[2];
if (x.RegEx.isHex.test(r)) {
for (
var o = ["Red", "Green", "Blue"],
l = x.Values.hexToRgb(r),
d = s ? x.Values.hexToRgb(s) : n,
u = 0;
u < o.length;
u++
) {
var p = [l[u]];
a && p.push(a),
d !== n && p.push(d[u]),
(g[e + o[u]] = p);
}
delete g[e];
}
}
});
for (var _ in g) {
var L = c(g[_]),
N = L[0],
q = L[1],
R = L[2];
_ = x.Names.camelCase(_);
var j = x.Hooks.getRoot(_),
H = !1;
if (
s(a).isSVG ||
"tween" === j ||
x.Names.prefixCheck(j)[1] !== !1 ||
x.Normalizations.registered[j] !== n
) {
((o.display !== n &&
null !== o.display &&
"none" !== o.display) ||
(o.visibility !== n && "hidden" !== o.visibility)) &&
/opacity|filter/.test(_) &&
!R &&
0 !== N &&
(R = 0),
o._cacheValues && $ && $[_]
? (R === n && (R = $[_].endValue + $[_].unitType),
(H = s(a).rootPropertyValueCache[j]))
: x.Hooks.registered[_]
? R === n
? ((H = x.getPropertyValue(a, j)),
(R = x.getPropertyValue(a, _, H)))
: (H = x.Hooks.templates[j][1])
: R === n && (R = x.getPropertyValue(a, _));
var B,
V,
W,
X = !1;
if (
((B = f(_, R)),
(R = B[0]),
(W = B[1]),
(B = f(_, N)),
(N = B[0].replace(/^([+-\/*])=/, function (e, t) {
return (X = t), "";
})),
(V = B[1]),
(R = parseFloat(R) || 0),
(N = parseFloat(N) || 0),
"%" === V &&
(/^(fontSize|lineHeight)$/.test(_)
? ((N /= 100), (V = "em"))
: /^scale/.test(_)
? ((N /= 100), (V = ""))
: /(Red|Green|Blue)$/i.test(_) &&
((N = (N / 100) * 255), (V = ""))),
/[\/*]/.test(X))
)
V = W;
else if (W !== V && 0 !== R)
if (0 === N) V = W;
else {
r = r || v();
var G =
/margin|padding|left|right|width|text|word|letter/i.test(
_
) ||
/X$/.test(_) ||
"x" === _
? "x"
: "y";
switch (W) {
case "%":
R *=
"x" === G
? r.percentToPxWidth
: r.percentToPxHeight;
break;
case "px":
break;
default:
R *= r[W + "ToPx"];
}
switch (V) {
case "%":
R *=
1 /
("x" === G
? r.percentToPxWidth
: r.percentToPxHeight);
break;
case "px":
break;
default:
R *= 1 / r[V + "ToPx"];
}
}
switch (X) {
case "+":
N = R + N;
break;
case "-":
N = R - N;
break;
case "*":
N = R * N;
break;
case "/":
N = R / N;
}
(l[_] = {
rootPropertyValue: H,
startValue: R,
currentValue: R,
endValue: N,
unitType: V,
easing: q,
}),
w.debug &&
console.log(
"tweensContainer (" +
_ +
"): " +
JSON.stringify(l[_]),
a
);
} else
w.debug &&
console.log(
"Skipping [" +
j +
"] due to a lack of browser support."
);
}
l.element = a;
}
l.element &&
(x.Values.addClass(a, "velocity-animating"),
D.push(l),
"" === o.queue &&
((s(a).tweensContainer = l), (s(a).opts = o)),
(s(a).isAnimating = !0),
k === T - 1
? (w.State.calls.push([D, h, o, null, E.resolver]),
w.State.isTicking === !1 &&
((w.State.isTicking = !0), u()))
: k++);
}
var r,
a = this,
o = p.extend({}, w.defaults, y),
l = {};
switch (
(s(a) === n && w.init(a),
parseFloat(o.delay) &&
o.queue !== !1 &&
p.queue(a, o.queue, function (e) {
(w.velocityQueueEntryFlag = !0),
(s(a).delayTimer = {
setTimeout: setTimeout(e, parseFloat(o.delay)),
next: e,
});
}),
o.duration.toString().toLowerCase())
) {
case "fast":
o.duration = 200;
break;
case "normal":
o.duration = v;
break;
case "slow":
o.duration = 600;
break;
default:
o.duration = parseFloat(o.duration) || 1;
}
w.mock !== !1 &&
(w.mock === !0
? (o.duration = o.delay = 1)
: ((o.duration *= parseFloat(w.mock) || 1),
(o.delay *= parseFloat(w.mock) || 1))),
(o.easing = d(o.easing, o.duration)),
o.begin && !m.isFunction(o.begin) && (o.begin = null),
o.progress &&
!m.isFunction(o.progress) &&
(o.progress = null),
o.complete &&
!m.isFunction(o.complete) &&
(o.complete = null),
o.display !== n &&
null !== o.display &&
((o.display = o.display.toString().toLowerCase()),
"auto" === o.display &&
(o.display = w.CSS.Values.getDisplayType(a))),
o.visibility !== n &&
null !== o.visibility &&
(o.visibility = o.visibility.toString().toLowerCase()),
(o.mobileHA =
o.mobileHA && w.State.isMobile && !w.State.isGingerbread),
o.queue === !1
? o.delay
? setTimeout(e, o.delay)
: e()
: p.queue(a, o.queue, function (t, i) {
return i === !0
? (E.promise && E.resolver(h), !0)
: ((w.velocityQueueEntryFlag = !0), void e(t));
}),
("" !== o.queue && "fx" !== o.queue) ||
"inprogress" === p.queue(a)[0] ||
p.dequeue(a);
}
var o,
l,
f,
h,
g,
y,
b =
arguments[0] &&
(arguments[0].p ||
(p.isPlainObject(arguments[0].properties) &&
!arguments[0].properties.names) ||
m.isString(arguments[0].properties));
if (
(m.isWrapped(this)
? ((o = !1), (f = 0), (h = this), (l = this))
: ((o = !0),
(f = 1),
(h = b
? arguments[0].elements || arguments[0].e
: arguments[0])),
(h = a(h)))
) {
b
? ((g = arguments[0].properties || arguments[0].p),
(y = arguments[0].options || arguments[0].o))
: ((g = arguments[f]), (y = arguments[f + 1]));
var T = h.length,
k = 0;
if (!/^(stop|finish)$/i.test(g) && !p.isPlainObject(y)) {
var S = f + 1;
y = {};
for (var F = S; F < arguments.length; F++)
m.isArray(arguments[F]) ||
(!/^(fast|normal|slow)$/i.test(arguments[F]) &&
!/^\d/.test(arguments[F]))
? m.isString(arguments[F]) || m.isArray(arguments[F])
? (y.easing = arguments[F])
: m.isFunction(arguments[F]) &&
(y.complete = arguments[F])
: (y.duration = arguments[F]);
}
var E = {
promise: null,
resolver: null,
rejecter: null,
};
o &&
w.Promise &&
(E.promise = new w.Promise(function (e, t) {
(E.resolver = e), (E.rejecter = t);
}));
var P;
switch (g) {
case "scroll":
P = "scroll";
break;
case "reverse":
P = "reverse";
break;
case "finish":
case "stop":
p.each(h, function (e, t) {
s(t) &&
s(t).delayTimer &&
(clearTimeout(s(t).delayTimer.setTimeout),
s(t).delayTimer.next && s(t).delayTimer.next(),
delete s(t).delayTimer);
});
var O = [];
return (
p.each(w.State.calls, function (e, t) {
t &&
p.each(t[1], function (i, r) {
var a = y === n ? "" : y;
return a === !0 ||
t[2].queue === a ||
(y === n && t[2].queue === !1)
? void p.each(h, function (i, n) {
n === r &&
((y === !0 || m.isString(y)) &&
(p.each(
p.queue(n, m.isString(y) ? y : ""),
function (e, t) {
m.isFunction(t) && t(null, !0);
}
),
p.queue(n, m.isString(y) ? y : "", [])),
"stop" === g
? (s(n) &&
s(n).tweensContainer &&
a !== !1 &&
p.each(
s(n).tweensContainer,
function (e, t) {
t.endValue = t.currentValue;
}
),
O.push(e))
: "finish" === g && (t[2].duration = 1));
})
: !0;
});
}),
"stop" === g &&
(p.each(O, function (e, t) {
c(t, !0);
}),
E.promise && E.resolver(h)),
e()
);
default:
if (!p.isPlainObject(g) || m.isEmptyObject(g)) {
if (m.isString(g) && w.Redirects[g]) {
var A = p.extend({}, y),
$ = A.duration,
I = A.delay || 0;
return (
A.backwards === !0 &&
(h = p.extend(!0, [], h).reverse()),
p.each(h, function (e, t) {
parseFloat(A.stagger)
? (A.delay = I + parseFloat(A.stagger) * e)
: m.isFunction(A.stagger) &&
(A.delay = I + A.stagger.call(t, e, T)),
A.drag &&
((A.duration =
parseFloat($) ||
(/^(callout|transition)/.test(g) ? 1e3 : v)),
(A.duration = Math.max(
A.duration *
(A.backwards ? 1 - e / T : (e + 1) / T),
0.75 * A.duration,
200
))),
w.Redirects[g].call(
t,
t,
A || {},
e,
T,
h,
E.promise ? E : n
);
}),
e()
);
}
var z =
"Velocity: First argument (" +
g +
") was not a property map, a known action, or a registered redirect. Aborting.";
return (
E.promise ? E.rejecter(new Error(z)) : console.log(z),
e()
);
}
P = "start";
}
var M = {
lastParent: null,
lastPosition: null,
lastFontSize: null,
lastPercentToPxWidth: null,
lastPercentToPxHeight: null,
lastEmToPx: null,
remToPx: null,
vwToPx: null,
vhToPx: null,
},
D = [];
p.each(h, function (e, t) {
m.isNode(t) && r.call(t);
});
var _,
A = p.extend({}, w.defaults, y);
if (((A.loop = parseInt(A.loop)), (_ = 2 * A.loop - 1), A.loop))
for (var L = 0; _ > L; L++) {
var N = {
delay: A.delay,
progress: A.progress,
};
L === _ - 1 &&
((N.display = A.display),
(N.visibility = A.visibility),
(N.complete = A.complete)),
C(h, "reverse", N);
}
return e();
}
};
(w = p.extend(C, w)), (w.animate = C);
var T = t.requestAnimationFrame || h;
return (
w.State.isMobile ||
i.hidden === n ||
i.addEventListener("visibilitychange", function () {
i.hidden
? ((T = function (e) {
return setTimeout(function () {
e(!0);
}, 16);
}),
u())
: (T = t.requestAnimationFrame || h);
}),
(e.Velocity = w),
e !== t &&
((e.fn.velocity = C), (e.fn.velocity.defaults = w.defaults)),
p.each(["Down", "Up"], function (e, t) {
w.Redirects["slide" + t] = function (e, i, r, a, s, o) {
var l = p.extend({}, i),
d = l.begin,
u = l.complete,
c = {
height: "",
marginTop: "",
marginBottom: "",
paddingTop: "",
paddingBottom: "",
},
f = {};
l.display === n &&
(l.display =
"Down" === t
? "inline" === w.CSS.Values.getDisplayType(e)
? "inline-block"
: "block"
: "none"),
(l.begin = function () {
d && d.call(s, s);
for (var i in c) {
f[i] = e.style[i];
var n = w.CSS.getPropertyValue(e, i);
c[i] = "Down" === t ? [n, 0] : [0, n];
}
(f.overflow = e.style.overflow),
(e.style.overflow = "hidden");
}),
(l.complete = function () {
for (var t in f) e.style[t] = f[t];
u && u.call(s, s), o && o.resolver(s);
}),
w(e, c, l);
};
}),
p.each(["In", "Out"], function (e, t) {
w.Redirects["fade" + t] = function (e, i, r, a, s, o) {
var l = p.extend({}, i),
d = {
opacity: "In" === t ? 1 : 0,
},
u = l.complete;
(l.complete =
r !== a - 1
? (l.begin = null)
: function () {
u && u.call(s, s), o && o.resolver(s);
}),
l.display === n &&
(l.display = "In" === t ? "auto" : "none"),
w(this, d, l);
};
}),
w
);
})(window.jQuery || window.Zepto || window, window, document);
})),
!(function (e, t, i, n) {
"use strict";
function r(e, t, i) {
return setTimeout(u(e, i), t);
}
function a(e, t, i) {
return Array.isArray(e) ? (s(e, i[t], i), !0) : !1;
}
function s(e, t, i) {
var r;
if (e)
if (e.forEach) e.forEach(t, i);
else if (e.length !== n)
for (r = 0; r < e.length; ) t.call(i, e[r], r, e), r++;
else for (r in e) e.hasOwnProperty(r) && t.call(i, e[r], r, e);
}
function o(e, t, i) {
for (var r = Object.keys(t), a = 0; a < r.length; )
(!i || (i && e[r[a]] === n)) && (e[r[a]] = t[r[a]]), a++;
return e;
}
function l(e, t) {
return o(e, t, !0);
}
function d(e, t, i) {
var n,
r = t.prototype;
(n = e.prototype = Object.create(r)),
(n.constructor = e),
(n._super = r),
i && o(n, i);
}
function u(e, t) {
return function () {
return e.apply(t, arguments);
};
}
function c(e, t) {
return typeof e == ue ? e.apply(t ? t[0] || n : n, t) : e;
}
function p(e, t) {
return e === n ? t : e;
}
function f(e, t, i) {
s(v(t), function (t) {
e.addEventListener(t, i, !1);
});
}
function h(e, t, i) {
s(v(t), function (t) {
e.removeEventListener(t, i, !1);
});
}
function m(e, t) {
for (; e; ) {
if (e == t) return !0;
e = e.parentNode;
}
return !1;
}
function g(e, t) {
return e.indexOf(t) > -1;
}
function v(e) {
return e.trim().split(/\s+/g);
}
function y(e, t, i) {
if (e.indexOf && !i) return e.indexOf(t);
for (var n = 0; n < e.length; ) {
if ((i && e[n][i] == t) || (!i && e[n] === t)) return n;
n++;
}
return -1;
}
function w(e) {
return Array.prototype.slice.call(e, 0);
}
function b(e, t, i) {
for (var n = [], r = [], a = 0; a < e.length; ) {
var s = t ? e[a][t] : e[a];
y(r, s) < 0 && n.push(e[a]), (r[a] = s), a++;
}
return (
i &&
(n = t
? n.sort(function (e, i) {
return e[t] > i[t];
})
: n.sort()),
n
);
}
function x(e, t) {
for (
var i, r, a = t[0].toUpperCase() + t.slice(1), s = 0;
s < le.length;
) {
if (((i = le[s]), (r = i ? i + a : t), r in e)) return r;
s++;
}
return n;
}
function C() {
return he++;
}
function T(e) {
var t = e.ownerDocument;
return t.defaultView || t.parentWindow;
}
function k(e, t) {
var i = this;
(this.manager = e),
(this.callback = t),
(this.element = e.element),
(this.target = e.options.inputTarget),
(this.domHandler = function (t) {
c(e.options.enable, [e]) && i.handler(t);
}),
this.init();
}
function S(e) {
var t,
i = e.options.inputClass;
return new (t = i ? i : ve ? q : ye ? H : ge ? V : N)(e, F);
}
function F(e, t, i) {
var n = i.pointers.length,
r = i.changedPointers.length,
a = t & ke && 0 === n - r,
s = t & (Fe | Ee) && 0 === n - r;
(i.isFirst = !!a),
(i.isFinal = !!s),
a && (e.session = {}),
(i.eventType = t),
E(e, i),
e.emit("hammer.input", i),
e.recognize(i),
(e.session.prevInput = i);
}
function E(e, t) {
var i = e.session,
n = t.pointers,
r = n.length;
i.firstInput || (i.firstInput = A(t)),
r > 1 && !i.firstMultiple
? (i.firstMultiple = A(t))
: 1 === r && (i.firstMultiple = !1);
var a = i.firstInput,
s = i.firstMultiple,
o = s ? s.center : a.center,
l = (t.center = $(n));
(t.timeStamp = fe()),
(t.deltaTime = t.timeStamp - a.timeStamp),
(t.angle = D(o, l)),
(t.distance = M(o, l)),
P(i, t),
(t.offsetDirection = z(t.deltaX, t.deltaY)),
(t.scale = s ? L(s.pointers, n) : 1),
(t.rotation = s ? _(s.pointers, n) : 0),
O(i, t);
var d = e.element;
m(t.srcEvent.target, d) && (d = t.srcEvent.target), (t.target = d);
}
function P(e, t) {
var i = t.center,
n = e.offsetDelta || {},
r = e.prevDelta || {},
a = e.prevInput || {};
(t.eventType === ke || a.eventType === Fe) &&
((r = e.prevDelta =
{
x: a.deltaX || 0,
y: a.deltaY || 0,
}),
(n = e.offsetDelta =
{
x: i.x,
y: i.y,
})),
(t.deltaX = r.x + (i.x - n.x)),
(t.deltaY = r.y + (i.y - n.y));
}
function O(e, t) {
var i,
r,
a,
s,
o = e.lastInterval || t,
l = t.timeStamp - o.timeStamp;
if (t.eventType != Ee && (l > Te || o.velocity === n)) {
var d = o.deltaX - t.deltaX,
u = o.deltaY - t.deltaY,
c = I(l, d, u);
(r = c.x),
(a = c.y),
(i = pe(c.x) > pe(c.y) ? c.x : c.y),
(s = z(d, u)),
(e.lastInterval = t);
} else
(i = o.velocity),
(r = o.velocityX),
(a = o.velocityY),
(s = o.direction);
(t.velocity = i),
(t.velocityX = r),
(t.velocityY = a),
(t.direction = s);
}
function A(e) {
for (var t = [], i = 0; i < e.pointers.length; )
(t[i] = {
clientX: ce(e.pointers[i].clientX),
clientY: ce(e.pointers[i].clientY),
}),
i++;
return {
timeStamp: fe(),
pointers: t,
center: $(t),
deltaX: e.deltaX,
deltaY: e.deltaY,
};
}
function $(e) {
var t = e.length;
if (1 === t)
return {
x: ce(e[0].clientX),
y: ce(e[0].clientY),
};
for (var i = 0, n = 0, r = 0; t > r; )
(i += e[r].clientX), (n += e[r].clientY), r++;
return {
x: ce(i / t),
y: ce(n / t),
};
}
function I(e, t, i) {
return {
x: t / e || 0,
y: i / e || 0,
};
}
function z(e, t) {
return e === t
? Pe
: pe(e) >= pe(t)
? e > 0
? Oe
: Ae
: t > 0
? $e
: Ie;
}
function M(e, t, i) {
i || (i = _e);
var n = t[i[0]] - e[i[0]],
r = t[i[1]] - e[i[1]];
return Math.sqrt(n * n + r * r);
}
function D(e, t, i) {
i || (i = _e);
var n = t[i[0]] - e[i[0]],
r = t[i[1]] - e[i[1]];
return (180 * Math.atan2(r, n)) / Math.PI;
}
function _(e, t) {
return D(t[1], t[0], Le) - D(e[1], e[0], Le);
}
function L(e, t) {
return M(t[0], t[1], Le) / M(e[0], e[1], Le);
}
function N() {
(this.evEl = qe),
(this.evWin = Re),
(this.allow = !0),
(this.pressed = !1),
k.apply(this, arguments);
}
function q() {
(this.evEl = Be),
(this.evWin = Ve),
k.apply(this, arguments),
(this.store = this.manager.session.pointerEvents = []);
}
function R() {
(this.evTarget = Xe),
(this.evWin = Ge),
(this.started = !1),
k.apply(this, arguments);
}
function j(e, t) {
var i = w(e.touches),
n = w(e.changedTouches);
return t & (Fe | Ee) && (i = b(i.concat(n), "identifier", !0)), [i, n];
}
function H() {
(this.evTarget = Ue), (this.targetIds = {}), k.apply(this, arguments);
}
function B(e, t) {
var i = w(e.touches),
n = this.targetIds;
if (t & (ke | Se) && 1 === i.length)
return (n[i[0].identifier] = !0), [i, i];
var r,
a,
s = w(e.changedTouches),
o = [],
l = this.target;
if (
((a = i.filter(function (e) {
return m(e.target, l);
})),
t === ke)
)
for (r = 0; r < a.length; ) (n[a[r].identifier] = !0), r++;
for (r = 0; r < s.length; )
n[s[r].identifier] && o.push(s[r]),
t & (Fe | Ee) && delete n[s[r].identifier],
r++;
return o.length ? [b(a.concat(o), "identifier", !0), o] : void 0;
}
function V() {
k.apply(this, arguments);
var e = u(this.handler, this);
(this.touch = new H(this.manager, e)),
(this.mouse = new N(this.manager, e));
}
function W(e, t) {
(this.manager = e), this.set(t);
}
function X(e) {
if (g(e, tt)) return tt;
var t = g(e, it),
i = g(e, nt);
return t && i
? it + " " + nt
: t || i
? t
? it
: nt
: g(e, et)
? et
: Je;
}
function G(e) {
(this.id = C()),
(this.manager = null),
(this.options = l(e || {}, this.defaults)),
(this.options.enable = p(this.options.enable, !0)),
(this.state = rt),
(this.simultaneous = {}),
(this.requireFail = []);
}
function Q(e) {
return e & dt
? "cancel"
: e & ot
? "end"
: e & st
? "move"
: e & at
? "start"
: "";
}
function U(e) {
return e == Ie
? "down"
: e == $e
? "up"
: e == Oe
? "left"
: e == Ae
? "right"
: "";
}
function Y(e, t) {
var i = t.manager;
return i ? i.get(e) : e;
}
function K() {
G.apply(this, arguments);
}
function Z() {
K.apply(this, arguments), (this.pX = null), (this.pY = null);
}
function J() {
K.apply(this, arguments);
}
function ee() {
G.apply(this, arguments), (this._timer = null), (this._input = null);
}
function te() {
K.apply(this, arguments);
}
function ie() {
K.apply(this, arguments);
}
function ne() {
G.apply(this, arguments),
(this.pTime = !1),
(this.pCenter = !1),
(this._timer = null),
(this._input = null),
(this.count = 0);
}
function re(e, t) {
return (
(t = t || {}),
(t.recognizers = p(t.recognizers, re.defaults.preset)),
new ae(e, t)
);
}
function ae(e, t) {
(t = t || {}),
(this.options = l(t, re.defaults)),
(this.options.inputTarget = this.options.inputTarget || e),
(this.handlers = {}),
(this.session = {}),
(this.recognizers = []),
(this.element = e),
(this.input = S(this)),
(this.touchAction = new W(this, this.options.touchAction)),
se(this, !0),
s(
t.recognizers,
function (e) {
var t = this.add(new e[0](e[1]));
e[2] && t.recognizeWith(e[2]), e[3] && t.requireFailure(e[3]);
},
this
);
}
function se(e, t) {
var i = e.element;
s(e.options.cssProps, function (e, n) {
i.style[x(i.style, n)] = t ? e : "";
});
}
function oe(e, i) {
var n = t.createEvent("Event");
n.initEvent(e, !0, !0), (n.gesture = i), i.target.dispatchEvent(n);
}
var le = ["", "webkit", "moz", "MS", "ms", "o"],
de = t.createElement("div"),
ue = "function",
ce = Math.round,
pe = Math.abs,
fe = Date.now,
he = 1,
me = /mobile|tablet|ip(ad|hone|od)|android/i,
ge = "ontouchstart" in e,
ve = x(e, "PointerEvent") !== n,
ye = ge && me.test(navigator.userAgent),
we = "touch",
be = "pen",
xe = "mouse",
Ce = "kinect",
Te = 25,
ke = 1,
Se = 2,
Fe = 4,
Ee = 8,
Pe = 1,
Oe = 2,
Ae = 4,
$e = 8,
Ie = 16,
ze = Oe | Ae,
Me = $e | Ie,
De = ze | Me,
_e = ["x", "y"],
Le = ["clientX", "clientY"];
k.prototype = {
handler: function () {},
init: function () {
this.evEl && f(this.element, this.evEl, this.domHandler),
this.evTarget && f(this.target, this.evTarget, this.domHandler),
this.evWin && f(T(this.element), this.evWin, this.domHandler);
},
destroy: function () {
this.evEl && h(this.element, this.evEl, this.domHandler),
this.evTarget && h(this.target, this.evTarget, this.domHandler),
this.evWin && h(T(this.element), this.evWin, this.domHandler);
},
};
var Ne = {
mousedown: ke,
mousemove: Se,
mouseup: Fe,
},
qe = "mousedown",
Re = "mousemove mouseup";
d(N, k, {
handler: function (e) {
var t = Ne[e.type];
t & ke && 0 === e.button && (this.pressed = !0),
t & Se && 1 !== e.which && (t = Fe),
this.pressed &&
this.allow &&
(t & Fe && (this.pressed = !1),
this.callback(this.manager, t, {
pointers: [e],
changedPointers: [e],
pointerType: xe,
srcEvent: e,
}));
},
});
var je = {
pointerdown: ke,
pointermove: Se,
pointerup: Fe,
pointercancel: Ee,
pointerout: Ee,
},
He = {
2: we,
3: be,
4: xe,
5: Ce,
},
Be = "pointerdown",
Ve = "pointermove pointerup pointercancel";
e.MSPointerEvent &&
((Be = "MSPointerDown"),
(Ve = "MSPointerMove MSPointerUp MSPointerCancel")),
d(q, k, {
handler: function (e) {
var t = this.store,
i = !1,
n = e.type.toLowerCase().replace("ms", ""),
r = je[n],
a = He[e.pointerType] || e.pointerType,
s = a == we,
o = y(t, e.pointerId, "pointerId");
r & ke && (0 === e.button || s)
? 0 > o && (t.push(e), (o = t.length - 1))
: r & (Fe | Ee) && (i = !0),
0 > o ||
((t[o] = e),
this.callback(this.manager, r, {
pointers: t,
changedPointers: [e],
pointerType: a,
srcEvent: e,
}),
i && t.splice(o, 1));
},
});
var We = {
touchstart: ke,
touchmove: Se,
touchend: Fe,
touchcancel: Ee,
},
Xe = "touchstart",
Ge = "touchstart touchmove touchend touchcancel";
d(R, k, {
handler: function (e) {
var t = We[e.type];
if ((t === ke && (this.started = !0), this.started)) {
var i = j.call(this, e, t);
t & (Fe | Ee) &&
0 === i[0].length - i[1].length &&
(this.started = !1),
this.callback(this.manager, t, {
pointers: i[0],
changedPointers: i[1],
pointerType: we,
srcEvent: e,
});
}
},
});
var Qe = {
touchstart: ke,
touchmove: Se,
touchend: Fe,
touchcancel: Ee,
},
Ue = "touchstart touchmove touchend touchcancel";
d(H, k, {
handler: function (e) {
var t = Qe[e.type],
i = B.call(this, e, t);
i &&
this.callback(this.manager, t, {
pointers: i[0],
changedPointers: i[1],
pointerType: we,
srcEvent: e,
});
},
}),
d(V, k, {
handler: function (e, t, i) {
var n = i.pointerType == we,
r = i.pointerType == xe;
if (n) this.mouse.allow = !1;
else if (r && !this.mouse.allow) return;
t & (Fe | Ee) && (this.mouse.allow = !0), this.callback(e, t, i);
},
destroy: function () {
this.touch.destroy(), this.mouse.destroy();
},
});
var Ye = x(de.style, "touchAction"),
Ke = Ye !== n,
Ze = "compute",
Je = "auto",
et = "manipulation",
tt = "none",
it = "pan-x",
nt = "pan-y";
W.prototype = {
set: function (e) {
e == Ze && (e = this.compute()),
Ke && (this.manager.element.style[Ye] = e),
(this.actions = e.toLowerCase().trim());
},
update: function () {
this.set(this.manager.options.touchAction);
},
compute: function () {
var e = [];
return (
s(this.manager.recognizers, function (t) {
c(t.options.enable, [t]) && (e = e.concat(t.getTouchAction()));
}),
X(e.join(" "))
);
},
preventDefaults: function (e) {
if (!Ke) {
var t = e.srcEvent,
i = e.offsetDirection;
if (this.manager.session.prevented) return void t.preventDefault();
var n = this.actions,
r = g(n, tt),
a = g(n, nt),
s = g(n, it);
return r || (a && i & ze) || (s && i & Me)
? this.preventSrc(t)
: void 0;
}
},
preventSrc: function (e) {
(this.manager.session.prevented = !0), e.preventDefault();
},
};
var rt = 1,
at = 2,
st = 4,
ot = 8,
lt = ot,
dt = 16,
ut = 32;
(G.prototype = {
defaults: {},
set: function (e) {
return (
o(this.options, e),
this.manager && this.manager.touchAction.update(),
this
);
},
recognizeWith: function (e) {
if (a(e, "recognizeWith", this)) return this;
var t = this.simultaneous;
return (
(e = Y(e, this)),
t[e.id] || ((t[e.id] = e), e.recognizeWith(this)),
this
);
},
dropRecognizeWith: function (e) {
return a(e, "dropRecognizeWith", this)
? this
: ((e = Y(e, this)), delete this.simultaneous[e.id], this);
},
requireFailure: function (e) {
if (a(e, "requireFailure", this)) return this;
var t = this.requireFail;
return (
(e = Y(e, this)),
-1 === y(t, e) && (t.push(e), e.requireFailure(this)),
this
);
},
dropRequireFailure: function (e) {
if (a(e, "dropRequireFailure", this)) return this;
e = Y(e, this);
var t = y(this.requireFail, e);
return t > -1 && this.requireFail.splice(t, 1), this;
},
hasRequireFailures: function () {
return this.requireFail.length > 0;
},
canRecognizeWith: function (e) {
return !!this.simultaneous[e.id];
},
emit: function (e) {
function t(t) {
i.manager.emit(i.options.event + (t ? Q(n) : ""), e);
}
var i = this,
n = this.state;
ot > n && t(!0), t(), n >= ot && t(!0);
},
tryEmit: function (e) {
return this.canEmit() ? this.emit(e) : void (this.state = ut);
},
canEmit: function () {
for (var e = 0; e < this.requireFail.length; ) {
if (!(this.requireFail[e].state & (ut | rt))) return !1;
e++;
}
return !0;
},
recognize: function (e) {
var t = o({}, e);
return c(this.options.enable, [this, t])
? (this.state & (lt | dt | ut) && (this.state = rt),
(this.state = this.process(t)),
void (this.state & (at | st | ot | dt) && this.tryEmit(t)))
: (this.reset(), void (this.state = ut));
},
process: function () {},
getTouchAction: function () {},
reset: function () {},
}),
d(K, G, {
defaults: {
pointers: 1,
},
attrTest: function (e) {
var t = this.options.pointers;
return 0 === t || e.pointers.length === t;
},
process: function (e) {
var t = this.state,
i = e.eventType,
n = t & (at | st),
r = this.attrTest(e);
return n && (i & Ee || !r)
? t | dt
: n || r
? i & Fe
? t | ot
: t & at
? t | st
: at
: ut;
},
}),
d(Z, K, {
defaults: {
event: "pan",
threshold: 10,
pointers: 1,
direction: De,
},
getTouchAction: function () {
var e = this.options.direction,
t = [];
return e & ze && t.push(nt), e & Me && t.push(it), t;
},
directionTest: function (e) {
var t = this.options,
i = !0,
n = e.distance,
r = e.direction,
a = e.deltaX,
s = e.deltaY;
return (
r & t.direction ||
(t.direction & ze
? ((r = 0 === a ? Pe : 0 > a ? Oe : Ae),
(i = a != this.pX),
(n = Math.abs(e.deltaX)))
: ((r = 0 === s ? Pe : 0 > s ? $e : Ie),
(i = s != this.pY),
(n = Math.abs(e.deltaY)))),
(e.direction = r),
i && n > t.threshold && r & t.direction
);
},
attrTest: function (e) {
return (
K.prototype.attrTest.call(this, e) &&
(this.state & at || (!(this.state & at) && this.directionTest(e)))
);
},
emit: function (e) {
(this.pX = e.deltaX), (this.pY = e.deltaY);
var t = U(e.direction);
t && this.manager.emit(this.options.event + t, e),
this._super.emit.call(this, e);
},
}),
d(J, K, {
defaults: {
event: "pinch",
threshold: 0,
pointers: 2,
},
getTouchAction: function () {
return [tt];
},
attrTest: function (e) {
return (
this._super.attrTest.call(this, e) &&
(Math.abs(e.scale - 1) > this.options.threshold ||
this.state & at)
);
},
emit: function (e) {
if ((this._super.emit.call(this, e), 1 !== e.scale)) {
var t = e.scale < 1 ? "in" : "out";
this.manager.emit(this.options.event + t, e);
}
},
}),
d(ee, G, {
defaults: {
event: "press",
pointers: 1,
time: 500,
threshold: 5,
},
getTouchAction: function () {
return [Je];
},
process: function (e) {
var t = this.options,
i = e.pointers.length === t.pointers,
n = e.distance < t.threshold,
a = e.deltaTime > t.time;
if (
((this._input = e), !n || !i || (e.eventType & (Fe | Ee) && !a))
)
this.reset();
else if (e.eventType & ke)
this.reset(),
(this._timer = r(
function () {
(this.state = lt), this.tryEmit();
},
t.time,
this
));
else if (e.eventType & Fe) return lt;
return ut;
},
reset: function () {
clearTimeout(this._timer);
},
emit: function (e) {
this.state === lt &&
(e && e.eventType & Fe
? this.manager.emit(this.options.event + "up", e)
: ((this._input.timeStamp = fe()),
this.manager.emit(this.options.event, this._input)));
},
}),
d(te, K, {
defaults: {
event: "rotate",
threshold: 0,
pointers: 2,
},
getTouchAction: function () {
return [tt];
},
attrTest: function (e) {
return (
this._super.attrTest.call(this, e) &&
(Math.abs(e.rotation) > this.options.threshold || this.state & at)
);
},
}),
d(ie, K, {
defaults: {
event: "swipe",
threshold: 10,
velocity: 0.65,
direction: ze | Me,
pointers: 1,
},
getTouchAction: function () {
return Z.prototype.getTouchAction.call(this);
},
attrTest: function (e) {
var t,
i = this.options.direction;
return (
i & (ze | Me)
? (t = e.velocity)
: i & ze
? (t = e.velocityX)
: i & Me && (t = e.velocityY),
this._super.attrTest.call(this, e) &&
i & e.direction &&
e.distance > this.options.threshold &&
pe(t) > this.options.velocity &&
e.eventType & Fe
);
},
emit: function (e) {
var t = U(e.direction);
t && this.manager.emit(this.options.event + t, e),
this.manager.emit(this.options.event, e);
},
}),
d(ne, G, {
defaults: {
event: "tap",
pointers: 1,
taps: 1,
interval: 300,
time: 250,
threshold: 2,
posThreshold: 10,
},
getTouchAction: function () {
return [et];
},
process: function (e) {
var t = this.options,
i = e.pointers.length === t.pointers,
n = e.distance < t.threshold,
a = e.deltaTime < t.time;
if ((this.reset(), e.eventType & ke && 0 === this.count))
return this.failTimeout();
if (n && a && i) {
if (e.eventType != Fe) return this.failTimeout();
var s = this.pTime ? e.timeStamp - this.pTime < t.interval : !0,
o = !this.pCenter || M(this.pCenter, e.center) < t.posThreshold;
(this.pTime = e.timeStamp),
(this.pCenter = e.center),
o && s ? (this.count += 1) : (this.count = 1),
(this._input = e);
var l = this.count % t.taps;
if (0 === l)
return this.hasRequireFailures()
? ((this._timer = r(
function () {
(this.state = lt), this.tryEmit();
},
t.interval,
this
)),
at)
: lt;
}
return ut;
},
failTimeout: function () {
return (
(this._timer = r(
function () {
this.state = ut;
},
this.options.interval,
this
)),
ut
);
},
reset: function () {
clearTimeout(this._timer);
},
emit: function () {
this.state == lt &&
((this._input.tapCount = this.count),
this.manager.emit(this.options.event, this._input));
},
}),
(re.VERSION = "2.0.4"),
(re.defaults = {
domEvents: !1,
touchAction: Ze,
enable: !0,
inputTarget: null,
inputClass: null,
preset: [
[
te,
{
enable: !1,
},
],
[
J,
{
enable: !1,
},
["rotate"],
],
[
ie,
{
direction: ze,
},
],
[
Z,
{
direction: ze,
},
["swipe"],
],
[ne],
[
ne,
{
event: "doubletap",
taps: 2,
},
["tap"],
],
[ee],
],
cssProps: {
userSelect: "default",
touchSelect: "none",
touchCallout: "none",
contentZooming: "none",
userDrag: "none",
tapHighlightColor: "rgba(0,0,0,0)",
},
});
var ct = 1,
pt = 2;
(ae.prototype = {
set: function (e) {
return (
o(this.options, e),
e.touchAction && this.touchAction.update(),
e.inputTarget &&
(this.input.destroy(),
(this.input.target = e.inputTarget),
this.input.init()),
this
);
},
stop: function (e) {
this.session.stopped = e ? pt : ct;
},
recognize: function (e) {
var t = this.session;
if (!t.stopped) {
this.touchAction.preventDefaults(e);
var i,
n = this.recognizers,
r = t.curRecognizer;
(!r || (r && r.state & lt)) && (r = t.curRecognizer = null);
for (var a = 0; a < n.length; )
(i = n[a]),
t.stopped === pt || (r && i != r && !i.canRecognizeWith(r))
? i.reset()
: i.recognize(e),
!r && i.state & (at | st | ot) && (r = t.curRecognizer = i),
a++;
}
},
get: function (e) {
if (e instanceof G) return e;
for (var t = this.recognizers, i = 0; i < t.length; i++)
if (t[i].options.event == e) return t[i];
return null;
},
add: function (e) {
if (a(e, "add", this)) return this;
var t = this.get(e.options.event);
return (
t && this.remove(t),
this.recognizers.push(e),
(e.manager = this),
this.touchAction.update(),
e
);
},
remove: function (e) {
if (a(e, "remove", this)) return this;
var t = this.recognizers;
return (
(e = this.get(e)),
t.splice(y(t, e), 1),
this.touchAction.update(),
this
);
},
on: function (e, t) {
var i = this.handlers;
return (
s(v(e), function (e) {
(i[e] = i[e] || []), i[e].push(t);
}),
this
);
},
off: function (e, t) {
var i = this.handlers;
return (
s(v(e), function (e) {
t ? i[e].splice(y(i[e], t), 1) : delete i[e];
}),
this
);
},
emit: function (e, t) {
this.options.domEvents && oe(e, t);
var i = this.handlers[e] && this.handlers[e].slice();
if (i && i.length) {
(t.type = e),
(t.preventDefault = function () {
t.srcEvent.preventDefault();
});
for (var n = 0; n < i.length; ) i[n](t), n++;
}
},
destroy: function () {
this.element && se(this, !1),
(this.handlers = {}),
(this.session = {}),
this.input.destroy(),
(this.element = null);
},
}),
o(re, {
INPUT_START: ke,
INPUT_MOVE: Se,
INPUT_END: Fe,
INPUT_CANCEL: Ee,
STATE_POSSIBLE: rt,
STATE_BEGAN: at,
STATE_CHANGED: st,
STATE_ENDED: ot,
STATE_RECOGNIZED: lt,
STATE_CANCELLED: dt,
STATE_FAILED: ut,
DIRECTION_NONE: Pe,
DIRECTION_LEFT: Oe,
DIRECTION_RIGHT: Ae,
DIRECTION_UP: $e,
DIRECTION_DOWN: Ie,
DIRECTION_HORIZONTAL: ze,
DIRECTION_VERTICAL: Me,
DIRECTION_ALL: De,
Manager: ae,
Input: k,
TouchAction: W,
TouchInput: H,
MouseInput: N,
PointerEventInput: q,
TouchMouseInput: V,
SingleTouchInput: R,
Recognizer: G,
AttrRecognizer: K,
Tap: ne,
Pan: Z,
Swipe: ie,
Pinch: J,
Rotate: te,
Press: ee,
on: f,
off: h,
each: s,
merge: l,
extend: o,
inherit: d,
bindFn: u,
prefixed: x,
}),
typeof define == ue && define.amd
? define(function () {
return re;
})
: "undefined" != typeof module && module.exports
? (module.exports = re)
: (e[i] = re);
})(window, document, "Hammer"),
(function (e) {
"function" == typeof define && define.amd
? define(["jquery", "hammerjs"], e)
: "object" == typeof exports
? e(require("jquery"), require("hammerjs"))
: e(jQuery, Hammer);
})(function (e, t) {
function i(i, n) {
var r = e(i);
r.data("hammer") || r.data("hammer", new t(r[0], n));
}
(e.fn.hammer = function (e) {
return this.each(function () {
i(this, e);
});
}),
(t.Manager.prototype.emit = (function (t) {
return function (i, n) {
t.call(this, i, n),
e(this.element).trigger({
type: i,
gesture: n,
});
};
})(t.Manager.prototype.emit));
}),
(function (e) {
e.Package ? (Materialize = {}) : (e.Materialize = {});
})(window),
(Materialize.guid = (function () {
function e() {
return Math.floor(65536 * (1 + Math.random()))
.toString(16)
.substring(1);
}
return function () {
return (
e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e()
);
};
})()),
(Materialize.elementOrParentIsFixed = function (e) {
var t = $(e),
i = t.add(t.parents()),
n = !1;
return (
i.each(function () {
return "fixed" === $(this).css("position") ? ((n = !0), !1) : void 0;
}),
n
);
});
var Vel;
(Vel = $ ? $.Velocity : Velocity),
(function (e) {
(e.fn.collapsible = function (t) {
var i = {
accordion: void 0,
};
return (
(t = e.extend(i, t)),
this.each(function () {
function i(t) {
(o = s.find("> li > .collapsible-header")),
t.hasClass("active")
? t.parent().addClass("active")
: t.parent().removeClass("active"),
t.parent().hasClass("active")
? t
.siblings(".collapsible-body")
.stop(!0, !1)
.slideDown({
duration: 350,
easing: "easeOutQuart",
queue: !1,
complete: function () {
e(this).css("height", "");
},
})
: t
.siblings(".collapsible-body")
.stop(!0, !1)
.slideUp({
duration: 350,
easing: "easeOutQuart",
queue: !1,
complete: function () {
e(this).css("height", "");
},
}),
o.not(t).removeClass("active").parent().removeClass("active"),
o
.not(t)
.parent()
.children(".collapsible-body")
.stop(!0, !1)
.slideUp({
duration: 350,
easing: "easeOutQuart",
queue: !1,
complete: function () {
e(this).css("height", "");
},
});
}
function n(t) {
t.hasClass("active")
? t.parent().addClass("active")
: t.parent().removeClass("active"),
t.parent().hasClass("active")
? t
.siblings(".collapsible-body")
.stop(!0, !1)
.slideDown({
duration: 350,
easing: "easeOutQuart",
queue: !1,
complete: function () {
e(this).css("height", "");
},
})
: t
.siblings(".collapsible-body")
.stop(!0, !1)
.slideUp({
duration: 350,
easing: "easeOutQuart",
queue: !1,
complete: function () {
e(this).css("height", "");
},
});
}
function r(e) {
var t = a(e);
return t.length > 0;
}
function a(e) {
return e.closest("li > .collapsible-header");
}
var s = e(this),
o = e(this).find("> li > .collapsible-header"),
l = s.data("collapsible");
s.off("click.collapse", ".collapsible-header"),
o.off("click.collapse"),
s.on(
"click.collapse",
"> li > .collapsible-header",
function (s) {
var o = e(this),
d = e(s.target);
r(d) && (d = a(d)),
d.toggleClass("active"),
t.accordion || "accordion" === l || void 0 === l
? i(d)
: (n(d), o.hasClass("active") && n(o));
}
);
var o = s.find("> li > .collapsible-header");
t.accordion || "accordion" === l || void 0 === l
? i(o.filter(".active").first())
: o.filter(".active").each(function () {
n(e(this));
});
})
);
}),
e(document).ready(function () {
e(".collapsible").collapsible();
});
})(jQuery),
(function (e) {
(e.fn.scrollTo = function (t) {
return (
e(this).scrollTop(
e(this).scrollTop() - e(this).offset().top + e(t).offset().top
),
this
);
}),
(e.fn.dropdown = function (t) {
var i = {
inDuration: 300,
outDuration: 225,
constrain_width: !0,
hover: !1,
gutter: 0,
belowOrigin: !1,
alignment: "left",
};
this.each(function () {
function n() {
void 0 !== s.data("induration") &&
(o.inDuration = s.data("inDuration")),
void 0 !== s.data("outduration") &&
(o.outDuration = s.data("outDuration")),
void 0 !== s.data("constrainwidth") &&
(o.constrain_width = s.data("constrainwidth")),
void 0 !== s.data("hover") && (o.hover = s.data("hover")),
void 0 !== s.data("gutter") && (o.gutter = s.data("gutter")),
void 0 !== s.data("beloworigin") &&
(o.belowOrigin = s.data("beloworigin")),
void 0 !== s.data("alignment") &&
(o.alignment = s.data("alignment"));
}
function r(t) {
"focus" === t && (l = !0),
n(),
d.addClass("active"),
s.addClass("active"),
o.constrain_width === !0
? d.css("width", s.outerWidth())
: d.css("white-space", "nowrap");
var i,
r = window.innerHeight,
a = s.innerHeight(),
u = s.offset().left,
c = s.offset().top - e(window).scrollTop(),
p = o.alignment,
f = 0;
if (
(o.belowOrigin === !0 && (f = a),
u + d.innerWidth() > e(window).width()
? (p = "right")
: u - d.innerWidth() + s.innerWidth() < 0 && (p = "left"),
c + d.innerHeight() > r)
)
if (c + a - d.innerHeight() < 0) {
var h = r - c - f;
d.css("max-height", h);
} else f || (f += a), (f -= d.innerHeight());
if ("left" === p)
(i = o.gutter), (leftPosition = s.position().left + i);
else if ("right" === p) {
var m = s.position().left + s.outerWidth() - d.outerWidth();
(i = -o.gutter), (leftPosition = m + i);
}
d.css({
position: "absolute",
top: s.position().top + f,
left: leftPosition,
}),
d
.stop(!0, !0)
.css("opacity", 0)
.slideDown({
queue: !1,
duration: o.inDuration,
easing: "easeOutCubic",
complete: function () {
e(this).css("height", "");
},
})
.animate(
{
opacity: 1,
},
{
queue: !1,
duration: o.inDuration,
easing: "easeOutSine",
}
);
}
function a() {
(l = !1),
d.fadeOut(o.outDuration),
d.removeClass("active"),
d.css("max-height", ""),
s.removeClass("active");
}
var s = e(this),
o = e.extend({}, i, t),
l = !1,
d = e("#" + s.attr("data-activates"));
if ((n(), s.after(d), o.hover)) {
var u = !1;
s.unbind("click." + s.attr("id")),
s.on("mouseenter", function (e) {
u === !1 && (r(), (u = !0));
}),
s.on("mouseleave", function (t) {
var i = t.toElement || t.relatedTarget;
e(i).closest(".dropdown-content").is(d) ||
(d.stop(!0, !0), a(), (u = !1));
}),
d.on("mouseleave", function (t) {
var i = t.toElement || t.relatedTarget;
e(i).closest(".dropdown-button").is(s) ||
(d.stop(!0, !0), a(), (u = !1));
});
} else
s.unbind("click." + s.attr("id")),
s.bind("click." + s.attr("id"), function (t) {
l ||
(s[0] != t.currentTarget ||
s.hasClass("active") ||
0 !== e(t.target).closest(".dropdown-content").length
? s.hasClass("active") &&
(a(),
e(document).unbind(
"click." +
d.attr("id") +
" touchstart." +
d.attr("id")
))
: (t.preventDefault(), r("click")),
d.hasClass("active") &&
e(document).bind(
"click." + d.attr("id") + " touchstart." + d.attr("id"),
function (t) {
d.is(t.target) ||
s.is(t.target) ||
s.find(t.target).length ||
(a(),
e(document).unbind(
"click." +
d.attr("id") +
" touchstart." +
d.attr("id")
));
}
));
});
s.on("open", function (e, t) {
r(t);
}),
s.on("close", a);
});
}),
e(document).ready(function () {
e(".dropdown-button").dropdown();
});
})(jQuery),
(function (e) {
var t = 0,
i = 0,
n = function () {
return i++, "materialize-lean-overlay-" + i;
};
e.fn.extend({
openModal: function (i) {
e("body").css("overflow", "hidden");
var r = {
opacity: 0.5,
in_duration: 350,
out_duration: 250,
ready: void 0,
complete: void 0,
dismissible: !0,
starting_top: "4%",
},
a = n(),
s = e(this),
o = e('
'),
l = ++t;
o.attr("id", a).css("z-index", 1e3 + 2 * l),
s.data("overlay-id", a).css("z-index", 1e3 + 2 * l + 1),
e("body").append(o),
(i = e.extend(r, i)),
i.dismissible &&
(o.click(function () {
s.closeModal(i);
}),
e(document).on("keyup.leanModal" + a, function (e) {
27 === e.keyCode && s.closeModal(i);
})),
s.find(".modal-close").on("click.close", function (e) {
s.closeModal(i);
}),
o.css({
display: "block",
opacity: 0,
}),
s.css({
display: "block",
opacity: 0,
}),
o.velocity(
{
opacity: i.opacity,
},
{
duration: i.in_duration,
queue: !1,
ease: "easeOutCubic",
}
),
s.data("associated-overlay", o[0]),
s.hasClass("bottom-sheet")
? s.velocity(
{
bottom: "0",
opacity: 1,
},
{
duration: i.in_duration,
queue: !1,
ease: "easeOutCubic",
complete: function () {
"function" == typeof i.ready && i.ready();
},
}
)
: (e.Velocity.hook(s, "scaleX", 0.7),
s.css({
top: i.starting_top,
}),
s.velocity(
{
top: "10%",
opacity: 1,
scaleX: "1",
},
{
duration: i.in_duration,
queue: !1,
ease: "easeOutCubic",
complete: function () {
"function" == typeof i.ready && i.ready();
},
}
));
},
}),
e.fn.extend({
closeModal: function (i) {
var n = {
out_duration: 250,
complete: void 0,
},
r = e(this),
a = r.data("overlay-id"),
s = e("#" + a);
(i = e.extend(n, i)),
e("body").css("overflow", ""),
r.find(".modal-close").off("click.close"),
e(document).off("keyup.leanModal" + a),
s.velocity(
{
opacity: 0,
},
{
duration: i.out_duration,
queue: !1,
ease: "easeOutQuart",
}
),
r.hasClass("bottom-sheet")
? r.velocity(
{
bottom: "-100%",
opacity: 0,
},
{
duration: i.out_duration,
queue: !1,
ease: "easeOutCubic",
complete: function () {
s.css({
display: "none",
}),
"function" == typeof i.complete && i.complete(),
s.remove(),
t--;
},
}
)
: r.velocity(
{
top: i.starting_top,
opacity: 0,
scaleX: 0.7,
},
{
duration: i.out_duration,
complete: function () {
e(this).css("display", "none"),
"function" == typeof i.complete && i.complete(),
s.remove(),
t--;
},
}
);
},
}),
e.fn.extend({
leanModal: function (t) {
return this.each(function () {
var i = {
starting_top: "4%",
},
n = e.extend(i, t);
e(this).click(function (t) {
n.starting_top =
(e(this).offset().top - e(window).scrollTop()) / 1.15;
var i = e(this).attr("href") || "#" + e(this).data("target");
e(i).openModal(n), t.preventDefault();
});
});
},
});
})(jQuery),
(function (e) {
(e.fn.materialbox = function () {
return this.each(function () {
function t() {
a = !1;
var t = l.parent(".material-placeholder"),
n = (window.innerWidth, window.innerHeight, l.data("width")),
s = l.data("height");
l.velocity("stop", !0),
e("#materialbox-overlay").velocity("stop", !0),
e(".materialbox-caption").velocity("stop", !0),
e("#materialbox-overlay").velocity(
{
opacity: 0,
},
{
duration: o,
queue: !1,
easing: "easeOutQuad",
complete: function () {
(r = !1), e(this).remove();
},
}
),
l.velocity(
{
width: n,
height: s,
left: 0,
top: 0,
},
{
duration: o,
queue: !1,
easing: "easeOutQuad",
}
),
e(".materialbox-caption").velocity(
{
opacity: 0,
},
{
duration: o,
queue: !1,
easing: "easeOutQuad",
complete: function () {
t.css({
height: "",
width: "",
position: "",
top: "",
left: "",
}),
l.css({
height: "",
top: "",
left: "",
width: "",
"max-width": "",
position: "",
"z-index": "",
}),
l.removeClass("active"),
(a = !0),
e(this).remove(),
i.css("overflow", "");
},
}
);
}
if (!e(this).hasClass("initialized")) {
e(this).addClass("initialized");
var i,
n,
r = !1,
a = !0,
s = 275,
o = 200,
l = e(this),
d = e("
").addClass("material-placeholder");
l.wrap(d),
l.on("click", function () {
var o = l.parent(".material-placeholder"),
d = window.innerWidth,
u = window.innerHeight,
c = l.width(),
p = l.height();
if (a === !1) return t(), !1;
if (r && a === !0) return t(), !1;
for (
a = !1,
l.addClass("active"),
r = !0,
o.css({
width: o[0].getBoundingClientRect().width,
height: o[0].getBoundingClientRect().height,
position: "relative",
top: 0,
left: 0,
}),
i = void 0,
n = o[0].parentNode;
null !== n && !e(n).is(document);
) {
var f = e(n);
"hidden" === f.css("overflow") &&
(f.css("overflow", "visible"),
(i = void 0 === i ? f : i.add(f))),
(n = n.parentNode);
}
l.css({
position: "absolute",
"z-index": 1e3,
})
.data("width", c)
.data("height", p);
var h = e('
')
.css({
opacity: 0,
})
.click(function () {
a === !0 && t();
});
if (
(e("body").append(h),
h.velocity(
{
opacity: 1,
},
{
duration: s,
queue: !1,
easing: "easeOutQuad",
}
),
"" !== l.data("caption"))
) {
var m = e('
');
m.text(l.data("caption")),
e("body").append(m),
m.css({
display: "inline",
}),
m.velocity(
{
opacity: 1,
},
{
duration: s,
queue: !1,
easing: "easeOutQuad",
}
);
}
var g = 0,
v = c / d,
y = p / u,
w = 0,
b = 0;
v > y
? ((g = p / c), (w = 0.9 * d), (b = 0.9 * d * g))
: ((g = c / p), (w = 0.9 * u * g), (b = 0.9 * u)),
l.hasClass("responsive-img")
? l.velocity(
{
"max-width": w,
width: c,
},
{
duration: 0,
queue: !1,
complete: function () {
l.css({
left: 0,
top: 0,
}).velocity(
{
height: b,
width: w,
left:
e(document).scrollLeft() +
d / 2 -
l.parent(".material-placeholder").offset()
.left -
w / 2,
top:
e(document).scrollTop() +
u / 2 -
l.parent(".material-placeholder").offset()
.top -
b / 2,
},
{
duration: s,
queue: !1,
easing: "easeOutQuad",
complete: function () {
a = !0;
},
}
);
},
}
)
: l
.css("left", 0)
.css("top", 0)
.velocity(
{
height: b,
width: w,
left:
e(document).scrollLeft() +
d / 2 -
l.parent(".material-placeholder").offset().left -
w / 2,
top:
e(document).scrollTop() +
u / 2 -
l.parent(".material-placeholder").offset().top -
b / 2,
},
{
duration: s,
queue: !1,
easing: "easeOutQuad",
complete: function () {
a = !0;
},
}
);
}),
e(window).scroll(function () {
r && t();
}),
e(document).keyup(function (e) {
27 === e.keyCode && a === !0 && r && t();
});
}
});
}),
e(document).ready(function () {
e(".materialboxed").materialbox();
});
})(jQuery),
(function (e) {
e.fn.parallax = function () {
var t = e(window).width();
return this.each(function (i) {
function n(i) {
var n;
n =
601 > t
? r.height() > 0
? r.height()
: r.children("img").height()
: r.height() > 0
? r.height()
: 500;
var a = r.children("img").first(),
s = a.height(),
o = s - n,
l = r.offset().top + n,
d = r.offset().top,
u = e(window).scrollTop(),
c = window.innerHeight,
p = u + c,
f = (p - d) / (n + c),
h = Math.round(o * f);
i && a.css("display", "block"),
l > u &&
u + c > d &&
a.css("transform", "translate3D(-50%," + h + "px, 0)");
}
var r = e(this);
r.addClass("parallax"),
r
.children("img")
.one("load", function () {
n(!0);
})
.each(function () {
this.complete && e(this).load();
}),
e(window).scroll(function () {
(t = e(window).width()), n(!1);
}),
e(window).resize(function () {
(t = e(window).width()), n(!1);
});
});
};
})(jQuery),
(function (e) {
var t = {
init: function () {
return this.each(function () {
var t = e(this);
e(window).width(), t.width("100%");
var i,
n,
r = t.find("li.tab a"),
a = t.width(),
s = t.find("li").first().outerWidth(),
o = parseInt(t.find("li").first().css("minWidth")),
l = 0;
(i = e(r.filter('[href="' + location.hash + '"]'))),
0 === i.length && (i = e(this).find("li.tab a.active").first()),
0 === i.length && (i = e(this).find("li.tab a").first()),
i.addClass("active"),
(l = r.index(i)),
0 > l && (l = 0),
(n = e(i[0].hash)),
t.append('
');
var d = t.find(".indicator");
if (
(t.is(":visible") &&
(d.css({
right: a - (l + 1) * s,
}),
d.css({
left: l * s,
})),
e(window).resize(function () {
(a = t.width()),
(s = t.find("li").first().outerWidth()),
0 > l && (l = 0),
0 !== s &&
0 !== a &&
(d.css({
right: a - (l + 1) * s,
}),
d.css({
left: l * s,
}));
}),
r.not(i).each(function () {
e(this.hash).hide();
}),
t.on("click", "a", function (o) {
if (e(this).parent().hasClass("disabled"))
return void o.preventDefault();
(a = t.width()),
(s = t.find("li").first().outerWidth()),
i.removeClass("active"),
n.hide(),
(i = e(this)),
(n = e(this.hash)),
(r = t.find("li.tab a")),
i.addClass("active");
var u = l;
(l = r.index(e(this))),
0 > l && (l = 0),
n.show(),
l - u >= 0
? (d.velocity(
{
right: a - (l + 1) * s,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
),
d.velocity(
{
left: l * s,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
delay: 90,
}
))
: (d.velocity(
{
left: l * s,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
),
d.velocity(
{
right: a - (l + 1) * s,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
delay: 90,
}
)),
o.preventDefault();
}),
o >= s)
) {
t.wrap('
');
var u = document.createElement("div");
(u.className = "scrollbar-measure"), document.body.appendChild(u);
var c = u.offsetHeight - u.clientHeight;
document.body.removeChild(u),
0 === c && ((c = 15), t.find(".indicator").css("bottom", c)),
t.height(e(this).height() + c);
}
});
},
select_tab: function (e) {
this.find('a[href="#' + e + '"]').trigger("click");
},
};
(e.fn.tabs = function (i) {
return t[i]
? t[i].apply(this, Array.prototype.slice.call(arguments, 1))
: "object" != typeof i && i
? void e.error("Method " + i + " does not exist on jQuery.tooltip")
: t.init.apply(this, arguments);
}),
e(document).ready(function () {
e("ul.tabs").tabs();
});
})(jQuery),
(function (e) {
e.fn.tooltip = function (i) {
var n = null,
r = !1,
a = null,
s = 5,
o = {
delay: 350,
};
return "remove" === i
? (this.each(function () {
e("#" + e(this).attr("data-tooltip-id")).remove();
}),
!1)
: ((i = e.extend(o, i)),
this.each(function () {
var o = Materialize.guid(),
l = e(this);
l.attr("data-tooltip-id", o);
var d = e("
").text(l.attr("data-tooltip")),
u = e("
");
u.addClass("material-tooltip")
.append(d)
.appendTo(e("body"))
.attr("id", o);
var c = e("
").addClass("backdrop");
c.appendTo(u),
c.css({
top: 0,
left: 0,
}),
l.off("mouseenter.tooltip mouseleave.tooltip"),
l.on({
"mouseenter.tooltip": function (e) {
var o = l.data("delay");
(o = void 0 === o || "" === o ? i.delay : o),
(n = 0),
(a = setInterval(function () {
if (((n += 10), n >= o && r === !1)) {
(r = !0),
u.css({
display: "block",
left: "0px",
top: "0px",
}),
u.children("span").text(l.attr("data-tooltip"));
var e,
i,
a,
d = l.outerWidth(),
p = l.outerHeight(),
f = l.attr("data-position"),
h = u.outerHeight(),
m = u.outerWidth(),
g = "0px",
v = "0px",
y = 8;
"top" === f
? ((e = l.offset().top - h - s),
(i = l.offset().left + d / 2 - m / 2),
(a = t(i, e, m, h)),
(g = "-10px"),
c.css({
borderRadius: "14px 14px 0 0",
transformOrigin: "50% 90%",
marginTop: h,
marginLeft: m / 2 - c.width() / 2,
}))
: "left" === f
? ((e = l.offset().top + p / 2 - h / 2),
(i = l.offset().left - m - s),
(a = t(i, e, m, h)),
(v = "-10px"),
c.css({
width: "14px",
height: "14px",
borderRadius: "14px 0 0 14px",
transformOrigin: "95% 50%",
marginTop: h / 2,
marginLeft: m,
}))
: "right" === f
? ((e = l.offset().top + p / 2 - h / 2),
(i = l.offset().left + d + s),
(a = t(i, e, m, h)),
(v = "+10px"),
c.css({
width: "14px",
height: "14px",
borderRadius: "0 14px 14px 0",
transformOrigin: "5% 50%",
marginTop: h / 2,
marginLeft: "0px",
}))
: ((e = l.offset().top + l.outerHeight() + s),
(i = l.offset().left + d / 2 - m / 2),
(a = t(i, e, m, h)),
(g = "+10px"),
c.css({
marginLeft: m / 2 - c.width() / 2,
})),
u.css({
top: a.y,
left: a.x,
}),
(y = m / 8),
8 > y && (y = 8),
("right" === f || "left" === f) &&
((y = m / 10), 6 > y && (y = 6)),
u
.velocity(
{
marginTop: g,
marginLeft: v,
},
{
duration: 350,
queue: !1,
}
)
.velocity(
{
opacity: 1,
},
{
duration: 300,
delay: 50,
queue: !1,
}
),
c
.css({
display: "block",
})
.velocity(
{
opacity: 1,
},
{
duration: 55,
delay: 0,
queue: !1,
}
)
.velocity(
{
scale: y,
},
{
duration: 300,
delay: 0,
queue: !1,
easing: "easeInOutQuad",
}
);
}
}, 10));
},
"mouseleave.tooltip": function () {
clearInterval(a),
(n = 0),
u.velocity(
{
opacity: 0,
marginTop: 0,
marginLeft: 0,
},
{
duration: 225,
queue: !1,
delay: 225,
}
),
c.velocity(
{
opacity: 0,
scale: 1,
},
{
duration: 225,
delay: 275,
queue: !1,
complete: function () {
c.css("display", "none"),
u.css("display", "none"),
(r = !1);
},
}
);
},
});
}));
};
var t = function (t, i, n, r) {
var a = t,
s = i;
return (
0 > a
? (a = 4)
: a + n > window.innerWidth && (a -= a + n - window.innerWidth),
0 > s
? (s = 4)
: s + r > window.innerHeight + e(window).scrollTop &&
(s -= s + r - window.innerHeight),
{
x: a,
y: s,
}
);
};
e(document).ready(function () {
e(".tooltipped").tooltip();
});
})(jQuery),
(function (e) {
"use strict";
function t(e) {
return null !== e && e === e.window;
}
function i(e) {
return t(e) ? e : 9 === e.nodeType && e.defaultView;
}
function n(e) {
var t,
n,
r = {
top: 0,
left: 0,
},
a = e && e.ownerDocument;
return (
(t = a.documentElement),
"undefined" != typeof e.getBoundingClientRect &&
(r = e.getBoundingClientRect()),
(n = i(a)),
{
top: r.top + n.pageYOffset - t.clientTop,
left: r.left + n.pageXOffset - t.clientLeft,
}
);
}
function r(e) {
var t = "";
for (var i in e) e.hasOwnProperty(i) && (t += i + ":" + e[i] + ";");
return t;
}
function a(e) {
if (u.allowEvent(e) === !1) return null;
for (
var t = null, i = e.target || e.srcElement;
null !== i.parentElement;
) {
if (
!(
i instanceof SVGElement ||
-1 === i.className.indexOf("waves-effect")
)
) {
t = i;
break;
}
if (i.classList.contains("waves-effect")) {
t = i;
break;
}
i = i.parentElement;
}
return t;
}
function s(t) {
var i = a(t);
null !== i &&
(d.show(t, i),
"ontouchstart" in e &&
(i.addEventListener("touchend", d.hide, !1),
i.addEventListener("touchcancel", d.hide, !1)),
i.addEventListener("mouseup", d.hide, !1),
i.addEventListener("mouseleave", d.hide, !1));
}
var o = o || {},
l = document.querySelectorAll.bind(document),
d = {
duration: 750,
show: function (e, t) {
if (2 === e.button) return !1;
var i = t || this,
a = document.createElement("div");
(a.className = "waves-ripple"), i.appendChild(a);
var s = n(i),
o = e.pageY - s.top,
l = e.pageX - s.left,
u = "scale(" + (i.clientWidth / 100) * 10 + ")";
"touches" in e &&
((o = e.touches[0].pageY - s.top),
(l = e.touches[0].pageX - s.left)),
a.setAttribute("data-hold", Date.now()),
a.setAttribute("data-scale", u),
a.setAttribute("data-x", l),
a.setAttribute("data-y", o);
var c = {
top: o + "px",
left: l + "px",
};
(a.className = a.className + " waves-notransition"),
a.setAttribute("style", r(c)),
(a.className = a.className.replace("waves-notransition", "")),
(c["-webkit-transform"] = u),
(c["-moz-transform"] = u),
(c["-ms-transform"] = u),
(c["-o-transform"] = u),
(c.transform = u),
(c.opacity = "1"),
(c["-webkit-transition-duration"] = d.duration + "ms"),
(c["-moz-transition-duration"] = d.duration + "ms"),
(c["-o-transition-duration"] = d.duration + "ms"),
(c["transition-duration"] = d.duration + "ms"),
(c["-webkit-transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
(c["-moz-transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
(c["-o-transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
(c["transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
a.setAttribute("style", r(c));
},
hide: function (e) {
u.touchup(e);
var t = this,
i = (1.4 * t.clientWidth, null),
n = t.getElementsByClassName("waves-ripple");
if (!(n.length > 0)) return !1;
i = n[n.length - 1];
var a = i.getAttribute("data-x"),
s = i.getAttribute("data-y"),
o = i.getAttribute("data-scale"),
l = Date.now() - Number(i.getAttribute("data-hold")),
c = 350 - l;
0 > c && (c = 0),
setTimeout(function () {
var e = {
top: s + "px",
left: a + "px",
opacity: "0",
"-webkit-transition-duration": d.duration + "ms",
"-moz-transition-duration": d.duration + "ms",
"-o-transition-duration": d.duration + "ms",
"transition-duration": d.duration + "ms",
"-webkit-transform": o,
"-moz-transform": o,
"-ms-transform": o,
"-o-transform": o,
transform: o,
};
i.setAttribute("style", r(e)),
setTimeout(function () {
try {
t.removeChild(i);
} catch (e) {
return !1;
}
}, d.duration);
}, c);
},
wrapInput: function (e) {
for (var t = 0; t < e.length; t++) {
var i = e[t];
if ("input" === i.tagName.toLowerCase()) {
var n = i.parentNode;
if (
"i" === n.tagName.toLowerCase() &&
-1 !== n.className.indexOf("waves-effect")
)
continue;
var r = document.createElement("i");
r.className = i.className + " waves-input-wrapper";
var a = i.getAttribute("style");
a || (a = ""),
r.setAttribute("style", a),
(i.className = "waves-button-input"),
i.removeAttribute("style"),
n.replaceChild(r, i),
r.appendChild(i);
}
}
},
},
u = {
touches: 0,
allowEvent: function (e) {
var t = !0;
return (
"touchstart" === e.type
? (u.touches += 1)
: "touchend" === e.type || "touchcancel" === e.type
? setTimeout(function () {
u.touches > 0 && (u.touches -= 1);
}, 500)
: "mousedown" === e.type && u.touches > 0 && (t = !1),
t
);
},
touchup: function (e) {
u.allowEvent(e);
},
};
(o.displayEffect = function (t) {
(t = t || {}),
"duration" in t && (d.duration = t.duration),
d.wrapInput(l(".waves-effect")),
"ontouchstart" in e &&
document.body.addEventListener("touchstart", s, !1),
document.body.addEventListener("mousedown", s, !1);
}),
(o.attach = function (t) {
"input" === t.tagName.toLowerCase() &&
(d.wrapInput([t]), (t = t.parentElement)),
"ontouchstart" in e && t.addEventListener("touchstart", s, !1),
t.addEventListener("mousedown", s, !1);
}),
(e.Waves = o),
document.addEventListener(
"DOMContentLoaded",
function () {
o.displayEffect();
},
!1
);
})(window),
(Materialize.toast = function (e, t, i, n) {
function r(e) {
var t = document.createElement("div");
if ((t.classList.add("toast"), i))
for (var r = i.split(" "), a = 0, s = r.length; s > a; a++)
t.classList.add(r[a]);
(
"object" == typeof HTMLElement
? e instanceof HTMLElement
: e &&
"object" == typeof e &&
null !== e &&
1 === e.nodeType &&
"string" == typeof e.nodeName
)
? t.appendChild(e)
: e instanceof jQuery
? t.appendChild(e[0])
: (t.innerHTML = e);
var o = new Hammer(t, {
prevent_default: !1,
});
return (
o.on("pan", function (e) {
var i = e.deltaX,
n = 80;
t.classList.contains("panning") || t.classList.add("panning");
var r = 1 - Math.abs(i / n);
0 > r && (r = 0),
Vel(
t,
{
left: i,
opacity: r,
},
{
duration: 50,
queue: !1,
easing: "easeOutQuad",
}
);
}),
o.on("panend", function (e) {
var i = e.deltaX,
r = 80;
Math.abs(i) > r
? Vel(
t,
{
marginTop: "-40px",
},
{
duration: 375,
easing: "easeOutExpo",
queue: !1,
complete: function () {
"function" == typeof n && n(),
t.parentNode.removeChild(t);
},
}
)
: (t.classList.remove("panning"),
Vel(
t,
{
left: 0,
opacity: 1,
},
{
duration: 300,
easing: "easeOutExpo",
queue: !1,
}
));
}),
t
);
}
i = i || "";
var a = document.getElementById("toast-container");
null === a &&
((a = document.createElement("div")),
(a.id = "toast-container"),
document.body.appendChild(a));
var s = r(e);
e && a.appendChild(s),
(s.style.top = "35px"),
(s.style.opacity = 0),
Vel(
s,
{
top: "0px",
opacity: 1,
},
{
duration: 300,
easing: "easeOutCubic",
queue: !1,
}
);
var o = t,
l = setInterval(function () {
null === s.parentNode && window.clearInterval(l),
s.classList.contains("panning") || (o -= 20),
0 >= o &&
(Vel(
s,
{
opacity: 0,
marginTop: "-40px",
},
{
duration: 375,
easing: "easeOutExpo",
queue: !1,
complete: function () {
"function" == typeof n && n(),
this[0].parentNode.removeChild(this[0]);
},
}
),
window.clearInterval(l));
}, 20);
}),
(function (e) {
var t = {
init: function (t) {
var i = {
menuWidth: 240,
edge: "left",
closeOnClick: !1,
};
(t = e.extend(i, t)),
e(this).each(function () {
function i(i) {
(s = !1),
(o = !1),
e("body").css("overflow", ""),
e("#sidenav-overlay").velocity(
{
opacity: 0,
},
{
duration: 200,
queue: !1,
easing: "easeOutQuad",
complete: function () {
e(this).remove();
},
}
),
"left" === t.edge
? (a.css({
width: "",
right: "",
left: "0",
}),
r.velocity(
{
left: -1 * (t.menuWidth + 10),
},
{
duration: 200,
queue: !1,
easing: "easeOutCubic",
complete: function () {
i === !0 &&
(r.removeAttr("style"),
r.css("width", t.menuWidth));
},
}
))
: (a.css({
width: "",
right: "0",
left: "",
}),
r.velocity(
{
right: -1 * (t.menuWidth + 10),
},
{
duration: 200,
queue: !1,
easing: "easeOutCubic",
complete: function () {
i === !0 &&
(r.removeAttr("style"),
r.css("width", t.menuWidth));
},
}
));
}
var n = e(this),
r = e("#" + n.attr("data-activates"));
240 != t.menuWidth && r.css("width", t.menuWidth);
var a = e('
');
e("body").append(a),
"left" == t.edge
? (r.css("left", -1 * (t.menuWidth + 10)),
a.css({
left: 0,
}))
: (r
.addClass("right-aligned")
.css("right", -1 * (t.menuWidth + 10))
.css("left", ""),
a.css({
right: 0,
})),
r.hasClass("fixed") &&
window.innerWidth > 992 &&
r.css("left", 0),
r.hasClass("fixed") &&
e(window).resize(function () {
window.innerWidth > 992
? 0 !== e("#sidenav-overlay").css("opacity") && o
? i(!0)
: (r.removeAttr("style"), r.css("width", t.menuWidth))
: o === !1 &&
("left" === t.edge
? r.css("left", -1 * (t.menuWidth + 10))
: r.css("right", -1 * (t.menuWidth + 10)));
}),
t.closeOnClick === !0 &&
r.on(
"click.itemclick",
"a:not(.collapsible-header)",
function () {
i();
}
);
var s = !1,
o = !1;
a.on("click", function () {
i();
}),
a
.hammer({
prevent_default: !1,
})
.bind("pan", function (n) {
if ("touch" == n.gesture.pointerType) {
var a = (n.gesture.direction, n.gesture.center.x);
if (
(n.gesture.center.y,
n.gesture.velocityX,
e("body").css("overflow", "hidden"),
0 === e("#sidenav-overlay").length)
) {
var s = e('
');
s.css("opacity", 0).click(function () {
i();
}),
e("body").append(s);
}
if (
("left" === t.edge &&
(a > t.menuWidth
? (a = t.menuWidth)
: 0 > a && (a = 0)),
"left" === t.edge)
)
a < t.menuWidth / 2
? (o = !1)
: a >= t.menuWidth / 2 && (o = !0),
r.css("left", a - t.menuWidth);
else {
a < window.innerWidth - t.menuWidth / 2
? (o = !0)
: a >= window.innerWidth - t.menuWidth / 2 &&
(o = !1);
var l = -1 * (a - t.menuWidth / 2);
l > 0 && (l = 0), r.css("right", l);
}
var d;
"left" === t.edge
? ((d = a / t.menuWidth),
e("#sidenav-overlay").velocity(
{
opacity: d,
},
{
duration: 50,
queue: !1,
easing: "easeOutQuad",
}
))
: ((d = Math.abs(
(a - window.innerWidth) / t.menuWidth
)),
e("#sidenav-overlay").velocity(
{
opacity: d,
},
{
duration: 50,
queue: !1,
easing: "easeOutQuad",
}
));
}
})
.bind("panend", function (i) {
if ("touch" == i.gesture.pointerType) {
var n = i.gesture.velocityX;
(s = !1),
"left" === t.edge
? (o && 0.3 >= n) || -0.5 > n
? (r.velocity(
{
left: 0,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
),
e("#sidenav-overlay").velocity(
{
opacity: 1,
},
{
duration: 50,
queue: !1,
easing: "easeOutQuad",
}
),
a.css({
width: "50%",
right: 0,
left: "",
}))
: (!o || n > 0.3) &&
(e("body").css("overflow", ""),
r.velocity(
{
left: -1 * (t.menuWidth + 10),
},
{
duration: 200,
queue: !1,
easing: "easeOutQuad",
}
),
e("#sidenav-overlay").velocity(
{
opacity: 0,
},
{
duration: 200,
queue: !1,
easing: "easeOutQuad",
complete: function () {
e(this).remove();
},
}
),
a.css({
width: "10px",
right: "",
left: 0,
}))
: (o && n >= -0.3) || n > 0.5
? (r.velocity(
{
right: 0,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
),
e("#sidenav-overlay").velocity(
{
opacity: 1,
},
{
duration: 50,
queue: !1,
easing: "easeOutQuad",
}
),
a.css({
width: "50%",
right: "",
left: 0,
}))
: (!o || -0.3 > n) &&
(e("body").css("overflow", ""),
r.velocity(
{
right: -1 * (t.menuWidth + 10),
},
{
duration: 200,
queue: !1,
easing: "easeOutQuad",
}
),
e("#sidenav-overlay").velocity(
{
opacity: 0,
},
{
duration: 200,
queue: !1,
easing: "easeOutQuad",
complete: function () {
e(this).remove();
},
}
),
a.css({
width: "10px",
right: 0,
left: "",
}));
}
}),
n.click(function () {
if (o === !0) (o = !1), (s = !1), i();
else {
e("body").css("overflow", "hidden"),
e("body").append(a),
"left" === t.edge
? (a.css({
width: "50%",
right: 0,
left: "",
}),
r.velocity(
{
left: 0,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
))
: (a.css({
width: "50%",
right: "",
left: 0,
}),
r.velocity(
{
right: 0,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
),
r.css("left", ""));
var n = e('
');
n.css("opacity", 0).click(function () {
(o = !1),
(s = !1),
i(),
n.velocity(
{
opacity: 0,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
complete: function () {
e(this).remove();
},
}
);
}),
e("body").append(n),
n.velocity(
{
opacity: 1,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
complete: function () {
(o = !0), (s = !1);
},
}
);
}
return !1;
});
});
},
show: function () {
this.trigger("click");
},
hide: function () {
e("#sidenav-overlay").trigger("click");
},
};
e.fn.sideNav = function (i) {
return t[i]
? t[i].apply(this, Array.prototype.slice.call(arguments, 1))
: "object" != typeof i && i
? void e.error("Method " + i + " does not exist on jQuery.sideNav")
: t.init.apply(this, arguments);
};
})(jQuery),
(function (e) {
function t(t, i, n, r) {
var a = e();
return (
e.each(s, function (e, s) {
if (s.height() > 0) {
var o = s.offset().top,
l = s.offset().left,
d = l + s.width(),
u = o + s.height(),
c = !(l > i || r > d || o > n || t > u);
c && a.push(s);
}
}),
a
);
}
function i() {
++d;
var i = a.scrollTop(),
n = a.scrollLeft(),
r = n + a.width(),
s = i + a.height(),
l = t(i + u.top + 200, r + u.right, s + u.bottom, n + u.left);
e.each(l, function (e, t) {
var i = t.data("scrollSpy:ticks");
"number" != typeof i && t.triggerHandler("scrollSpy:enter"),
t.data("scrollSpy:ticks", d);
}),
e.each(o, function (e, t) {
var i = t.data("scrollSpy:ticks");
"number" == typeof i &&
i !== d &&
(t.triggerHandler("scrollSpy:exit"),
t.data("scrollSpy:ticks", null));
}),
(o = l);
}
function n() {
a.trigger("scrollSpy:winSize");
}
function r(e, t, i) {
var n,
r,
a,
s = null,
o = 0;
i || (i = {});
var l = function () {
(o = i.leading === !1 ? 0 : c()),
(s = null),
(a = e.apply(n, r)),
(n = r = null);
};
return function () {
var d = c();
o || i.leading !== !1 || (o = d);
var u = t - (d - o);
return (
(n = this),
(r = arguments),
0 >= u
? (clearTimeout(s),
(s = null),
(o = d),
(a = e.apply(n, r)),
(n = r = null))
: s || i.trailing === !1 || (s = setTimeout(l, u)),
a
);
};
}
var a = e(window),
s = [],
o = [],
l = !1,
d = 0,
u = {
top: 0,
right: 0,
bottom: 0,
left: 0,
},
c =
Date.now ||
function () {
return new Date().getTime();
};
(e.scrollSpy = function (t, n) {
var o = [];
(t = e(t)),
t.each(function (t, i) {
s.push(e(i)),
e(i).data("scrollSpy:id", t),
e("a[href=#" + e(i).attr("id") + "]").click(function (t) {
t.preventDefault();
var i = e(this.hash).offset().top + 1;
e("html, body").animate(
{
scrollTop: i - 200,
},
{
duration: 400,
queue: !1,
easing: "easeOutCubic",
}
);
});
}),
(n = n || {
throttle: 100,
}),
(u.top = n.offsetTop || 0),
(u.right = n.offsetRight || 0),
(u.bottom = n.offsetBottom || 0),
(u.left = n.offsetLeft || 0);
var d = r(i, n.throttle || 100),
c = function () {
e(document).ready(d);
};
return (
l || (a.on("scroll", c), a.on("resize", c), (l = !0)),
setTimeout(c, 0),
t.on("scrollSpy:enter", function () {
o = e.grep(o, function (e) {
return 0 != e.height();
});
var t = e(this);
o[0]
? (e("a[href=#" + o[0].attr("id") + "]").removeClass("active"),
t.data("scrollSpy:id") < o[0].data("scrollSpy:id")
? o.unshift(e(this))
: o.push(e(this)))
: o.push(e(this)),
e("a[href=#" + o[0].attr("id") + "]").addClass("active");
}),
t.on("scrollSpy:exit", function () {
if (
((o = e.grep(o, function (e) {
return 0 != e.height();
})),
o[0])
) {
e("a[href=#" + o[0].attr("id") + "]").removeClass("active");
var t = e(this);
(o = e.grep(o, function (e) {
return e.attr("id") != t.attr("id");
})),
o[0] &&
e("a[href=#" + o[0].attr("id") + "]").addClass("active");
}
}),
t
);
}),
(e.winSizeSpy = function (t) {
return (
(e.winSizeSpy = function () {
return a;
}),
(t = t || {
throttle: 100,
}),
a.on("resize", r(n, t.throttle || 100))
);
}),
(e.fn.scrollSpy = function (t) {
return e.scrollSpy(e(this), t);
});
})(jQuery),
(function (e) {
e(document).ready(function () {
function t(t) {
var i = t.css("font-family"),
r = t.css("font-size");
r && n.css("font-size", r),
i && n.css("font-family", i),
"off" === t.attr("wrap") &&
n.css("overflow-wrap", "normal").css("white-space", "pre"),
n.text(t.val() + "\n");
var a = n.html().replace(/\n/g, "
");
n.html(a),
t.is(":visible")
? n.css("width", t.width())
: n.css("width", e(window).width() / 2),
t.css("height", n.height());
}
Materialize.updateTextFields = function () {
var t =
"input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea";
e(t).each(function (t, i) {
e(i).val().length > 0 ||
void 0 !== e(this).attr("placeholder") ||
e(i)[0].validity.badInput === !0
? e(this).siblings("label").addClass("active")
: e(this).siblings("label, i").removeClass("active");
});
};
var i =
"input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea";
e("input[autofocus]").siblings("label, i").addClass("active"),
e(document).on("change", i, function () {
(0 !== e(this).val().length ||
void 0 !== e(this).attr("placeholder")) &&
e(this).siblings("label").addClass("active"),
validate_field(e(this));
}),
e(document).ready(function () {
Materialize.updateTextFields();
}),
e(document).on("reset", function (t) {
var n = e(t.target);
n.is("form") &&
(n.find(i).removeClass("valid").removeClass("invalid"),
n.find(i).each(function () {
"" === e(this).attr("value") &&
e(this).siblings("label, i").removeClass("active");
}),
n.find("select.initialized").each(function () {
var e = n.find("option[selected]").text();
n.siblings("input.select-dropdown").val(e);
}));
}),
e(document).on("focus", i, function () {
e(this).siblings("label, i").addClass("active");
}),
e(document).on("blur", i, function () {
var t = e(this);
0 === t.val().length &&
t[0].validity.badInput !== !0 &&
void 0 === t.attr("placeholder") &&
t.siblings("label, i").removeClass("active"),
0 === t.val().length &&
t[0].validity.badInput !== !0 &&
void 0 !== t.attr("placeholder") &&
t.siblings("i").removeClass("active"),
validate_field(t);
}),
(window.validate_field = function (e) {
var t = void 0 !== e.attr("length"),
i = parseInt(e.attr("length")),
n = e.val().length;
0 === e.val().length && e[0].validity.badInput === !1
? e.hasClass("validate") &&
(e.removeClass("valid"), e.removeClass("invalid"))
: e.hasClass("validate") &&
((e.is(":valid") && t && i >= n) || (e.is(":valid") && !t)
? (e.removeClass("invalid"), e.addClass("valid"))
: (e.removeClass("valid"), e.addClass("invalid")));
});
var n = e(".hiddendiv").first();
n.length ||
((n = e('
')),
e("body").append(n));
var r = ".materialize-textarea";
e(r).each(function () {
var i = e(this);
i.val().length && t(i);
}),
e("body").on("keyup keydown autoresize", r, function () {
t(e(this));
}),
e(document).on(
"change",
'.file-field input[type="file"]',
function () {
for (
var t = e(this).closest(".file-field"),
i = t.find("input.file-path"),
n = e(this)[0].files,
r = [],
a = 0;
a < n.length;
a++
)
r.push(n[a].name);
i.val(r.join(", ")), i.trigger("change");
}
);
var a,
s = "input[type=range]",
o = !1;
e(s).each(function () {
var t = e('
');
e(this).after(t);
});
var l = ".range-field";
e(document).on("change", s, function (t) {
var i = e(this).siblings(".thumb");
i.find(".value").html(e(this).val());
}),
e(document).on("input mousedown touchstart", s, function (t) {
var i = e(this).siblings(".thumb"),
n = e(this).outerWidth();
i.length <= 0 &&
((i = e(
'
'
)),
e(this).append(i)),
i.find(".value").html(e(this).val()),
(o = !0),
e(this).addClass("active"),
i.hasClass("active") ||
i.velocity(
{
height: "30px",
width: "30px",
top: "-20px",
marginLeft: "-15px",
},
{
duration: 300,
easing: "easeOutExpo",
}
),
"input" !== t.type &&
((a =
void 0 === t.pageX || null === t.pageX
? t.originalEvent.touches[0].pageX - e(this).offset().left
: t.pageX - e(this).offset().left),
0 > a ? (a = 0) : a > n && (a = n),
i.addClass("active").css("left", a)),
i.find(".value").html(e(this).val());
}),
e(document).on("mouseup touchend", l, function () {
(o = !1), e(this).removeClass("active");
}),
e(document).on("mousemove touchmove", l, function (t) {
var i,
n = e(this).children(".thumb");
if (o) {
n.hasClass("active") ||
n.velocity(
{
height: "30px",
width: "30px",
top: "-20px",
marginLeft: "-15px",
},
{
duration: 300,
easing: "easeOutExpo",
}
),
(i =
void 0 === t.pageX || null === t.pageX
? t.originalEvent.touches[0].pageX - e(this).offset().left
: t.pageX - e(this).offset().left);
var r = e(this).outerWidth();
0 > i ? (i = 0) : i > r && (i = r),
n.addClass("active").css("left", i),
n.find(".value").html(n.siblings(s).val());
}
}),
e(document).on("mouseout touchleave", l, function () {
if (!o) {
var t = e(this).children(".thumb");
t.hasClass("active") &&
t.velocity(
{
height: "0",
width: "0",
top: "10px",
marginLeft: "-6px",
},
{
duration: 100,
}
),
t.removeClass("active");
}
});
}),
(e.fn.material_select = function (t) {
function i(e, t, i) {
var r = e.indexOf(t);
-1 === r ? e.push(t) : e.splice(r, 1),
i
.siblings("ul.dropdown-content")
.find("li")
.eq(t)
.toggleClass("active"),
i.find("option").eq(t).prop("selected", !0),
n(e, i);
}
function n(e, t) {
for (var i = "", n = 0, r = e.length; r > n; n++) {
var a = t.find("option").eq(e[n]).text();
i += 0 === n ? a : ", " + a;
}
"" === i && (i = t.find("option:disabled").eq(0).text()),
t.siblings("input.select-dropdown").val(i);
}
e(this).each(function () {
var n = e(this);
if (!n.hasClass("browser-default")) {
var r = n.attr("multiple") ? !0 : !1,
a = n.data("select-id");
if (
(a &&
(n.parent().find("span.caret").remove(),
n.parent().find("input").remove(),
n.unwrap(),
e("ul#select-options-" + a).remove()),
"destroy" === t)
)
return void n
.data("select-id", null)
.removeClass("initialized");
var s = Materialize.guid();
n.data("select-id", s);
var o = e('
');
o.addClass(n.attr("class"));
var l = e(
'
'
),
d = n.children("option"),
u = n.children("optgroup"),
c = [],
p = !1;
n.find("option:selected").length > 0
? (label = n.find("option:selected"))
: (label = d.first());
var f = function (t, i, n) {
var r = i.is(":disabled") ? "disabled " : "",
a = i.data("icon"),
s = i.attr("class");
if (a) {
var o = "";
return (
s && (o = ' class="' + s + '"'),
"multiple" === n
? l.append(
e(
'
" +
i.html() +
""
)
)
: l.append(
e(
'
" +
i.html() +
""
)
),
!0
);
}
"multiple" === n
? l.append(
e(
'
" +
i.html() +
""
)
)
: l.append(
e(
'
' +
i.html() +
""
)
);
};
u.length
? u.each(function () {
(d = e(this).children("option")),
l.append(
e(
'
' +
e(this).attr("label") +
""
)
),
d.each(function () {
f(n, e(this));
});
})
: d.each(function () {
e(this).is(":disabled") ? "disabled " : "",
r ? f(n, e(this), "multiple") : f(n, e(this));
}),
l.find("li:not(.optgroup)").each(function (a) {
var s = n;
e(this).click(function (n) {
e(this).hasClass("disabled") ||
e(this).hasClass("optgroup") ||
(r
? (e('input[type="checkbox"]', this).prop(
"checked",
function (e, t) {
return !t;
}
),
i(c, e(this).index(), s),
g.trigger("focus"))
: (l.find("li").removeClass("active"),
e(this).toggleClass("active"),
s
.siblings("input.select-dropdown")
.val(e(this).text())),
activateOption(l, e(this)),
s.find("option").eq(a).prop("selected", !0),
s.trigger("change"),
"undefined" != typeof t && t()),
n.stopPropagation();
});
}),
n.wrap(o);
var h = e('
▼');
n.is(":disabled") && h.addClass("disabled");
var m = label.html() && label.html().replace(/"/g, """),
g = e(
'
'
);
n.before(g),
g.before(h),
g.after(l),
n.is(":disabled") ||
g.dropdown({
hover: !1,
closeOnClick: !1,
}),
n.attr("tabindex") &&
e(g[0]).attr("tabindex", n.attr("tabindex")),
n.addClass("initialized"),
g.on({
focus: function () {
if (
(e("ul.select-dropdown").not(l[0]).is(":visible") &&
e("input.select-dropdown").trigger("close"),
!l.is(":visible"))
) {
e(this).trigger("open", ["focus"]);
var t = e(this).val(),
i = l.find("li").filter(function () {
return (
e(this).text().toLowerCase() === t.toLowerCase()
);
})[0];
activateOption(l, i);
}
},
click: function (e) {
e.stopPropagation();
},
}),
g.on("blur", function () {
r || e(this).trigger("close"),
l.find("li.selected").removeClass("selected");
}),
l.hover(
function () {
p = !0;
},
function () {
p = !1;
}
),
e(window).on({
click: function (e) {
r && (p || g.trigger("close"));
},
}),
(activateOption = function (t, i) {
t.find("li.selected").removeClass("selected"),
e(i).addClass("selected");
});
var v = [],
y = function (t) {
if (9 == t.which) return void g.trigger("close");
if (40 == t.which && !l.is(":visible"))
return void g.trigger("open");
if (13 != t.which || l.is(":visible")) {
t.preventDefault();
var i = String.fromCharCode(t.which).toLowerCase(),
n = [9, 13, 27, 38, 40];
if (i && -1 === n.indexOf(t.which)) {
v.push(i);
var a = v.join(""),
s = l.find("li").filter(function () {
return 0 === e(this).text().toLowerCase().indexOf(a);
})[0];
s && activateOption(l, s);
}
if (13 == t.which) {
var o = l.find("li.selected:not(.disabled)")[0];
o && (e(o).trigger("click"), r || g.trigger("close"));
}
40 == t.which &&
((s = l.find("li.selected").length
? l.find("li.selected").next("li:not(.disabled)")[0]
: l.find("li:not(.disabled)")[0]),
activateOption(l, s)),
27 == t.which && g.trigger("close"),
38 == t.which &&
((s = l
.find("li.selected")
.prev("li:not(.disabled)")[0]),
s && activateOption(l, s)),
setTimeout(function () {
v = [];
}, 1e3);
}
};
g.on("keydown", y);
}
});
});
})(jQuery),
(function (e) {
var t = {
init: function (t) {
var i = {
indicators: !0,
height: 400,
transition: 500,
interval: 6e3,
};
return (
(t = e.extend(i, t)),
this.each(function () {
function i(e, t) {
e.hasClass("center-align")
? e.velocity(
{
opacity: 0,
translateY: -100,
},
{
duration: t,
queue: !1,
}
)
: e.hasClass("right-align")
? e.velocity(
{
opacity: 0,
translateX: 100,
},
{
duration: t,
queue: !1,
}
)
: e.hasClass("left-align") &&
e.velocity(
{
opacity: 0,
translateX: -100,
},
{
duration: t,
queue: !1,
}
);
}
function n(e) {
e >= d.length ? (e = 0) : 0 > e && (e = d.length - 1),
(u = l.find(".active").index()),
u != e &&
((r = d.eq(u)),
($caption = r.find(".caption")),
r.removeClass("active"),
r.velocity(
{
opacity: 0,
},
{
duration: t.transition,
queue: !1,
easing: "easeOutQuad",
complete: function () {
d.not(".active").velocity(
{
opacity: 0,
translateX: 0,
translateY: 0,
},
{
duration: 0,
queue: !1,
}
);
},
}
),
i($caption, t.transition),
t.indicators && a.eq(u).removeClass("active"),
d.eq(e).velocity(
{
opacity: 1,
},
{
duration: t.transition,
queue: !1,
easing: "easeOutQuad",
}
),
d.eq(e).find(".caption").velocity(
{
opacity: 1,
translateX: 0,
translateY: 0,
},
{
duration: t.transition,
delay: t.transition,
queue: !1,
easing: "easeOutQuad",
}
),
d.eq(e).addClass("active"),
t.indicators && a.eq(e).addClass("active"));
}
var r,
a,
s,
o = e(this),
l = o.find("ul.slides").first(),
d = l.find("li"),
u = l.find(".active").index();
-1 != u && (r = d.eq(u)),
o.hasClass("fullscreen") ||
(t.indicators ? o.height(t.height + 40) : o.height(t.height),
l.height(t.height)),
d.find(".caption").each(function () {
i(e(this), 0);
}),
d.find("img").each(function () {
var t =
"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
e(this).attr("src") !== t &&
(e(this).css(
"background-image",
"url(" + e(this).attr("src") + ")"
),
e(this).attr("src", t));
}),
t.indicators &&
((a = e('
')),
d.each(function (i) {
var r = e('
');
r.click(function () {
var i = l.parent(),
r = i.find(e(this)).index();
n(r),
clearInterval(s),
(s = setInterval(function () {
(u = l.find(".active").index()),
d.length == u + 1 ? (u = 0) : (u += 1),
n(u);
}, t.transition + t.interval));
}),
a.append(r);
}),
o.append(a),
(a = o.find("ul.indicators").find("li.indicator-item"))),
r
? r.show()
: (d.first().addClass("active").velocity(
{
opacity: 1,
},
{
duration: t.transition,
queue: !1,
easing: "easeOutQuad",
}
),
(u = 0),
(r = d.eq(u)),
t.indicators && a.eq(u).addClass("active")),
r.find("img").each(function () {
r.find(".caption").velocity(
{
opacity: 1,
translateX: 0,
translateY: 0,
},
{
duration: t.transition,
queue: !1,
easing: "easeOutQuad",
}
);
}),
(s = setInterval(function () {
(u = l.find(".active").index()), n(u + 1);
}, t.transition + t.interval));
var c = !1,
p = !1,
f = !1;
o
.hammer({
prevent_default: !1,
})
.bind("pan", function (e) {
if ("touch" === e.gesture.pointerType) {
clearInterval(s);
var t = e.gesture.direction,
i = e.gesture.deltaX,
n = e.gesture.velocityX;
($curr_slide = l.find(".active")),
$curr_slide.velocity(
{
translateX: i,
},
{
duration: 50,
queue: !1,
easing: "easeOutQuad",
}
),
4 === t && (i > o.innerWidth() / 2 || -0.65 > n)
? (f = !0)
: 2 === t &&
(i < (-1 * o.innerWidth()) / 2 || n > 0.65) &&
(p = !0);
var r;
p &&
((r = $curr_slide.next()),
0 === r.length && (r = d.first()),
r.velocity(
{
opacity: 1,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
)),
f &&
((r = $curr_slide.prev()),
0 === r.length && (r = d.last()),
r.velocity(
{
opacity: 1,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
));
}
})
.bind("panend", function (e) {
"touch" === e.gesture.pointerType &&
(($curr_slide = l.find(".active")),
(c = !1),
(curr_index = l.find(".active").index()),
f || p
? p
? (n(curr_index + 1),
$curr_slide.velocity(
{
translateX: -1 * o.innerWidth(),
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
complete: function () {
$curr_slide.velocity(
{
opacity: 0,
translateX: 0,
},
{
duration: 0,
queue: !1,
}
);
},
}
))
: f &&
(n(curr_index - 1),
$curr_slide.velocity(
{
translateX: o.innerWidth(),
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
complete: function () {
$curr_slide.velocity(
{
opacity: 0,
translateX: 0,
},
{
duration: 0,
queue: !1,
}
);
},
}
))
: $curr_slide.velocity(
{
translateX: 0,
},
{
duration: 300,
queue: !1,
easing: "easeOutQuad",
}
),
(p = !1),
(f = !1),
clearInterval(s),
(s = setInterval(function () {
(u = l.find(".active").index()),
d.length == u + 1 ? (u = 0) : (u += 1),
n(u);
}, t.transition + t.interval)));
}),
o.on("sliderPause", function () {
clearInterval(s);
}),
o.on("sliderStart", function () {
clearInterval(s),
(s = setInterval(function () {
(u = l.find(".active").index()),
d.length == u + 1 ? (u = 0) : (u += 1),
n(u);
}, t.transition + t.interval));
}),
o.on("sliderNext", function () {
(u = l.find(".active").index()), n(u + 1);
}),
o.on("sliderPrev", function () {
(u = l.find(".active").index()), n(u - 1);
});
})
);
},
pause: function () {
e(this).trigger("sliderPause");
},
start: function () {
e(this).trigger("sliderStart");
},
next: function () {
e(this).trigger("sliderNext");
},
prev: function () {
e(this).trigger("sliderPrev");
},
};
e.fn.slider = function (i) {
return t[i]
? t[i].apply(this, Array.prototype.slice.call(arguments, 1))
: "object" != typeof i && i
? void e.error("Method " + i + " does not exist on jQuery.tooltip")
: t.init.apply(this, arguments);
};
})(jQuery),
(function (e) {
e(document).ready(function () {
e(document).on("click.card", ".card", function (t) {
e(this).find("> .card-reveal").length &&
(e(t.target).is(e(".card-reveal .card-title")) ||
e(t.target).is(e(".card-reveal .card-title i"))
? e(this)
.find(".card-reveal")
.velocity(
{
translateY: 0,
},
{
duration: 225,
queue: !1,
easing: "easeInOutQuad",
complete: function () {
e(this).css({
display: "none",
});
},
}
)
: (e(t.target).is(e(".card .activator")) ||
e(t.target).is(e(".card .activator i"))) &&
(e(t.target).closest(".card").css("overflow", "hidden"),
e(this)
.find(".card-reveal")
.css({
display: "block",
})
.velocity("stop", !1)
.velocity(
{
translateY: "-100%",
},
{
duration: 300,
queue: !1,
easing: "easeInOutQuad",
}
))),
e(".card-reveal").closest(".card").css("overflow", "hidden");
});
});
})(jQuery),
(function (e) {
e(document).ready(function () {
e(document).on("click.chip", ".chip .material-icons", function (t) {
e(this).parent().remove();
});
});
})(jQuery),
(function (e) {
e(document).ready(function () {
e.fn.pushpin = function (t) {
var i = {
top: 0,
bottom: 1 / 0,
offset: 0,
};
return (
(t = e.extend(i, t)),
($index = 0),
this.each(function () {
function i(e) {
e.removeClass("pin-top"),
e.removeClass("pinned"),
e.removeClass("pin-bottom");
}
function n(n, r) {
n.each(function () {
t.top <= r &&
t.bottom >= r &&
!e(this).hasClass("pinned") &&
(i(e(this)),
e(this).css("top", t.offset),
e(this).addClass("pinned")),
r < t.top &&
!e(this).hasClass("pin-top") &&
(i(e(this)),
e(this).css("top", 0),
e(this).addClass("pin-top")),
r > t.bottom &&
!e(this).hasClass("pin-bottom") &&
(i(e(this)),
e(this).addClass("pin-bottom"),
e(this).css("top", t.bottom - s));
});
}
var r = Materialize.guid(),
a = e(this),
s = e(this).offset().top;
n(a, e(window).scrollTop()),
e(window).on("scroll." + r, function () {
var i = e(window).scrollTop() + t.offset;
n(a, i);
});
})
);
};
});
})(jQuery),
(function (e) {
e(document).ready(function () {
(e.fn.reverse = [].reverse),
e(document).on(
"mouseenter.fixedActionBtn",
".fixed-action-btn:not(.click-to-toggle)",
function (i) {
var n = e(this);
t(n);
}
),
e(document).on(
"mouseleave.fixedActionBtn",
".fixed-action-btn:not(.click-to-toggle)",
function (t) {
var n = e(this);
i(n);
}
),
e(document).on(
"click.fixedActionBtn",
".fixed-action-btn.click-to-toggle > a",
function (n) {
var r = e(this),
a = r.parent();
a.hasClass("active") ? i(a) : t(a);
}
);
}),
e.fn.extend({
openFAB: function () {
var i = e(this);
t(i);
},
closeFAB: function () {
i($this);
},
});
var t = function (t) {
if ((($this = t), $this.hasClass("active") === !1)) {
var i,
n,
r = $this.hasClass("horizontal");
r === !0 ? (n = 40) : (i = 40),
$this.addClass("active"),
$this.find("ul .btn-floating").velocity(
{
scaleY: ".4",
scaleX: ".4",
translateY: i + "px",
translateX: n + "px",
},
{
duration: 0,
}
);
var a = 0;
$this
.find("ul .btn-floating")
.reverse()
.each(function () {
e(this).velocity(
{
opacity: "1",
scaleX: "1",
scaleY: "1",
translateY: "0",
translateX: "0",
},
{
duration: 80,
delay: a,
}
),
(a += 40);
});
}
},
i = function (e) {
$this = e;
var t,
i,
n = $this.hasClass("horizontal");
n === !0 ? (i = 40) : (t = 40),
$this.removeClass("active"),
$this.find("ul .btn-floating").velocity("stop", !0),
$this.find("ul .btn-floating").velocity(
{
opacity: "0",
scaleX: ".4",
scaleY: ".4",
translateY: t + "px",
translateX: i + "px",
},
{
duration: 80,
}
);
};
})(jQuery),
(function (e) {
(Materialize.fadeInImage = function (t) {
var i = e(t);
i.css({
opacity: 0,
}),
e(i).velocity(
{
opacity: 1,
},
{
duration: 650,
queue: !1,
easing: "easeOutSine",
}
),
e(i).velocity(
{
opacity: 1,
},
{
duration: 1300,
queue: !1,
easing: "swing",
step: function (t, i) {
i.start = 100;
var n = t / 100,
r = 150 - (100 - t) / 1.75;
100 > r && (r = 100),
t >= 0 &&
e(this).css({
"-webkit-filter":
"grayscale(" + n + ")brightness(" + r + "%)",
filter: "grayscale(" + n + ")brightness(" + r + "%)",
});
},
}
);
}),
(Materialize.showStaggeredList = function (t) {
var i = 0;
e(t).find("li").velocity(
{
translateX: "-100px",
},
{
duration: 0,
}
),
e(t)
.find("li")
.each(function () {
e(this).velocity(
{
opacity: "1",
translateX: "0",
},
{
duration: 800,
delay: i,
easing: [60, 10],
}
),
(i += 120);
});
}),
e(document).ready(function () {
var t = !1,
i = !1;
e(".dismissable").each(function () {
e(this)
.hammer({
prevent_default: !1,
})
.bind("pan", function (n) {
if ("touch" === n.gesture.pointerType) {
var r = e(this),
a = n.gesture.direction,
s = n.gesture.deltaX,
o = n.gesture.velocityX;
r.velocity(
{
translateX: s,
},
{
duration: 50,
queue: !1,
easing: "easeOutQuad",
}
),
4 === a &&
(s > r.innerWidth() / 2 || -0.75 > o) &&
(t = !0),
2 === a &&
(s < (-1 * r.innerWidth()) / 2 || o > 0.75) &&
(i = !0);
}
})
.bind("panend", function (n) {
if (
(Math.abs(n.gesture.deltaX) < e(this).innerWidth() / 2 &&
((i = !1), (t = !1)),
"touch" === n.gesture.pointerType)
) {
var r = e(this);
if (t || i) {
var a;
(a = t ? r.innerWidth() : -1 * r.innerWidth()),
r.velocity(
{
translateX: a,
},
{
duration: 100,
queue: !1,
easing: "easeOutQuad",
complete: function () {
r.css("border", "none"),
r.velocity(
{
height: 0,
padding: 0,
},
{
duration: 200,
queue: !1,
easing: "easeOutQuad",
complete: function () {
r.remove();
},
}
);
},
}
);
} else
r.velocity(
{
translateX: 0,
},
{
duration: 100,
queue: !1,
easing: "easeOutQuad",
}
);
(t = !1), (i = !1);
}
});
});
});
})(jQuery),
(function (e) {
Materialize.scrollFire = function (e) {
var t = !1;
window.addEventListener("scroll", function () {
t = !0;
}),
setInterval(function () {
if (t) {
t = !1;
for (
var i = window.pageYOffset + window.innerHeight, n = 0;
n < e.length;
n++
) {
var r = e[n],
a = r.selector,
s = r.offset,
o = r.callback,
l = document.querySelector(a);
if (null !== l) {
var d = l.getBoundingClientRect().top + window.pageYOffset;
if (i > d + s && r.done !== !0) {
var u = new Function(o);
u(), (r.done = !0);
}
}
}
}
}, 100);
};
})(jQuery),
(function (e) {
"function" == typeof define && define.amd
? define("picker", ["jquery"], e)
: "object" == typeof exports
? (module.exports = e(require("jquery")))
: (this.Picker = e(jQuery));
})(function (e) {
function t(a, s, l, c) {
function p() {
return t._.node(
"div",
t._.node(
"div",
t._.node(
"div",
t._.node("div", k.component.nodes(w.open), x.box),
x.wrap
),
x.frame
),
x.holder
);
}
function f() {
C.data(s, k)
.addClass(x.input)
.attr("tabindex", -1)
.val(C.data("value") ? k.get("select", b.format) : a.value),
b.editable ||
C.on("focus." + w.id + " click." + w.id, function (e) {
e.preventDefault(), k.$root[0].focus();
}).on("keydown." + w.id, g),
r(a, {
haspopup: !0,
expanded: !1,
readonly: !1,
owns: a.id + "_root",
});
}
function h() {
k.$root
.on({
keydown: g,
focusin: function (e) {
k.$root.removeClass(x.focused), e.stopPropagation();
},
"mousedown click": function (t) {
var i = t.target;
i != k.$root.children()[0] &&
(t.stopPropagation(),
"mousedown" != t.type ||
e(i).is("input, select, textarea, button, option") ||
(t.preventDefault(), k.$root[0].focus()));
},
})
.on({
focus: function () {
C.addClass(x.target);
},
blur: function () {
C.removeClass(x.target);
},
})
.on("focus.toOpen", v)
.on(
"click",
"[data-pick], [data-nav], [data-clear], [data-close]",
function () {
var t = e(this),
i = t.data(),
n = t.hasClass(x.navDisabled) || t.hasClass(x.disabled),
r = o();
(r = r && (r.type || r.href)),
(n || (r && !e.contains(k.$root[0], r))) &&
k.$root[0].focus(),
!n && i.nav
? k.set("highlight", k.component.item.highlight, {
nav: i.nav,
})
: !n && "pick" in i
? k.set("select", i.pick)
: i.clear
? k.clear().close(!0)
: i.close && k.close(!0);
}
),
r(k.$root[0], "hidden", !0);
}
function m() {
var t;
b.hiddenName === !0
? ((t = a.name), (a.name = ""))
: ((t = [
"string" == typeof b.hiddenPrefix ? b.hiddenPrefix : "",
"string" == typeof b.hiddenSuffix ? b.hiddenSuffix : "_submit",
]),
(t = t[0] + a.name + t[1])),
(k._hidden = e(
'
"
)[0]),
C.on("change." + w.id, function () {
k._hidden.value = a.value ? k.get("select", b.formatSubmit) : "";
}),
b.container ? e(b.container).append(k._hidden) : C.after(k._hidden);
}
function g(e) {
var t = e.keyCode,
i = /^(8|46)$/.test(t);
return 27 == t
? (k.close(), !1)
: void (
(32 == t || i || (!w.open && k.component.key[t])) &&
(e.preventDefault(),
e.stopPropagation(),
i ? k.clear().close() : k.open())
);
}
function v(e) {
e.stopPropagation(),
"focus" == e.type && k.$root.addClass(x.focused),
k.open();
}
if (!a) return t;
var y = !1,
w = {
id: a.id || "P" + Math.abs(~~(Math.random() * new Date())),
},
b = l ? e.extend(!0, {}, l.defaults, c) : c || {},
x = e.extend({}, t.klasses(), b.klass),
C = e(a),
T = function () {
return this.start();
},
k = (T.prototype = {
constructor: T,
$node: C,
start: function () {
return w && w.start
? k
: ((w.methods = {}),
(w.start = !0),
(w.open = !1),
(w.type = a.type),
(a.autofocus = a == o()),
(a.readOnly = !b.editable),
(a.id = a.id || w.id),
"text" != a.type && (a.type = "text"),
(k.component = new l(k, b)),
(k.$root = e(
t._.node(
"div",
p(),
x.picker,
'id="' + a.id + '_root" tabindex="0"'
)
)),
h(),
b.formatSubmit && m(),
f(),
b.container
? e(b.container).append(k.$root)
: C.after(k.$root),
k
.on({
start: k.component.onStart,
render: k.component.onRender,
stop: k.component.onStop,
open: k.component.onOpen,
close: k.component.onClose,
set: k.component.onSet,
})
.on({
start: b.onStart,
render: b.onRender,
stop: b.onStop,
open: b.onOpen,
close: b.onClose,
set: b.onSet,
}),
(y = i(k.$root.children()[0])),
a.autofocus && k.open(),
k.trigger("start").trigger("render"));
},
render: function (e) {
return (
e
? k.$root.html(p())
: k.$root.find("." + x.box).html(k.component.nodes(w.open)),
k.trigger("render")
);
},
stop: function () {
return w.start
? (k.close(),
k._hidden && k._hidden.parentNode.removeChild(k._hidden),
k.$root.remove(),
C.removeClass(x.input).removeData(s),
setTimeout(function () {
C.off("." + w.id);
}, 0),
(a.type = w.type),
(a.readOnly = !1),
k.trigger("stop"),
(w.methods = {}),
(w.start = !1),
k)
: k;
},
open: function (i) {
return w.open
? k
: (C.addClass(x.active),
r(a, "expanded", !0),
setTimeout(function () {
k.$root.addClass(x.opened), r(k.$root[0], "hidden", !1);
}, 0),
i !== !1 &&
((w.open = !0),
y &&
u
.css("overflow", "hidden")
.css("padding-right", "+=" + n()),
k.$root[0].focus(),
d
.on("click." + w.id + " focusin." + w.id, function (e) {
var t = e.target;
t != a &&
t != document &&
3 != e.which &&
k.close(t === k.$root.children()[0]);
})
.on("keydown." + w.id, function (i) {
var n = i.keyCode,
r = k.component.key[n],
a = i.target;
27 == n
? k.close(!0)
: a != k.$root[0] || (!r && 13 != n)
? e.contains(k.$root[0], a) &&
13 == n &&
(i.preventDefault(), a.click())
: (i.preventDefault(),
r
? t._.trigger(k.component.key.go, k, [
t._.trigger(r),
])
: k.$root
.find("." + x.highlighted)
.hasClass(x.disabled) ||
k
.set("select", k.component.item.highlight)
.close());
})),
k.trigger("open"));
},
close: function (e) {
return (
e &&
(k.$root.off("focus.toOpen")[0].focus(),
setTimeout(function () {
k.$root.on("focus.toOpen", v);
}, 0)),
C.removeClass(x.active),
r(a, "expanded", !1),
setTimeout(function () {
k.$root.removeClass(x.opened + " " + x.focused),
r(k.$root[0], "hidden", !0);
}, 0),
w.open
? ((w.open = !1),
y && u.css("overflow", "").css("padding-right", "-=" + n()),
d.off("." + w.id),
k.trigger("close"))
: k
);
},
clear: function (e) {
return k.set("clear", null, e);
},
set: function (t, i, n) {
var r,
a,
s = e.isPlainObject(t),
o = s ? t : {};
if (((n = s && e.isPlainObject(i) ? i : n || {}), t)) {
s || (o[t] = i);
for (r in o)
(a = o[r]),
r in k.component.item &&
(void 0 === a && (a = null), k.component.set(r, a, n)),
("select" == r || "clear" == r) &&
C.val("clear" == r ? "" : k.get(r, b.format)).trigger(
"change"
);
k.render();
}
return n.muted ? k : k.trigger("set", o);
},
get: function (e, i) {
if (((e = e || "value"), null != w[e])) return w[e];
if ("valueSubmit" == e) {
if (k._hidden) return k._hidden.value;
e = "value";
}
if ("value" == e) return a.value;
if (e in k.component.item) {
if ("string" == typeof i) {
var n = k.component.get(e);
return n
? t._.trigger(k.component.formats.toString, k.component, [
i,
n,
])
: "";
}
return k.component.get(e);
}
},
on: function (t, i, n) {
var r,
a,
s = e.isPlainObject(t),
o = s ? t : {};
if (t) {
s || (o[t] = i);
for (r in o)
(a = o[r]),
n && (r = "_" + r),
(w.methods[r] = w.methods[r] || []),
w.methods[r].push(a);
}
return k;
},
off: function () {
var e,
t,
i = arguments;
for (e = 0, namesCount = i.length; e < namesCount; e += 1)
(t = i[e]), t in w.methods && delete w.methods[t];
return k;
},
trigger: function (e, i) {
var n = function (e) {
var n = w.methods[e];
n &&
n.map(function (e) {
t._.trigger(e, k, [i]);
});
};
return n("_" + e), n(e), k;
},
});
return new T();
}
function i(e) {
var t,
i = "position";
return (
e.currentStyle
? (t = e.currentStyle[i])
: window.getComputedStyle && (t = getComputedStyle(e)[i]),
"fixed" == t
);
}
function n() {
if (u.height() <= l.height()) return 0;
var t = e('
').appendTo(
"body"
),
i = t[0].offsetWidth;
t.css("overflow", "scroll");
var n = e('
').appendTo(t),
r = n[0].offsetWidth;
return t.remove(), i - r;
}
function r(t, i, n) {
if (e.isPlainObject(i)) for (var r in i) a(t, r, i[r]);
else a(t, i, n);
}
function a(e, t, i) {
e.setAttribute(("role" == t ? "" : "aria-") + t, i);
}
function s(t, i) {
e.isPlainObject(t) ||
(t = {
attribute: i,
}),
(i = "");
for (var n in t) {
var r = ("role" == n ? "" : "aria-") + n,
a = t[n];
i += null == a ? "" : r + '="' + t[n] + '"';
}
return i;
}
function o() {
try {
return document.activeElement;
} catch (e) {}
}
var l = e(window),
d = e(document),
u = e(document.documentElement);
return (
(t.klasses = function (e) {
return (
(e = e || "picker"),
{
picker: e,
opened: e + "--opened",
focused: e + "--focused",
input: e + "__input",
active: e + "__input--active",
target: e + "__input--target",
holder: e + "__holder",
frame: e + "__frame",
wrap: e + "__wrap",
box: e + "__box",
}
);
}),
(t._ = {
group: function (e) {
for (
var i, n = "", r = t._.trigger(e.min, e);
r <= t._.trigger(e.max, e, [r]);
r += e.i
)
(i = t._.trigger(e.item, e, [r])),
(n += t._.node(e.node, i[0], i[1], i[2]));
return n;
},
node: function (t, i, n, r) {
return i
? ((i = e.isArray(i) ? i.join("") : i),
(n = n ? ' class="' + n + '"' : ""),
(r = r ? " " + r : ""),
"<" + t + n + r + ">" + i + "" + t + ">")
: "";
},
lead: function (e) {
return (10 > e ? "0" : "") + e;
},
trigger: function (e, t, i) {
return "function" == typeof e ? e.apply(t, i || []) : e;
},
digits: function (e) {
return /\d/.test(e[1]) ? 2 : 1;
},
isDate: function (e) {
return (
{}.toString.call(e).indexOf("Date") > -1 &&
this.isInteger(e.getDate())
);
},
isInteger: function (e) {
return {}.toString.call(e).indexOf("Number") > -1 && e % 1 === 0;
},
ariaAttr: s,
}),
(t.extend = function (i, n) {
(e.fn[i] = function (r, a) {
var s = this.data(i);
return "picker" == r
? s
: s && "string" == typeof r
? t._.trigger(s[r], s, [a])
: this.each(function () {
var a = e(this);
a.data(i) || new t(this, i, n, r);
});
}),
(e.fn[i].defaults = n.defaults);
}),
t
);
}),
(function (e) {
"function" == typeof define && define.amd
? define(["picker", "jquery"], e)
: "object" == typeof exports
? (module.exports = e(require("./picker.js"), require("jquery")))
: e(Picker, jQuery);
})(function (e, t) {
function i(e, t) {
var i = this,
n = e.$node[0],
r = n.value,
a = e.$node.data("value"),
s = a || r,
o = a ? t.formatSubmit : t.format,
l = function () {
return n.currentStyle
? "rtl" == n.currentStyle.direction
: "rtl" == getComputedStyle(e.$root[0]).direction;
};
(i.settings = t),
(i.$node = e.$node),
(i.queue = {
min: "measure create",
max: "measure create",
now: "now create",
select: "parse create validate",
highlight: "parse navigate create validate",
view: "parse create validate viewset",
disable: "deactivate",
enable: "activate",
}),
(i.item = {}),
(i.item.clear = null),
(i.item.disable = (t.disable || []).slice(0)),
(i.item.enable = -(function (e) {
return e[0] === !0 ? e.shift() : -1;
})(i.item.disable)),
i.set("min", t.min).set("max", t.max).set("now"),
s
? i.set("select", s, {
format: o,
})
: i.set("select", null).set("highlight", i.item.now),
(i.key = {
40: 7,
38: -7,
39: function () {
return l() ? -1 : 1;
},
37: function () {
return l() ? 1 : -1;
},
go: function (e) {
var t = i.item.highlight,
n = new Date(t.year, t.month, t.date + e);
i.set("highlight", n, {
interval: e,
}),
this.render();
},
}),
e
.on(
"render",
function () {
e.$root
.find("." + t.klass.selectMonth)
.on("change", function () {
var i = this.value;
i &&
(e.set("highlight", [
e.get("view").year,
i,
e.get("highlight").date,
]),
e.$root.find("." + t.klass.selectMonth).trigger("focus"));
}),
e.$root
.find("." + t.klass.selectYear)
.on("change", function () {
var i = this.value;
i &&
(e.set("highlight", [
i,
e.get("view").month,
e.get("highlight").date,
]),
e.$root
.find("." + t.klass.selectYear)
.trigger("focus"));
});
},
1
)
.on(
"open",
function () {
var n = "";
i.disabled(i.get("now")) &&
(n = ":not(." + t.klass.buttonToday + ")"),
e.$root.find("button" + n + ", select").attr("disabled", !1);
},
1
)
.on(
"close",
function () {
e.$root.find("button, select").attr("disabled", !0);
},
1
);
}
var n = 7,
r = 6,
a = e._;
(i.prototype.set = function (e, t, i) {
var n = this,
r = n.item;
return null === t
? ("clear" == e && (e = "select"), (r[e] = t), n)
: ((r["enable" == e ? "disable" : "flip" == e ? "enable" : e] =
n.queue[e]
.split(" ")
.map(function (r) {
return (t = n[r](e, t, i));
})
.pop()),
"select" == e
? n.set("highlight", r.select, i)
: "highlight" == e
? n.set("view", r.highlight, i)
: e.match(/^(flip|min|max|disable|enable)$/) &&
(r.select &&
n.disabled(r.select) &&
n.set("select", r.select, i),
r.highlight &&
n.disabled(r.highlight) &&
n.set("highlight", r.highlight, i)),
n);
}),
(i.prototype.get = function (e) {
return this.item[e];
}),
(i.prototype.create = function (e, i, n) {
var r,
s = this;
return (
(i = void 0 === i ? e : i),
i == -(1 / 0) || i == 1 / 0
? (r = i)
: t.isPlainObject(i) && a.isInteger(i.pick)
? (i = i.obj)
: t.isArray(i)
? ((i = new Date(i[0], i[1], i[2])),
(i = a.isDate(i) ? i : s.create().obj))
: (i =
a.isInteger(i) || a.isDate(i)
? s.normalize(new Date(i), n)
: s.now(e, i, n)),
{
year: r || i.getFullYear(),
month: r || i.getMonth(),
date: r || i.getDate(),
day: r || i.getDay(),
obj: r || i,
pick: r || i.getTime(),
}
);
}),
(i.prototype.createRange = function (e, i) {
var n = this,
r = function (e) {
return e === !0 || t.isArray(e) || a.isDate(e) ? n.create(e) : e;
};
return (
a.isInteger(e) || (e = r(e)),
a.isInteger(i) || (i = r(i)),
a.isInteger(e) && t.isPlainObject(i)
? (e = [i.year, i.month, i.date + e])
: a.isInteger(i) &&
t.isPlainObject(e) &&
(i = [e.year, e.month, e.date + i]),
{
from: r(e),
to: r(i),
}
);
}),
(i.prototype.withinRange = function (e, t) {
return (
(e = this.createRange(e.from, e.to)),
t.pick >= e.from.pick && t.pick <= e.to.pick
);
}),
(i.prototype.overlapRanges = function (e, t) {
var i = this;
return (
(e = i.createRange(e.from, e.to)),
(t = i.createRange(t.from, t.to)),
i.withinRange(e, t.from) ||
i.withinRange(e, t.to) ||
i.withinRange(t, e.from) ||
i.withinRange(t, e.to)
);
}),
(i.prototype.now = function (e, t, i) {
return (
(t = new Date()),
i && i.rel && t.setDate(t.getDate() + i.rel),
this.normalize(t, i)
);
}),
(i.prototype.navigate = function (e, i, n) {
var r,
a,
s,
o,
l = t.isArray(i),
d = t.isPlainObject(i),
u = this.item.view;
if (l || d) {
for (
d
? ((a = i.year), (s = i.month), (o = i.date))
: ((a = +i[0]), (s = +i[1]), (o = +i[2])),
n &&
n.nav &&
u &&
u.month !== s &&
((a = u.year), (s = u.month)),
r = new Date(a, s + (n && n.nav ? n.nav : 0), 1),
a = r.getFullYear(),
s = r.getMonth();
new Date(a, s, o).getMonth() !== s;
)
o -= 1;
i = [a, s, o];
}
return i;
}),
(i.prototype.normalize = function (e) {
return e.setHours(0, 0, 0, 0), e;
}),
(i.prototype.measure = function (e, t) {
var i = this;
return (
t
? "string" == typeof t
? (t = i.parse(e, t))
: a.isInteger(t) &&
(t = i.now(e, t, {
rel: t,
}))
: (t = "min" == e ? -(1 / 0) : 1 / 0),
t
);
}),
(i.prototype.viewset = function (e, t) {
return this.create([t.year, t.month, 1]);
}),
(i.prototype.validate = function (e, i, n) {
var r,
s,
o,
l,
d = this,
u = i,
c = n && n.interval ? n.interval : 1,
p = -1 === d.item.enable,
f = d.item.min,
h = d.item.max,
m =
p &&
d.item.disable.filter(function (e) {
if (t.isArray(e)) {
var n = d.create(e).pick;
n < i.pick ? (r = !0) : n > i.pick && (s = !0);
}
return a.isInteger(e);
}).length;
if (
(!n || !n.nav) &&
((!p && d.disabled(i)) ||
(p && d.disabled(i) && (m || r || s)) ||
(!p && (i.pick <= f.pick || i.pick >= h.pick)))
)
for (
p && !m && ((!s && c > 0) || (!r && 0 > c)) && (c *= -1);
d.disabled(i) &&
(Math.abs(c) > 1 &&
(i.month < u.month || i.month > u.month) &&
((i = u), (c = c > 0 ? 1 : -1)),
i.pick <= f.pick
? ((o = !0),
(c = 1),
(i = d.create([
f.year,
f.month,
f.date + (i.pick === f.pick ? 0 : -1),
])))
: i.pick >= h.pick &&
((l = !0),
(c = -1),
(i = d.create([
h.year,
h.month,
h.date + (i.pick === h.pick ? 0 : 1),
]))),
!o || !l);
)
i = d.create([i.year, i.month, i.date + c]);
return i;
}),
(i.prototype.disabled = function (e) {
var i = this,
n = i.item.disable.filter(function (n) {
return a.isInteger(n)
? e.day === (i.settings.firstDay ? n : n - 1) % 7
: t.isArray(n) || a.isDate(n)
? e.pick === i.create(n).pick
: t.isPlainObject(n)
? i.withinRange(n, e)
: void 0;
});
return (
(n =
n.length &&
!n.filter(function (e) {
return (
(t.isArray(e) && "inverted" == e[3]) ||
(t.isPlainObject(e) && e.inverted)
);
}).length),
-1 === i.item.enable
? !n
: n || e.pick < i.item.min.pick || e.pick > i.item.max.pick
);
}),
(i.prototype.parse = function (e, t, i) {
var n = this,
r = {};
return t && "string" == typeof t
? ((i && i.format) ||
((i = i || {}), (i.format = n.settings.format)),
n.formats.toArray(i.format).map(function (e) {
var i = n.formats[e],
s = i ? a.trigger(i, n, [t, r]) : e.replace(/^!/, "").length;
i && (r[e] = t.substr(0, s)), (t = t.substr(s));
}),
[r.yyyy || r.yy, +(r.mm || r.m) - 1, r.dd || r.d])
: t;
}),
(i.prototype.formats = (function () {
function e(e, t, i) {
var n = e.match(/\w+/)[0];
return i.mm || i.m || (i.m = t.indexOf(n) + 1), n.length;
}
function t(e) {
return e.match(/\w+/)[0].length;
}
return {
d: function (e, t) {
return e ? a.digits(e) : t.date;
},
dd: function (e, t) {
return e ? 2 : a.lead(t.date);
},
ddd: function (e, i) {
return e ? t(e) : this.settings.weekdaysShort[i.day];
},
dddd: function (e, i) {
return e ? t(e) : this.settings.weekdaysFull[i.day];
},
m: function (e, t) {
return e ? a.digits(e) : t.month + 1;
},
mm: function (e, t) {
return e ? 2 : a.lead(t.month + 1);
},
mmm: function (t, i) {
var n = this.settings.monthsShort;
return t ? e(t, n, i) : n[i.month];
},
mmmm: function (t, i) {
var n = this.settings.monthsFull;
return t ? e(t, n, i) : n[i.month];
},
yy: function (e, t) {
return e ? 2 : ("" + t.year).slice(2);
},
yyyy: function (e, t) {
return e ? 4 : t.year;
},
toArray: function (e) {
return e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
},
toString: function (e, t) {
var i = this;
return i.formats
.toArray(e)
.map(function (e) {
return (
a.trigger(i.formats[e], i, [0, t]) || e.replace(/^!/, "")
);
})
.join("");
},
};
})()),
(i.prototype.isDateExact = function (e, i) {
var n = this;
return (a.isInteger(e) && a.isInteger(i)) ||
("boolean" == typeof e && "boolean" == typeof i)
? e === i
: (a.isDate(e) || t.isArray(e)) && (a.isDate(i) || t.isArray(i))
? n.create(e).pick === n.create(i).pick
: t.isPlainObject(e) && t.isPlainObject(i)
? n.isDateExact(e.from, i.from) && n.isDateExact(e.to, i.to)
: !1;
}),
(i.prototype.isDateOverlap = function (e, i) {
var n = this,
r = n.settings.firstDay ? 1 : 0;
return a.isInteger(e) && (a.isDate(i) || t.isArray(i))
? ((e = (e % 7) + r), e === n.create(i).day + 1)
: a.isInteger(i) && (a.isDate(e) || t.isArray(e))
? ((i = (i % 7) + r), i === n.create(e).day + 1)
: t.isPlainObject(e) && t.isPlainObject(i)
? n.overlapRanges(e, i)
: !1;
}),
(i.prototype.flipEnable = function (e) {
var t = this.item;
t.enable = e || (-1 == t.enable ? 1 : -1);
}),
(i.prototype.deactivate = function (e, i) {
var n = this,
r = n.item.disable.slice(0);
return (
"flip" == i
? n.flipEnable()
: i === !1
? (n.flipEnable(1), (r = []))
: i === !0
? (n.flipEnable(-1), (r = []))
: i.map(function (e) {
for (var i, s = 0; s < r.length; s += 1)
if (n.isDateExact(e, r[s])) {
i = !0;
break;
}
i ||
((a.isInteger(e) ||
a.isDate(e) ||
t.isArray(e) ||
(t.isPlainObject(e) && e.from && e.to)) &&
r.push(e));
}),
r
);
}),
(i.prototype.activate = function (e, i) {
var n = this,
r = n.item.disable,
s = r.length;
return (
"flip" == i
? n.flipEnable()
: i === !0
? (n.flipEnable(1), (r = []))
: i === !1
? (n.flipEnable(-1), (r = []))
: i.map(function (e) {
var i, o, l, d;
for (l = 0; s > l; l += 1) {
if (((o = r[l]), n.isDateExact(o, e))) {
(i = r[l] = null), (d = !0);
break;
}
if (n.isDateOverlap(o, e)) {
t.isPlainObject(e)
? ((e.inverted = !0), (i = e))
: t.isArray(e)
? ((i = e), i[3] || i.push("inverted"))
: a.isDate(e) &&
(i = [
e.getFullYear(),
e.getMonth(),
e.getDate(),
"inverted",
]);
break;
}
}
if (i)
for (l = 0; s > l; l += 1)
if (n.isDateExact(r[l], e)) {
r[l] = null;
break;
}
if (d)
for (l = 0; s > l; l += 1)
if (n.isDateOverlap(r[l], e)) {
r[l] = null;
break;
}
i && r.push(i);
}),
r.filter(function (e) {
return null != e;
})
);
}),
(i.prototype.nodes = function (e) {
var t = this,
i = t.settings,
s = t.item,
o = s.now,
l = s.select,
d = s.highlight,
u = s.view,
c = s.disable,
p = s.min,
f = s.max,
h = (function (e, t) {
return (
i.firstDay && (e.push(e.shift()), t.push(t.shift())),
a.node(
"thead",
a.node(
"tr",
a.group({
min: 0,
max: n - 1,
i: 1,
node: "th",
item: function (n) {
return [
e[n],
i.klass.weekdays,
'scope=col title="' + t[n] + '"',
];
},
})
)
)
);
})(
(i.showWeekdaysFull ? i.weekdaysFull : i.weekdaysLetter).slice(0),
i.weekdaysFull.slice(0)
),
m = function (e) {
return a.node(
"div",
" ",
i.klass["nav" + (e ? "Next" : "Prev")] +
((e && u.year >= f.year && u.month >= f.month) ||
(!e && u.year <= p.year && u.month <= p.month)
? " " + i.klass.navDisabled
: ""),
"data-nav=" +
(e || -1) +
" " +
a.ariaAttr({
role: "button",
controls: t.$node[0].id + "_table",
}) +
' title="' +
(e ? i.labelMonthNext : i.labelMonthPrev) +
'"'
);
},
g = function (n) {
var r = i.showMonthsShort ? i.monthsShort : i.monthsFull;
return (
"short_months" == n && (r = i.monthsShort),
i.selectMonths && void 0 == n
? a.node(
"select",
a.group({
min: 0,
max: 11,
i: 1,
node: "option",
item: function (e) {
return [
r[e],
0,
"value=" +
e +
(u.month == e ? " selected" : "") +
((u.year == p.year && e < p.month) ||
(u.year == f.year && e > f.month)
? " disabled"
: ""),
];
},
}),
i.klass.selectMonth + " browser-default",
(e ? "" : "disabled") +
" " +
a.ariaAttr({
controls: t.$node[0].id + "_table",
}) +
' title="' +
i.labelMonthSelect +
'"'
)
: "short_months" == n
? null != l
? a.node("div", r[l.month])
: a.node("div", r[u.month])
: a.node("div", r[u.month], i.klass.month)
);
},
v = function (n) {
var r = u.year,
s = i.selectYears === !0 ? 5 : ~~(i.selectYears / 2);
if (s) {
var o = p.year,
l = f.year,
d = r - s,
c = r + s;
if ((o > d && ((c += o - d), (d = o)), c > l)) {
var h = d - o,
m = c - l;
(d -= h > m ? m : h), (c = l);
}
if (i.selectYears && void 0 == n)
return a.node(
"select",
a.group({
min: d,
max: c,
i: 1,
node: "option",
item: function (e) {
return [
e,
0,
"value=" + e + (r == e ? " selected" : ""),
];
},
}),
i.klass.selectYear + " browser-default",
(e ? "" : "disabled") +
" " +
a.ariaAttr({
controls: t.$node[0].id + "_table",
}) +
' title="' +
i.labelYearSelect +
'"'
);
}
return "raw" == n
? a.node("div", r)
: a.node("div", r, i.klass.year);
};
return (
(createDayLabel = function () {
return null != l ? a.node("div", l.date) : a.node("div", o.date);
}),
(createWeekdayLabel = function () {
var e;
e = null != l ? l.day : o.day;
var t = i.weekdaysFull[e];
return t;
}),
a.node(
"div",
a.node("div", createWeekdayLabel(), "picker__weekday-display") +
a.node("div", g("short_months"), i.klass.month_display) +
a.node("div", createDayLabel(), i.klass.day_display) +
a.node("div", v("raw"), i.klass.year_display),
i.klass.date_display
) +
a.node(
"div",
a.node(
"div",
(i.selectYears ? g() + v() : g() + v()) + m() + m(1),
i.klass.header
) +
a.node(
"table",
h +
a.node(
"tbody",
a.group({
min: 0,
max: r - 1,
i: 1,
node: "tr",
item: function (e) {
var r =
i.firstDay &&
0 === t.create([u.year, u.month, 1]).day
? -7
: 0;
return [
a.group({
min: n * e - u.day + r + 1,
max: function () {
return this.min + n - 1;
},
i: 1,
node: "td",
item: function (e) {
e = t.create([
u.year,
u.month,
e + (i.firstDay ? 1 : 0),
]);
var n = l && l.pick == e.pick,
r = d && d.pick == e.pick,
s =
(c && t.disabled(e)) ||
e.pick < p.pick ||
e.pick > f.pick,
h = a.trigger(t.formats.toString, t, [
i.format,
e,
]);
return [
a.node(
"div",
e.date,
(function (t) {
return (
t.push(
u.month == e.month
? i.klass.infocus
: i.klass.outfocus
),
o.pick == e.pick &&
t.push(i.klass.now),
n && t.push(i.klass.selected),
r && t.push(i.klass.highlighted),
s && t.push(i.klass.disabled),
t.join(" ")
);
})([i.klass.day]),
"data-pick=" +
e.pick +
" " +
a.ariaAttr({
role: "gridcell",
label: h,
selected:
n && t.$node.val() === h
? !0
: null,
activedescendant: r ? !0 : null,
disabled: s ? !0 : null,
})
),
"",
a.ariaAttr({
role: "presentation",
}),
];
},
}),
];
},
})
),
i.klass.table,
'id="' +
t.$node[0].id +
'_table" ' +
a.ariaAttr({
role: "grid",
controls: t.$node[0].id,
readonly: !0,
})
),
i.klass.calendar_container
) +
a.node(
"div",
a.node(
"button",
i.today,
"btn-flat picker__today",
"type=button data-pick=" +
o.pick +
(e && !t.disabled(o) ? "" : " disabled") +
" " +
a.ariaAttr({
controls: t.$node[0].id,
})
) +
a.node(
"button",
i.clear,
"btn-flat picker__clear",
"type=button data-clear=1" +
(e ? "" : " disabled") +
" " +
a.ariaAttr({
controls: t.$node[0].id,
})
) +
a.node(
"button",
i.close,
"btn-flat picker__close",
"type=button data-close=true " +
(e ? "" : " disabled") +
" " +
a.ariaAttr({
controls: t.$node[0].id,
})
),
i.klass.footer
)
);
}),
(i.defaults = (function (e) {
return {
labelMonthNext: "Next month",
labelMonthPrev: "Previous month",
labelMonthSelect: "Select a month",
labelYearSelect: "Select a year",
monthsFull: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
],
monthsShort: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
weekdaysFull: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
],
weekdaysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
weekdaysLetter: ["S", "M", "T", "W", "T", "F", "S"],
today: "Today",
clear: "Clear",
close: "Close",
format: "d mmmm, yyyy",
klass: {
table: e + "table",
header: e + "header",
date_display: e + "date-display",
day_display: e + "day-display",
month_display: e + "month-display",
year_display: e + "year-display",
calendar_container: e + "calendar-container",
navPrev: e + "nav--prev",
navNext: e + "nav--next",
navDisabled: e + "nav--disabled",
month: e + "month",
year: e + "year",
selectMonth: e + "select--month",
selectYear: e + "select--year",
weekdays: e + "weekday",
day: e + "day",
disabled: e + "day--disabled",
selected: e + "day--selected",
highlighted: e + "day--highlighted",
now: e + "day--today",
infocus: e + "day--infocus",
outfocus: e + "day--outfocus",
footer: e + "footer",
buttonClear: e + "button--clear",
buttonToday: e + "button--today",
buttonClose: e + "button--close",
},
};
})(e.klasses().picker + "__")),
e.extend("pickadate", i);
}),
(function (e) {
function t() {
var t = +e(this).attr("length"),
i = +e(this).val().length,
n = t >= i;
e(this)
.parent()
.find('span[class="character-counter"]')
.html(i + "/" + t),
r(n, e(this));
}
function i(t) {
var i = e("
")
.addClass("character-counter")
.css("float", "right")
.css("font-size", "12px")
.css("height", 1);
t.parent().append(i);
}
function n() {
e(this).parent().find('span[class="character-counter"]').html("");
}
function r(e, t) {
var i = t.hasClass("invalid");
e && i
? t.removeClass("invalid")
: e || i || (t.removeClass("valid"), t.addClass("invalid"));
}
(e.fn.characterCounter = function () {
return this.each(function () {
var r = void 0 !== e(this).attr("length");
r &&
(e(this).on("input", t),
e(this).on("focus", t),
e(this).on("blur", n),
i(e(this)));
});
}),
e(document).ready(function () {
e("input, textarea").characterCounter();
});
})(jQuery),
!(function (e) {
function t(e) {
return "undefined" == typeof e.which
? !0
: "number" == typeof e.which && e.which > 0
? !e.ctrlKey &&
!e.metaKey &&
!e.altKey &&
8 != e.which &&
9 != e.which
: !1;
}
function i(t) {
e(t).closest(".form-group").addClass("is-focused");
}
function n(t) {
e(t).closest(".form-group").removeClass("is-focused");
}
(e.expr[":"].notmdproc = function (t) {
return e(t).data("mdproc") ? !1 : !0;
}),
(e.material = {
options: {
input: !0,
ripples: !0,
checkbox: !0,
togglebutton: !0,
radio: !0,
arrive: !0,
autofill: !1,
withRipples: [
".btn:not(.btn-link)",
".card-image",
".navbar a:not(.withoutripple)",
".dropdown-menu a",
".nav-tabs a:not(.withoutripple)",
".withripple",
".pagination li:not(.active):not(.disabled) a:not(.withoutripple)",
].join(","),
inputElements:
"input.form-control, textarea.form-control, select.form-control",
checkboxElements: ".checkbox > label > input[type=checkbox]",
togglebuttonElements:
".togglebutton > label > input[type=checkbox]",
radioElements: ".radio > label > input[type=radio]",
},
checkbox: function (t) {
e(t ? t : this.options.checkboxElements)
.filter(":notmdproc")
.data("mdproc", !0)
.after(
"
"
);
},
togglebutton: function (t) {
e(t ? t : this.options.togglebuttonElements)
.filter(":notmdproc")
.data("mdproc", !0)
.after("
");
},
radio: function (t) {
e(t ? t : this.options.radioElements)
.filter(":notmdproc")
.data("mdproc", !0)
.after("
");
},
input: function (t) {
e(t ? t : this.options.inputElements)
.filter(":notmdproc")
.data("mdproc", !0)
.each(function () {
var t = e(this),
i = t.closest(".form-group");
0 === i.length &&
(t.wrap("
"),
(i = t.closest(".form-group"))),
t.attr("data-hint") &&
(t.after(
"
" + t.attr("data-hint") + "
"
),
t.removeAttr("data-hint"));
var n = {
"input-lg": "form-group-lg",
"input-sm": "form-group-sm",
};
if (
(e.each(n, function (e, n) {
t.hasClass(e) && (t.removeClass(e), i.addClass(n));
}),
t.hasClass("floating-label"))
) {
var r = t.attr("placeholder");
t.attr("placeholder", null).removeClass("floating-label");
var a = t.attr("id"),
s = "";
a && (s = "for='" + a + "'"),
i.addClass("label-floating"),
t.after(
"
"
);
}
(null === t.val() ||
"undefined" == t.val() ||
"" === t.val()) &&
i.addClass("is-empty"),
i.append("
"),
i.find("input[type=file]").length > 0 &&
i.addClass("is-fileinput");
});
},
attachInputEventHandlers: function () {
e(".form-group .checkbox label").hover(
function () {
i(this);
},
function () {
n(this);
}
),
e(document)
.on("change", ".checkbox input[type=checkbox]", function () {
e(this).blur();
})
.on("keydown paste", ".form-control", function (i) {
t(i) &&
e(this).closest(".form-group").removeClass("is-empty");
})
.on("keyup change", ".form-control", function () {
var t = e(this),
i = t.closest(".form-group"),
n =
"undefined" == typeof t[0].checkValidity ||
t[0].checkValidity();
"" === t.val() && n
? i.addClass("is-empty")
: i.removeClass("is-empty"),
n ? i.removeClass("has-error") : i.addClass("has-error");
})
.on(
"focus",
".form-control, .form-group.is-fileinput",
function () {
i(this);
}
)
.on(
"blur",
".form-control, .form-group.is-fileinput",
function () {
n(this);
}
)
.on("change", ".form-group input", function () {
var t = e(this);
if ("file" != t.attr("type")) {
var i = t.closest(".form-group"),
n = t.val();
n ? i.removeClass("is-empty") : i.addClass("is-empty");
}
})
.on(
"change",
".form-group.is-fileinput input[type='file']",
function () {
var t = e(this),
i = t.closest(".form-group"),
n = "";
e.each(this.files, function (e, t) {
n += t.name + ", ";
}),
(n = n.substring(0, n.length - 2)),
n ? i.removeClass("is-empty") : i.addClass("is-empty"),
i.find("input.form-control[readonly]").val(n);
}
);
},
ripples: function (t) {
e(t ? t : this.options.withRipples).ripples();
},
autofill: function () {
var t = setInterval(function () {
e("input[type!=checkbox]").each(function () {
var t = e(this);
t.val() && t.val() !== t.attr("value") && t.trigger("change");
});
}, 100);
setTimeout(function () {
clearInterval(t);
}, 1e4);
},
attachAutofillEventHandlers: function () {
var t;
e(document)
.on("focus", "input", function () {
var i = e(this)
.parents("form")
.find("input")
.not("[type=file]");
t = setInterval(function () {
i.each(function () {
var t = e(this);
t.val() !== t.attr("value") && t.trigger("change");
});
}, 100);
})
.on("blur", ".form-group input", function () {
clearInterval(t);
});
},
init: function () {
var t = e(document);
e.fn.ripples && this.options.ripples && this.ripples(),
this.options.input &&
(this.input(), this.attachInputEventHandlers()),
this.options.checkbox && this.checkbox(),
this.options.togglebutton && this.togglebutton(),
this.options.radio && this.radio(),
this.options.autofill &&
(this.autofill(), this.attachAutofillEventHandlers()),
document.arrive &&
this.options.arrive &&
(e.fn.ripples &&
this.options.ripples &&
t.arrive(this.options.withRipples, function () {
e.material.ripples(e(this));
}),
this.options.input &&
t.arrive(this.options.inputElements, function () {
e.material.input(e(this));
}),
this.options.checkbox &&
t.arrive(this.options.checkboxElements, function () {
e.material.checkbox(e(this));
}),
this.options.radio &&
t.arrive(this.options.radioElements, function () {
e.material.radio(e(this));
}),
this.options.togglebutton &&
t.arrive(this.options.togglebuttonElements, function () {
e.material.togglebutton(e(this));
}));
},
});
})(jQuery),
!(function (e, t) {
"use strict";
"function" == typeof define && define.amd
? define(["jquery"], t)
: "object" == typeof exports
? (module.exports = t(require("jquery")))
: (e.bootbox = t(e.jQuery));
})(this, function e(t, i) {
"use strict";
function n(e) {
var t = g[h.locale];
return t ? t[e] : g.en[e];
}
function r(e, i, n) {
e.stopPropagation(), e.preventDefault();
var r = t.isFunction(n) && n(e) === !1;
r || i.modal("hide");
}
function a(e) {
var t,
i = 0;
for (t in e) i++;
return i;
}
function s(e, i) {
var n = 0;
t.each(e, function (e, t) {
i(e, t, n++);
});
}
function o(e) {
var i, n;
if ("object" != typeof e)
throw new Error("Please supply an object of options");
if (!e.message) throw new Error("Please specify a message");
return (
(e = t.extend({}, h, e)),
e.buttons || (e.buttons = {}),
(e.backdrop = e.backdrop ? "static" : !1),
(i = e.buttons),
(n = a(i)),
s(i, function (e, r, a) {
if (
(t.isFunction(r) &&
(r = i[e] =
{
callback: r,
}),
"object" !== t.type(r))
)
throw new Error("button with key " + e + " must be an object");
r.label || (r.label = e),
r.className ||
(r.className =
2 >= n && a === n - 1 ? "btn-primary" : "btn-default");
}),
e
);
}
function l(e, t) {
var i = e.length,
n = {};
if (1 > i || i > 2) throw new Error("Invalid argument length");
return (
2 === i || "string" == typeof e[0]
? ((n[t[0]] = e[0]), (n[t[1]] = e[1]))
: (n = e[0]),
n
);
}
function d(e, i, n) {
return t.extend(!0, {}, e, l(i, n));
}
function u(e, t, i, n) {
var r = {
className: "bootbox-" + e,
buttons: c.apply(null, t),
};
return p(d(r, n, i), t);
}
function c() {
for (var e = {}, t = 0, i = arguments.length; i > t; t++) {
var r = arguments[t],
a = r.toLowerCase(),
s = r.toUpperCase();
e[a] = {
label: n(s),
};
}
return e;
}
function p(e, t) {
var n = {};
return (
s(t, function (e, t) {
n[t] = !0;
}),
s(e.buttons, function (e) {
if (n[e] === i)
throw new Error(
"button key " +
e +
" is not allowed (options are " +
t.join("\n") +
")"
);
}),
e
);
}
var f = {
dialog:
"
",
header:
"",
footer: "",
closeButton:
"
",
form: "
",
inputs: {
text: "
",
textarea:
"
",
email:
"
",
select:
"
",
checkbox:
"
",
date: "
",
time: "
",
number:
"
",
password:
"
",
},
},
h = {
locale: "en",
backdrop: !0,
animate: !0,
className: null,
closeButton: !0,
show: !0,
container: "body",
},
m = {};
(m.alert = function () {
var e;
if (
((e = u("alert", ["ok"], ["message", "callback"], arguments)),
e.callback && !t.isFunction(e.callback))
)
throw new Error(
"alert requires callback property to be a function when provided"
);
return (
(e.buttons.ok.callback = e.onEscape =
function () {
return t.isFunction(e.callback) ? e.callback() : !0;
}),
m.dialog(e)
);
}),
(m.confirm = function () {
var e;
if (
((e = u(
"confirm",
["cancel", "confirm"],
["message", "callback"],
arguments
)),
(e.buttons.cancel.callback = e.onEscape =
function () {
return e.callback(!1);
}),
(e.buttons.confirm.callback = function () {
return e.callback(!0);
}),
!t.isFunction(e.callback))
)
throw new Error("confirm requires a callback");
return m.dialog(e);
}),
(m.prompt = function () {
var e, n, r, a, o, l, u;
if (
((a = t(f.form)),
(n = {
className: "bootbox-prompt",
buttons: c("cancel", "confirm"),
value: "",
inputType: "text",
}),
(e = p(d(n, arguments, ["title", "callback"]), [
"cancel",
"confirm",
])),
(l = e.show === i ? !0 : e.show),
(e.message = a),
(e.buttons.cancel.callback = e.onEscape =
function () {
return e.callback(null);
}),
(e.buttons.confirm.callback = function () {
var i;
switch (e.inputType) {
case "text":
case "textarea":
case "email":
case "select":
case "date":
case "time":
case "number":
case "password":
i = o.val();
break;
case "checkbox":
var n = o.find("input:checked");
(i = []),
s(n, function (e, n) {
i.push(t(n).val());
});
}
return e.callback(i);
}),
(e.show = !1),
!e.title)
)
throw new Error("prompt requires a title");
if (!t.isFunction(e.callback))
throw new Error("prompt requires a callback");
if (!f.inputs[e.inputType]) throw new Error("invalid prompt type");
switch (((o = t(f.inputs[e.inputType])), e.inputType)) {
case "text":
case "textarea":
case "email":
case "date":
case "time":
case "number":
case "password":
o.val(e.value);
break;
case "select":
var h = {};
if (((u = e.inputOptions || []), !u.length))
throw new Error("prompt with select requires options");
s(u, function (e, n) {
var r = o;
if (n.value === i || n.text === i)
throw new Error("given options in wrong format");
n.group &&
(h[n.group] ||
(h[n.group] = t("
").attr("label", n.group)),
(r = h[n.group])),
r.append(
"
"
);
}),
s(h, function (e, t) {
o.append(t);
}),
o.val(e.value);
break;
case "checkbox":
var g = t.isArray(e.value) ? e.value : [e.value];
if (((u = e.inputOptions || []), !u.length))
throw new Error("prompt with checkbox requires options");
if (!u[0].value || !u[0].text)
throw new Error("given options in wrong format");
(o = t("
")),
s(u, function (i, n) {
var r = t(f.inputs[e.inputType]);
r.find("input").attr("value", n.value),
r.find("label").append(n.text),
s(g, function (e, t) {
t === n.value && r.find("input").prop("checked", !0);
}),
o.append(r);
});
}
return (
e.placeholder && o.attr("placeholder", e.placeholder),
e.pattern && o.attr("pattern", e.pattern),
a.append(o),
a.on("submit", function (e) {
e.preventDefault(),
e.stopPropagation(),
r.find(".btn-primary").click();
}),
(r = m.dialog(e)),
r.off("shown.bs.modal"),
r.on("shown.bs.modal", function () {
o.focus();
}),
l === !0 && r.modal("show"),
r
);
}),
(m.dialog = function (e) {
e = o(e);
var i = t(f.dialog),
n = i.find(".modal-dialog"),
a = i.find(".modal-body"),
l = e.buttons,
d = "",
u = {
onEscape: e.onEscape,
};
if (
(s(l, function (e, t) {
(d +=
"
"),
(u[e] = t.callback);
}),
a.find(".bootbox-body").html(e.message),
e.animate === !0 && i.addClass("fade"),
e.className && i.addClass(e.className),
"large" === e.size && n.addClass("modal-lg"),
"small" === e.size && n.addClass("modal-sm"),
e.title && a.before(f.header),
e.closeButton)
) {
var c = t(f.closeButton);
e.title
? i.find(".modal-header").prepend(c)
: c.css("margin-top", "-10px").prependTo(a);
}
return (
e.title && i.find(".modal-title").html(e.title),
d.length && (a.after(f.footer), i.find(".modal-footer").html(d)),
i.on("hidden.bs.modal", function (e) {
e.target === this && i.remove();
}),
i.on("shown.bs.modal", function () {
i.find(".btn-primary:first").focus();
}),
i.on("escape.close.bb", function (e) {
u.onEscape && r(e, i, u.onEscape);
}),
i.on("click", ".modal-footer button", function (e) {
var n = t(this).data("bb-handler");
r(e, i, u[n]);
}),
i.on("click", ".bootbox-close-button", function (e) {
r(e, i, u.onEscape);
}),
i.on("keyup", function (e) {
27 === e.which && i.trigger("escape.close.bb");
}),
t(e.container).append(i),
i.modal({
backdrop: e.backdrop,
keyboard: !1,
show: !1,
}),
e.show && i.modal("show"),
i
);
}),
(m.setDefaults = function () {
var e = {};
2 === arguments.length
? (e[arguments[0]] = arguments[1])
: (e = arguments[0]),
t.extend(h, e);
}),
(m.hideAll = function () {
return t(".bootbox").modal("hide"), m;
});
var g = {
br: {
OK: "OK",
CANCEL: "Cancelar",
CONFIRM: "Sim",
},
cs: {
OK: "OK",
CANCEL: "Zrušit",
CONFIRM: "Potvrdit",
},
da: {
OK: "OK",
CANCEL: "Annuller",
CONFIRM: "Accepter",
},
de: {
OK: "OK",
CANCEL: "Abbrechen",
CONFIRM: "Akzeptieren",
},
el: {
OK: "Εντάξει",
CANCEL: "ΑκÏÏωση",
CONFIRM: "Επιβεβαίωση",
},
en: {
OK: "OK",
CANCEL: "Cancel",
CONFIRM: "OK",
},
es: {
OK: "OK",
CANCEL: "Cancelar",
CONFIRM: "Aceptar",
},
et: {
OK: "OK",
CANCEL: "Katkesta",
CONFIRM: "OK",
},
fi: {
OK: "OK",
CANCEL: "Peruuta",
CONFIRM: "OK",
},
fr: {
OK: "OK",
CANCEL: "Annuler",
CONFIRM: "D'accord",
},
he: {
OK: "×ישור",
CANCEL: "ביטול",
CONFIRM: "×ישור",
},
id: {
OK: "OK",
CANCEL: "Batal",
CONFIRM: "OK",
},
it: {
OK: "OK",
CANCEL: "Annulla",
CONFIRM: "Conferma",
},
ja: {
OK: "OK",
CANCEL: "ã‚ャンセル",
CONFIRM: "確èª",
},
lt: {
OK: "Gerai",
CANCEL: "Atšaukti",
CONFIRM: "Patvirtinti",
},
lv: {
OK: "Labi",
CANCEL: "Atcelt",
CONFIRM: "ApstiprinÄt",
},
nl: {
OK: "OK",
CANCEL: "Annuleren",
CONFIRM: "Accepteren",
},
no: {
OK: "OK",
CANCEL: "Avbryt",
CONFIRM: "OK",
},
pl: {
OK: "OK",
CANCEL: "Anuluj",
CONFIRM: "Potwierdź",
},
pt: {
OK: "OK",
CANCEL: "Cancelar",
CONFIRM: "Confirmar",
},
ru: {
OK: "OK",
CANCEL: "Отмена",
CONFIRM: "Применить",
},
sv: {
OK: "OK",
CANCEL: "Avbryt",
CONFIRM: "OK",
},
tr: {
OK: "Tamam",
CANCEL: "Ä°ptal",
CONFIRM: "Onayla",
},
zh_CN: {
OK: "OK",
CANCEL: "å–消",
CONFIRM: "确认",
},
zh_TW: {
OK: "OK",
CANCEL: "å–消",
CONFIRM: "確èª",
},
};
return (
(m.init = function (i) {
return e(i || t);
}),
m
);
}),
(function () {
var e = (function () {
var e = {},
t = function (t, i, n) {
for (var r = t.split("."), a = 0; a < r.length - 1; a++)
n[r[a]] || (n[r[a]] = {}), (n = n[r[a]]);
"function" == typeof i
? i.isClass
? (n[r[a]] = i)
: (n[r[a]] = function () {
return i.apply(e, arguments);
})
: (n[r[a]] = i);
},
i = function (i, n, r) {
t(i, n, e), r && t(i, n, window.filepicker);
},
n = function (t, n, r) {
"function" == typeof t && ((r = n), (n = t), (t = "")),
t && (t += ".");
var a = n.call(e);
for (var s in a) i(t + s, a[s], r);
},
r = function (t) {
t.apply(e, arguments);
};
return {
extend: n,
internal: r,
};
})();
if (window.filepicker) for (attr in e) window.filepicker[attr] = e[attr];
else window.filepicker = e;
})(),
filepicker.extend("ajax", function () {
var e = this,
t = function (e, t) {
(t.method = "GET"), a(e, t);
},
i = function (t, i) {
(i.method = "POST"),
(t +=
(t.indexOf("?") >= 0 ? "&" : "?") +
"_cacheBust=" +
e.util.getId()),
a(t, i);
},
n = function (t, i) {
var r = [];
for (var a in t) {
var s = t[a];
i && (a = i + "[" + a + "]");
var o;
switch (e.util.typeOf(s)) {
case "object":
o = n(s, a);
break;
case "array":
for (var l = {}, d = 0; d < s.length; d++) l[d] = s[d];
o = n(l, a);
break;
default:
o = a + "=" + encodeURIComponent(s);
}
null !== s && r.push(o);
}
return r.join("&");
},
r = function () {
try {
return new window.XMLHttpRequest();
} catch (e) {
try {
return new window.ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new window.ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
return null;
}
}
}
},
a = function (t, i) {
t = t || "";
var a = i.method ? i.method.toUpperCase() : "POST",
o = i.success || function () {},
l = i.error || function () {},
d = void 0 === i.async ? !0 : i.async,
u = i.data || null,
c = void 0 === i.processData ? !0 : i.processData,
p = i.headers || {},
f = e.util.parseUrl(t),
h = window.location.protocol + "//" + window.location.host,
m = h !== f.origin,
g = !1;
u && c && (u = n(i.data));
var v;
if (i.xhr) v = i.xhr;
else if (((v = r()), !v)) return i.error("Ajax not allowed"), v;
if (m && window.XDomainRequest && !("withCredentials" in v))
return s(t, i);
i.progress &&
v.upload &&
v.upload.addEventListener(
"progress",
function (e) {
e.lengthComputable &&
i.progress(Math.round((95 * e.loaded) / e.total));
},
!1
);
var y = function () {
if (4 == v.readyState && !g)
if (
(i.progress && i.progress(100),
v.status >= 200 && v.status < 300)
) {
var t = v.responseText;
if (i.json)
try {
t = e.json.decode(t);
} catch (n) {
return void w.call(v, "Invalid json: " + t);
}
o(t, v.status, v), (g = !0);
} else w.call(v, v.responseText), (g = !0);
};
v.onreadystatechange = y;
var w = function (e) {
return g
? void 0
: (i.progress && i.progress(100),
(g = !0),
400 == this.status
? void l("bad_params", this.status, this)
: 403 == this.status
? void l("not_authorized", this.status, this)
: 404 == this.status
? void l("not_found", this.status, this)
: m
? 4 == this.readyState && 0 === this.status
? void l("CORS_not_allowed", this.status, this)
: void l("CORS_error", this.status, this)
: void l(e, this.status, this));
};
(v.onerror = w),
u &&
"GET" == a &&
((t += (-1 != t.indexOf("?") ? "&" : "?") + u), (u = null)),
v.open(a, t, d),
i.json
? v.setRequestHeader(
"Accept",
"application/json, text/javascript"
)
: v.setRequestHeader(
"Accept",
"text/javascript, text/html, application/xml, text/xml, */*"
);
var b = p["Content-Type"] || p["content-type"];
if (
(u &&
c &&
("POST" == a || "PUT" == a) &&
void 0 == b &&
v.setRequestHeader(
"Content-Type",
"application/x-www-form-urlencoded; charset=utf-8"
),
p)
)
for (var x in p) v.setRequestHeader(x, p[x]);
return v.send(u), v;
},
s = function (t, i) {
if (!window.XDomainRequest) return null;
var r = i.method ? i.method.toUpperCase() : "POST",
a = i.success || function () {},
s = i.error || function () {},
o = i.data || {};
if (
("http:" == window.location.protocol
? (t = t.replace("https:", "http:"))
: "https:" == window.location.protocol &&
(t = t.replace("http:", "https:")),
i.async)
)
throw new e.FilepickerException(
"Asyncronous Cross-domain requests are not supported"
);
"GET" != r && "POST" != r && ((o._method = r), (r = "POST")),
i.processData !== !1 && (o = o ? n(o) : null),
o &&
"GET" == r &&
((t += (t.indexOf("?") >= 0 ? "&" : "?") + o), (o = null)),
(t +=
(t.indexOf("?") >= 0 ? "&" : "?") +
"_xdr=true&_cacheBust=" +
e.util.getId());
var l = new window.XDomainRequest();
return (
(l.onload = function () {
var t = l.responseText;
if ((i.progress && i.progress(100), i.json))
try {
t = e.json.decode(t);
} catch (n) {
return void s("Invalid json: " + t, 200, l);
}
a(t, 200, l);
}),
(l.onerror = function () {
i.progress && i.progress(100),
s(l.responseText || "CORS_error", this.status || 500, this);
}),
(l.onprogress = function () {}),
(l.ontimeout = function () {}),
(l.timeout = 3e4),
l.open(r, t, !0),
l.send(o),
l
);
};
return {
get: t,
post: i,
request: a,
};
}),
filepicker.extend(
"base64",
function () {
var e =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
t = function (t, i) {
i = i || void 0 === i;
var r,
a,
s,
o,
l,
d,
u,
c = "",
p = 0;
for (i && (t = n(t)); p < t.length; )
(r = t.charCodeAt(p)),
(a = t.charCodeAt(p + 1)),
(s = t.charCodeAt(p + 2)),
(p += 3),
(o = r >> 2),
(l = ((3 & r) << 4) | (a >> 4)),
(d = ((15 & a) << 2) | (s >> 6)),
(u = 63 & s),
isNaN(a) ? (d = u = 64) : isNaN(s) && (u = 64),
(c = c + e.charAt(o) + e.charAt(l) + e.charAt(d) + e.charAt(u));
return c;
},
i = function (t, i) {
i = i || void 0 === i;
var n,
a,
s,
o,
l,
d,
u,
c = "",
p = 0;
for (t = t.replace(/[^A-Za-z0-9\+\/\=]/g, ""); p < t.length; )
(o = e.indexOf(t.charAt(p))),
(l = e.indexOf(t.charAt(p + 1))),
(d = e.indexOf(t.charAt(p + 2))),
(u = e.indexOf(t.charAt(p + 3))),
(p += 4),
(n = (o << 2) | (l >> 4)),
(a = ((15 & l) << 4) | (d >> 2)),
(s = ((3 & d) << 6) | u),
(c += String.fromCharCode(n)),
64 != d && (c += String.fromCharCode(a)),
64 != u && (c += String.fromCharCode(s));
return i && (c = r(c)), c;
},
n = function (e) {
e = e.replace(/\r\n/g, "\n");
for (var t = "", i = 0; i < e.length; i++) {
var n = e.charCodeAt(i);
128 > n
? (t += String.fromCharCode(n))
: n > 127 && 2048 > n
? ((t += String.fromCharCode((n >> 6) | 192)),
(t += String.fromCharCode((63 & n) | 128)))
: ((t += String.fromCharCode((n >> 12) | 224)),
(t += String.fromCharCode(((n >> 6) & 63) | 128)),
(t += String.fromCharCode((63 & n) | 128)));
}
return t;
},
r = function (e) {
for (var t = "", i = 0, n = (c1 = c2 = 0); i < e.length; )
(n = e.charCodeAt(i)),
128 > n
? ((t += String.fromCharCode(n)), i++)
: n > 191 && 224 > n
? ((c2 = e.charCodeAt(i + 1)),
(t += String.fromCharCode(((31 & n) << 6) | (63 & c2))),
(i += 2))
: ((c2 = e.charCodeAt(i + 1)),
(c3 = e.charCodeAt(i + 2)),
(t += String.fromCharCode(
((15 & n) << 12) | ((63 & c2) << 6) | (63 & c3)
)),
(i += 3));
return t;
};
return {
encode: t,
decode: i,
};
},
!0
),
filepicker.extend("browser", function () {
var e = function () {
return !!(
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/iPad/i)
);
},
t = function () {
return !!navigator.userAgent.match(/Android/i);
},
i = function () {
return !!navigator.userAgent.match(/MSIE 7\.0/i);
};
return {
isIOS: e,
isAndroid: t,
isIE7: i,
};
}),
filepicker.extend("comm", function () {
var e = this,
t = "filepicker_comm_iframe",
i = "fpapi_comm_iframe",
n = function () {
if (void 0 === window.frames[t]) {
s();
var n;
(n = document.createElement("iframe")),
(n.id = n.name = t),
(n.src = e.urls.COMM),
(n.style.display = "none"),
document.body.appendChild(n);
}
if (void 0 === window.frames[i]) {
s();
var r;
(r = document.createElement("iframe")),
(r.id = r.name = i),
(r.src = e.urls.API_COMM),
(r.style.display = "none"),
document.body.appendChild(r);
}
},
r = function (t) {
if (t.origin == e.urls.BASE || t.origin == e.urls.DIALOG_BASE) {
var i = e.json.parse(t.data);
e.handlers.run(i);
}
},
a = !1,
s = function () {
if (!a)
if (((a = !0), window.addEventListener))
window.addEventListener("message", r, !1);
else {
if (!window.attachEvent)
throw new e.FilepickerException("Unsupported browser");
window.attachEvent("onmessage", r);
}
},
o = function () {
if (window.removeEventListener)
window.removeEventListener("message", r, !1);
else {
if (!window.attachEvent)
throw new e.FilepickerException("Unsupported browser");
window.detachEvent("onmessage", r);
}
if (a) {
a = !1;
for (
var n = document.getElementsByName(t), s = 0;
s < n.length;
s++
)
n[s].parentNode.removeChild(n[s]);
try {
delete window.frames[t];
} catch (o) {}
for (
var l = document.getElementsByName(i), d = 0;
d < l.length;
d++
)
l[d].parentNode.removeChild(l[d]);
try {
delete window.frames[i];
} catch (o) {}
}
};
return {
openChannel: n,
closeChannel: o,
};
}),
filepicker.extend("comm_fallback", function () {
var e,
t = this,
i = "filepicker_comm_iframe",
n = "host_comm_iframe",
r = "",
a = 200,
s = function () {
o();
},
o = function () {
if (void 0 === window.frames[n]) {
var e;
(e = document.createElement("iframe")),
(e.id = e.name = n),
(r = e.src = t.urls.constructHostCommFallback()),
(e.style.display = "none");
var i = function () {
(r = e.contentWindow.location.href), l();
};
e.attachEvent ? e.attachEvent("onload", i) : (e.onload = i),
document.body.appendChild(e);
}
},
l = function () {
if (void 0 === window.frames[i]) {
var e;
(e = document.createElement("iframe")),
(e.id = e.name = i),
(e.src =
t.urls.FP_COMM_FALLBACK + "?host_url=" + encodeURIComponent(r)),
(e.style.display = "none"),
document.body.appendChild(e);
}
f();
},
d = !1,
u = void 0,
c = "",
p = function () {
var e = window.frames[i];
if (e) {
var r = e.frames[n];
if (r) {
var a = r.location.hash;
if (
(a && "#" == a.charAt(0) && (a = a.substr(1)),
a !== c && (c = a))
) {
var s;
try {
s = t.json.parse(a);
} catch (o) {}
s && t.handlers.run(s);
}
}
}
},
f = function () {
d || ((d = !0), (u = window.setInterval(p, a)));
},
h = function () {
if ((window.clearInterval(u), d)) {
d = !1;
for (
var e = document.getElementsByName(i), t = 0;
t < e.length;
t++
)
e[t].parentNode.removeChild(e[t]);
try {
delete window.frames[i];
} catch (r) {}
for (e = document.getElementsByName(n), t = 0; t < e.length; t++)
e[t].parentNode.removeChild(e[t]);
try {
delete window.frames[n];
} catch (r) {}
}
},
m = !("postMessage" in window),
g = function () {
(e = t.comm),
(t.comm = {
openChannel: s,
closeChannel: h,
});
};
return (
m && g(),
{
openChannel: s,
closeChannel: h,
isEnabled: m,
}
);
}),
filepicker.extend("conversions", function () {
var e = this,
t = {
width: "number",
height: "number",
fit: "string",
format: "string",
watermark: "string",
watermark_size: "number",
watermark_position: "string",
align: "string",
crop: "string or array",
quality: "number",
text: "string",
text_font: "string",
text_size: "number",
text_color: "string",
text_align: "string",
text_padding: "number",
policy: "string",
signature: "string",
storeLocation: "string",
storePath: "string",
storeContainer: "string",
storeAccess: "string",
rotate: "string or number",
},
i = function (i) {
var n;
for (var r in i) {
n = !1;
for (var a in t)
if (
r == a &&
((n = !0), -1 === t[a].indexOf(e.util.typeOf(i[r])))
)
throw new e.FilepickerException(
"Conversion parameter " +
r +
" is not the right type: " +
i[r] +
". Should be a " +
t[a]
);
if (!n)
throw new e.FilepickerException(
"Conversion parameter " + r + " is not a valid parameter."
);
}
},
n = function (t, n, r, a, s) {
i(n),
n.crop && e.util.isArray(n.crop) && (n.crop = n.crop.join(",")),
e.ajax.post(t + "/convert", {
data: n,
json: !0,
success: function (t) {
r(e.util.standardizeFPFile(t));
},
error: function (t, i, n) {
a(
"not_found" == t
? new e.errors.FPError(141)
: "bad_params" == t
? new e.errors.FPError(142)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(143)
);
},
progress: s,
});
};
return {
convert: n,
};
}),
filepicker.extend("cookies", function () {
var e = this,
t = function (t) {
var i = function (i) {
"ThirdPartyCookies" === i.type &&
((e.cookies.THIRD_PARTY_COOKIES = !!i.payload),
t && "function" == typeof t && t(!!i.payload));
};
return i;
},
i = function (i) {
var n = t(i);
e.handlers.attach("cookies", n), e.comm.openChannel();
};
return {
checkThirdParty: i,
};
}),
filepicker.extend("dragdrop", function () {
var e = this,
t = function () {
return (
(!!window.FileReader ||
navigator.userAgent.indexOf("Safari") >= 0) &&
"draggable" in document.createElement("span")
);
},
i = function (i, n) {
var r = "No DOM element found to create drop pane";
if (!i) throw new e.FilepickerException(r);
if (i.jquery) {
if (0 === i.length) throw new e.FilepickerException(r);
i = i[0];
}
if (!t())
return (
e.util.console.error(
"Your browser doesn't support drag-drop functionality"
),
!1
);
n = n || {};
var a = n.dragEnter || function () {},
s = n.dragLeave || function () {},
o = n.onStart || function () {},
l = n.onSuccess || function () {},
d = n.onError || function () {},
u = n.onProgress || function () {},
c = n.mimetypes;
c || (c = n.mimetype ? [n.mimetype] : ["*/*"]),
"string" == e.util.typeOf(c) && (c = c.split(","));
var p = n.extensions;
p || (n.extension && (p = [n.extension])),
"string" == e.util.typeOf(p) &&
(p = p.replace(/ /g, "").split(","));
var f = {
location: n.location,
path: n.path,
container: n.container,
access: n.access,
policy: n.policy,
signature: n.signature,
},
h = function () {
return (
i && "disabled" != (i.getAttribute("disabled") || "enabled")
);
};
i.addEventListener(
"dragenter",
function (e) {
return h() && a(), e.stopPropagation(), e.preventDefault(), !1;
},
!1
),
i.addEventListener(
"dragleave",
function (e) {
return h() && s(), e.stopPropagation(), e.preventDefault(), !1;
},
!1
),
i.addEventListener(
"dragover",
function (e) {
return e.preventDefault(), !1;
},
!1
),
i.addEventListener("drop", function (t) {
if ((t.stopPropagation(), t.preventDefault(), !h())) return !1;
var n, r, a;
if (t.dataTransfer.items)
for (r = t.dataTransfer.items, n = 0; n < r.length; n++)
if (
((a =
r[n] && r[n].webkitGetAsEntry
? r[n].webkitGetAsEntry()
: void 0),
a && a.isDirectory)
)
return (
d("WrongType", "Uploading a folder is not allowed"), !1
);
var s = t.dataTransfer.files,
l = s.length;
if (x(s))
for (
o(s), i.setAttribute("disabled", "disabled"), n = 0;
n < s.length;
n++
)
e.store(s[n], f, v(n, l), y, w(n, l));
return !1;
});
var m = {},
g = [],
v = function (e, t) {
return function (r) {
n.multiple
? (g.push(r),
g.length == t
? (l(g),
(g = []),
(m = {}),
i.setAttribute("disabled", "enabled"))
: ((m[e] = 100), b(t)))
: l([r]);
};
},
y = function (e) {
d("UploadError", e.toString()),
i.setAttribute("disabled", "enabled");
},
w = function (e, t) {
return function (i) {
(m[e] = i), b(t);
};
},
b = function (e) {
var t = 0;
for (var i in m) t += m[i];
var n = t / e;
u(n);
},
x = function (t) {
if (t.length > 0) {
if (t.length > 1 && !n.multiple)
return d("TooManyFiles", "Only one file at a time"), !1;
if (n.maxFiles > 0 && t.length > n.maxFiles)
return (
d(
"TooManyFiles",
"Only " + n.maxFiles + " files at a time"
),
!1
);
for (var i, r, a, s = 0; s < t.length; s++) {
(i = !1),
(r = t[s]),
(a = r.name || r.fileName || '"Unknown file"');
for (var o = 0; o < c.length; o++) {
var l = e.mimetypes.getMimetype(r);
i = i || e.mimetypes.matchesMimetype(l, c[o]);
}
if (!i)
return (
d("WrongType", a + " isn't the right type of file"), !1
);
if (p) {
for (i = !1, o = 0; o < p.length; o++)
i = i || e.util.endsWith(a, p[o]);
if (!i)
return (
d("WrongType", a + " isn't the right type of file"), !1
);
}
if (r.size && n.maxSize && r.size > n.maxSize)
return (
d(
"WrongSize",
a + " is too large (" + r.size + " Bytes)"
),
!1
);
}
return !0;
}
return d("NoFilesFound", "No files uploaded"), !1;
};
return !0;
};
return {
enabled: t,
makeDropPane: i,
};
}),
filepicker.extend(
"errors",
function () {
var e = this,
t = function (e) {
if (this === window) return new t(e);
if (((this.code = e), filepicker.debug)) {
var i = filepicker.error_map[this.code];
(this.message = i.message),
(this.moreInfo = i.moreInfo),
(this.toString = function () {
return (
"FPError " +
this.code +
": " +
this.message +
". For help, see " +
this.moreInfo
);
});
} else
this.toString = function () {
return (
"FPError " +
this.code +
". Include filepicker_debug.js for more info"
);
};
return this;
};
t.isClass = !0;
var i = function (t) {
filepicker.debug && e.util.console.error(t.toString());
};
return {
FPError: t,
handleError: i,
};
},
!0
),
filepicker.extend("exporter", function () {
var e = this,
t = function (t) {
var i = function (i, n, r) {
t[n] && !e.util.isArray(t[n])
? (t[n] = [t[n]])
: t[i]
? (t[n] = [t[i]])
: r && (t[n] = r);
};
if (t.mimetype && t.extension)
throw e.FilepickerException(
"Error: Cannot pass in both mimetype and extension parameters to the export function"
);
if ((i("service", "services"), t.services))
for (var n = 0; n < t.services.length; n++) {
var r = ("" + t.services[n]).replace(" ", ""),
a = e.services[r];
t.services[n] = void 0 === a ? r : a;
}
t.openTo && (t.openTo = e.services[t.openTo] || t.openTo),
e.util.setDefault(t, "container", "modal");
},
i = function (t, i) {
var n = function (n) {
if ("filepickerUrl" === n.type) {
if (n.error)
e.util.console.error(n.error), i(e.errors.FPError(132));
else {
var r = {};
(r.url = n.payload.url),
(r.filename = n.payload.data.filename),
(r.mimetype = n.payload.data.type),
(r.size = n.payload.data.size),
(r.isWriteable = !0),
t(r);
}
e.modal.close();
}
};
return n;
},
n = function (r, a, s, o) {
if ((t(a), a.debug))
return void setTimeout(function () {
s({
url: "https://www.filepicker.io/api/file/-nBq2onTSemLBxlcBWn1",
filename: "test.png",
mimetype: "image/png",
size: 58979,
});
}, 1);
if (void 0 === e.cookies.THIRD_PARTY_COOKIES) {
var l = !1;
return void e.cookies.checkThirdParty(function () {
l || (n(r, a, s, o), (l = !0));
});
}
var d = e.util.getId(),
u = !1,
c = function (e) {
(u = !0), s(e);
},
p = function (e) {
(u = !0), o(e);
},
f = function () {
u || ((u = !0), o(e.errors.FPError(131)));
};
"modal" == a.container &&
(a.mobile || e.window.shouldForce()) &&
(a.container = "window"),
e.window.open(a.container, e.urls.constructExportUrl(r, a, d), f),
e.handlers.attach(d, i(c, p));
};
return {
createExporter: n,
};
}),
filepicker.extend("files", function () {
var e = this,
t = function (t, n, r, a, s) {
var o = void 0 === n.base64encode;
o && (n.base64encode = !0), (n.base64encode = n.base64encode !== !1);
var l = function (t) {
o && (t = e.base64.decode(t, !!n.asText)), r(t);
};
i.call(this, t, n, l, a, s);
},
i = function (t, i, n, r, a) {
i.cache !== !0 && (i._cacheBust = e.util.getId()),
e.ajax.get(t, {
data: i,
headers: {
"X-NO-STREAM": !0,
},
success: n,
error: function (t, i, n) {
r(
"CORS_not_allowed" == t
? new e.errors.FPError(113)
: "CORS_error" == t
? new e.errors.FPError(114)
: "not_found" == t
? new e.errors.FPError(115)
: "bad_params" == t
? new e.errors.FPError(400)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(118)
);
},
progress: a,
});
},
n = function (t, i, n, r, a) {
if (
!(
window.File &&
window.FileReader &&
window.FileList &&
window.Blob
)
)
return (
a(10),
void e.files.storeFile(
t,
{},
function (t) {
a(50),
e.files.readFromFPUrl(t.url, i, n, r, function (e) {
a(50 + e / 2);
});
},
r,
function (e) {
a(e / 2);
}
)
);
var s = !!i.base64encode,
o = !!i.asText,
l = new FileReader();
(l.onprogress = function (e) {
e.lengthComputable && a(Math.round((e.loaded / e.total) * 100));
}),
(l.onload = function (t) {
a(100),
n(s ? e.base64.encode(t.target.result, o) : t.target.result);
}),
(l.onerror = function (t) {
switch (t.target.error.code) {
case t.target.error.NOT_FOUND_ERR:
r(new e.errors.FPError(115));
break;
case t.target.error.NOT_READABLE_ERR:
r(new e.errors.FPError(116));
break;
case t.target.error.ABORT_ERR:
r(new e.errors.FPError(117));
break;
default:
r(new e.errors.FPError(118));
}
}),
o || !l.readAsBinaryString
? l.readAsText(t)
: l.readAsBinaryString(t);
},
r = function (t, i, n, r, a, s) {
var o = n.mimetype || "text/plain";
e.ajax.post(e.urls.constructWriteUrl(t, n), {
headers: {
"Content-Type": o,
},
data: i,
processData: !1,
json: !0,
success: function (t) {
r(e.util.standardizeFPFile(t));
},
error: function (t, i, n) {
a(
"not_found" == t
? new e.errors.FPError(121)
: "bad_params" == t
? new e.errors.FPError(122)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(123)
);
},
progress: s,
});
},
a = function (t, i, n, r, a, s) {
var o = function (t, i, n) {
a(
"not_found" == t
? new e.errors.FPError(121)
: "bad_params" == t
? new e.errors.FPError(122)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(123)
);
},
l = function (t) {
r(e.util.standardizeFPFile(t));
};
u(i, e.urls.constructWriteUrl(t, n), l, o, s);
},
s = function (t, i, n, r, a, s) {
var o = function (t, i, n) {
a(
"not_found" == t
? new e.errors.FPError(121)
: "bad_params" == t
? new e.errors.FPError(122)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(123)
);
},
l = function (t) {
r(e.util.standardizeFPFile(t));
};
(n.mimetype = i.type), u(i, e.urls.constructWriteUrl(t, n), l, o, s);
},
o = function (t, i, n, r, a, s) {
e.ajax.post(e.urls.constructWriteUrl(t, n), {
data: {
url: i,
},
json: !0,
success: function (t) {
r(e.util.standardizeFPFile(t));
},
error: function (t, i, n) {
a(
"not_found" == t
? new e.errors.FPError(121)
: "bad_params" == t
? new e.errors.FPError(122)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(123)
);
},
progress: s,
});
},
l = function (t, i, n, r, a) {
if (t.files)
return void (0 === t.files.length
? r(new e.errors.FPError(115))
: d(t.files[0], i, n, r, a));
e.util.setDefault(i, "location", "S3"),
i.filename ||
(i.filename = t.value.replace("C:\\fakepath\\", "") || t.name);
var s = t.name;
(t.name = "fileUpload"),
e.iframeAjax.post(e.urls.constructStoreUrl(i), {
data: t,
processData: !1,
json: !0,
success: function (i) {
(t.name = s), n(e.util.standardizeFPFile(i));
},
error: function (t, i, n) {
r(
"not_found" == t
? new e.errors.FPError(121)
: "bad_params" == t
? new e.errors.FPError(122)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(123)
);
},
});
},
d = function (t, i, n, r, a) {
e.util.setDefault(i, "location", "S3");
var s = function (t, i, n) {
"not_found" == t
? r(new e.errors.FPError(121))
: "bad_params" == t
? r(new e.errors.FPError(122))
: "not_authorized" == t
? r(new e.errors.FPError(403))
: (e.util.console.error(t), r(new e.errors.FPError(123)));
},
o = function (t) {
n(e.util.standardizeFPFile(t));
};
i.filename || (i.filename = t.name || t.fileName),
u(t, e.urls.constructStoreUrl(i), o, s, a);
},
u = function (t, i, n, r, a) {
t.files && (t = t.files[0]);
var s = !!window.FormData && !!window.XMLHttpRequest;
s
? ((data = new FormData()),
data.append("fileUpload", t),
e.ajax.post(i, {
json: !0,
processData: !1,
data: data,
success: n,
error: r,
progress: a,
}))
: e.iframeAjax.post(i, {
data: t,
json: !0,
success: n,
error: r,
});
},
c = function (t, i, n, r, a) {
e.util.setDefault(i, "location", "S3"),
e.util.setDefault(i, "mimetype", "text/plain"),
e.ajax.post(e.urls.constructStoreUrl(i), {
headers: {
"Content-Type": i.mimetype,
},
data: t,
processData: !1,
json: !0,
success: function (t) {
n(e.util.standardizeFPFile(t));
},
error: function (t, i, n) {
r(
"not_found" == t
? new e.errors.FPError(121)
: "bad_params" == t
? new e.errors.FPError(122)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(123)
);
},
progress: a,
});
},
p = function (t, i, n, r, a) {
e.util.setDefault(i, "location", "S3"),
e.ajax.post(e.urls.constructStoreUrl(i), {
data: {
url: t,
},
json: !0,
success: function (t) {
n(e.util.standardizeFPFile(t));
},
error: function (t, i, n) {
r(
"not_found" == t
? new e.errors.FPError(151)
: "bad_params" == t
? new e.errors.FPError(152)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(153)
);
},
progress: a,
});
},
f = function (t, i, n, r) {
var a = ["uploaded", "modified", "created"];
i.cache !== !0 && (i._cacheBust = e.util.getId()),
e.ajax.get(t + "/metadata", {
json: !0,
data: i,
success: function (e) {
for (var t = 0; t < a.length; t++)
e[a[t]] && (e[a[t]] = new Date(e[a[t]]));
n(e);
},
error: function (t, i, n) {
r(
"not_found" == t
? new e.errors.FPError(161)
: "bad_params" == t
? new e.errors.FPError(400)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(162)
);
},
});
},
h = function (t, i, n, r) {
(i.key = e.apikey),
e.ajax.post(t + "/remove", {
data: i,
success: function (e) {
n();
},
error: function (t, i, n) {
r(
"not_found" == t
? new e.errors.FPError(171)
: "bad_params" == t
? new e.errors.FPError(400)
: "not_authorized" == t
? new e.errors.FPError(403)
: new e.errors.FPError(172)
);
},
});
};
return {
readFromUrl: i,
readFromFile: n,
readFromFPUrl: t,
writeDataToFPUrl: r,
writeFileToFPUrl: s,
writeFileInputToFPUrl: a,
writeUrlToFPUrl: o,
storeFileInput: l,
storeFile: d,
storeUrl: p,
storeData: c,
stat: f,
remove: h,
};
}),
filepicker.extend("handlers", function () {
var e = {},
t = function (t, i) {
return e.hasOwnProperty(t) ? e[t].push(i) : (e[t] = [i]), i;
},
i = function (t, i) {
var n = e[t];
if (n)
if (i) {
for (var r = 0; r < n.length; r++)
if (n[r] === i) {
n.splice(r, 1);
break;
}
0 === n.length && delete e[t];
} else delete e[t];
},
n = function (t) {
var i = t.id;
if (e.hasOwnProperty(i)) {
for (var n = e[i], r = 0; r < n.length; r++) n[r](t);
return !0;
}
return !1;
};
return {
attach: t,
detach: i,
run: n,
};
}),
filepicker.extend("iframeAjax", function () {
var e = this,
t = "ajax_iframe",
i = [],
n = !1,
r = function (e, t) {
(t.method = "GET"), o(e, t);
},
a = function (t, i) {
(i.method = "POST"),
(t +=
(t.indexOf("?") >= 0 ? "&" : "?") +
"_cacheBust=" +
e.util.getId()),
o(t, i);
},
s = function () {
if (i.length > 0) {
var e = i.shift();
o(e.url, e.options);
}
},
o = function (r, a) {
if (n)
return void i.push({
url: r,
options: a,
});
(r +=
(r.indexOf("?") >= 0 ? "&" : "?") + "_cacheBust=" + e.util.getId()),
(r += "&Content-Type=text%2Fhtml"),
e.comm.openChannel();
var s;
try {
s = document.createElement('