/*! * jQuery JavaScript Library v1.12.5-pre e09907ce152fb6ef7537a3733b1d65ead8ee6303 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-06-22T11:32Z */ (function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") { // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get jQuery. // For environments that do not have a `window` with a `document` // (such as Node.js), expose a factory as module.exports. // This accentuates the need for the creation of a real `window`. // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info. module.exports = global.document ? factory(global, true) : function(w) { if (!w.document) { throw new Error("jQuery requires a window with a document"); } return factory(w); }; } else { factory(global); } // Pass this if window is not defined yet }(typeof window !== "undefined" ? window : this, function(window, noGlobal) { // Support: Firefox 18+ // Can't be in strict mode, several libs including ASP.NET trace // the stack via arguments.caller.callee and Firefox dies if // you try to trace through "use strict" call chains. (#13335) //"use strict"; var deletedIds = []; var document = window.document; var slice = deletedIds.slice; var concat = deletedIds.concat; var push = deletedIds.push; var indexOf = deletedIds.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var support = {}; var version = "1.12.5-pre e09907ce152fb6ef7537a3733b1d65ead8ee6303", // Define a local copy of jQuery jQuery = function(selector, context) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init(selector, context); }, // Support: Android<4.1, IE<9 // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([\da-z])/gi, // Used by jQuery.camelCase as callback to replace() fcamelCase = function(all, letter) { return letter.toUpperCase(); }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // Start with an empty selector selector: "", // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call(this); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function(num) { return num != null ? // Return just the one element from the set (num < 0 ? this[num + this.length] : this[num]) : // Return all the elements in a clean array slice.call(this); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function(elems) { // Build a new jQuery matched element set var ret = jQuery.merge(this.constructor(), elems); // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. each: function(callback) { return jQuery.each(this, callback); }, map: function(callback) { return this.pushStack(jQuery.map(this, function(elem, i) { return callback.call(elem, i, elem); })); }, slice: function() { return this.pushStack(slice.apply(this, arguments)); }, first: function() { return this.eq(0); }, last: function() { return this.eq(-1); }, eq: function(i) { var len = this.length, j = +i + (i < 0 ? len : 0); return this.pushStack(j >= 0 && j < len ? [this[j]] : []); }, end: function() { return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: deletedIds.sort, splice: deletedIds.splice }; jQuery.extend = jQuery.fn.extend = function() { var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if (typeof target === "boolean") { deep = target; // skip the boolean and the target target = arguments[i] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if (typeof target !== "object" && !jQuery.isFunction(target)) { target = {}; } // extend jQuery itself if only one argument is passed if (i === length) { target = this; i--; } for (; i < length; i++) { // Only deal with non-null/undefined values if ((options = arguments[i]) != null) { // Extend the base object for (name in options) { src = target[name]; copy = options[name]; // Prevent never-ending loop if (target === copy) { continue; } // Recurse if we're merging plain objects or arrays if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) { if (copyIsArray) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[name] = jQuery.extend(deep, clone, copy); // Don't bring in undefined values } else if (copy !== undefined) { target[name] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ // Unique for each copy of jQuery on the page expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""), // Assume jQuery is ready without the ready module isReady: true, error: function(msg) { throw new Error(msg); }, noop: function() {}, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function(obj) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function(obj) { return jQuery.type(obj) === "array"; }, isWindow: function(obj) { /* jshint eqeqeq: false */ return obj != null && obj == obj.window; }, isNumeric: function(obj) { // parseFloat NaNs numeric-cast false positives (null|true|false|"") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN // adding 1 corrects loss of precision from parseFloat (#15100) var realStringObj = obj && obj.toString(); return !jQuery.isArray(obj) && (realStringObj - parseFloat(realStringObj) + 1) >= 0; }, isEmptyObject: function(obj) { var name; for (name in obj) { return false; } return true; }, isPlainObject: function(obj) { var key; // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) { return false; } try { // Not own constructor property must be Object if (obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { return false; } } catch (e) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Support: IE<9 // Handle iteration over inherited properties before own properties. if (!support.ownFirst) { for (key in obj) { return hasOwn.call(obj, key); } } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. for (key in obj) {} return key === undefined || hasOwn.call(obj, key); }, type: function(obj) { if (obj == null) { return obj + ""; } return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj; }, // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function(data) { if (data && jQuery.trim(data)) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox (window.execScript || function(data) { window["eval"].call(window, data); // jscs:ignore requireDotNotation })(data); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function(string) { return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); }, nodeName: function(elem, name) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, each: function(obj, callback) { var length, i = 0; if (isArrayLike(obj)) { length = obj.length; for (; i < length; i++) { if (callback.call(obj[i], i, obj[i]) === false) { break; } } } else { for (i in obj) { if (callback.call(obj[i], i, obj[i]) === false) { break; } } } return obj; }, // Support: Android<4.1, IE<9 trim: function(text) { return text == null ? "" : (text + "").replace(rtrim, ""); }, // results is for internal usage only makeArray: function(arr, results) { var ret = results || []; if (arr != null) { if (isArrayLike(Object(arr))) { jQuery.merge(ret, typeof arr === "string" ? [arr] : arr ); } else { push.call(ret, arr); } } return ret; }, inArray: function(elem, arr, i) { var len; if (arr) { if (indexOf) { return indexOf.call(arr, elem, i); } len = arr.length; i = i ? i < 0 ? Math.max(0, len + i) : i : 0; for (; i < len; i++) { // Skip accessing in sparse arrays if (i in arr && arr[i] === elem) { return i; } } } return -1; }, merge: function(first, second) { var len = +second.length, j = 0, i = first.length; while (j < len) { first[i++] = second[j++]; } // Support: IE<9 // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) if (len !== len) { while (second[j] !== undefined) { first[i++] = second[j++]; } } first.length = i; return first; }, grep: function(elems, callback, invert) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for (; i < length; i++) { callbackInverse = !callback(elems[i], i); if (callbackInverse !== callbackExpect) { matches.push(elems[i]); } } return matches; }, // arg is for internal usage only map: function(elems, callback, arg) { var length, value, i = 0, ret = []; // Go through the array, translating each of the items to their new values if (isArrayLike(elems)) { length = elems.length; for (; i < length; i++) { value = callback(elems[i], i, arg); if (value != null) { ret.push(value); } } // Go through every key on the object, } else { for (i in elems) { value = callback(elems[i], i, arg); if (value != null) { ret.push(value); } } } // Flatten any nested arrays return concat.apply([], ret); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function(fn, context) { var args, proxy, tmp; if (typeof context === "string") { tmp = fn[context]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if (!jQuery.isFunction(fn)) { return undefined; } // Simulated bind args = slice.call(arguments, 2); proxy = function() { return fn.apply(context || this, args.concat(slice.call(arguments))); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, now: function() { return +(new Date()); }, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support }); // JSHint would error on this code due to the Symbol not being defined in ES5. // Defining this global in .jshintrc would create a danger of using the global // unguarded in another place, it seems safer to just disable JSHint for these // three lines. /* jshint ignore: start */ if (typeof Symbol === "function") { jQuery.fn[Symbol.iterator] = deletedIds[Symbol.iterator]; } /* jshint ignore: end */ // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(i, name) { class2type["[object " + name + "]"] = name.toLowerCase(); }); function isArrayLike(obj) { // Support: iOS 8.2 (not reproducible in simulator) // `in` check used to prevent JIT error (gh-2145) // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE var length = !!obj && "length" in obj && obj.length, type = jQuery.type(obj); if (type === "function" || jQuery.isWindow(obj)) { return false; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v2.2.1 * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2015-10-17 */ (function(window) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function(a, b) { if (a === b) { hasDuplicate = true; } return 0; }, // General-purpose constants MAX_NEGATIVE = 1 << 31, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf as it's faster than native // http://jsperf.com/thor-indexof-vs-for/5 indexOf = function(list, elem) { var i = 0, len = list.length; for (; i < len; i++) { if (list[i] === elem) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp(whitespace + "+", "g"), rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = { "ID": new RegExp("^#(" + identifier + ")"), "CLASS": new RegExp("^\\.(" + identifier + ")"), "TAG": new RegExp("^(" + identifier + "|[*])"), "ATTR": new RegExp("^" + attributes), "PSEUDO": new RegExp("^" + pseudos), "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"), "bool": new RegExp("^(?:" + booleans + ")$", "i"), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"), funescape = function(_, escaped, escapedWhitespace) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox<24 // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint String.fromCharCode(high + 0x10000) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00); }, // Used for iframes // See setDocument() // Removing the function wrapper causes a "Permission Denied" // error in IE unloadHandler = function() { setDocument(); }; // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call(preferredDoc.childNodes)), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[preferredDoc.childNodes.length].nodeType; } catch (e) { push = { apply: arr.length ? // Leverage slice if possible function(target, els) { push_native.apply(target, slice.call(els)); } : // Support: IE<9 // Otherwise append directly function(target, els) { var j = target.length, i = 0; // Can't trust NodeList.length while ((target[j++] = els[i++])) {} target.length = j - 1; } }; } function Sizzle(selector, context, results, seed) { var m, i, elem, nid, nidselect, match, groups, newSelector, newContext = context && context.ownerDocument, // nodeType defaults to 9, since context defaults to document nodeType = context ? context.nodeType : 9; results = results || []; // Return early from calls with invalid selector or context if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { return results; } // Try to shortcut find operations (as opposed to filters) in HTML documents if (!seed) { if ((context ? context.ownerDocument || context : preferredDoc) !== document) { setDocument(context); } context = context || document; if (documentIsHTML) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) if (nodeType !== 11 && (match = rquickExpr.exec(selector))) { // ID selector if ((m = match[1])) { // Document context if (nodeType === 9) { if ((elem = context.getElementById(m))) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if (elem.id === m) { results.push(elem); return results; } } else { return results; } // Element context } else { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) { results.push(elem); return results; } } // Type selector } else if (match[2]) { push.apply(results, context.getElementsByTagName(selector)); return results; // Class selector } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) { push.apply(results, context.getElementsByClassName(m)); return results; } } // Take advantage of querySelectorAll if (support.qsa && !compilerCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) { if (nodeType !== 1) { newContext = context; newSelector = selector; // qSA looks outside Element context, which is not what we want // Thanks to Andrew Dupont for this workaround technique // Support: IE <=8 // Exclude object elements } else if (context.nodeName.toLowerCase() !== "object") { // Capture the context ID, setting it first if necessary if ((nid = context.getAttribute("id"))) { nid = nid.replace(rescape, "\\$&"); } else { context.setAttribute("id", (nid = expando)); } // Prefix every selector in the list groups = tokenize(selector); i = groups.length; nidselect = ridentifier.test(nid) ? "#" + nid : "[id='" + nid + "']"; while (i--) { groups[i] = nidselect + " " + toSelector(groups[i]); } newSelector = groups.join(","); // Expand context for sibling selectors newContext = rsibling.test(selector) && testContext(context.parentNode) || context; } if (newSelector) { try { push.apply(results, newContext.querySelectorAll(newSelector) ); return results; } catch (qsaError) {} finally { if (nid === expando) { context.removeAttribute("id"); } } } } } } // All others return select(selector.replace(rtrim, "$1"), context, results, seed); } /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache(key, value) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if (keys.push(key + " ") > Expr.cacheLength) { // Only keep the most recent entries delete cache[keys.shift()]; } return (cache[key + " "] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction(fn) { fn[expando] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result */ function assert(fn) { var div = document.createElement("div"); try { return !!fn(div); } catch (e) { return false; } finally { // Remove from its parent by default if (div.parentNode) { div.parentNode.removeChild(div); } // release memory in IE div = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle(attrs, handler) { var arr = attrs.split("|"), i = arr.length; while (i--) { Expr.attrHandle[arr[i]] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck(a, b) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE); // Use IE sourceIndex if available on both nodes if (diff) { return diff; } // Check if b follows a if (cur) { while ((cur = cur.nextSibling)) { if (cur === b) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo(type) { return function(elem) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo(type) { return function(elem) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo(fn) { return markFunction(function(argument) { argument = +argument; return markFunction(function(seed, matches) { var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length; // Match elements found at the specified indexes while (i--) { if (seed[(j = matchIndexes[i])]) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext(context) { return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function(elem) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function(node) { var hasCompare, parent, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected if (doc === document || doc.nodeType !== 9 || !doc.documentElement) { return document; } // Update global variables document = doc; docElem = document.documentElement; documentIsHTML = !isXML(document); // Support: IE 9-11, Edge // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) if ((parent = document.defaultView) && parent.top !== parent) { // Support: IE 11 if (parent.addEventListener) { parent.addEventListener("unload", unloadHandler, false); // Support: IE 9 - 10 only } else if (parent.attachEvent) { parent.attachEvent("onunload", unloadHandler); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) support.attributes = assert(function(div) { div.className = "i"; return !div.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function(div) { div.appendChild(document.createComment("")); return !div.getElementsByTagName("*").length; }); // Support: IE<9 support.getElementsByClassName = rnative.test(document.getElementsByClassName); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function(div) { docElem.appendChild(div).id = expando; return !document.getElementsByName || !document.getElementsByName(expando).length; }); // ID find and filter if (support.getById) { Expr.find["ID"] = function(id, context) { if (typeof context.getElementById !== "undefined" && documentIsHTML) { var m = context.getElementById(id); return m ? [m] : []; } }; Expr.filter["ID"] = function(id) { var attrId = id.replace(runescape, funescape); return function(elem) { return elem.getAttribute("id") === attrId; }; }; } else { // Support: IE6/7 // getElementById is not reliable as a find shortcut delete Expr.find["ID"]; Expr.filter["ID"] = function(id) { var attrId = id.replace(runescape, funescape); return function(elem) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function(tag, context) { if (typeof context.getElementsByTagName !== "undefined") { return context.getElementsByTagName(tag); // DocumentFragment nodes don't have gEBTN } else if (support.qsa) { return context.querySelectorAll(tag); } } : function(tag, context) { var elem, tmp = [], i = 0, // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName(tag); // Filter out possible comments if (tag === "*") { while ((elem = results[i++])) { if (elem.nodeType === 1) { tmp.push(elem); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function(className, context) { if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) { return context.getElementsByClassName(className); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See http://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ((support.qsa = rnative.test(document.querySelectorAll))) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function(div) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 docElem.appendChild(div).innerHTML = "" + ""; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if (div.querySelectorAll("[msallowcapture^='']").length) { rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")"); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if (!div.querySelectorAll("[selected]").length) { rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if (!div.querySelectorAll("[id~=" + expando + "-]").length) { rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if (!div.querySelectorAll(":checked").length) { rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibing-combinator selector` fails if (!div.querySelectorAll("a#" + expando + "+*").length) { rbuggyQSA.push(".#.+[+~]"); } }); assert(function(div) { // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = document.createElement("input"); input.setAttribute("type", "hidden"); div.appendChild(input).setAttribute("name", "D"); // Support: IE8 // Enforce case-sensitivity of name attribute if (div.querySelectorAll("[name=d]").length) { rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?="); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if (!div.querySelectorAll(":enabled").length) { rbuggyQSA.push(":enabled", ":disabled"); } // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ((support.matchesSelector = rnative.test((matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)))) { assert(function(div) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call(div, "div"); // This should fail with an exception // Gecko does not error, returns false instead matches.call(div, "[s!='']:x"); rbuggyMatches.push("!=", pseudos); }); } rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test(docElem.compareDocumentPosition); // Element contains another // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test(docElem.contains) ? function(a, b) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!(bup && bup.nodeType === 1 && ( adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16 )); } : function(a, b) { if (b) { while ((b = b.parentNode)) { if (b === a) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function(a, b) { // Flag for duplicate removal if (a === b) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if (compare) { return compare; } // Calculate position if both inputs belong to the same document compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : // Otherwise we know they are disconnected 1; // Disconnected nodes if (compare & 1 || (!support.sortDetached && b.compareDocumentPosition(a) === compare)) { // Choose the first element that is related to our preferred document if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) { return -1; } if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) { return 1; } // Maintain original order return sortInput ? (indexOf(sortInput, a) - indexOf(sortInput, b)) : 0; } return compare & 4 ? -1 : 1; } : function(a, b) { // Exit early if the nodes are identical if (a === b) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [a], bp = [b]; // Parentless nodes are either documents or disconnected if (!aup || !bup) { return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? (indexOf(sortInput, a) - indexOf(sortInput, b)) : 0; // If the nodes are siblings, we can do a quick check } else if (aup === bup) { return siblingCheck(a, b); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ((cur = cur.parentNode)) { ap.unshift(cur); } cur = b; while ((cur = cur.parentNode)) { bp.unshift(cur); } // Walk down the tree looking for a discrepancy while (ap[i] === bp[i]) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck(ap[i], bp[i]) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return document; }; Sizzle.matches = function(expr, elements) { return Sizzle(expr, null, null, elements); }; Sizzle.matchesSelector = function(elem, expr) { // Set document vars if needed if ((elem.ownerDocument || elem) !== document) { setDocument(elem); } // Make sure that attribute selectors are quoted expr = expr.replace(rattributeQuotes, "='$1']"); if (support.matchesSelector && documentIsHTML && !compilerCache[expr + " "] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) { try { var ret = matches.call(elem, expr); // IE 9's matchesSelector returns false on disconnected nodes if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11) { return ret; } } catch (e) {} } return Sizzle(expr, document, null, [elem]).length > 0; }; Sizzle.contains = function(context, elem) { // Set document vars if needed if ((context.ownerDocument || context) !== document) { setDocument(context); } return contains(context, elem); }; Sizzle.attr = function(elem, name) { // Set document vars if needed if ((elem.ownerDocument || elem) !== document) { setDocument(elem); } var fn = Expr.attrHandle[name.toLowerCase()], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.error = function(msg) { throw new Error("Syntax error, unrecognized expression: " + msg); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function(results) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice(0); results.sort(sortOrder); if (hasDuplicate) { while ((elem = results[i++])) { if (elem === results[i]) { j = duplicates.push(i); } } while (j--) { results.splice(duplicates[j], 1); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function(elem) { var node, ret = "", i = 0, nodeType = elem.nodeType; if (!nodeType) { // If no nodeType, this is expected to be an array while ((node = elem[i++])) { // Do not traverse comment nodes ret += getText(node); } } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if (typeof elem.textContent === "string") { return elem.textContent; } else { // Traverse its children for (elem = elem.firstChild; elem; elem = elem.nextSibling) { ret += getText(elem); } } } else if (nodeType === 3 || nodeType === 4) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function(match) { match[1] = match[1].replace(runescape, funescape); // Move the given value to match[3] whether quoted or unquoted match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape); if (match[2] === "~=") { match[3] = " " + match[3] + " "; } return match.slice(0, 4); }, "CHILD": function(match) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if (match[1].slice(0, 3) === "nth") { // nth-* requires argument if (!match[3]) { Sizzle.error(match[0]); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); match[5] = +((match[7] + match[8]) || match[3] === "odd"); // other types prohibit arguments } else if (match[3]) { Sizzle.error(match[0]); } return match; }, "PSEUDO": function(match) { var excess, unquoted = !match[6] && match[2]; if (matchExpr["CHILD"].test(match[0])) { return null; } // Accept quoted arguments as-is if (match[3]) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively) (excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { // excess is a negative index match[0] = match[0].slice(0, excess); match[2] = unquoted.slice(0, excess); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice(0, 3); } }, filter: { "TAG": function(nodeNameSelector) { var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function(elem) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function(className) { var pattern = classCache[className + " "]; return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) { return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""); }); }, "ATTR": function(name, operator, check) { return function(elem) { var result = Sizzle.attr(elem, name); if (result == null) { return operator === "!="; } if (!operator) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false; }; }, "CHILD": function(type, what, argument, first, last) { var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function(elem) { return !!elem.parentNode; } : function(elem, context, xml) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if (parent) { // :(first|last|only)-(child|of-type) if (simple) { while (dir) { node = elem; while ((node = node[dir])) { if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [forward ? parent.firstChild : parent.lastChild]; // non-xml :nth-child(...) stores cache data on `parent` if (forward && useCache) { // Seek `elem` from a previously-cached index // ...in a gzip-friendly way node = parent; outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); cache = uniqueCache[type] || []; nodeIndex = cache[0] === dirruns && cache[1]; diff = nodeIndex && cache[2]; node = nodeIndex && parent.childNodes[nodeIndex]; while ((node = ++nodeIndex && node && node[dir] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop())) { // When found, cache indexes on `parent` and break if (node.nodeType === 1 && ++diff && node === elem) { uniqueCache[type] = [dirruns, nodeIndex, diff]; break; } } } else { // Use previously-cached element index if available if (useCache) { // ...in a gzip-friendly way node = elem; outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); cache = uniqueCache[type] || []; nodeIndex = cache[0] === dirruns && cache[1]; diff = nodeIndex; } // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if (diff === false) { // Use the same loop as above to seek `elem` from the start while ((node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop())) { if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) { // Cache the index of each encountered element if (useCache) { outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); uniqueCache[type] = [dirruns, diff]; } if (node === elem) { break; } } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || (diff % first === 0 && diff / first >= 0); } }; }, "PSEUDO": function(pseudo, argument) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if (fn[expando]) { return fn(argument); } // But maintain support for old signatures if (fn.length > 1) { args = [pseudo, pseudo, "", argument]; return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches) { var idx, matched = fn(seed, argument), i = matched.length; while (i--) { idx = indexOf(seed, matched[i]); seed[idx] = !(matches[idx] = matched[i]); } }) : function(elem) { return fn(elem, 0, args); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function(selector) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile(selector.replace(rtrim, "$1")); return matcher[expando] ? markFunction(function(seed, matches, context, xml) { var elem, unmatched = matcher(seed, null, xml, []), i = seed.length; // Match elements unmatched by `matcher` while (i--) { if ((elem = unmatched[i])) { seed[i] = !(matches[i] = elem); } } }) : function(elem, context, xml) { input[0] = elem; matcher(input, null, xml, results); // Don't keep the element (issue #299) input[0] = null; return !results.pop(); }; }), "has": markFunction(function(selector) { return function(elem) { return Sizzle(selector, elem).length > 0; }; }), "contains": markFunction(function(text) { text = text.replace(runescape, funescape); return function(elem) { return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction(function(lang) { // lang value must be a valid identifier if (!ridentifier.test(lang || "")) { Sizzle.error("unsupported lang: " + lang); } lang = lang.replace(runescape, funescape).toLowerCase(); return function(elem) { var elemLang; do { if ((elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang"))) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf(lang + "-") === 0; } } while ((elem = elem.parentNode) && elem.nodeType === 1); return false; }; }), // Miscellaneous "target": function(elem) { var hash = window.location && window.location.hash; return hash && hash.slice(1) === elem.id; }, "root": function(elem) { return elem === docElem; }, "focus": function(elem) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": function(elem) { return elem.disabled === false; }, "disabled": function(elem) { return elem.disabled === true; }, "checked": function(elem) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function(elem) { // Accessing this property makes selected-by-default // options in Safari work properly if (elem.parentNode) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function(elem) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for (elem = elem.firstChild; elem; elem = elem.nextSibling) { if (elem.nodeType < 6) { return false; } } return true; }, "parent": function(elem) { return !Expr.pseudos["empty"](elem); }, // Element/input types "header": function(elem) { return rheader.test(elem.nodeName); }, "input": function(elem) { return rinputs.test(elem.nodeName); }, "button": function(elem) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function(elem) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text"); }, // Position-in-collection "first": createPositionalPseudo(function() { return [0]; }), "last": createPositionalPseudo(function(matchIndexes, length) { return [length - 1]; }), "eq": createPositionalPseudo(function(matchIndexes, length, argument) { return [argument < 0 ? argument + length : argument]; }), "even": createPositionalPseudo(function(matchIndexes, length) { var i = 0; for (; i < length; i += 2) { matchIndexes.push(i); } return matchIndexes; }), "odd": createPositionalPseudo(function(matchIndexes, length) { var i = 1; for (; i < length; i += 2) { matchIndexes.push(i); } return matchIndexes; }), "lt": createPositionalPseudo(function(matchIndexes, length, argument) { var i = argument < 0 ? argument + length : argument; for (; --i >= 0;) { matchIndexes.push(i); } return matchIndexes; }), "gt": createPositionalPseudo(function(matchIndexes, length, argument) { var i = argument < 0 ? argument + length : argument; for (; ++i < length;) { matchIndexes.push(i); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) { Expr.pseudos[i] = createInputPseudo(i); } for (i in { submit: true, reset: true }) { Expr.pseudos[i] = createButtonPseudo(i); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function(selector, parseOnly) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "]; if (cached) { return parseOnly ? 0 : cached.slice(0); } soFar = selector; groups = []; preFilters = Expr.preFilter; while (soFar) { // Comma and first run if (!matched || (match = rcomma.exec(soFar))) { if (match) { // Don't consume trailing commas as valid soFar = soFar.slice(match[0].length) || soFar; } groups.push((tokens = [])); } matched = false; // Combinators if ((match = rcombinators.exec(soFar))) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace(rtrim, " ") }); soFar = soFar.slice(matched.length); } // Filters for (type in Expr.filter) { if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice(matched.length); } } if (!matched) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : // Cache the tokens tokenCache(selector, groups).slice(0); }; function toSelector(tokens) { var i = 0, len = tokens.length, selector = ""; for (; i < len; i++) { selector += tokens[i].value; } return selector; } function addCombinator(matcher, combinator, base) { var dir = combinator.dir, checkNonElements = base && dir === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function(elem, context, xml) { while ((elem = elem[dir])) { if (elem.nodeType === 1 || checkNonElements) { return matcher(elem, context, xml); } } } : // Check against all ancestor/preceding elements function(elem, context, xml) { var oldCache, uniqueCache, outerCache, newCache = [dirruns, doneName]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if (xml) { while ((elem = elem[dir])) { if (elem.nodeType === 1 || checkNonElements) { if (matcher(elem, context, xml)) { return true; } } } } else { while ((elem = elem[dir])) { if (elem.nodeType === 1 || checkNonElements) { outerCache = elem[expando] || (elem[expando] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {}); if ((oldCache = uniqueCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) { // Assign to newCache so results back-propagate to previous elements return (newCache[2] = oldCache[2]); } else { // Reuse newcache so results back-propagate to previous elements uniqueCache[dir] = newCache; // A match means we're done; a fail means we have to keep checking if ((newCache[2] = matcher(elem, context, xml))) { return true; } } } } } }; } function elementMatcher(matchers) { return matchers.length > 1 ? function(elem, context, xml) { var i = matchers.length; while (i--) { if (!matchers[i](elem, context, xml)) { return false; } } return true; } : matchers[0]; } function multipleContexts(selector, contexts, results) { var i = 0, len = contexts.length; for (; i < len; i++) { Sizzle(selector, contexts[i], results); } return results; } function condense(unmatched, map, filter, context, xml) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for (; i < len; i++) { if ((elem = unmatched[i])) { if (!filter || filter(elem, context, xml)) { newUnmatched.push(elem); if (mapped) { map.push(i); } } } } return newUnmatched; } function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { if (postFilter && !postFilter[expando]) { postFilter = setMatcher(postFilter); } if (postFinder && !postFinder[expando]) { postFinder = setMatcher(postFinder, postSelector); } return markFunction(function(seed, results, context, xml) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || (seed ? preFilter : preexisting || postFilter) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if (matcher) { matcher(matcherIn, matcherOut, context, xml); } // Apply postFilter if (postFilter) { temp = condense(matcherOut, postMap); postFilter(temp, [], context, xml); // Un-match failing elements by moving them back to matcherIn i = temp.length; while (i--) { if ((elem = temp[i])) { matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem); } } } if (seed) { if (postFinder || preFilter) { if (postFinder) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while (i--) { if ((elem = matcherOut[i])) { // Restore matcherIn since elem is not yet a final match temp.push((matcherIn[i] = elem)); } } postFinder(null, (matcherOut = []), temp, xml); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while (i--) { if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut ); if (postFinder) { postFinder(null, results, matcherOut, xml); } else { push.apply(results, matcherOut); } } }); } function matcherFromTokens(tokens) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator(function(elem) { return elem === checkContext; }, implicitRelative, true), matchAnyContext = addCombinator(function(elem) { return indexOf(checkContext, elem) > -1; }, implicitRelative, true), matchers = [function(elem, context, xml) { var ret = (!leadingRelative && (xml || context !== outermostContext)) || ( (checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); // Avoid hanging onto element (issue #299) checkContext = null; return ret; }]; for (; i < len; i++) { if ((matcher = Expr.relative[tokens[i].type])) { matchers = [addCombinator(elementMatcher(matchers), matcher)]; } else { matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); // Return special upon seeing a positional matcher if (matcher[expando]) { // Find the next relative operator (if any) for proper handling j = ++i; for (; j < len; j++) { if (Expr.relative[tokens[j].type]) { break; } } return setMatcher( i > 1 && elementMatcher(matchers), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === " " ? "*" : "" }) ).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens((tokens = tokens.slice(j))), j < len && toSelector(tokens) ); } matchers.push(matcher); } } return elementMatcher(matchers); } function matcherFromGroupMatchers(elementMatchers, setMatchers) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]("*", outermost), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if (outermost) { outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id for (; i !== len && (elem = elems[i]) != null; i++) { if (byElement && elem) { j = 0; if (!context && elem.ownerDocument !== document) { setDocument(elem); xml = !documentIsHTML; } while ((matcher = elementMatchers[j++])) { if (matcher(elem, context || document, xml)) { results.push(elem); break; } } if (outermost) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if (bySet) { // They will have gone through all possible matchers if ((elem = !matcher && elem)) { matchedCount--; } // Lengthen the array for every element, matched or not if (seed) { unmatched.push(elem); } } } // `i` is now the count of elements visited above, and adding it to `matchedCount` // makes the latter nonnegative. matchedCount += i; // Apply set filters to unmatched elements // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` // equals `i`), unless we didn't visit _any_ elements in the above loop because we have // no element matchers and no seed. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that // case, which will result in a "00" `matchedCount` that differs from `i` but is also // numerically zero. if (bySet && i !== matchedCount) { j = 0; while ((matcher = setMatchers[j++])) { matcher(unmatched, setMatched, context, xml); } if (seed) { // Reintegrate element matches to eliminate the need for sorting if (matchedCount > 0) { while (i--) { if (!(unmatched[i] || setMatched[i])) { setMatched[i] = pop.call(results); } } } // Discard index placeholder values to get only actual matches setMatched = condense(setMatched); } // Add matches to results push.apply(results, setMatched); // Seedless set matches succeeding multiple successful matchers stipulate sorting if (outermost && !seed && setMatched.length > 0 && (matchedCount + setMatchers.length) > 1) { Sizzle.uniqueSort(results); } } // Override manipulation of globals by nested matchers if (outermost) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction(superMatcher) : superMatcher; } compile = Sizzle.compile = function(selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "]; if (!cached) { // Generate a function of recursive functions that can be used to check each element if (!match) { match = tokenize(selector); } i = match.length; while (i--) { cached = matcherFromTokens(match[i]); if (cached[expando]) { setMatchers.push(cached); } else { elementMatchers.push(cached); } } // Cache the compiled function cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function(selector, context, results, seed) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize((selector = compiled.selector || selector)); results = results || []; // Try to minimize operations if there is only one selector in the list and no seed // (the latter of which guarantees us context) if (match.length === 1) { // Reduce context if the leading compound selector is an ID tokens = match[0] = match[0].slice(0); if (tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) { context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0]; if (!context) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if (compiled) { context = context.parentNode; } selector = selector.slice(tokens.shift().value.length); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length; while (i--) { token = tokens[i]; // Abort if we hit a combinator if (Expr.relative[(type = token.type)]) { break; } if ((find = Expr.find[type])) { // Search, expanding context for leading sibling combinators if ((seed = find( token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context ))) { // If seed is empty or no tokens remain, we can return early tokens.splice(i, 1); selector = seed.length && toSelector(tokens); if (!selector) { push.apply(results, seed); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above (compiled || compile(selector, match))( seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort(sortOrder).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function(div1) { // Should return 1, but returns 4 (following) return div1.compareDocumentPosition(document.createElement("div")) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if (!assert(function(div) { div.innerHTML = ""; return div.firstChild.getAttribute("href") === "#"; })) { addHandle("type|href|height|width", function(elem, name, isXML) { if (!isXML) { return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if (!support.attributes || !assert(function(div) { div.innerHTML = ""; div.firstChild.setAttribute("value", ""); return div.firstChild.getAttribute("value") === ""; })) { addHandle("value", function(elem, name, isXML) { if (!isXML && elem.nodeName.toLowerCase() === "input") { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if (!assert(function(div) { return div.getAttribute("disabled") == null; })) { addHandle(booleans, function(elem, name, isXML) { var val; if (!isXML) { return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; } }); } return Sizzle; })(window); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; var dir = function(elem, dir, until) { var matched = [], truncate = until !== undefined; while ((elem = elem[dir]) && elem.nodeType !== 9) { if (elem.nodeType === 1) { if (truncate && jQuery(elem).is(until)) { break; } matched.push(elem); } } return matched; }; var siblings = function(n, elem) { var matched = []; for (; n; n = n.nextSibling) { if (n.nodeType === 1 && n !== elem) { matched.push(n); } } return matched; }; var rneedsContext = jQuery.expr.match.needsContext; var rsingleTag = (/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/); var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow(elements, qualifier, not) { if (jQuery.isFunction(qualifier)) { return jQuery.grep(elements, function(elem, i) { /* jshint -W018 */ return !!qualifier.call(elem, i, elem) !== not; }); } if (qualifier.nodeType) { return jQuery.grep(elements, function(elem) { return (elem === qualifier) !== not; }); } if (typeof qualifier === "string") { if (risSimple.test(qualifier)) { return jQuery.filter(qualifier, elements, not); } qualifier = jQuery.filter(qualifier, elements); } return jQuery.grep(elements, function(elem) { return (jQuery.inArray(elem, qualifier) > -1) !== not; }); } jQuery.filter = function(expr, elems, not) { var elem = elems[0]; if (not) { expr = ":not(" + expr + ")"; } return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function(elem) { return elem.nodeType === 1; })); }; jQuery.fn.extend({ find: function(selector) { var i, ret = [], self = this, len = self.length; if (typeof selector !== "string") { return this.pushStack(jQuery(selector).filter(function() { for (i = 0; i < len; i++) { if (jQuery.contains(self[i], this)) { return true; } } })); } for (i = 0; i < len; i++) { jQuery.find(selector, self[i], ret); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret); ret.selector = this.selector ? this.selector + " " + selector : selector; return ret; }, filter: function(selector) { return this.pushStack(winnow(this, selector || [], false)); }, not: function(selector) { return this.pushStack(winnow(this, selector || [], true)); }, is: function(selector) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false ).length; } }); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, init = jQuery.fn.init = function(selector, context, root) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if (!selector) { return this; } // init accepts an alternate rootjQuery // so migrate can support jQuery.sub (gh-2101) root = root || rootjQuery; // Handle HTML strings if (typeof selector === "string") { if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [null, selector, null]; } else { match = rquickExpr.exec(selector); } // Match html or make sure no context is specified for #id if (match && (match[1] || !context)) { // HANDLE: $(html) -> $(array) if (match[1]) { context = context instanceof jQuery ? context[0] : context; // scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge(this, jQuery.parseHTML( match[1], context && context.nodeType ? context.ownerDocument || context : document, true )); // HANDLE: $(html, props) if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { for (match in context) { // Properties of context are called as methods if possible if (jQuery.isFunction(this[match])) { this[match](context[match]); // ...and otherwise set as attributes } else { this.attr(match, context[match]); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById(match[2]); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if (elem && elem.parentNode) { // Handle the case where IE and Opera return items // by name instead of ID if (elem.id !== match[2]) { return rootjQuery.find(selector); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if (!context || context.jquery) { return (context || root).find(selector); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor(context).find(selector); } // HANDLE: $(DOMElement) } else if (selector.nodeType) { this.context = this[0] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if (jQuery.isFunction(selector)) { return typeof root.ready !== "undefined" ? root.ready(selector) : // Execute immediately if ready is not present selector(jQuery); } if (selector.selector !== undefined) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray(selector, this); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery(document); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend({ has: function(target) { var i, targets = jQuery(target, this), len = targets.length; return this.filter(function() { for (i = 0; i < len; i++) { if (jQuery.contains(this, targets[i])) { return true; } } }); }, closest: function(selectors, context) { var cur, i = 0, l = this.length, matched = [], pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? jQuery(selectors, context || this.context) : 0; for (; i < l; i++) { for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { // Always skip document fragments if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) { matched.push(cur); break; } } } return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched); }, // Determine the position of an element within // the matched set of elements index: function(elem) { // No argument, return index in parent if (!elem) { return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1; } // index in selector if (typeof elem === "string") { return jQuery.inArray(this[0], jQuery(elem)); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this); }, add: function(selector, context) { return this.pushStack( jQuery.uniqueSort( jQuery.merge(this.get(), jQuery(selector, context)) ) ); }, addBack: function(selector) { return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector) ); } }); function sibling(cur, dir) { do { cur = cur[dir]; } while (cur && cur.nodeType !== 1); return cur; } jQuery.each({ parent: function(elem) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function(elem) { return dir(elem, "parentNode"); }, parentsUntil: function(elem, i, until) { return dir(elem, "parentNode", until); }, next: function(elem) { return sibling(elem, "nextSibling"); }, prev: function(elem) { return sibling(elem, "previousSibling"); }, nextAll: function(elem) { return dir(elem, "nextSibling"); }, prevAll: function(elem) { return dir(elem, "previousSibling"); }, nextUntil: function(elem, i, until) { return dir(elem, "nextSibling", until); }, prevUntil: function(elem, i, until) { return dir(elem, "previousSibling", until); }, siblings: function(elem) { return siblings((elem.parentNode || {}).firstChild, elem); }, children: function(elem) { return siblings(elem.firstChild); }, contents: function(elem) { return jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow.document : jQuery.merge([], elem.childNodes); } }, function(name, fn) { jQuery.fn[name] = function(until, selector) { var ret = jQuery.map(this, fn, until); if (name.slice(-5) !== "Until") { selector = until; } if (selector && typeof selector === "string") { ret = jQuery.filter(selector, ret); } if (this.length > 1) { // Remove duplicates if (!guaranteedUnique[name]) { ret = jQuery.uniqueSort(ret); } // Reverse order for parents* and prev-derivatives if (rparentsprev.test(name)) { ret = ret.reverse(); } } return this.pushStack(ret); }; }); var rnotwhite = (/\S+/g); // Convert String-formatted options into Object-formatted ones function createOptions(options) { var object = {}; jQuery.each(options.match(rnotwhite) || [], function(_, flag) { object[flag] = true; }); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function(options) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options); var // Flag to know if list is currently firing firing, // Last fire value for non-forgettable lists memory, // Flag to know if list was already fired fired, // Flag to prevent firing locked, // Actual callback list list = [], // Queue of execution data for repeatable lists queue = [], // Index of currently firing callback (modified by add/remove as needed) firingIndex = -1, // Fire callbacks fire = function() { // Enforce single-firing locked = options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for (; queue.length; firingIndex = -1) { memory = queue.shift(); while (++firingIndex < list.length) { // Run callback and check for early termination if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) { // Jump to end and forget the data so .add doesn't re-fire firingIndex = list.length; memory = false; } } } // Forget the data if we're done with it if (!options.memory) { memory = false; } firing = false; // Clean up if we're done firing for good if (locked) { // Keep an empty list if we have data for future add calls if (memory) { list = []; // Otherwise, this object is spent } else { list = ""; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if (list) { // If we have memory from a past run, we should fire after adding if (memory && !firing) { firingIndex = list.length - 1; queue.push(memory); } (function add(args) { jQuery.each(args, function(_, arg) { if (jQuery.isFunction(arg)) { if (!options.unique || !self.has(arg)) { list.push(arg); } } else if (arg && arg.length && jQuery.type(arg) !== "string") { // Inspect recursively add(arg); } }); })(arguments); if (memory && !firing) { fire(); } } return this; }, // Remove a callback from the list remove: function() { jQuery.each(arguments, function(_, arg) { var index; while ((index = jQuery.inArray(arg, list, index)) > -1) { list.splice(index, 1); // Handle firing indexes if (index <= firingIndex) { firingIndex--; } } }); return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function(fn) { return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { if (list) { list = []; } return this; }, // Disable .fire and .add // Abort any current/pending executions // Clear all callbacks and values disable: function() { locked = queue = []; list = memory = ""; return this; }, disabled: function() { return !list; }, // Disable .fire // Also disable .add unless we have memory (since it would have no effect) // Abort any pending executions lock: function() { locked = true; if (!memory) { self.disable(); } return this; }, locked: function() { return !!locked; }, // Call all callbacks with the given context and arguments fireWith: function(context, args) { if (!locked) { args = args || []; args = [context, args.slice ? args.slice() : args]; queue.push(args); if (!firing) { fire(); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith(this, arguments); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; jQuery.extend({ Deferred: function(func) { var tuples = [ // action, add listener, listener list, final state ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"], ["notify", "progress", jQuery.Callbacks("memory")] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done(arguments).fail(arguments); return this; }, then: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred(function(newDefer) { jQuery.each(tuples, function(i, tuple) { var fn = jQuery.isFunction(fns[i]) && fns[i]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[tuple[1]](function() { var returned = fn && fn.apply(this, arguments); if (returned && jQuery.isFunction(returned.promise)) { returned.promise() .progress(newDefer.notify) .done(newDefer.resolve) .fail(newDefer.reject); } else { newDefer[tuple[0] + "With"]( this === promise ? newDefer.promise() : this, fn ? [returned] : arguments ); } }); }); fns = null; }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function(obj) { return obj != null ? jQuery.extend(obj, promise) : promise; } }, deferred = {}; // Keep pipe for back-compat promise.pipe = promise.then; // Add list-specific methods jQuery.each(tuples, function(i, tuple) { var list = tuple[2], stateString = tuple[3]; // promise[ done | fail | progress ] = list.add promise[tuple[1]] = list.add; // Handle state if (stateString) { list.add(function() { // state = [ resolved | rejected ] state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[i ^ 1][2].disable, tuples[2][2].lock); } // deferred[ resolve | reject | notify ] deferred[tuple[0]] = function() { deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments); return this; }; deferred[tuple[0] + "With"] = list.fireWith; }); // Make the deferred a promise promise.promise(deferred); // Call given func if any if (func) { func.call(deferred, deferred); } // All done! return deferred; }, // Deferred helper when: function(subordinate /* , ..., subordinateN */ ) { var i = 0, resolveValues = slice.call(arguments), length = resolveValues.length, // the count of uncompleted subordinates remaining = length !== 1 || (subordinate && jQuery.isFunction(subordinate.promise)) ? length : 0, // the master Deferred. // If resolveValues consist of only a single Deferred, just use that. deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // Update function for both resolve and progress values updateFunc = function(i, contexts, values) { return function(value) { contexts[i] = this; values[i] = arguments.length > 1 ? slice.call(arguments) : value; if (values === progressValues) { deferred.notifyWith(contexts, values); } else if (!(--remaining)) { deferred.resolveWith(contexts, values); } }; }, progressValues, progressContexts, resolveContexts; // add listeners to Deferred subordinates; treat others as resolved if (length > 1) { progressValues = new Array(length); progressContexts = new Array(length); resolveContexts = new Array(length); for (; i < length; i++) { if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) { resolveValues[i].promise() .progress(updateFunc(i, progressContexts, progressValues)) .done(updateFunc(i, resolveContexts, resolveValues)) .fail(deferred.reject); } else { --remaining; } } } // if we're not waiting on anything, resolve the master if (!remaining) { deferred.resolveWith(resolveContexts, resolveValues); } return deferred.promise(); } }); // The deferred used on DOM ready var readyList; jQuery.fn.ready = function(fn) { // Add the callback jQuery.ready.promise().done(fn); return this; }; jQuery.extend({ // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function(hold) { if (hold) { jQuery.readyWait++; } else { jQuery.ready(true); } }, // Handle when the DOM is ready ready: function(wait) { // Abort if there are pending holds or we're already ready if (wait === true ? --jQuery.readyWait : jQuery.isReady) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if (wait !== true && --jQuery.readyWait > 0) { return; } // If there are functions bound, to execute readyList.resolveWith(document, [jQuery]); // Trigger any bound ready events if (jQuery.fn.triggerHandler) { jQuery(document).triggerHandler("ready"); jQuery(document).off("ready"); } } }); /** * Clean-up method for dom ready events */ function detach() { if (document.addEventListener) { document.removeEventListener("DOMContentLoaded", completed); window.removeEventListener("load", completed); } else { document.detachEvent("onreadystatechange", completed); window.detachEvent("onload", completed); } } /** * The ready event handler and self cleanup method */ function completed() { // readyState === "complete" is good enough for us to call the dom ready in oldIE if (document.addEventListener || window.event.type === "load" || document.readyState === "complete") { detach(); jQuery.ready(); } } jQuery.ready.promise = function(obj) { if (!readyList) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called // after the browser event has already occurred. // Support: IE6-10 // Older IE sometimes signals "interactive" too soon if (document.readyState === "complete" || (document.readyState !== "loading" && !document.documentElement.doScroll)) { // Handle it asynchronously to allow scripts the opportunity to delay ready window.setTimeout(jQuery.ready); // Standards-based browsers support DOMContentLoaded } else if (document.addEventListener) { // Use the handy event callback document.addEventListener("DOMContentLoaded", completed); // A fallback to window.onload, that will always work window.addEventListener("load", completed); // If IE event model is used } else { // Ensure firing before onload, maybe late but safe also for iframes document.attachEvent("onreadystatechange", completed); // A fallback to window.onload, that will always work window.attachEvent("onload", completed); // If IE and not a frame // continually check to see if the document is ready var top = false; try { top = window.frameElement == null && document.documentElement; } catch (e) {} if (top && top.doScroll) { (function doScrollCheck() { if (!jQuery.isReady) { try { // Use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ top.doScroll("left"); } catch (e) { return window.setTimeout(doScrollCheck, 50); } // detach all dom ready events detach(); // and execute any waiting functions jQuery.ready(); } })(); } } } return readyList.promise(obj); }; // Kick off the DOM ready check even if the user does not jQuery.ready.promise(); // Support: IE<9 // Iteration over object's inherited properties before its own var i; for (i in jQuery(support)) { break; } support.ownFirst = i === "0"; // Note: most support tests are defined in their respective modules. // false until the test is run support.inlineBlockNeedsLayout = false; // Execute ASAP in case we need to set body.style.zoom jQuery(function() { // Minified: var a,b,c,d var val, div, body, container; body = document.getElementsByTagName("body")[0]; if (!body || !body.style) { // Return for frameset docs that don't have a body return; } // Setup div = document.createElement("div"); container = document.createElement("div"); container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; body.appendChild(container).appendChild(div); if (typeof div.style.zoom !== "undefined") { // Support: IE<8 // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; if (val) { // Prevent IE 6 from affecting layout for positioned elements #11048 // Prevent IE from shrinking the body in IE 7 mode #12869 // Support: IE<8 body.style.zoom = 1; } } body.removeChild(container); }); (function() { var div = document.createElement("div"); // Support: IE<9 support.deleteExpando = true; try { delete div.test; } catch (e) { support.deleteExpando = false; } // Null elements to avoid leaks in IE. div = null; })(); var acceptData = function(elem) { var noData = jQuery.noData[(elem.nodeName + " ").toLowerCase()], nodeType = +elem.nodeType || 1; // Do not set data on non-element DOM nodes because it will not be cleared (#8335). return nodeType !== 1 && nodeType !== 9 ? false : // Nodes accept data unless otherwise specified; rejection can be conditional !noData || noData !== true && elem.getAttribute("classid") === noData; }; var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /([A-Z])/g; function dataAttr(elem, key, data) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if (data === undefined && elem.nodeType === 1) { var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase(); data = elem.getAttribute(name); if (typeof data === "string") { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : // Only convert to a number if it doesn't change the string +data + "" === data ? +data : rbrace.test(data) ? jQuery.parseJSON(data) : data; } catch (e) {} // Make sure we set the data so it isn't changed later jQuery.data(elem, key, data); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject(obj) { var name; for (name in obj) { // if the public data object is empty, the private is still empty if (name === "data" && jQuery.isEmptyObject(obj[name])) { continue; } if (name !== "toJSON") { return false; } } return true; } function internalData(elem, name, data, pvt /* Internal Use Only */ ) { if (!acceptData(elem)) { return; } var ret, thisCache, internalKey = jQuery.expando, // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[internalKey] : elem[internalKey] && internalKey; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ((!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string") { return; } if (!id) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if (isNode) { id = elem[internalKey] = deletedIds.pop() || jQuery.guid++; } else { id = internalKey; } } if (!cache[id]) { // Avoid exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify cache[id] = isNode ? {} : { toJSON: jQuery.noop }; } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if (typeof name === "object" || typeof name === "function") { if (pvt) { cache[id] = jQuery.extend(cache[id], name); } else { cache[id].data = jQuery.extend(cache[id].data, name); } } thisCache = cache[id]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if (!pvt) { if (!thisCache.data) { thisCache.data = {}; } thisCache = thisCache.data; } if (data !== undefined) { thisCache[jQuery.camelCase(name)] = data; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if (typeof name === "string") { // First Try to find as-is property data ret = thisCache[name]; // Test for null|undefined property data if (ret == null) { // Try to find the camelCased property ret = thisCache[jQuery.camelCase(name)]; } } else { ret = thisCache; } return ret; } function internalRemoveData(elem, name, pvt) { if (!acceptData(elem)) { return; } var thisCache, i, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, id = isNode ? elem[jQuery.expando] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if (!cache[id]) { return; } if (name) { thisCache = pvt ? cache[id] : cache[id].data; if (thisCache) { // Support array or space separated string names for data keys if (!jQuery.isArray(name)) { // try the string as a key before any manipulation if (name in thisCache) { name = [name]; } else { // split the camel cased version by spaces unless a key with the spaces exists name = jQuery.camelCase(name); if (name in thisCache) { name = [name]; } else { name = name.split(" "); } } } else { // If "name" is an array of keys... // When data is initially created, via ("key", "val") signature, // keys will be converted to camelCase. // Since there is no way to tell _how_ a key was added, remove // both plain key and camelCase key. #12786 // This will only penalize the array argument path. name = name.concat(jQuery.map(name, jQuery.camelCase)); } i = name.length; while (i--) { delete thisCache[name[i]]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if (pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache)) { return; } } } // See jQuery.data for more information if (!pvt) { delete cache[id].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if (!isEmptyDataObject(cache[id])) { return; } } // Destroy the cache if (isNode) { jQuery.cleanData([elem], true); // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) /* jshint eqeqeq: false */ } else if (support.deleteExpando || cache != cache.window) { /* jshint eqeqeq: true */ delete cache[id]; // When all else fails, undefined } else { cache[id] = undefined; } } jQuery.extend({ cache: {}, // The following elements (space-suffixed to avoid Object.prototype collisions) // throw uncatchable exceptions if you attempt to set expando properties noData: { "applet ": true, "embed ": true, // ...but Flash objects (which have this classid) *can* handle expandos "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" }, hasData: function(elem) { elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando]; return !!elem && !isEmptyDataObject(elem); }, data: function(elem, name, data) { return internalData(elem, name, data); }, removeData: function(elem, name) { return internalRemoveData(elem, name); }, // For internal use only. _data: function(elem, name, data) { return internalData(elem, name, data, true); }, _removeData: function(elem, name) { return internalRemoveData(elem, name, true); } }); jQuery.fn.extend({ data: function(key, value) { var i, name, data, elem = this[0], attrs = elem && elem.attributes; // Special expections of .data basically thwart jQuery.access, // so implement the relevant behavior ourselves // Gets all values if (key === undefined) { if (this.length) { data = jQuery.data(elem); if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) { i = attrs.length; while (i--) { // Support: IE11+ // The attrs elements can be null (#14894) if (attrs[i]) { name = attrs[i].name; if (name.indexOf("data-") === 0) { name = jQuery.camelCase(name.slice(5)); dataAttr(elem, name, data[name]); } } } jQuery._data(elem, "parsedAttrs", true); } } return data; } // Sets multiple values if (typeof key === "object") { return this.each(function() { jQuery.data(this, key); }); } return arguments.length > 1 ? // Sets one value this.each(function() { jQuery.data(this, key, value); }) : // Gets one value // Try to fetch any internally stored data first elem ? dataAttr(elem, key, jQuery.data(elem, key)) : undefined; }, removeData: function(key) { return this.each(function() { jQuery.removeData(this, key); }); } }); jQuery.extend({ queue: function(elem, type, data) { var queue; if (elem) { type = (type || "fx") + "queue"; queue = jQuery._data(elem, type); // Speed up dequeue by getting out quickly if this is just a lookup if (data) { if (!queue || jQuery.isArray(data)) { queue = jQuery._data(elem, type, jQuery.makeArray(data)); } else { queue.push(data); } } return queue || []; } }, dequeue: function(elem, type) { type = type || "fx"; var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() { jQuery.dequeue(elem, type); }; // If the fx queue is dequeued, always remove the progress sentinel if (fn === "inprogress") { fn = queue.shift(); startLength--; } if (fn) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if (type === "fx") { queue.unshift("inprogress"); } // clear up the last queue stop function delete hooks.stop; fn.call(elem, next, hooks); } if (!startLength && hooks) { hooks.empty.fire(); } }, // not intended for public consumption - generates a queueHooks object, // or returns the current one _queueHooks: function(elem, type) { var key = type + "queueHooks"; return jQuery._data(elem, key) || jQuery._data(elem, key, { empty: jQuery.Callbacks("once memory").add(function() { jQuery._removeData(elem, type + "queue"); jQuery._removeData(elem, key); }) }); } }); jQuery.fn.extend({ queue: function(type, data) { var setter = 2; if (typeof type !== "string") { data = type; type = "fx"; setter--; } if (arguments.length < setter) { return jQuery.queue(this[0], type); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue(this, type, data); // ensure a hooks for this queue jQuery._queueHooks(this, type); if (type === "fx" && queue[0] !== "inprogress") { jQuery.dequeue(this, type); } }); }, dequeue: function(type) { return this.each(function() { jQuery.dequeue(this, type); }); }, clearQueue: function(type) { return this.queue(type || "fx", []); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function(type, obj) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if (!(--count)) { defer.resolveWith(elements, [elements]); } }; if (typeof type !== "string") { obj = type; type = undefined; } type = type || "fx"; while (i--) { tmp = jQuery._data(elements[i], type + "queueHooks"); if (tmp && tmp.empty) { count++; tmp.empty.add(resolve); } } resolve(); return defer.promise(obj); } }); (function() { var shrinkWrapBlocksVal; support.shrinkWrapBlocks = function() { if (shrinkWrapBlocksVal != null) { return shrinkWrapBlocksVal; } // Will be changed later if needed. shrinkWrapBlocksVal = false; // Minified: var b,c,d var div, body, container; body = document.getElementsByTagName("body")[0]; if (!body || !body.style) { // Test fired too early or in an unsupported environment, exit. return; } // Setup div = document.createElement("div"); container = document.createElement("div"); container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; body.appendChild(container).appendChild(div); // Support: IE6 // Check if elements with layout shrink-wrap their children if (typeof div.style.zoom !== "undefined") { // Reset CSS: box-sizing; display; margin; border div.style.cssText = // Support: Firefox<29, Android 2.3 // Vendor-prefix box-sizing "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;" + "padding:1px;width:1px;zoom:1"; div.appendChild(document.createElement("div")).style.width = "5px"; shrinkWrapBlocksVal = div.offsetWidth !== 3; } body.removeChild(container); return shrinkWrapBlocksVal; }; })(); var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"); var cssExpand = ["Top", "Right", "Bottom", "Left"]; var isHidden = function(elem, el) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem); }; function adjustCSS(elem, prop, valueParts, tween) { var adjusted, scale = 1, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { return jQuery.css(elem, prop, ""); }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), // Starting value computation is required for potential unit mismatches initialInUnit = (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop)); if (initialInUnit && initialInUnit[3] !== unit) { // Trust units reported by jQuery.css unit = unit || initialInUnit[3]; // Make sure we update the tween properties later on valueParts = valueParts || []; // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; do { // If previous iteration zeroed out, double until we get *something*. // Use string for doubling so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply initialInUnit = initialInUnit / scale; jQuery.style(elem, prop, initialInUnit + unit); // Update scale, tolerating zero or NaN from tween.cur() // Break the loop if scale is unchanged or perfect, or if we've just had enough. } while ( scale !== (scale = currentValue() / initial) && scale !== 1 && --maxIterations ); } if (valueParts) { initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2]; if (tween) { tween.unit = unit; tween.start = initialInUnit; tween.end = adjusted; } } return adjusted; } // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = function(elems, fn, key, value, chainable, emptyGet, raw) { var i = 0, length = elems.length, bulk = key == null; // Sets many values if (jQuery.type(key) === "object") { chainable = true; for (i in key) { access(elems, fn, i, key[i], true, emptyGet, raw); } // Sets one value } else if (value !== undefined) { chainable = true; if (!jQuery.isFunction(value)) { raw = true; } if (bulk) { // Bulk operations run against the entire set if (raw) { fn.call(elems, value); fn = null; // ...except when executing function values } else { bulk = fn; fn = function(elem, key, value) { return bulk.call(jQuery(elem), value); }; } } if (fn) { for (; i < length; i++) { fn( elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)) ); } } } return chainable ? elems : // Gets bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet; }; var rcheckableType = (/^(?:checkbox|radio)$/i); var rtagName = (/<([\w:-]+)/); var rscriptType = (/^$|\/(?:java|ecma)script/i); var rleadingWhitespace = (/^\s+/); var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + "details|dialog|figcaption|figure|footer|header|hgroup|main|" + "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; function createSafeFragment(document) { var list = nodeNames.split("|"), safeFrag = document.createDocumentFragment(); if (safeFrag.createElement) { while (list.length) { safeFrag.createElement( list.pop() ); } } return safeFrag; } (function() { var div = document.createElement("div"), fragment = document.createDocumentFragment(), input = document.createElement("input"); // Setup div.innerHTML = "
a"; // IE strips leading whitespace when .innerHTML is used support.leadingWhitespace = div.firstChild.nodeType === 3; // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables support.tbody = !div.getElementsByTagName("tbody").length; // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE support.htmlSerialize = !!div.getElementsByTagName("link").length; // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works support.html5Clone = document.createElement("nav").cloneNode(true).outerHTML !== "<:nav>"; // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) input.type = "checkbox"; input.checked = true; fragment.appendChild(input); support.appendChecked = input.checked; // Make sure textarea (and checkbox) defaultValue is properly cloned // Support: IE6-IE11+ div.innerHTML = ""; support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; // #11217 - WebKit loses check when the name is after the checked attribute fragment.appendChild(div); // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input = document.createElement("input"); input.setAttribute("type", "radio"); input.setAttribute("checked", "checked"); input.setAttribute("name", "t"); div.appendChild(input); // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 // old WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; // Support: IE<9 // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ support.noCloneEvent = !!div.addEventListener; // Support: IE<9 // Since attributes and properties are the same in IE, // cleanData must set properties to undefined rather than use removeAttribute div[jQuery.expando] = 1; support.attributes = !div.getAttribute(jQuery.expando); })(); // We have to close these tags to support XHTML (#13200) var wrapMap = { option: [1, ""], legend: [1, "
", "
"], area: [1, "", ""], // Support: IE8 param: [1, "", ""], thead: [1, "", "
"], tr: [2, "", "
"], col: [2, "", "
"], td: [3, "", "
"], // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, // unless wrapped in a div with non-breaking characters in front of it. _default: support.htmlSerialize ? [0, "", ""] : [1, "X
", "
"] }; // Support: IE8-IE9 wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; function getAll(context, tag) { var elems, elem, i = 0, found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName(tag || "*") : typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll(tag || "*") : undefined; if (!found) { for (found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { if (!tag || jQuery.nodeName(elem, tag)) { found.push(elem); } else { jQuery.merge(found, getAll(elem, tag)); } } } return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], found) : found; } // Mark scripts as having already been evaluated function setGlobalEval(elems, refElements) { var elem, i = 0; for (; (elem = elems[i]) != null; i++) { jQuery._data( elem, "globalEval", !refElements || jQuery._data(refElements[i], "globalEval") ); } } var rhtml = /<|&#?\w+;/, rtbody = / from table fragments if (!support.tbody) { // String was a , *may* have spurious elem = tag === "table" && !rtbody.test(elem) ? tmp.firstChild : // String was a bare or wrap[1] === "
" && !rtbody.test(elem) ? tmp : 0; j = elem && elem.childNodes.length; while (j--) { if (jQuery.nodeName((tbody = elem.childNodes[j]), "tbody") && !tbody.childNodes.length) { elem.removeChild(tbody); } } } jQuery.merge(nodes, tmp.childNodes); // Fix #12392 for WebKit and IE > 9 tmp.textContent = ""; // Fix #12392 for oldIE while (tmp.firstChild) { tmp.removeChild(tmp.firstChild); } // Remember the top-level container for proper cleanup tmp = safe.lastChild; } } } // Fix #11356: Clear elements from fragment if (tmp) { safe.removeChild(tmp); } // Reset defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) if (!support.appendChecked) { jQuery.grep(getAll(nodes, "input"), fixDefaultChecked); } i = 0; while ((elem = nodes[i++])) { // Skip elements already in the context collection (trac-4087) if (selection && jQuery.inArray(elem, selection) > -1) { if (ignored) { ignored.push(elem); } continue; } contains = jQuery.contains(elem.ownerDocument, elem); // Append to fragment tmp = getAll(safe.appendChild(elem), "script"); // Preserve script evaluation history if (contains) { setGlobalEval(tmp); } // Capture executables if (scripts) { j = 0; while ((elem = tmp[j++])) { if (rscriptType.test(elem.type || "")) { scripts.push(elem); } } } } tmp = null; return safe; } (function() { var i, eventName, div = document.createElement("div"); // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) for (i in { submit: true, change: true, focusin: true }) { eventName = "on" + i; if (!(support[i] = eventName in window)) { // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) div.setAttribute(eventName, "t"); support[i] = div.attributes[eventName].expando === false; } } // Null elements to avoid leaks in IE. div = null; })(); var rformElems = /^(?:input|select|textarea)$/i, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; } function returnFalse() { return false; } // Support: IE9 // See #13393 for more info function safeActiveElement() { try { return document.activeElement; } catch (err) {} } function on(elem, types, selector, data, fn, one) { var origFn, type; // Types can be a map of types/handlers if (typeof types === "object") { // ( types-Object, selector, data ) if (typeof selector !== "string") { // ( types-Object, data ) data = data || selector; selector = undefined; } for (type in types) { on(elem, type, selector, data, types[type], one); } return elem; } if (data == null && fn == null) { // ( types, fn ) fn = selector; data = selector = undefined; } else if (fn == null) { if (typeof selector === "string") { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if (fn === false) { fn = returnFalse; } else if (!fn) { return elem; } if (one === 1) { origFn = fn; fn = function(event) { // Can use an empty set, since event contains the info jQuery().off(event); return origFn.apply(this, arguments); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); } return elem.each(function() { jQuery.event.add(this, types, fn, data, selector); }); } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function(elem, types, handler, data, selector) { var tmp, events, t, handleObjIn, special, eventHandle, handleObj, handlers, type, namespaces, origType, elemData = jQuery._data(elem); // Don't attach events to noData or text/comment nodes (but allow plain objects) if (!elemData) { return; } // Caller can pass in an object of custom data in lieu of the handler if (handler.handler) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if (!handler.guid) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if (!(events = elemData.events)) { events = elemData.events = {}; } if (!(eventHandle = elemData.handle)) { eventHandle = elemData.handle = function(e) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply(eventHandle.elem, arguments) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak // with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space types = (types || "").match(rnotwhite) || [""]; t = types.length; while (t--) { tmp = rtypenamespace.exec(types[t]) || []; type = origType = tmp[1]; namespaces = (tmp[2] || "").split(".").sort(); // There *must* be a type, no attaching namespace-only handlers if (!type) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[type] || {}; // If selector defined, determine special event api type, otherwise given type type = (selector ? special.delegateType : special.bindType) || type; // Update special based on newly reset type special = jQuery.event.special[type] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test(selector), namespace: namespaces.join(".") }, handleObjIn); // Init the event handler queue if we're the first if (!(handlers = events[type])) { handlers = events[type] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { // Bind the global event handler to the element if (elem.addEventListener) { elem.addEventListener(type, eventHandle, false); } else if (elem.attachEvent) { elem.attachEvent("on" + type, eventHandle); } } } if (special.add) { special.add.call(elem, handleObj); if (!handleObj.handler.guid) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if (selector) { handlers.splice(handlers.delegateCount++, 0, handleObj); } else { handlers.push(handleObj); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[type] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, // Detach an event or set of events from an element remove: function(elem, types, handler, selector, mappedTypes) { var j, handleObj, tmp, origCount, t, events, special, handlers, type, namespaces, origType, elemData = jQuery.hasData(elem) && jQuery._data(elem); if (!elemData || !(events = elemData.events)) { return; } // Once for each type.namespace in types; type may be omitted types = (types || "").match(rnotwhite) || [""]; t = types.length; while (t--) { tmp = rtypenamespace.exec(types[t]) || []; type = origType = tmp[1]; namespaces = (tmp[2] || "").split(".").sort(); // Unbind all events (on this namespace, if provided) for the element if (!type) { for (type in events) { jQuery.event.remove(elem, type + types[t], handler, selector, true); } continue; } special = jQuery.event.special[type] || {}; type = (selector ? special.delegateType : special.bindType) || type; handlers = events[type] || []; tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); // Remove matching events origCount = j = handlers.length; while (j--) { handleObj = handlers[j]; if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { handlers.splice(j, 1); if (handleObj.selector) { handlers.delegateCount--; } if (special.remove) { special.remove.call(elem, handleObj); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if (origCount && !handlers.length) { if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) { jQuery.removeEvent(elem, type, elemData.handle); } delete events[type]; } } // Remove the expando if it's no longer used if (jQuery.isEmptyObject(events)) { delete elemData.handle; // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery._removeData(elem, "events"); } }, trigger: function(event, data, elem, onlyHandlers) { var handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [elem || document], type = hasOwn.call(event, "type") ? event.type : event, namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if (elem.nodeType === 3 || elem.nodeType === 8) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if (rfocusMorph.test(type + jQuery.event.triggered)) { return; } if (type.indexOf(".") > -1) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join("."); event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; // Clean up the event in case it is being reused event.result = undefined; if (!event.target) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [event] : jQuery.makeArray(data, [event]); // Allow special events to draw outside the lines special = jQuery.event.special[type] || {}; if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) { bubbleType = special.delegateType || type; if (!rfocusMorph.test(bubbleType + type)) { cur = cur.parentNode; } for (; cur; cur = cur.parentNode) { eventPath.push(cur); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if (tmp === (elem.ownerDocument || document)) { eventPath.push(tmp.defaultView || tmp.parentWindow || window); } } // Fire handlers on the event path i = 0; while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = (jQuery._data(cur, "events") || {})[event.type] && jQuery._data(cur, "handle"); if (handle) { handle.apply(cur, data); } // Native handler handle = ontype && cur[ontype]; if (handle && handle.apply && acceptData(cur)) { event.result = handle.apply(cur, data); if (event.result === false) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if (!onlyHandlers && !event.isDefaultPrevented()) { if ( (!special._default || special._default.apply(eventPath.pop(), data) === false ) && acceptData(elem) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) if (ontype && elem[type] && !jQuery.isWindow(elem)) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ontype]; if (tmp) { elem[ontype] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; try { elem[type](); } catch (e) { // IE<9 dies on focus/blur to hidden element (#1486,#12518) // only reproducible on winXP IE8 native, not IE9 in IE8 mode } jQuery.event.triggered = undefined; if (tmp) { elem[ontype] = tmp; } } } } return event.result; }, dispatch: function(event) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix(event); var i, j, ret, matched, handleObj, handlerQueue = [], args = slice.call(arguments), handlers = (jQuery._data(this, "events") || {})[event.type] || [], special = jQuery.event.special[event.type] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if (special.preDispatch && special.preDispatch.call(this, event) === false) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call(this, event, handlers); // Run delegates first; they may want to stop propagation beneath us i = 0; while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { event.currentTarget = matched.elem; j = 0; while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) { // Triggered event must either 1) have no namespace, or 2) have namespace(s) // a subset or equal to those in the bound event (both can have no namespace). if (!event.rnamespace || event.rnamespace.test(handleObj.namespace)) { event.handleObj = handleObj; event.data = handleObj.data; ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); if (ret !== undefined) { if ((event.result = ret) === false) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if (special.postDispatch) { special.postDispatch.call(this, event); } return event.result; }, handlers: function(event, handlers) { var i, matches, sel, handleObj, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Support (at least): Chrome, IE9 // Find delegate handlers // Black-hole SVG instance trees (#13180) // // Support: Firefox<=42+ // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) if (delegateCount && cur.nodeType && (event.type !== "click" || isNaN(event.button) || event.button < 1)) { /* jshint eqeqeq: false */ for (; cur != this; cur = cur.parentNode || this) { /* jshint eqeqeq: true */ // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if (cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click")) { matches = []; for (i = 0; i < delegateCount; i++) { handleObj = handlers[i]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if (matches[sel] === undefined) { matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length; } if (matches[sel]) { matches.push(handleObj); } } if (matches.length) { handlerQueue.push({ elem: cur, handlers: matches }); } } } } // Add the remaining (directly-bound) handlers if (delegateCount < handlers.length) { handlerQueue.push({ elem: this, handlers: handlers.slice(delegateCount) }); } return handlerQueue; }, fix: function(event) { if (event[jQuery.expando]) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, copy, type = event.type, originalEvent = event, fixHook = this.fixHooks[type]; if (!fixHook) { this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(type) ? this.keyHooks : {}; } copy = fixHook.props ? this.props.concat(fixHook.props) : this.props; event = new jQuery.Event(originalEvent); i = copy.length; while (i--) { prop = copy[i]; event[prop] = originalEvent[prop]; } // Support: IE<9 // Fix target property (#1925) if (!event.target) { event.target = originalEvent.srcElement || document; } // Support: Safari 6-8+ // Target should not be a text node (#504, #13143) if (event.target.nodeType === 3) { event.target = event.target.parentNode; } // Support: IE<9 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) event.metaKey = !!event.metaKey; return fixHook.filter ? fixHook.filter(event, originalEvent) : event; }, // Includes some event props shared by KeyEvent and MouseEvent props: ("altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + "metaKey relatedTarget shiftKey target timeStamp view which").split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function(event, original) { // Add which for key events if (event.which == null) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: ("button buttons clientX clientY fromElement offsetX offsetY " + "pageX pageY screenX screenY toElement").split(" "), filter: function(event, original) { var body, eventDoc, doc, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if (event.pageX == null && original.clientX != null) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // Add relatedTarget, if necessary if (!event.relatedTarget && fromElement) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if (!event.which && button !== undefined) { event.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0))); } return event; } }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if (this !== safeActiveElement() && this.focus) { try { this.focus(); return false; } catch (e) { // Support: IE<9 // If we error on focus to hidden element (#1486, #12518), // let .trigger() run the handlers } } }, delegateType: "focusin" }, blur: { trigger: function() { if (this === safeActiveElement() && this.blur) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if (jQuery.nodeName(this, "input") && this.type === "checkbox" && this.click) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function(event) { return jQuery.nodeName(event.target, "a"); } }, beforeunload: { postDispatch: function(event) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if (event.result !== undefined && event.originalEvent) { event.originalEvent.returnValue = event.result; } } } }, // Piggyback on a donor event to simulate a different one simulate: function(type, elem, event) { var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true // Previously, `originalEvent: {}` was set here, so stopPropagation call // would not be triggered on donor event, since in our own // jQuery.event.stopPropagation function we had a check for existence of // originalEvent.stopPropagation method, so, consequently it would be a noop. // // Guard for simulated events was moved to jQuery.event.stopPropagation function // since `originalEvent` should point to the original event for the // constancy with other events and for more focused logic } ); jQuery.event.trigger(e, null, elem); if (e.isDefaultPrevented()) { event.preventDefault(); } } }; jQuery.removeEvent = document.removeEventListener ? function(elem, type, handle) { // This "if" is needed for plain objects if (elem.removeEventListener) { elem.removeEventListener(type, handle); } } : function(elem, type, handle) { var name = "on" + type; if (elem.detachEvent) { // #8545, #7054, preventing memory leaks for custom events in IE6-8 // detachEvent needed property on element, by name of that event, // to properly expose it to GC if (typeof elem[name] === "undefined") { elem[name] = null; } elem.detachEvent(name, handle); } }; jQuery.Event = function(src, props) { // Allow instantiation without the 'new' keyword if (!(this instanceof jQuery.Event)) { return new jQuery.Event(src, props); } // Event object if (src && src.type) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: IE < 9, Android < 4.0 src.returnValue === false ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if (props) { jQuery.extend(this, props); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[jQuery.expando] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if (!e) { return; } // If preventDefault exists, run it on the original event if (e.preventDefault) { e.preventDefault(); // Support: IE // Otherwise set the returnValue property of the original event to false } else { e.returnValue = false; } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if (!e || this.isSimulated) { return; } // If stopPropagation exists, run it on the original event if (e.stopPropagation) { e.stopPropagation(); } // Support: IE // Set the cancelBubble property of the original event to true e.cancelBubble = true; }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if (e && e.stopImmediatePropagation) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout // // Support: Safari 7 only // Safari sends mouseenter too often; see: // https://code.google.com/p/chromium/issues/detail?id=470258 // for the description of the bug (it existed in older Chrome versions as well). jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function(orig, fix) { jQuery.event.special[orig] = { delegateType: fix, bindType: fix, handle: function(event) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if (!related || (related !== target && !jQuery.contains(target, related))) { event.type = handleObj.origType; ret = handleObj.handler.apply(this, arguments); event.type = fix; } return ret; } }; }); // IE submit delegation if (!support.submit) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if (jQuery.nodeName(this, "form")) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add(this, "click._submit keypress._submit", function(e) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName(elem, "input") || jQuery.nodeName(elem, "button") ? // Support: IE <=8 // We use jQuery.prop instead of elem.form // to allow fixing the IE8 delegated submit issue (gh-2332) // by 3rd party polyfills/workarounds. jQuery.prop(elem, "form") : undefined; if (form && !jQuery._data(form, "submit")) { jQuery.event.add(form, "submit._submit", function(event) { event._submitBubble = true; }); jQuery._data(form, "submit", true); } }); // return undefined since we don't need an event listener }, postDispatch: function(event) { // If form was submitted by the user, bubble the event up the tree if (event._submitBubble) { delete event._submitBubble; if (this.parentNode && !event.isTrigger) { jQuery.event.simulate("submit", this.parentNode, event); } } }, teardown: function() { // Only need this for delegated form submit events if (jQuery.nodeName(this, "form")) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove(this, "._submit"); } }; } // IE change delegation and checkbox/radio fix if (!support.change) { jQuery.event.special.change = { setup: function() { if (rformElems.test(this.nodeName)) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if (this.type === "checkbox" || this.type === "radio") { jQuery.event.add(this, "propertychange._change", function(event) { if (event.originalEvent.propertyName === "checked") { this._justChanged = true; } }); jQuery.event.add(this, "click._change", function(event) { if (this._justChanged && !event.isTrigger) { this._justChanged = false; } // Allow triggered, simulated change events (#11500) jQuery.event.simulate("change", this, event); }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add(this, "beforeactivate._change", function(e) { var elem = e.target; if (rformElems.test(elem.nodeName) && !jQuery._data(elem, "change")) { jQuery.event.add(elem, "change._change", function(event) { if (this.parentNode && !event.isSimulated && !event.isTrigger) { jQuery.event.simulate("change", this.parentNode, event); } }); jQuery._data(elem, "change", true); } }); }, handle: function(event) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if (this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox")) { return event.handleObj.handler.apply(this, arguments); } }, teardown: function() { jQuery.event.remove(this, "._change"); return !rformElems.test(this.nodeName); } }; } // Support: Firefox // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 // // Support: Chrome, Safari // focus(in | out) events fire after focus & blur events, // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order // Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 if (!support.focusin) { jQuery.each({ focus: "focusin", blur: "focusout" }, function(orig, fix) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function(event) { jQuery.event.simulate(fix, event.target, jQuery.event.fix(event)); }; jQuery.event.special[fix] = { setup: function() { var doc = this.ownerDocument || this, attaches = jQuery._data(doc, fix); if (!attaches) { doc.addEventListener(orig, handler, true); } jQuery._data(doc, fix, (attaches || 0) + 1); }, teardown: function() { var doc = this.ownerDocument || this, attaches = jQuery._data(doc, fix) - 1; if (!attaches) { doc.removeEventListener(orig, handler, true); jQuery._removeData(doc, fix); } else { jQuery._data(doc, fix, attaches); } } }; }); } jQuery.fn.extend({ on: function(types, selector, data, fn) { return on(this, types, selector, data, fn); }, one: function(types, selector, data, fn) { return on(this, types, selector, data, fn, 1); }, off: function(types, selector, fn) { var handleObj, type; if (types && types.preventDefault && types.handleObj) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery(types.delegateTarget).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if (typeof types === "object") { // ( types-object [, selector] ) for (type in types) { this.off(type, selector, types[type]); } return this; } if (selector === false || typeof selector === "function") { // ( types [, fn] ) fn = selector; selector = undefined; } if (fn === false) { fn = returnFalse; } return this.each(function() { jQuery.event.remove(this, types, fn, selector); }); }, trigger: function(type, data) { return this.each(function() { jQuery.event.trigger(type, data, this); }); }, triggerHandler: function(type, data) { var elem = this[0]; if (elem) { return jQuery.event.trigger(type, data, elem, true); } } }); var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, // Support: IE 10-11, Edge 10240+ // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /\s*$/g, safeFragment = createSafeFragment(document), fragmentDiv = safeFragment.appendChild(document.createElement("div")); // Support: IE<8 // Manipulating tables requires a tbody function manipulationTarget(elem, content) { return jQuery.nodeName(elem, "table") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr") ? elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody")) : elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript(elem) { elem.type = (jQuery.find.attr(elem, "type") !== null) + "/" + elem.type; return elem; } function restoreScript(elem) { var match = rscriptTypeMasked.exec(elem.type); if (match) { elem.type = match[1]; } else { elem.removeAttribute("type"); } return elem; } function cloneCopyEvent(src, dest) { if (dest.nodeType !== 1 || !jQuery.hasData(src)) { return; } var type, i, l, oldData = jQuery._data(src), curData = jQuery._data(dest, oldData), events = oldData.events; if (events) { delete curData.handle; curData.events = {}; for (type in events) { for (i = 0, l = events[type].length; i < l; i++) { jQuery.event.add(dest, type, events[type][i]); } } } // make the cloned public data object a copy from the original if (curData.data) { curData.data = jQuery.extend({}, curData.data); } } function fixCloneNodeIssues(src, dest) { var nodeName, e, data; // We do not need to do anything for non-Elements if (dest.nodeType !== 1) { return; } nodeName = dest.nodeName.toLowerCase(); // IE6-8 copies events bound via attachEvent when using cloneNode. if (!support.noCloneEvent && dest[jQuery.expando]) { data = jQuery._data(dest); for (e in data.events) { jQuery.removeEvent(dest, e, data.handle); } // Event data gets referenced instead of copied if the expando gets copied too dest.removeAttribute(jQuery.expando); } // IE blanks contents when cloning scripts, and tries to evaluate newly-set text if (nodeName === "script" && dest.text !== src.text) { disableScript(dest).text = src.text; restoreScript(dest); // IE6-10 improperly clones children of object elements using classid. // IE10 throws NoModificationAllowedError if parent is null, #12132. } else if (nodeName === "object") { if (dest.parentNode) { dest.outerHTML = src.outerHTML; } // This path appears unavoidable for IE9. When cloning an object // element in IE9, the outerHTML strategy above is not sufficient. // If the src has innerHTML and the destination does not, // copy the src.innerHTML into the dest.innerHTML. #10324 if (support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML))) { dest.innerHTML = src.innerHTML; } } else if (nodeName === "input" && rcheckableType.test(src.type)) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set dest.defaultChecked = dest.checked = src.checked; // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if (dest.value !== src.value) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if (nodeName === "option") { dest.defaultSelected = dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if (nodeName === "input" || nodeName === "textarea") { dest.defaultValue = src.defaultValue; } } function domManip(collection, args, callback, ignored) { // Flatten any nested arrays args = concat.apply([], args); var first, node, hasScripts, scripts, doc, fragment, i = 0, l = collection.length, iNoClone = l - 1, value = args[0], isFunction = jQuery.isFunction(value); // We can't cloneNode fragments that contain checked, in WebKit if (isFunction || (l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value))) { return collection.each(function(index) { var self = collection.eq(index); if (isFunction) { args[0] = value.call(this, index, self.html()); } domManip(self, args, callback, ignored); }); } if (l) { fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored); first = fragment.firstChild; if (fragment.childNodes.length === 1) { fragment = first; } // Require either new content or an interest in ignored elements to invoke the callback if (first || ignored) { scripts = jQuery.map(getAll(fragment, "script"), disableScript); hasScripts = scripts.length; // Use the original fragment for the last item // instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for (; i < l; i++) { node = fragment; if (i !== iNoClone) { node = jQuery.clone(node, true, true); // Keep references to cloned scripts for later restoration if (hasScripts) { // Support: Android<4.1, PhantomJS<2 // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge(scripts, getAll(node, "script")); } } callback.call(collection[i], node, i); } if (hasScripts) { doc = scripts[scripts.length - 1].ownerDocument; // Reenable scripts jQuery.map(scripts, restoreScript); // Evaluate executable scripts on first document insertion for (i = 0; i < hasScripts; i++) { node = scripts[i]; if (rscriptType.test(node.type || "") && !jQuery._data(node, "globalEval") && jQuery.contains(doc, node)) { if (node.src) { // Optional AJAX dependency, but won't run scripts if not present if (jQuery._evalUrl) { jQuery._evalUrl(node.src); } } else { jQuery.globalEval( (node.text || node.textContent || node.innerHTML || "") .replace(rcleanScript, "") ); } } } } // Fix #11809: Avoid leaking memory fragment = first = null; } } return collection; } function remove(elem, selector, keepData) { var node, elems = selector ? jQuery.filter(selector, elem) : elem, i = 0; for (; (node = elems[i]) != null; i++) { if (!keepData && node.nodeType === 1) { jQuery.cleanData(getAll(node)); } if (node.parentNode) { if (keepData && jQuery.contains(node.ownerDocument, node)) { setGlobalEval(getAll(node, "script")); } node.parentNode.removeChild(node); } } return elem; } jQuery.extend({ htmlPrefilter: function(html) { return html.replace(rxhtmlTag, "<$1>"); }, clone: function(elem, dataAndEvents, deepDataAndEvents) { var destElements, node, clone, i, srcElements, inPage = jQuery.contains(elem.ownerDocument, elem); if (support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test("<" + elem.nodeName + ">")) { clone = elem.cloneNode(true); // IE<=8 does not properly clone detached, unknown element nodes } else { fragmentDiv.innerHTML = elem.outerHTML; fragmentDiv.removeChild(clone = fragmentDiv.firstChild); } if ((!support.noCloneEvent || !support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) { // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 destElements = getAll(clone); srcElements = getAll(elem); // Fix all IE cloning issues for (i = 0; (node = srcElements[i]) != null; ++i) { // Ensure that the destination node is not null; Fixes #9587 if (destElements[i]) { fixCloneNodeIssues(node, destElements[i]); } } } // Copy the events from the original to the clone if (dataAndEvents) { if (deepDataAndEvents) { srcElements = srcElements || getAll(elem); destElements = destElements || getAll(clone); for (i = 0; (node = srcElements[i]) != null; i++) { cloneCopyEvent(node, destElements[i]); } } else { cloneCopyEvent(elem, clone); } } // Preserve script evaluation history destElements = getAll(clone, "script"); if (destElements.length > 0) { setGlobalEval(destElements, !inPage && getAll(elem, "script")); } destElements = srcElements = node = null; // Return the cloned set return clone; }, cleanData: function(elems, /* internal */ forceAcceptData) { var elem, type, id, data, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, attributes = support.attributes, special = jQuery.event.special; for (; (elem = elems[i]) != null; i++) { if (forceAcceptData || acceptData(elem)) { id = elem[internalKey]; data = id && cache[id]; if (data) { if (data.events) { for (type in data.events) { if (special[type]) { jQuery.event.remove(elem, type); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent(elem, type, data.handle); } } } // Remove cache only if it was not already removed by jQuery.event.remove if (cache[id]) { delete cache[id]; // Support: IE<9 // IE does not allow us to delete expando properties from nodes // IE creates expando attributes along with the property // IE does not have a removeAttribute function on Document nodes if (!attributes && typeof elem.removeAttribute !== "undefined") { elem.removeAttribute(internalKey); // Webkit & Blink performance suffers when deleting properties // from DOM nodes, so set to undefined instead // https://code.google.com/p/chromium/issues/detail?id=378607 } else { elem[internalKey] = undefined; } deletedIds.push(id); } } } } } }); jQuery.fn.extend({ // Keep domManip exposed until 3.0 (gh-2225) domManip: domManip, detach: function(selector) { return remove(this, selector, true); }, remove: function(selector) { return remove(this, selector); }, text: function(value) { return access(this, function(value) { return value === undefined ? jQuery.text(this) : this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode(value) ); }, null, value, arguments.length); }, append: function() { return domManip(this, arguments, function(elem) { if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { var target = manipulationTarget(this, elem); target.appendChild(elem); } }); }, prepend: function() { return domManip(this, arguments, function(elem) { if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { var target = manipulationTarget(this, elem); target.insertBefore(elem, target.firstChild); } }); }, before: function() { return domManip(this, arguments, function(elem) { if (this.parentNode) { this.parentNode.insertBefore(elem, this); } }); }, after: function() { return domManip(this, arguments, function(elem) { if (this.parentNode) { this.parentNode.insertBefore(elem, this.nextSibling); } }); }, empty: function() { var elem, i = 0; for (; (elem = this[i]) != null; i++) { // Remove element nodes and prevent memory leaks if (elem.nodeType === 1) { jQuery.cleanData(getAll(elem, false)); } // Remove any remaining nodes while (elem.firstChild) { elem.removeChild(elem.firstChild); } // If this is a select, ensure that it displays empty (#12336) // Support: IE<9 if (elem.options && jQuery.nodeName(elem, "select")) { elem.options.length = 0; } } return this; }, clone: function(dataAndEvents, deepDataAndEvents) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map(function() { return jQuery.clone(this, dataAndEvents, deepDataAndEvents); }); }, html: function(value) { return access(this, function(value) { var elem = this[0] || {}, i = 0, l = this.length; if (value === undefined) { return elem.nodeType === 1 ? elem.innerHTML.replace(rinlinejQuery, "") : undefined; } // See if we can take a shortcut and just use innerHTML if (typeof value === "string" && !rnoInnerhtml.test(value) && (support.htmlSerialize || !rnoshimcache.test(value)) && (support.leadingWhitespace || !rleadingWhitespace.test(value)) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { value = jQuery.htmlPrefilter(value); try { for (; i < l; i++) { // Remove element nodes and prevent memory leaks elem = this[i] || {}; if (elem.nodeType === 1) { jQuery.cleanData(getAll(elem, false)); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch (e) {} } if (elem) { this.empty().append(value); } }, null, value, arguments.length); }, replaceWith: function() { var ignored = []; // Make the changes, replacing each non-ignored context element with the new content return domManip(this, arguments, function(elem) { var parent = this.parentNode; if (jQuery.inArray(this, ignored) < 0) { jQuery.cleanData(getAll(this)); if (parent) { parent.replaceChild(elem, this); } } // Force callback invocation }, ignored); } }); jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function(name, original) { jQuery.fn[name] = function(selector) { var elems, i = 0, ret = [], insert = jQuery(selector), last = insert.length - 1; for (; i <= last; i++) { elems = i === last ? this : this.clone(true); jQuery(insert[i])[original](elems); // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() push.apply(ret, elems.get()); } return this.pushStack(ret); }; }); var iframe, elemdisplay = { // Support: Firefox // We have to pre-define these values for FF (#10227) HTML: "block", BODY: "block" }; /** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */ // Called only from within defaultDisplay function actualDisplay(name, doc) { var elem = jQuery(doc.createElement(name)).appendTo(doc.body), display = jQuery.css(elem[0], "display"); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element elem.detach(); return display; } /** * Try to determine the default display value of an element * @param {String} nodeName */ function defaultDisplay(nodeName) { var doc = document, display = elemdisplay[nodeName]; if (!display) { display = actualDisplay(nodeName, doc); // If the simple way fails, read from inside an iframe if (display === "none" || !display) { // Use the already-created iframe if possible iframe = (iframe || jQuery("' : "vimeo" === g.type && (c = ''), f.addClass("owl-video-playing"), this._playing = f, d = a('
' + c + "
"), e.after(d) }, d.prototype.isInFullScreen = function() { var d = c.fullscreenElement || c.mozFullScreenElement || c.webkitFullscreenElement; return d && a(d).parent().hasClass("owl-video-frame") && (this._core.speed(0), this._fullscreen = !0), d && this._fullscreen && this._playing ? !1 : this._fullscreen ? (this._fullscreen = !1, !1) : this._playing && this._core.state.orientation !== b.orientation ? (this._core.state.orientation = b.orientation, !1) : !0 }, d.prototype.destroy = function() { var a, b; this._core.$element.off("click.owl.video"); for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Video = d }(window.Zepto || window.jQuery, window, document), function(a, b, c, d) { var e = function(b) { this.core = b, this.core.options = a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous = d, this.next = d, this.handlers = { "change.owl.carousel": a.proxy(function(a) { "position" == a.property.name && (this.previous = this.core.current(), this.next = a.property.value) }, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function(a) { this.swapping = "translated" == a.type }, this), "translate.owl.carousel": a.proxy(function() { this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap() }, this) }, this.core.$element.on(this.handlers) }; e.Defaults = { animateOut: !1, animateIn: !1 }, e.prototype.swap = function() { if (1 === this.core.settings.items && this.core.support3d) { this.core.speed(0); var b, c = a.proxy(this.clear, this), d = this.core.$stage.children().eq(this.previous), e = this.core.$stage.children().eq(this.next), f = this.core.settings.animateIn, g = this.core.settings.animateOut; this.core.current() !== this.previous && (g && (b = this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.css({ left: b + "px" }).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", c)), f && e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", c)) } }, e.prototype.clear = function(b) { a(b.target).css({ left: "" }).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.transitionEnd() }, e.prototype.destroy = function() { var a, b; for (a in this.handlers) this.core.$element.off(a, this.handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Animate = e }(window.Zepto || window.jQuery, window, document), function(a, b, c) { var d = function(b) { this.core = b, this.core.options = a.extend({}, d.Defaults, this.core.options), this.handlers = { "translated.owl.carousel refreshed.owl.carousel": a.proxy(function() { this.autoplay() }, this), "play.owl.autoplay": a.proxy(function(a, b, c) { this.play(b, c) }, this), "stop.owl.autoplay": a.proxy(function() { this.stop() }, this), "mouseover.owl.autoplay": a.proxy(function() { this.core.settings.autoplayHoverPause && this.pause() }, this), "mouseleave.owl.autoplay": a.proxy(function() { this.core.settings.autoplayHoverPause && this.autoplay() }, this) }, this.core.$element.on(this.handlers) }; d.Defaults = { autoplay: !1, autoplayTimeout: 5e3, autoplayHoverPause: !1, autoplaySpeed: !1 }, d.prototype.autoplay = function() { this.core.settings.autoplay && !this.core.state.videoPlay ? (b.clearInterval(this.interval), this.interval = b.setInterval(a.proxy(function() { this.play() }, this), this.core.settings.autoplayTimeout)) : b.clearInterval(this.interval) }, d.prototype.play = function() { return c.hidden === !0 || this.core.state.isTouch || this.core.state.isScrolling || this.core.state.isSwiping || this.core.state.inMotion ? void 0 : this.core.settings.autoplay === !1 ? void b.clearInterval(this.interval) : void this.core.next(this.core.settings.autoplaySpeed) }, d.prototype.stop = function() { b.clearInterval(this.interval) }, d.prototype.pause = function() { b.clearInterval(this.interval) }, d.prototype.destroy = function() { var a, c; b.clearInterval(this.interval); for (a in this.handlers) this.core.$element.off(a, this.handlers[a]); for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) }, a.fn.owlCarousel.Constructor.Plugins.autoplay = d }(window.Zepto || window.jQuery, window, document), function(a) { "use strict"; var b = function(c) { this._core = c, this._initialized = !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = { next: this._core.next, prev: this._core.prev, to: this._core.to }, this._handlers = { "prepared.owl.carousel": a.proxy(function(b) { this._core.settings.dotsData && this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")) }, this), "add.owl.carousel": a.proxy(function(b) { this._core.settings.dotsData && this._templates.splice(b.position, 0, a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")) }, this), "remove.owl.carousel prepared.owl.carousel": a.proxy(function(a) { this._core.settings.dotsData && this._templates.splice(a.position, 1) }, this), "change.owl.carousel": a.proxy(function(a) { if ("position" == a.property.name && !this._core.state.revert && !this._core.settings.loop && this._core.settings.navRewind) { var b = this._core.current(), c = this._core.maximum(), d = this._core.minimum(); a.data = a.property.value > c ? b >= c ? d : c : a.property.value < d ? c : a.property.value } }, this), "changed.owl.carousel": a.proxy(function(a) { "position" == a.property.name && this.draw() }, this), "refreshed.owl.carousel": a.proxy(function() { this._initialized || (this.initialize(), this._initialized = !0), this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation") }, this) }, this._core.options = a.extend({}, b.Defaults, this._core.options), this.$element.on(this._handlers) }; b.Defaults = { nav: !1, navRewind: !0, navText: ["prev", "next"], navSpeed: !1, navElement: "div", navContainer: !1, navContainerClass: "owl-nav", navClass: ["owl-prev", "owl-next"], slideBy: 1, dotClass: "owl-dot", dotsClass: "owl-dots", dots: !0, dotsEach: !1, dotData: !1, dotsSpeed: !1, dotsContainer: !1, controlsClass: "owl-controls" }, b.prototype.initialize = function() { var b, c, d = this._core.settings; d.dotsData || (this._templates = [a("
").addClass(d.dotClass).append(a("")).prop("outerHTML")]), d.navContainer && d.dotsContainer || (this._controls.$container = a("
").addClass(d.controlsClass).appendTo(this.$element)), this._controls.$indicators = d.dotsContainer ? a(d.dotsContainer) : a("
").hide().addClass(d.dotsClass).appendTo(this._controls.$container), this._controls.$indicators.on("click", "div", a.proxy(function(b) { var c = a(b.target).parent().is(this._controls.$indicators) ? a(b.target).index() : a(b.target).parent().index(); b.preventDefault(), this.to(c, d.dotsSpeed) }, this)), b = d.navContainer ? a(d.navContainer) : a("
").addClass(d.navContainerClass).prependTo(this._controls.$container), this._controls.$next = a("<" + d.navElement + ">"), this._controls.$previous = this._controls.$next.clone(), this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click", a.proxy(function() { this.prev(d.navSpeed) }, this)), this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click", a.proxy(function() { this.next(d.navSpeed) }, this)); for (c in this._overrides) this._core[c] = a.proxy(this[c], this) }, b.prototype.destroy = function() { var a, b, c, d; for (a in this._handlers) this.$element.off(a, this._handlers[a]); for (b in this._controls) this._controls[b].remove(); for (d in this.overides) this._core[d] = this._overrides[d]; for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) }, b.prototype.update = function() { var a, b, c, d = this._core.settings, e = this._core.clones().length / 2, f = e + this._core.items().length, g = d.center || d.autoWidth || d.dotData ? 1 : d.dotsEach || d.items; if ("page" !== d.slideBy && (d.slideBy = Math.min(d.slideBy, d.items)), d.dots || "page" == d.slideBy) for (this._pages = [], a = e, b = 0, c = 0; f > a; a++)(b >= g || 0 === b) && (this._pages.push({ start: a - e, end: a - e + g - 1 }), b = 0, ++c), b += this._core.mergers(this._core.relative(a)) }, b.prototype.draw = function() { var b, c, d = "", e = this._core.settings, f = (this._core.$stage.children(), this._core.relative(this._core.current())); if (!e.nav || e.loop || e.navRewind || (this._controls.$previous.toggleClass("disabled", 0 >= f), this._controls.$next.toggleClass("disabled", f >= this._core.maximum())), this._controls.$previous.toggle(e.nav), this._controls.$next.toggle(e.nav), e.dots) { if (b = this._pages.length - this._controls.$indicators.children().length, e.dotData && 0 !== b) { for (c = 0; c < this._controls.$indicators.children().length; c++) d += this._templates[this._core.relative(c)]; this._controls.$indicators.html(d) } else b > 0 ? (d = new Array(b + 1).join(this._templates[0]), this._controls.$indicators.append(d)) : 0 > b && this._controls.$indicators.children().slice(b).remove(); this._controls.$indicators.find(".active").removeClass("active"), this._controls.$indicators.children().eq(a.inArray(this.current(), this._pages)).addClass("active") } this._controls.$indicators.toggle(e.dots) }, b.prototype.onTrigger = function(b) { var c = this._core.settings; b.page = { index: a.inArray(this.current(), this._pages), count: this._pages.length, size: c && (c.center || c.autoWidth || c.dotData ? 1 : c.dotsEach || c.items) } }, b.prototype.current = function() { var b = this._core.relative(this._core.current()); return a.grep(this._pages, function(a) { return a.start <= b && a.end >= b }).pop() }, b.prototype.getPosition = function(b) { var c, d, e = this._core.settings; return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c : --c, c = this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d = this._core.items().length, b ? c += e.slideBy : c -= e.slideBy), c }, b.prototype.next = function(b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b) }, b.prototype.prev = function(b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b) }, b.prototype.to = function(b, c, d) { var e; d ? a.proxy(this._overrides.to, this._core)(b, c) : (e = this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c)) }, a.fn.owlCarousel.Constructor.Plugins.Navigation = b }(window.Zepto || window.jQuery, window, document), function(a, b) { "use strict"; var c = function(d) { this._core = d, this._hashes = {}, this.$element = this._core.$element, this._handlers = { "initialized.owl.carousel": a.proxy(function() { "URLHash" == this._core.settings.startPosition && a(b).trigger("hashchange.owl.navigation") }, this), "prepared.owl.carousel": a.proxy(function(b) { var c = a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash"); this._hashes[c] = b.content }, this) }, this._core.options = a.extend({}, c.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function() { var a = b.location.hash.substring(1), c = this._core.$stage.children(), d = this._hashes[a] && c.index(this._hashes[a]) || 0; return a ? void this._core.to(d, !1, !0) : !1 }, this)) }; c.Defaults = { URLhashListener: !1 }, c.prototype.destroy = function() { var c, d; a(b).off("hashchange.owl.navigation"); for (c in this._handlers) this._core.$element.off(c, this._handlers[c]); for (d in Object.getOwnPropertyNames(this)) "function" != typeof this[d] && (this[d] = null) }, a.fn.owlCarousel.Constructor.Plugins.Hash = c }(window.Zepto || window.jQuery, window, document); /** * @module Isotope PACKAGED * @version v2.2.2 * @license GPLv3 * @see http://isotope.metafizzy.co */ ! function(a) { function b() {} function c(a) { function c(b) { b.prototype.option || (b.prototype.option = function(b) { a.isPlainObject(b) && (this.options = a.extend(!0, this.options, b)) }) } function e(b, c) { a.fn[b] = function(e) { if ("string" == typeof e) { for (var g = d.call(arguments, 1), h = 0, i = this.length; i > h; h++) { var j = this[h], k = a.data(j, b); if (k) if (a.isFunction(k[e]) && "_" !== e.charAt(0)) { var l = k[e].apply(k, g); if (void 0 !== l) return l } else f("no such method '" + e + "' for " + b + " instance"); else f("cannot call methods on " + b + " prior to initialization; attempted to call '" + e + "'") } return this } return this.each(function() { var d = a.data(this, b); d ? (d.option(e), d._init()) : (d = new c(this, e), a.data(this, b, d)) }) } } if (a) { var f = "undefined" == typeof console ? b : function(a) { console.error(a) }; return a.bridget = function(a, b) { c(b), e(a, b) }, a.bridget } } var d = Array.prototype.slice; "function" == typeof define && define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], c) : c("object" == typeof exports ? require("jquery") : a.jQuery) }(window), function(a) { function b(b) { var c = a.event; return c.target = c.target || c.srcElement || b, c } var c = document.documentElement, d = function() {}; c.addEventListener ? d = function(a, b, c) { a.addEventListener(b, c, !1) } : c.attachEvent && (d = function(a, c, d) { a[c + d] = d.handleEvent ? function() { var c = b(a); d.handleEvent.call(d, c) } : function() { var c = b(a); d.call(a, c) }, a.attachEvent("on" + c, a[c + d]) }); var e = function() {}; c.removeEventListener ? e = function(a, b, c) { a.removeEventListener(b, c, !1) } : c.detachEvent && (e = function(a, b, c) { a.detachEvent("on" + b, a[b + c]); try { delete a[b + c] } catch (d) { a[b + c] = void 0 } }); var f = { bind: d, unbind: e }; "function" == typeof define && define.amd ? define("eventie/eventie", f) : "object" == typeof exports ? module.exports = f : a.eventie = f }(window), function() { "use strict"; function a() {} function b(a, b) { for (var c = a.length; c--;) if (a[c].listener === b) return c; return -1 } function c(a) { return function() { return this[a].apply(this, arguments) } } var d = a.prototype, e = this, f = e.EventEmitter; d.getListeners = function(a) { var b, c, d = this._getEvents(); if (a instanceof RegExp) { b = {}; for (c in d) d.hasOwnProperty(c) && a.test(c) && (b[c] = d[c]) } else b = d[a] || (d[a] = []); return b }, d.flattenListeners = function(a) { var b, c = []; for (b = 0; b < a.length; b += 1) c.push(a[b].listener); return c }, d.getListenersAsObject = function(a) { var b, c = this.getListeners(a); return c instanceof Array && (b = {}, b[a] = c), b || c }, d.addListener = function(a, c) { var d, e = this.getListenersAsObject(a), f = "object" == typeof c; for (d in e) e.hasOwnProperty(d) && -1 === b(e[d], c) && e[d].push(f ? c : { listener: c, once: !1 }); return this }, d.on = c("addListener"), d.addOnceListener = function(a, b) { return this.addListener(a, { listener: b, once: !0 }) }, d.once = c("addOnceListener"), d.defineEvent = function(a) { return this.getListeners(a), this }, d.defineEvents = function(a) { for (var b = 0; b < a.length; b += 1) this.defineEvent(a[b]); return this }, d.removeListener = function(a, c) { var d, e, f = this.getListenersAsObject(a); for (e in f) f.hasOwnProperty(e) && (d = b(f[e], c), -1 !== d && f[e].splice(d, 1)); return this }, d.off = c("removeListener"), d.addListeners = function(a, b) { return this.manipulateListeners(!1, a, b) }, d.removeListeners = function(a, b) { return this.manipulateListeners(!0, a, b) }, d.manipulateListeners = function(a, b, c) { var d, e, f = a ? this.removeListener : this.addListener, g = a ? this.removeListeners : this.addListeners; if ("object" != typeof b || b instanceof RegExp) for (d = c.length; d--;) f.call(this, b, c[d]); else for (d in b) b.hasOwnProperty(d) && (e = b[d]) && ("function" == typeof e ? f.call(this, d, e) : g.call(this, d, e)); return this }, d.removeEvent = function(a) { var b, c = typeof a, d = this._getEvents(); if ("string" === c) delete d[a]; else if (a instanceof RegExp) for (b in d) d.hasOwnProperty(b) && a.test(b) && delete d[b]; else delete this._events; return this }, d.removeAllListeners = c("removeEvent"), d.emitEvent = function(a, b) { var c, d, e, f, g = this.getListenersAsObject(a); for (e in g) if (g.hasOwnProperty(e)) for (d = g[e].length; d--;) c = g[e][d], c.once === !0 && this.removeListener(a, c.listener), f = c.listener.apply(this, b || []), f === this._getOnceReturnValue() && this.removeListener(a, c.listener); return this }, d.trigger = c("emitEvent"), d.emit = function(a) { var b = Array.prototype.slice.call(arguments, 1); return this.emitEvent(a, b) }, d.setOnceReturnValue = function(a) { return this._onceReturnValue = a, this }, d._getOnceReturnValue = function() { return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0 }, d._getEvents = function() { return this._events || (this._events = {}) }, a.noConflict = function() { return e.EventEmitter = f, a }, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function() { return a }) : "object" == typeof module && module.exports ? module.exports = a : e.EventEmitter = a }.call(this), function(a) { function b(a) { if (a) { if ("string" == typeof d[a]) return a; a = a.charAt(0).toUpperCase() + a.slice(1); for (var b, e = 0, f = c.length; f > e; e++) if (b = c[e] + a, "string" == typeof d[b]) return b } } var c = "Webkit Moz ms Ms O".split(" "), d = document.documentElement.style; "function" == typeof define && define.amd ? define("get-style-property/get-style-property", [], function() { return b }) : "object" == typeof exports ? module.exports = b : a.getStyleProperty = b }(window), function(a, b) { function c(a) { var b = parseFloat(a), c = -1 === a.indexOf("%") && !isNaN(b); return c && b } function d() {} function e() { for (var a = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }, b = 0, c = h.length; c > b; b++) { var d = h[b]; a[d] = 0 } return a } function f(b) { function d() { if (!m) { m = !0; var d = a.getComputedStyle; if (j = function() { var a = d ? function(a) { return d(a, null) } : function(a) { return a.currentStyle }; return function(b) { var c = a(b); return c || g("Style returned " + c + ". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"), c } }(), k = b("boxSizing")) { var e = document.createElement("div"); e.style.width = "200px", e.style.padding = "1px 2px 3px 4px", e.style.borderStyle = "solid", e.style.borderWidth = "1px 2px 3px 4px", e.style[k] = "border-box"; var f = document.body || document.documentElement; f.appendChild(e); var h = j(e); l = 200 === c(h.width), f.removeChild(e) } } } function f(a) { if (d(), "string" == typeof a && (a = document.querySelector(a)), a && "object" == typeof a && a.nodeType) { var b = j(a); if ("none" === b.display) return e(); var f = {}; f.width = a.offsetWidth, f.height = a.offsetHeight; for (var g = f.isBorderBox = !(!k || !b[k] || "border-box" !== b[k]), m = 0, n = h.length; n > m; m++) { var o = h[m], p = b[o]; p = i(a, p); var q = parseFloat(p); f[o] = isNaN(q) ? 0 : q } var r = f.paddingLeft + f.paddingRight, s = f.paddingTop + f.paddingBottom, t = f.marginLeft + f.marginRight, u = f.marginTop + f.marginBottom, v = f.borderLeftWidth + f.borderRightWidth, w = f.borderTopWidth + f.borderBottomWidth, x = g && l, y = c(b.width); y !== !1 && (f.width = y + (x ? 0 : r + v)); var z = c(b.height); return z !== !1 && (f.height = z + (x ? 0 : s + w)), f.innerWidth = f.width - (r + v), f.innerHeight = f.height - (s + w), f.outerWidth = f.width + t, f.outerHeight = f.height + u, f } } function i(b, c) { if (a.getComputedStyle || -1 === c.indexOf("%")) return c; var d = b.style, e = d.left, f = b.runtimeStyle, g = f && f.left; return g && (f.left = b.currentStyle.left), d.left = c, c = d.pixelLeft, d.left = e, g && (f.left = g), c } var j, k, l, m = !1; return f } var g = "undefined" == typeof console ? d : function(a) { console.error(a) }, h = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; "function" == typeof define && define.amd ? define("get-size/get-size", ["get-style-property/get-style-property"], f) : "object" == typeof exports ? module.exports = f(require("desandro-get-style-property")) : a.getSize = f(a.getStyleProperty) }(window), function(a) { function b(a) { "function" == typeof a && (b.isReady ? a() : g.push(a)) } function c(a) { var c = "readystatechange" === a.type && "complete" !== f.readyState; b.isReady || c || d() } function d() { b.isReady = !0; for (var a = 0, c = g.length; c > a; a++) { var d = g[a]; d() } } function e(e) { return "complete" === f.readyState ? d() : (e.bind(f, "DOMContentLoaded", c), e.bind(f, "readystatechange", c), e.bind(a, "load", c)), b } var f = a.document, g = []; b.isReady = !1, "function" == typeof define && define.amd ? define("doc-ready/doc-ready", ["eventie/eventie"], e) : "object" == typeof exports ? module.exports = e(require("eventie")) : a.docReady = e(a.eventie) }(window), function(a) { "use strict"; function b(a, b) { return a[g](b) } function c(a) { if (!a.parentNode) { var b = document.createDocumentFragment(); b.appendChild(a) } } function d(a, b) { c(a); for (var d = a.parentNode.querySelectorAll(b), e = 0, f = d.length; f > e; e++) if (d[e] === a) return !0; return !1 } function e(a, d) { return c(a), b(a, d) } var f, g = function() { if (a.matches) return "matches"; if (a.matchesSelector) return "matchesSelector"; for (var b = ["webkit", "moz", "ms", "o"], c = 0, d = b.length; d > c; c++) { var e = b[c], f = e + "MatchesSelector"; if (a[f]) return f } }(); if (g) { var h = document.createElement("div"), i = b(h, "div"); f = i ? b : e } else f = d; "function" == typeof define && define.amd ? define("matches-selector/matches-selector", [], function() { return f }) : "object" == typeof exports ? module.exports = f : window.matchesSelector = f }(Element.prototype), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("fizzy-ui-utils/utils", ["doc-ready/doc-ready", "matches-selector/matches-selector"], function(c, d) { return b(a, c, d) }) : "object" == typeof exports ? module.exports = b(a, require("doc-ready"), require("desandro-matches-selector")) : a.fizzyUIUtils = b(a, a.docReady, a.matchesSelector) }(window, function(a, b, c) { var d = {}; d.extend = function(a, b) { for (var c in b) a[c] = b[c]; return a }, d.modulo = function(a, b) { return (a % b + b) % b }; var e = Object.prototype.toString; d.isArray = function(a) { return "[object Array]" == e.call(a) }, d.makeArray = function(a) { var b = []; if (d.isArray(a)) b = a; else if (a && "number" == typeof a.length) for (var c = 0, e = a.length; e > c; c++) b.push(a[c]); else b.push(a); return b }, d.indexOf = Array.prototype.indexOf ? function(a, b) { return a.indexOf(b) } : function(a, b) { for (var c = 0, d = a.length; d > c; c++) if (a[c] === b) return c; return -1 }, d.removeFrom = function(a, b) { var c = d.indexOf(a, b); - 1 != c && a.splice(c, 1) }, d.isElement = "function" == typeof HTMLElement || "object" == typeof HTMLElement ? function(a) { return a instanceof HTMLElement } : function(a) { return a && "object" == typeof a && 1 == a.nodeType && "string" == typeof a.nodeName }, d.setText = function() { function a(a, c) { b = b || (void 0 !== document.documentElement.textContent ? "textContent" : "innerText"), a[b] = c } var b; return a }(), d.getParent = function(a, b) { for (; a != document.body;) if (a = a.parentNode, c(a, b)) return a }, d.getQueryElement = function(a) { return "string" == typeof a ? document.querySelector(a) : a }, d.handleEvent = function(a) { var b = "on" + a.type; this[b] && this[b](a) }, d.filterFindElements = function(a, b) { a = d.makeArray(a); for (var e = [], f = 0, g = a.length; g > f; f++) { var h = a[f]; if (d.isElement(h)) if (b) { c(h, b) && e.push(h); for (var i = h.querySelectorAll(b), j = 0, k = i.length; k > j; j++) e.push(i[j]) } else e.push(h) } return e }, d.debounceMethod = function(a, b, c) { var d = a.prototype[b], e = b + "Timeout"; a.prototype[b] = function() { var a = this[e]; a && clearTimeout(a); var b = arguments, f = this; this[e] = setTimeout(function() { d.apply(f, b), delete f[e] }, c || 100) } }, d.toDashed = function(a) { return a.replace(/(.)([A-Z])/g, function(a, b, c) { return b + "-" + c }).toLowerCase() }; var f = a.console; return d.htmlInit = function(c, e) { b(function() { for (var b = d.toDashed(e), g = document.querySelectorAll(".js-" + b), h = "data-" + b + "-options", i = 0, j = g.length; j > i; i++) { var k, l = g[i], m = l.getAttribute(h); try { k = m && JSON.parse(m) } catch (n) { f && f.error("Error parsing " + h + " on " + l.nodeName.toLowerCase() + (l.id ? "#" + l.id : "") + ": " + n); continue } var o = new c(l, k), p = a.jQuery; p && p.data(l, e, o) } }) }, d }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property", "fizzy-ui-utils/utils"], function(c, d, e, f) { return b(a, c, d, e, f) }) : "object" == typeof exports ? module.exports = b(a, require("wolfy87-eventemitter"), require("get-size"), require("desandro-get-style-property"), require("fizzy-ui-utils")) : (a.Outlayer = {}, a.Outlayer.Item = b(a, a.EventEmitter, a.getSize, a.getStyleProperty, a.fizzyUIUtils)) }(window, function(a, b, c, d, e) { "use strict"; function f(a) { for (var b in a) return !1; return b = null, !0 } function g(a, b) { a && (this.element = a, this.layout = b, this.position = { x: 0, y: 0 }, this._create()) } function h(a) { return a.replace(/([A-Z])/g, function(a) { return "-" + a.toLowerCase() }) } var i = a.getComputedStyle, j = i ? function(a) { return i(a, null) } : function(a) { return a.currentStyle }, k = d("transition"), l = d("transform"), m = k && l, n = !!d("perspective"), o = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend" }[k], p = ["transform", "transition", "transitionDuration", "transitionProperty"], q = function() { for (var a = {}, b = 0, c = p.length; c > b; b++) { var e = p[b], f = d(e); f && f !== e && (a[e] = f) } return a }(); e.extend(g.prototype, b.prototype), g.prototype._create = function() { this._transn = { ingProperties: {}, clean: {}, onEnd: {} }, this.css({ position: "absolute" }) }, g.prototype.handleEvent = function(a) { var b = "on" + a.type; this[b] && this[b](a) }, g.prototype.getSize = function() { this.size = c(this.element) }, g.prototype.css = function(a) { var b = this.element.style; for (var c in a) { var d = q[c] || c; b[d] = a[c] } }, g.prototype.getPosition = function() { var a = j(this.element), b = this.layout.options, c = b.isOriginLeft, d = b.isOriginTop, e = a[c ? "left" : "right"], f = a[d ? "top" : "bottom"], g = this.layout.size, h = -1 != e.indexOf("%") ? parseFloat(e) / 100 * g.width : parseInt(e, 10), i = -1 != f.indexOf("%") ? parseFloat(f) / 100 * g.height : parseInt(f, 10); h = isNaN(h) ? 0 : h, i = isNaN(i) ? 0 : i, h -= c ? g.paddingLeft : g.paddingRight, i -= d ? g.paddingTop : g.paddingBottom, this.position.x = h, this.position.y = i }, g.prototype.layoutPosition = function() { var a = this.layout.size, b = this.layout.options, c = {}, d = b.isOriginLeft ? "paddingLeft" : "paddingRight", e = b.isOriginLeft ? "left" : "right", f = b.isOriginLeft ? "right" : "left", g = this.position.x + a[d]; c[e] = this.getXValue(g), c[f] = ""; var h = b.isOriginTop ? "paddingTop" : "paddingBottom", i = b.isOriginTop ? "top" : "bottom", j = b.isOriginTop ? "bottom" : "top", k = this.position.y + a[h]; c[i] = this.getYValue(k), c[j] = "", this.css(c), this.emitEvent("layout", [this]) }, g.prototype.getXValue = function(a) { var b = this.layout.options; return b.percentPosition && !b.isHorizontal ? a / this.layout.size.width * 100 + "%" : a + "px" }, g.prototype.getYValue = function(a) { var b = this.layout.options; return b.percentPosition && b.isHorizontal ? a / this.layout.size.height * 100 + "%" : a + "px" }, g.prototype._transitionTo = function(a, b) { this.getPosition(); var c = this.position.x, d = this.position.y, e = parseInt(a, 10), f = parseInt(b, 10), g = e === this.position.x && f === this.position.y; if (this.setPosition(a, b), g && !this.isTransitioning) return void this.layoutPosition(); var h = a - c, i = b - d, j = {}; j.transform = this.getTranslate(h, i), this.transition({ to: j, onTransitionEnd: { transform: this.layoutPosition }, isCleaning: !0 }) }, g.prototype.getTranslate = function(a, b) { var c = this.layout.options; return a = c.isOriginLeft ? a : -a, b = c.isOriginTop ? b : -b, n ? "translate3d(" + a + "px, " + b + "px, 0)" : "translate(" + a + "px, " + b + "px)" }, g.prototype.goTo = function(a, b) { this.setPosition(a, b), this.layoutPosition() }, g.prototype.moveTo = m ? g.prototype._transitionTo : g.prototype.goTo, g.prototype.setPosition = function(a, b) { this.position.x = parseInt(a, 10), this.position.y = parseInt(b, 10) }, g.prototype._nonTransition = function(a) { this.css(a.to), a.isCleaning && this._removeStyles(a.to); for (var b in a.onTransitionEnd) a.onTransitionEnd[b].call(this) }, g.prototype._transition = function(a) { if (!parseFloat(this.layout.options.transitionDuration)) return void this._nonTransition(a); var b = this._transn; for (var c in a.onTransitionEnd) b.onEnd[c] = a.onTransitionEnd[c]; for (c in a.to) b.ingProperties[c] = !0, a.isCleaning && (b.clean[c] = !0); if (a.from) { this.css(a.from); var d = this.element.offsetHeight; d = null } this.enableTransition(a.to), this.css(a.to), this.isTransitioning = !0 }; var r = "opacity," + h(q.transform || "transform"); g.prototype.enableTransition = function() { this.isTransitioning || (this.css({ transitionProperty: r, transitionDuration: this.layout.options.transitionDuration }), this.element.addEventListener(o, this, !1)) }, g.prototype.transition = g.prototype[k ? "_transition" : "_nonTransition"], g.prototype.onwebkitTransitionEnd = function(a) { this.ontransitionend(a) }, g.prototype.onotransitionend = function(a) { this.ontransitionend(a) }; var s = { "-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform" }; g.prototype.ontransitionend = function(a) { if (a.target === this.element) { var b = this._transn, c = s[a.propertyName] || a.propertyName; if (delete b.ingProperties[c], f(b.ingProperties) && this.disableTransition(), c in b.clean && (this.element.style[a.propertyName] = "", delete b.clean[c]), c in b.onEnd) { var d = b.onEnd[c]; d.call(this), delete b.onEnd[c] } this.emitEvent("transitionEnd", [this]) } }, g.prototype.disableTransition = function() { this.removeTransitionStyles(), this.element.removeEventListener(o, this, !1), this.isTransitioning = !1 }, g.prototype._removeStyles = function(a) { var b = {}; for (var c in a) b[c] = ""; this.css(b) }; var t = { transitionProperty: "", transitionDuration: "" }; return g.prototype.removeTransitionStyles = function() { this.css(t) }, g.prototype.removeElem = function() { this.element.parentNode.removeChild(this.element), this.css({ display: "" }), this.emitEvent("remove", [this]) }, g.prototype.remove = function() { if (!k || !parseFloat(this.layout.options.transitionDuration)) return void this.removeElem(); var a = this; this.once("transitionEnd", function() { a.removeElem() }), this.hide() }, g.prototype.reveal = function() { delete this.isHidden, this.css({ display: "" }); var a = this.layout.options, b = {}, c = this.getHideRevealTransitionEndProperty("visibleStyle"); b[c] = this.onRevealTransitionEnd, this.transition({ from: a.hiddenStyle, to: a.visibleStyle, isCleaning: !0, onTransitionEnd: b }) }, g.prototype.onRevealTransitionEnd = function() { this.isHidden || this.emitEvent("reveal") }, g.prototype.getHideRevealTransitionEndProperty = function(a) { var b = this.layout.options[a]; if (b.opacity) return "opacity"; for (var c in b) return c }, g.prototype.hide = function() { this.isHidden = !0, this.css({ display: "" }); var a = this.layout.options, b = {}, c = this.getHideRevealTransitionEndProperty("hiddenStyle"); b[c] = this.onHideTransitionEnd, this.transition({ from: a.visibleStyle, to: a.hiddenStyle, isCleaning: !0, onTransitionEnd: b }) }, g.prototype.onHideTransitionEnd = function() { this.isHidden && (this.css({ display: "none" }), this.emitEvent("hide")) }, g.prototype.destroy = function() { this.css({ position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: "" }) }, g }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("outlayer/outlayer", ["eventie/eventie", "eventEmitter/EventEmitter", "get-size/get-size", "fizzy-ui-utils/utils", "./item"], function(c, d, e, f, g) { return b(a, c, d, e, f, g) }) : "object" == typeof exports ? module.exports = b(a, require("eventie"), require("wolfy87-eventemitter"), require("get-size"), require("fizzy-ui-utils"), require("./item")) : a.Outlayer = b(a, a.eventie, a.EventEmitter, a.getSize, a.fizzyUIUtils, a.Outlayer.Item) }(window, function(a, b, c, d, e, f) { "use strict"; function g(a, b) { var c = e.getQueryElement(a); if (!c) return void(h && h.error("Bad element for " + this.constructor.namespace + ": " + (c || a))); this.element = c, i && (this.$element = i(this.element)), this.options = e.extend({}, this.constructor.defaults), this.option(b); var d = ++k; this.element.outlayerGUID = d, l[d] = this, this._create(), this.options.isInitLayout && this.layout() } var h = a.console, i = a.jQuery, j = function() {}, k = 0, l = {}; return g.namespace = "outlayer", g.Item = f, g.defaults = { containerStyle: { position: "relative" }, isInitLayout: !0, isOriginLeft: !0, isOriginTop: !0, isResizeBound: !0, isResizingContainer: !0, transitionDuration: "0.4s", hiddenStyle: { opacity: 0, transform: "scale(0.001)" }, visibleStyle: { opacity: 1, transform: "scale(1)" } }, e.extend(g.prototype, c.prototype), g.prototype.option = function(a) { e.extend(this.options, a) }, g.prototype._create = function() { this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), e.extend(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize() }, g.prototype.reloadItems = function() { this.items = this._itemize(this.element.children) }, g.prototype._itemize = function(a) { for (var b = this._filterFindItemElements(a), c = this.constructor.Item, d = [], e = 0, f = b.length; f > e; e++) { var g = b[e], h = new c(g, this); d.push(h) } return d }, g.prototype._filterFindItemElements = function(a) { return e.filterFindElements(a, this.options.itemSelector) }, g.prototype.getItemElements = function() { for (var a = [], b = 0, c = this.items.length; c > b; b++) a.push(this.items[b].element); return a }, g.prototype.layout = function() { this._resetLayout(), this._manageStamps(); var a = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; this.layoutItems(this.items, a), this._isLayoutInited = !0 }, g.prototype._init = g.prototype.layout, g.prototype._resetLayout = function() { this.getSize() }, g.prototype.getSize = function() { this.size = d(this.element) }, g.prototype._getMeasurement = function(a, b) { var c, f = this.options[a]; f ? ("string" == typeof f ? c = this.element.querySelector(f) : e.isElement(f) && (c = f), this[a] = c ? d(c)[b] : f) : this[a] = 0 }, g.prototype.layoutItems = function(a, b) { a = this._getItemsForLayout(a), this._layoutItems(a, b), this._postLayout() }, g.prototype._getItemsForLayout = function(a) { for (var b = [], c = 0, d = a.length; d > c; c++) { var e = a[c]; e.isIgnored || b.push(e) } return b }, g.prototype._layoutItems = function(a, b) { if (this._emitCompleteOnItems("layout", a), a && a.length) { for (var c = [], d = 0, e = a.length; e > d; d++) { var f = a[d], g = this._getItemLayoutPosition(f); g.item = f, g.isInstant = b || f.isLayoutInstant, c.push(g) } this._processLayoutQueue(c) } }, g.prototype._getItemLayoutPosition = function() { return { x: 0, y: 0 } }, g.prototype._processLayoutQueue = function(a) { for (var b = 0, c = a.length; c > b; b++) { var d = a[b]; this._positionItem(d.item, d.x, d.y, d.isInstant) } }, g.prototype._positionItem = function(a, b, c, d) { d ? a.goTo(b, c) : a.moveTo(b, c) }, g.prototype._postLayout = function() { this.resizeContainer() }, g.prototype.resizeContainer = function() { if (this.options.isResizingContainer) { var a = this._getContainerSize(); a && (this._setContainerMeasure(a.width, !0), this._setContainerMeasure(a.height, !1)) } }, g.prototype._getContainerSize = j, g.prototype._setContainerMeasure = function(a, b) { if (void 0 !== a) { var c = this.size; c.isBorderBox && (a += b ? c.paddingLeft + c.paddingRight + c.borderLeftWidth + c.borderRightWidth : c.paddingBottom + c.paddingTop + c.borderTopWidth + c.borderBottomWidth), a = Math.max(a, 0), this.element.style[b ? "width" : "height"] = a + "px" } }, g.prototype._emitCompleteOnItems = function(a, b) { function c() { e.dispatchEvent(a + "Complete", null, [b]) } function d() { g++, g === f && c() } var e = this, f = b.length; if (!b || !f) return void c(); for (var g = 0, h = 0, i = b.length; i > h; h++) { var j = b[h]; j.once(a, d) } }, g.prototype.dispatchEvent = function(a, b, c) { var d = b ? [b].concat(c) : c; if (this.emitEvent(a, d), i) if (this.$element = this.$element || i(this.element), b) { var e = i.Event(b); e.type = a, this.$element.trigger(e, c) } else this.$element.trigger(a, c) }, g.prototype.ignore = function(a) { var b = this.getItem(a); b && (b.isIgnored = !0) }, g.prototype.unignore = function(a) { var b = this.getItem(a); b && delete b.isIgnored }, g.prototype.stamp = function(a) { if (a = this._find(a)) { this.stamps = this.stamps.concat(a); for (var b = 0, c = a.length; c > b; b++) { var d = a[b]; this.ignore(d) } } }, g.prototype.unstamp = function(a) { if (a = this._find(a)) for (var b = 0, c = a.length; c > b; b++) { var d = a[b]; e.removeFrom(this.stamps, d), this.unignore(d) } }, g.prototype._find = function(a) { return a ? ("string" == typeof a && (a = this.element.querySelectorAll(a)), a = e.makeArray(a)) : void 0 }, g.prototype._manageStamps = function() { if (this.stamps && this.stamps.length) { this._getBoundingRect(); for (var a = 0, b = this.stamps.length; b > a; a++) { var c = this.stamps[a]; this._manageStamp(c) } } }, g.prototype._getBoundingRect = function() { var a = this.element.getBoundingClientRect(), b = this.size; this._boundingRect = { left: a.left + b.paddingLeft + b.borderLeftWidth, top: a.top + b.paddingTop + b.borderTopWidth, right: a.right - (b.paddingRight + b.borderRightWidth), bottom: a.bottom - (b.paddingBottom + b.borderBottomWidth) } }, g.prototype._manageStamp = j, g.prototype._getElementOffset = function(a) { var b = a.getBoundingClientRect(), c = this._boundingRect, e = d(a), f = { left: b.left - c.left - e.marginLeft, top: b.top - c.top - e.marginTop, right: c.right - b.right - e.marginRight, bottom: c.bottom - b.bottom - e.marginBottom }; return f }, g.prototype.handleEvent = function(a) { var b = "on" + a.type; this[b] && this[b](a) }, g.prototype.bindResize = function() { this.isResizeBound || (b.bind(a, "resize", this), this.isResizeBound = !0) }, g.prototype.unbindResize = function() { this.isResizeBound && b.unbind(a, "resize", this), this.isResizeBound = !1 }, g.prototype.onresize = function() { function a() { b.resize(), delete b.resizeTimeout } this.resizeTimeout && clearTimeout(this.resizeTimeout); var b = this; this.resizeTimeout = setTimeout(a, 100) }, g.prototype.resize = function() { this.isResizeBound && this.needsResizeLayout() && this.layout() }, g.prototype.needsResizeLayout = function() { var a = d(this.element), b = this.size && a; return b && a.innerWidth !== this.size.innerWidth }, g.prototype.addItems = function(a) { var b = this._itemize(a); return b.length && (this.items = this.items.concat(b)), b }, g.prototype.appended = function(a) { var b = this.addItems(a); b.length && (this.layoutItems(b, !0), this.reveal(b)) }, g.prototype.prepended = function(a) { var b = this._itemize(a); if (b.length) { var c = this.items.slice(0); this.items = b.concat(c), this._resetLayout(), this._manageStamps(), this.layoutItems(b, !0), this.reveal(b), this.layoutItems(c) } }, g.prototype.reveal = function(a) { this._emitCompleteOnItems("reveal", a); for (var b = a && a.length, c = 0; b && b > c; c++) { var d = a[c]; d.reveal() } }, g.prototype.hide = function(a) { this._emitCompleteOnItems("hide", a); for (var b = a && a.length, c = 0; b && b > c; c++) { var d = a[c]; d.hide() } }, g.prototype.revealItemElements = function(a) { var b = this.getItems(a); this.reveal(b) }, g.prototype.hideItemElements = function(a) { var b = this.getItems(a); this.hide(b) }, g.prototype.getItem = function(a) { for (var b = 0, c = this.items.length; c > b; b++) { var d = this.items[b]; if (d.element === a) return d } }, g.prototype.getItems = function(a) { a = e.makeArray(a); for (var b = [], c = 0, d = a.length; d > c; c++) { var f = a[c], g = this.getItem(f); g && b.push(g) } return b }, g.prototype.remove = function(a) { var b = this.getItems(a); if (this._emitCompleteOnItems("remove", b), b && b.length) for (var c = 0, d = b.length; d > c; c++) { var f = b[c]; f.remove(), e.removeFrom(this.items, f) } }, g.prototype.destroy = function() { var a = this.element.style; a.height = "", a.position = "", a.width = ""; for (var b = 0, c = this.items.length; c > b; b++) { var d = this.items[b]; d.destroy() } this.unbindResize(); var e = this.element.outlayerGUID; delete l[e], delete this.element.outlayerGUID, i && i.removeData(this.element, this.constructor.namespace) }, g.data = function(a) { a = e.getQueryElement(a); var b = a && a.outlayerGUID; return b && l[b] }, g.create = function(a, b) { function c() { g.apply(this, arguments) } return Object.create ? c.prototype = Object.create(g.prototype) : e.extend(c.prototype, g.prototype), c.prototype.constructor = c, c.defaults = e.extend({}, g.defaults), e.extend(c.defaults, b), c.prototype.settings = {}, c.namespace = a, c.data = g.data, c.Item = function() { f.apply(this, arguments) }, c.Item.prototype = new f, e.htmlInit(c, a), i && i.bridget && i.bridget(a, c), c }, g.Item = f, g }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/item", ["outlayer/outlayer"], b) : "object" == typeof exports ? module.exports = b(require("outlayer")) : (a.Isotope = a.Isotope || {}, a.Isotope.Item = b(a.Outlayer)) }(window, function(a) { "use strict"; function b() { a.Item.apply(this, arguments) } b.prototype = new a.Item, b.prototype._create = function() { this.id = this.layout.itemGUID++, a.Item.prototype._create.call(this), this.sortData = {} }, b.prototype.updateSortData = function() { if (!this.isIgnored) { this.sortData.id = this.id, this.sortData["original-order"] = this.id, this.sortData.random = Math.random(); var a = this.layout.options.getSortData, b = this.layout._sorters; for (var c in a) { var d = b[c]; this.sortData[c] = d(this.element, this) } } }; var c = b.prototype.destroy; return b.prototype.destroy = function() { c.apply(this, arguments), this.css({ display: "" }) }, b }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-mode", ["get-size/get-size", "outlayer/outlayer"], b) : "object" == typeof exports ? module.exports = b(require("get-size"), require("outlayer")) : (a.Isotope = a.Isotope || {}, a.Isotope.LayoutMode = b(a.getSize, a.Outlayer)) }(window, function(a, b) { "use strict"; function c(a) { this.isotope = a, a && (this.options = a.options[this.namespace], this.element = a.element, this.items = a.filteredItems, this.size = a.size) } return function() { function a(a) { return function() { return b.prototype[a].apply(this.isotope, arguments) } } for (var d = ["_resetLayout", "_getItemLayoutPosition", "_manageStamp", "_getContainerSize", "_getElementOffset", "needsResizeLayout"], e = 0, f = d.length; f > e; e++) { var g = d[e]; c.prototype[g] = a(g) } }(), c.prototype.needsVerticalResizeLayout = function() { var b = a(this.isotope.element), c = this.isotope.size && b; return c && b.innerHeight != this.isotope.size.innerHeight }, c.prototype._getMeasurement = function() { this.isotope._getMeasurement.apply(this, arguments) }, c.prototype.getColumnWidth = function() { this.getSegmentSize("column", "Width") }, c.prototype.getRowHeight = function() { this.getSegmentSize("row", "Height") }, c.prototype.getSegmentSize = function(a, b) { var c = a + b, d = "outer" + b; if (this._getMeasurement(c, d), !this[c]) { var e = this.getFirstItemSize(); this[c] = e && e[d] || this.isotope.size["inner" + b] } }, c.prototype.getFirstItemSize = function() { var b = this.isotope.filteredItems[0]; return b && b.element && a(b.element) }, c.prototype.layout = function() { this.isotope.layout.apply(this.isotope, arguments) }, c.prototype.getSize = function() { this.isotope.getSize(), this.size = this.isotope.size }, c.modes = {}, c.create = function(a, b) { function d() { c.apply(this, arguments) } return d.prototype = new c, b && (d.options = b), d.prototype.namespace = a, c.modes[a] = d, d }, c }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("masonry/masonry", ["outlayer/outlayer", "get-size/get-size", "fizzy-ui-utils/utils"], b) : "object" == typeof exports ? module.exports = b(require("outlayer"), require("get-size"), require("fizzy-ui-utils")) : a.Masonry = b(a.Outlayer, a.getSize, a.fizzyUIUtils) }(window, function(a, b, c) { var d = a.create("masonry"); return d.prototype._resetLayout = function() { this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); var a = this.cols; for (this.colYs = []; a--;) this.colYs.push(0); this.maxY = 0 }, d.prototype.measureColumns = function() { if (this.getContainerWidth(), !this.columnWidth) { var a = this.items[0], c = a && a.element; this.columnWidth = c && b(c).outerWidth || this.containerWidth } var d = this.columnWidth += this.gutter, e = this.containerWidth + this.gutter, f = e / d, g = d - e % d, h = g && 1 > g ? "round" : "floor"; f = Math[h](f), this.cols = Math.max(f, 1) }, d.prototype.getContainerWidth = function() { var a = this.options.isFitWidth ? this.element.parentNode : this.element, c = b(a); this.containerWidth = c && c.innerWidth }, d.prototype._getItemLayoutPosition = function(a) { a.getSize(); var b = a.size.outerWidth % this.columnWidth, d = b && 1 > b ? "round" : "ceil", e = Math[d](a.size.outerWidth / this.columnWidth); e = Math.min(e, this.cols); for (var f = this._getColGroup(e), g = Math.min.apply(Math, f), h = c.indexOf(f, g), i = { x: this.columnWidth * h, y: g }, j = g + a.size.outerHeight, k = this.cols + 1 - f.length, l = 0; k > l; l++) this.colYs[h + l] = j; return i }, d.prototype._getColGroup = function(a) { if (2 > a) return this.colYs; for (var b = [], c = this.cols + 1 - a, d = 0; c > d; d++) { var e = this.colYs.slice(d, d + a); b[d] = Math.max.apply(Math, e) } return b }, d.prototype._manageStamp = function(a) { var c = b(a), d = this._getElementOffset(a), e = this.options.isOriginLeft ? d.left : d.right, f = e + c.outerWidth, g = Math.floor(e / this.columnWidth); g = Math.max(0, g); var h = Math.floor(f / this.columnWidth); h -= f % this.columnWidth ? 0 : 1, h = Math.min(this.cols - 1, h); for (var i = (this.options.isOriginTop ? d.top : d.bottom) + c.outerHeight, j = g; h >= j; j++) this.colYs[j] = Math.max(i, this.colYs[j]) }, d.prototype._getContainerSize = function() { this.maxY = Math.max.apply(Math, this.colYs); var a = { height: this.maxY }; return this.options.isFitWidth && (a.width = this._getContainerFitWidth()), a }, d.prototype._getContainerFitWidth = function() { for (var a = 0, b = this.cols; --b && 0 === this.colYs[b];) a++; return (this.cols - a) * this.columnWidth - this.gutter }, d.prototype.needsResizeLayout = function() { var a = this.containerWidth; return this.getContainerWidth(), a !== this.containerWidth }, d }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-modes/masonry", ["../layout-mode", "masonry/masonry"], b) : "object" == typeof exports ? module.exports = b(require("../layout-mode"), require("masonry-layout")) : b(a.Isotope.LayoutMode, a.Masonry) }(window, function(a, b) { "use strict"; function c(a, b) { for (var c in b) a[c] = b[c]; return a } var d = a.create("masonry"), e = d.prototype._getElementOffset, f = d.prototype.layout, g = d.prototype._getMeasurement; c(d.prototype, b.prototype), d.prototype._getElementOffset = e, d.prototype.layout = f, d.prototype._getMeasurement = g; var h = d.prototype.measureColumns; d.prototype.measureColumns = function() { this.items = this.isotope.filteredItems, h.call(this) }; var i = d.prototype._manageStamp; return d.prototype._manageStamp = function() { this.options.isOriginLeft = this.isotope.options.isOriginLeft, this.options.isOriginTop = this.isotope.options.isOriginTop, i.apply(this, arguments) }, d }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-modes/fit-rows", ["../layout-mode"], b) : "object" == typeof exports ? module.exports = b(require("../layout-mode")) : b(a.Isotope.LayoutMode) }(window, function(a) { "use strict"; var b = a.create("fitRows"); return b.prototype._resetLayout = function() { this.x = 0, this.y = 0, this.maxY = 0, this._getMeasurement("gutter", "outerWidth") }, b.prototype._getItemLayoutPosition = function(a) { a.getSize(); var b = a.size.outerWidth + this.gutter, c = this.isotope.size.innerWidth + this.gutter; 0 !== this.x && b + this.x > c && (this.x = 0, this.y = this.maxY); var d = { x: this.x, y: this.y }; return this.maxY = Math.max(this.maxY, this.y + a.size.outerHeight), this.x += b, d }, b.prototype._getContainerSize = function() { return { height: this.maxY } }, b }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-modes/vertical", ["../layout-mode"], b) : "object" == typeof exports ? module.exports = b(require("../layout-mode")) : b(a.Isotope.LayoutMode) }(window, function(a) { "use strict"; var b = a.create("vertical", { horizontalAlignment: 0 }); return b.prototype._resetLayout = function() { this.y = 0 }, b.prototype._getItemLayoutPosition = function(a) { a.getSize(); var b = (this.isotope.size.innerWidth - a.size.outerWidth) * this.options.horizontalAlignment, c = this.y; return this.y += a.size.outerHeight, { x: b, y: c } }, b.prototype._getContainerSize = function() { return { height: this.y } }, b }), function(a, b) { "use strict"; "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size", "matches-selector/matches-selector", "fizzy-ui-utils/utils", "isotope/js/item", "isotope/js/layout-mode", "isotope/js/layout-modes/masonry", "isotope/js/layout-modes/fit-rows", "isotope/js/layout-modes/vertical"], function(c, d, e, f, g, h) { return b(a, c, d, e, f, g, h) }) : "object" == typeof exports ? module.exports = b(a, require("outlayer"), require("get-size"), require("desandro-matches-selector"), require("fizzy-ui-utils"), require("./item"), require("./layout-mode"), require("./layout-modes/masonry"), require("./layout-modes/fit-rows"), require("./layout-modes/vertical")) : a.Isotope = b(a, a.Outlayer, a.getSize, a.matchesSelector, a.fizzyUIUtils, a.Isotope.Item, a.Isotope.LayoutMode) }(window, function(a, b, c, d, e, f, g) { function h(a, b) { return function(c, d) { for (var e = 0, f = a.length; f > e; e++) { var g = a[e], h = c.sortData[g], i = d.sortData[g]; if (h > i || i > h) { var j = void 0 !== b[g] ? b[g] : b, k = j ? 1 : -1; return (h > i ? 1 : -1) * k } } return 0 } } var i = a.jQuery, j = String.prototype.trim ? function(a) { return a.trim() } : function(a) { return a.replace(/^\s+|\s+$/g, "") }, k = document.documentElement, l = k.textContent ? function(a) { return a.textContent } : function(a) { return a.innerText }, m = b.create("isotope", { layoutMode: "masonry", isJQueryFiltering: !0, sortAscending: !0 }); m.Item = f, m.LayoutMode = g, m.prototype._create = function() { this.itemGUID = 0, this._sorters = {}, this._getSorters(), b.prototype._create.call(this), this.modes = {}, this.filteredItems = this.items, this.sortHistory = ["original-order"]; for (var a in g.modes) this._initLayoutMode(a) }, m.prototype.reloadItems = function() { this.itemGUID = 0, b.prototype.reloadItems.call(this) }, m.prototype._itemize = function() { for (var a = b.prototype._itemize.apply(this, arguments), c = 0, d = a.length; d > c; c++) { var e = a[c]; e.id = this.itemGUID++ } return this._updateItemsSortData(a), a }, m.prototype._initLayoutMode = function(a) { var b = g.modes[a], c = this.options[a] || {}; this.options[a] = b.options ? e.extend(b.options, c) : c, this.modes[a] = new b(this) }, m.prototype.layout = function() { return !this._isLayoutInited && this.options.isInitLayout ? void this.arrange() : void this._layout() }, m.prototype._layout = function() { var a = this._getIsInstant(); this._resetLayout(), this._manageStamps(), this.layoutItems(this.filteredItems, a), this._isLayoutInited = !0 }, m.prototype.arrange = function(a) { function b() { d.reveal(c.needReveal), d.hide(c.needHide) } this.option(a), this._getIsInstant(); var c = this._filter(this.items); this.filteredItems = c.matches; var d = this; this._bindArrangeComplete(), this._isInstant ? this._noTransition(b) : b(), this._sort(), this._layout() }, m.prototype._init = m.prototype.arrange, m.prototype._getIsInstant = function() { var a = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; return this._isInstant = a, a }, m.prototype._bindArrangeComplete = function() { function a() { b && c && d && e.dispatchEvent("arrangeComplete", null, [e.filteredItems]) } var b, c, d, e = this; this.once("layoutComplete", function() { b = !0, a() }), this.once("hideComplete", function() { c = !0, a() }), this.once("revealComplete", function() { d = !0, a() }) }, m.prototype._filter = function(a) { var b = this.options.filter; b = b || "*"; for (var c = [], d = [], e = [], f = this._getFilterTest(b), g = 0, h = a.length; h > g; g++) { var i = a[g]; if (!i.isIgnored) { var j = f(i); j && c.push(i), j && i.isHidden ? d.push(i) : j || i.isHidden || e.push(i) } } return { matches: c, needReveal: d, needHide: e } }, m.prototype._getFilterTest = function(a) { return i && this.options.isJQueryFiltering ? function(b) { return i(b.element).is(a) } : "function" == typeof a ? function(b) { return a(b.element) } : function(b) { return d(b.element, a) } }, m.prototype.updateSortData = function(a) { var b; a ? (a = e.makeArray(a), b = this.getItems(a)) : b = this.items, this._getSorters(), this._updateItemsSortData(b) }, m.prototype._getSorters = function() { var a = this.options.getSortData; for (var b in a) { var c = a[b]; this._sorters[b] = n(c) } }, m.prototype._updateItemsSortData = function(a) { for (var b = a && a.length, c = 0; b && b > c; c++) { var d = a[c]; d.updateSortData() } }; var n = function() { function a(a) { if ("string" != typeof a) return a; var c = j(a).split(" "), d = c[0], e = d.match(/^\[(.+)\]$/), f = e && e[1], g = b(f, d), h = m.sortDataParsers[c[1]]; return a = h ? function(a) { return a && h(g(a)) } : function(a) { return a && g(a) } } function b(a, b) { var c; return c = a ? function(b) { return b.getAttribute(a) } : function(a) { var c = a.querySelector(b); return c && l(c) } } return a }(); m.sortDataParsers = { parseInt: function(a) { return parseInt(a, 10) }, parseFloat: function(a) { return parseFloat(a) } }, m.prototype._sort = function() { var a = this.options.sortBy; if (a) { var b = [].concat.apply(a, this.sortHistory), c = h(b, this.options.sortAscending); this.filteredItems.sort(c), a != this.sortHistory[0] && this.sortHistory.unshift(a) } }, m.prototype._mode = function() { var a = this.options.layoutMode, b = this.modes[a]; if (!b) throw new Error("No layout mode: " + a); return b.options = this.options[a], b }, m.prototype._resetLayout = function() { b.prototype._resetLayout.call(this), this._mode()._resetLayout() }, m.prototype._getItemLayoutPosition = function(a) { return this._mode()._getItemLayoutPosition(a) }, m.prototype._manageStamp = function(a) { this._mode()._manageStamp(a) }, m.prototype._getContainerSize = function() { return this._mode()._getContainerSize() }, m.prototype.needsResizeLayout = function() { return this._mode().needsResizeLayout() }, m.prototype.appended = function(a) { var b = this.addItems(a); if (b.length) { var c = this._filterRevealAdded(b); this.filteredItems = this.filteredItems.concat(c) } }, m.prototype.prepended = function(a) { var b = this._itemize(a); if (b.length) { this._resetLayout(), this._manageStamps(); var c = this._filterRevealAdded(b); this.layoutItems(this.filteredItems), this.filteredItems = c.concat(this.filteredItems), this.items = b.concat(this.items) } }, m.prototype._filterRevealAdded = function(a) { var b = this._filter(a); return this.hide(b.needHide), this.reveal(b.matches), this.layoutItems(b.matches, !0), b.matches }, m.prototype.insert = function(a) { var b = this.addItems(a); if (b.length) { var c, d, e = b.length; for (c = 0; e > c; c++) d = b[c], this.element.appendChild(d.element); var f = this._filter(b).matches; for (c = 0; e > c; c++) b[c].isLayoutInstant = !0; for (this.arrange(), c = 0; e > c; c++) delete b[c].isLayoutInstant; this.reveal(f) } }; var o = m.prototype.remove; return m.prototype.remove = function(a) { a = e.makeArray(a); var b = this.getItems(a); o.call(this, a); var c = b && b.length; if (c) for (var d = 0; c > d; d++) { var f = b[d]; e.removeFrom(this.filteredItems, f) } }, m.prototype.shuffle = function() { for (var a = 0, b = this.items.length; b > a; a++) { var c = this.items[a]; c.sortData.random = Math.random() } this.options.sortBy = "random", this._sort(), this._layout() }, m.prototype._noTransition = function(a) { var b = this.options.transitionDuration; this.options.transitionDuration = 0; var c = a.call(this); return this.options.transitionDuration = b, c }, m.prototype.getFilteredItemElements = function() { for (var a = [], b = 0, c = this.filteredItems.length; c > b; b++) a.push(this.filteredItems[b].element); return a }, m }); /** * @module PhotoSwipe * @author Dmitry Semenov * @see http://photoswipe.com * @version 4.1.1 */ ! function(a, b) { "function" == typeof define && define.amd ? define(b) : "object" == typeof exports ? module.exports = b() : a.PhotoSwipe = b() }(this, function() { "use strict"; var a = function(a, b, c, d) { var e = { features: null, bind: function(a, b, c, d) { var e = (d ? "remove" : "add") + "EventListener"; b = b.split(" "); for (var f = 0; f < b.length; f++) b[f] && a[e](b[f], c, !1) }, isArray: function(a) { return a instanceof Array }, createEl: function(a, b) { var c = document.createElement(b || "div"); return a && (c.className = a), c }, getScrollY: function() { var a = window.pageYOffset; return void 0 !== a ? a : document.documentElement.scrollTop }, unbind: function(a, b, c) { e.bind(a, b, c, !0) }, removeClass: function(a, b) { var c = new RegExp("(\\s|^)" + b + "(\\s|$)"); a.className = a.className.replace(c, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "") }, addClass: function(a, b) { e.hasClass(a, b) || (a.className += (a.className ? " " : "") + b) }, hasClass: function(a, b) { return a.className && new RegExp("(^|\\s)" + b + "(\\s|$)").test(a.className) }, getChildByClass: function(a, b) { for (var c = a.firstChild; c;) { if (e.hasClass(c, b)) return c; c = c.nextSibling } }, arraySearch: function(a, b, c) { for (var d = a.length; d--;) if (a[d][c] === b) return d; return -1 }, extend: function(a, b, c) { for (var d in b) if (b.hasOwnProperty(d)) { if (c && a.hasOwnProperty(d)) continue; a[d] = b[d] } }, easing: { sine: { out: function(a) { return Math.sin(a * (Math.PI / 2)) }, inOut: function(a) { return -(Math.cos(Math.PI * a) - 1) / 2 } }, cubic: { out: function(a) { return --a * a * a + 1 } } }, detectFeatures: function() { if (e.features) return e.features; var a = e.createEl(), b = a.style, c = "", d = {}; if (d.oldIE = document.all && !document.addEventListener, d.touch = "ontouchstart" in window, window.requestAnimationFrame && (d.raf = window.requestAnimationFrame, d.caf = window.cancelAnimationFrame), d.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled, !d.pointerEvent) { var f = navigator.userAgent; if (/iP(hone|od)/.test(navigator.platform)) { var g = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); g && g.length > 0 && (g = parseInt(g[1], 10), g >= 1 && 8 > g && (d.isOldIOSPhone = !0)) } var h = f.match(/Android\s([0-9\.]*)/), i = h ? h[1] : 0; i = parseFloat(i), i >= 1 && (4.4 > i && (d.isOldAndroid = !0), d.androidVersion = i), d.isMobileOpera = /opera mini|opera mobi/i.test(f) } for (var j, k, l = ["transform", "perspective", "animationName"], m = ["", "webkit", "Moz", "ms", "O"], n = 0; 4 > n; n++) { c = m[n]; for (var o = 0; 3 > o; o++) j = l[o], k = c + (c ? j.charAt(0).toUpperCase() + j.slice(1) : j), !d[j] && k in b && (d[j] = k); c && !d.raf && (c = c.toLowerCase(), d.raf = window[c + "RequestAnimationFrame"], d.raf && (d.caf = window[c + "CancelAnimationFrame"] || window[c + "CancelRequestAnimationFrame"])) } if (!d.raf) { var p = 0; d.raf = function(a) { var b = (new Date).getTime(), c = Math.max(0, 16 - (b - p)), d = window.setTimeout(function() { a(b + c) }, c); return p = b + c, d }, d.caf = function(a) { clearTimeout(a) } } return d.svg = !!document.createElementNS && !!document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect, e.features = d, d } }; e.detectFeatures(), e.features.oldIE && (e.bind = function(a, b, c, d) { b = b.split(" "); for (var e, f = (d ? "detach" : "attach") + "Event", g = function() { c.handleEvent.call(c) }, h = 0; h < b.length; h++) if (e = b[h]) if ("object" == typeof c && c.handleEvent) { if (d) { if (!c["oldIE" + e]) return !1 } else c["oldIE" + e] = g; a[f]("on" + e, c["oldIE" + e]) } else a[f]("on" + e, c) }); var f = this, g = 25, h = 3, i = { allowPanToNext: !0, spacing: .12, bgOpacity: 1, mouseUsed: !1, loop: !0, pinchToClose: !0, closeOnScroll: !0, closeOnVerticalDrag: !0, verticalDragRange: .75, hideAnimationDuration: 333, showAnimationDuration: 333, showHideOpacity: !1, focus: !0, escKey: !0, arrowKeys: !0, mainScrollEndFriction: .35, panEndFriction: .35, isClickableElement: function(a) { return "A" === a.tagName }, getDoubleTapZoom: function(a, b) { return a ? 1 : b.initialZoomLevel < .7 ? 1 : 1.33 }, maxSpreadZoom: 1.33, modal: !0, scaleMode: "fit" }; e.extend(i, d); var j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, $, _, aa, ba, ca, da, ea, fa, ga, ha, ia, ja, ka, la = function() { return { x: 0, y: 0 } }, ma = la(), na = la(), oa = la(), pa = {}, qa = 0, ra = {}, sa = la(), ta = 0, ua = !0, va = [], wa = {}, xa = !1, ya = function(a, b) { e.extend(f, b.publicMethods), va.push(a) }, za = function(a) { var b = _b(); return a > b - 1 ? a - b : 0 > a ? b + a : a }, Aa = {}, Ba = function(a, b) { return Aa[a] || (Aa[a] = []), Aa[a].push(b) }, Ca = function(a) { var b = Aa[a]; if (b) { var c = Array.prototype.slice.call(arguments); c.shift(); for (var d = 0; d < b.length; d++) b[d].apply(f, c) } }, Da = function() { return (new Date).getTime() }, Ea = function(a) { ia = a, f.bg.style.opacity = a * i.bgOpacity }, Fa = function(a, b, c, d, e) { (!xa || e && e !== f.currItem) && (d /= e ? e.fitRatio : f.currItem.fitRatio), a[E] = u + b + "px, " + c + "px" + v + " scale(" + d + ")" }, Ga = function(a) { da && (a && (s > f.currItem.fitRatio ? xa || (lc(f.currItem, !1, !0), xa = !0) : xa && (lc(f.currItem), xa = !1)), Fa(da, oa.x, oa.y, s)) }, Ha = function(a) { a.container && Fa(a.container.style, a.initialPosition.x, a.initialPosition.y, a.initialZoomLevel, a) }, Ia = function(a, b) { b[E] = u + a + "px, 0px" + v }, Ja = function(a, b) { if (!i.loop && b) { var c = m + (sa.x * qa - a) / sa.x, d = Math.round(a - sb.x); (0 > c && d > 0 || c >= _b() - 1 && 0 > d) && (a = sb.x + d * i.mainScrollEndFriction) } sb.x = a, Ia(a, n) }, Ka = function(a, b) { var c = tb[a] - ra[a]; return na[a] + ma[a] + c - c * (b / t) }, La = function(a, b) { a.x = b.x, a.y = b.y, b.id && (a.id = b.id) }, Ma = function(a) { a.x = Math.round(a.x), a.y = Math.round(a.y) }, Na = null, Oa = function() { Na && (e.unbind(document, "mousemove", Oa), e.addClass(a, "pswp--has_mouse"), i.mouseUsed = !0, Ca("mouseUsed")), Na = setTimeout(function() { Na = null }, 100) }, Pa = function() { e.bind(document, "keydown", f), N.transform && e.bind(f.scrollWrap, "click", f), i.mouseUsed || e.bind(document, "mousemove", Oa), e.bind(window, "resize scroll", f), Ca("bindEvents") }, Qa = function() { e.unbind(window, "resize", f), e.unbind(window, "scroll", r.scroll), e.unbind(document, "keydown", f), e.unbind(document, "mousemove", Oa), N.transform && e.unbind(f.scrollWrap, "click", f), U && e.unbind(window, p, f), Ca("unbindEvents") }, Ra = function(a, b) { var c = hc(f.currItem, pa, a); return b && (ca = c), c }, Sa = function(a) { return a || (a = f.currItem), a.initialZoomLevel }, Ta = function(a) { return a || (a = f.currItem), a.w > 0 ? i.maxSpreadZoom : 1 }, Ua = function(a, b, c, d) { return d === f.currItem.initialZoomLevel ? (c[a] = f.currItem.initialPosition[a], !0) : (c[a] = Ka(a, d), c[a] > b.min[a] ? (c[a] = b.min[a], !0) : c[a] < b.max[a] ? (c[a] = b.max[a], !0) : !1) }, Va = function() { if (E) { var b = N.perspective && !G; return u = "translate" + (b ? "3d(" : "("), void(v = N.perspective ? ", 0px)" : ")") } E = "left", e.addClass(a, "pswp--ie"), Ia = function(a, b) { b.left = a + "px" }, Ha = function(a) { var b = a.fitRatio > 1 ? 1 : a.fitRatio, c = a.container.style, d = b * a.w, e = b * a.h; c.width = d + "px", c.height = e + "px", c.left = a.initialPosition.x + "px", c.top = a.initialPosition.y + "px" }, Ga = function() { if (da) { var a = da, b = f.currItem, c = b.fitRatio > 1 ? 1 : b.fitRatio, d = c * b.w, e = c * b.h; a.width = d + "px", a.height = e + "px", a.left = oa.x + "px", a.top = oa.y + "px" } } }, Wa = function(a) { var b = ""; i.escKey && 27 === a.keyCode ? b = "close" : i.arrowKeys && (37 === a.keyCode ? b = "prev" : 39 === a.keyCode && (b = "next")), b && (a.ctrlKey || a.altKey || a.shiftKey || a.metaKey || (a.preventDefault ? a.preventDefault() : a.returnValue = !1, f[b]())) }, Xa = function(a) { a && (X || W || ea || S) && (a.preventDefault(), a.stopPropagation()) }, Ya = function() { f.setScrollOffset(0, e.getScrollY()) }, Za = {}, $a = 0, _a = function(a) { Za[a] && (Za[a].raf && I(Za[a].raf), $a--, delete Za[a]) }, ab = function(a) { Za[a] && _a(a), Za[a] || ($a++, Za[a] = {}) }, bb = function() { for (var a in Za) Za.hasOwnProperty(a) && _a(a) }, cb = function(a, b, c, d, e, f, g) { var h, i = Da(); ab(a); var j = function() { if (Za[a]) { if (h = Da() - i, h >= d) return _a(a), f(c), void(g && g()); f((c - b) * e(h / d) + b), Za[a].raf = H(j) } }; j() }, db = { shout: Ca, listen: Ba, viewportSize: pa, options: i, isMainScrollAnimating: function() { return ea }, getZoomLevel: function() { return s }, getCurrentIndex: function() { return m }, isDragging: function() { return U }, isZooming: function() { return _ }, setScrollOffset: function(a, b) { ra.x = a, M = ra.y = b, Ca("updateScrollOffset", ra) }, applyZoomPan: function(a, b, c, d) { oa.x = b, oa.y = c, s = a, Ga(d) }, init: function() { if (!j && !k) { var c; f.framework = e, f.template = a, f.bg = e.getChildByClass(a, "pswp__bg"), J = a.className, j = !0, N = e.detectFeatures(), H = N.raf, I = N.caf, E = N.transform, L = N.oldIE, f.scrollWrap = e.getChildByClass(a, "pswp__scroll-wrap"), f.container = e.getChildByClass(f.scrollWrap, "pswp__container"), n = f.container.style, f.itemHolders = y = [{ el: f.container.children[0], wrap: 0, index: -1 }, { el: f.container.children[1], wrap: 0, index: -1 }, { el: f.container.children[2], wrap: 0, index: -1 }], y[0].el.style.display = y[2].el.style.display = "none", Va(), r = { resize: f.updateSize, scroll: Ya, keydown: Wa, click: Xa }; var d = N.isOldIOSPhone || N.isOldAndroid || N.isMobileOpera; for (N.animationName && N.transform && !d || (i.showAnimationDuration = i.hideAnimationDuration = 0), c = 0; c < va.length; c++) f["init" + va[c]](); if (b) { var g = f.ui = new b(f, e); g.init() } Ca("firstUpdate"), m = m || i.index || 0, (isNaN(m) || 0 > m || m >= _b()) && (m = 0), f.currItem = $b(m), (N.isOldIOSPhone || N.isOldAndroid) && (ua = !1), a.setAttribute("aria-hidden", "false"), i.modal && (ua ? a.style.position = "fixed" : (a.style.position = "absolute", a.style.top = e.getScrollY() + "px")), void 0 === M && (Ca("initialLayout"), M = K = e.getScrollY()); var l = "pswp--open "; for (i.mainClass && (l += i.mainClass + " "), i.showHideOpacity && (l += "pswp--animate_opacity "), l += G ? "pswp--touch" : "pswp--notouch", l += N.animationName ? " pswp--css_animation" : "", l += N.svg ? " pswp--svg" : "", e.addClass(a, l), f.updateSize(), o = -1, ta = null, c = 0; h > c; c++) Ia((c + o) * sa.x, y[c].el.style); L || e.bind(f.scrollWrap, q, f), Ba("initialZoomInEnd", function() { f.setContent(y[0], m - 1), f.setContent(y[2], m + 1), y[0].el.style.display = y[2].el.style.display = "block", i.focus && a.focus(), Pa() }), f.setContent(y[1], m), f.updateCurrItem(), Ca("afterInit"), ua || (w = setInterval(function() { $a || U || _ || s !== f.currItem.initialZoomLevel || f.updateSize() }, 1e3)), e.addClass(a, "pswp--visible") } }, close: function() { j && (j = !1, k = !0, Ca("close"), Qa(), bc(f.currItem, null, !0, f.destroy)) }, destroy: function() { Ca("destroy"), Wb && clearTimeout(Wb), a.setAttribute("aria-hidden", "true"), a.className = J, w && clearInterval(w), e.unbind(f.scrollWrap, q, f), e.unbind(window, "scroll", f), yb(), bb(), Aa = null }, panTo: function(a, b, c) { c || (a > ca.min.x ? a = ca.min.x : a < ca.max.x && (a = ca.max.x), b > ca.min.y ? b = ca.min.y : b < ca.max.y && (b = ca.max.y)), oa.x = a, oa.y = b, Ga() }, handleEvent: function(a) { a = a || window.event, r[a.type] && r[a.type](a) }, goTo: function(a) { a = za(a); var b = a - m; ta = b, m = a, f.currItem = $b(m), qa -= b, Ja(sa.x * qa), bb(), ea = !1, f.updateCurrItem() }, next: function() { f.goTo(m + 1) }, prev: function() { f.goTo(m - 1) }, updateCurrZoomItem: function(a) { if (a && Ca("beforeChange", 0), y[1].el.children.length) { var b = y[1].el.children[0]; da = e.hasClass(b, "pswp__zoom-wrap") ? b.style : null } else da = null; ca = f.currItem.bounds, t = s = f.currItem.initialZoomLevel, oa.x = ca.center.x, oa.y = ca.center.y, a && Ca("afterChange") }, invalidateCurrItems: function() { x = !0; for (var a = 0; h > a; a++) y[a].item && (y[a].item.needsUpdate = !0) }, updateCurrItem: function(a) { if (0 !== ta) { var b, c = Math.abs(ta); if (!(a && 2 > c)) { f.currItem = $b(m), xa = !1, Ca("beforeChange", ta), c >= h && (o += ta + (ta > 0 ? -h : h), c = h); for (var d = 0; c > d; d++) ta > 0 ? (b = y.shift(), y[h - 1] = b, o++, Ia((o + 2) * sa.x, b.el.style), f.setContent(b, m - c + d + 1 + 1)) : (b = y.pop(), y.unshift(b), o--, Ia(o * sa.x, b.el.style), f.setContent(b, m + c - d - 1 - 1)); if (da && 1 === Math.abs(ta)) { var e = $b(z); e.initialZoomLevel !== s && (hc(e, pa), lc(e), Ha(e)) } ta = 0, f.updateCurrZoomItem(), z = m, Ca("afterChange") } } }, updateSize: function(b) { if (!ua && i.modal) { var c = e.getScrollY(); if (M !== c && (a.style.top = c + "px", M = c), !b && wa.x === window.innerWidth && wa.y === window.innerHeight) return; wa.x = window.innerWidth, wa.y = window.innerHeight, a.style.height = wa.y + "px" } if (pa.x = f.scrollWrap.clientWidth, pa.y = f.scrollWrap.clientHeight, Ya(), sa.x = pa.x + Math.round(pa.x * i.spacing), sa.y = pa.y, Ja(sa.x * qa), Ca("beforeResize"), void 0 !== o) { for (var d, g, j, k = 0; h > k; k++) d = y[k], Ia((k + o) * sa.x, d.el.style), j = m + k - 1, i.loop && _b() > 2 && (j = za(j)), g = $b(j), g && (x || g.needsUpdate || !g.bounds) ? (f.cleanSlide(g), f.setContent(d, j), 1 === k && (f.currItem = g, f.updateCurrZoomItem(!0)), g.needsUpdate = !1) : -1 === d.index && j >= 0 && f.setContent(d, j), g && g.container && (hc(g, pa), lc(g), Ha(g)); x = !1 } t = s = f.currItem.initialZoomLevel, ca = f.currItem.bounds, ca && (oa.x = ca.center.x, oa.y = ca.center.y, Ga(!0)), Ca("resize") }, zoomTo: function(a, b, c, d, f) { b && (t = s, tb.x = Math.abs(b.x) - oa.x, tb.y = Math.abs(b.y) - oa.y, La(na, oa)); var g = Ra(a, !1), h = {}; Ua("x", g, h, a), Ua("y", g, h, a); var i = s, j = { x: oa.x, y: oa.y }; Ma(h); var k = function(b) { 1 === b ? (s = a, oa.x = h.x, oa.y = h.y) : (s = (a - i) * b + i, oa.x = (h.x - j.x) * b + j.x, oa.y = (h.y - j.y) * b + j.y), f && f(b), Ga(1 === b) }; c ? cb("customZoomTo", 0, 1, c, d || e.easing.sine.inOut, k) : k(1) } }, eb = 30, fb = 10, gb = {}, hb = {}, ib = {}, jb = {}, kb = {}, lb = [], mb = {}, nb = [], ob = {}, pb = 0, qb = la(), rb = 0, sb = la(), tb = la(), ub = la(), vb = function(a, b) { return a.x === b.x && a.y === b.y }, wb = function(a, b) { return Math.abs(a.x - b.x) < g && Math.abs(a.y - b.y) < g }, xb = function(a, b) { return ob.x = Math.abs(a.x - b.x), ob.y = Math.abs(a.y - b.y), Math.sqrt(ob.x * ob.x + ob.y * ob.y) }, yb = function() { Y && (I(Y), Y = null) }, zb = function() { U && (Y = H(zb), Pb()) }, Ab = function() { return !("fit" === i.scaleMode && s === f.currItem.initialZoomLevel) }, Bb = function(a, b) { return a && a !== document ? a.getAttribute("class") && a.getAttribute("class").indexOf("pswp__scroll-wrap") > -1 ? !1 : b(a) ? a : Bb(a.parentNode, b) : !1 }, Cb = {}, Db = function(a, b) { return Cb.prevent = !Bb(a.target, i.isClickableElement), Ca("preventDragEvent", a, b, Cb), Cb.prevent }, Eb = function(a, b) { return b.x = a.pageX, b.y = a.pageY, b.id = a.identifier, b }, Fb = function(a, b, c) { c.x = .5 * (a.x + b.x), c.y = .5 * (a.y + b.y) }, Gb = function(a, b, c) { if (a - P > 50) { var d = nb.length > 2 ? nb.shift() : {}; d.x = b, d.y = c, nb.push(d), P = a } }, Hb = function() { var a = oa.y - f.currItem.initialPosition.y; return 1 - Math.abs(a / (pa.y / 2)) }, Ib = {}, Jb = {}, Kb = [], Lb = function(a) { for (; Kb.length > 0;) Kb.pop(); return F ? (ka = 0, lb.forEach(function(a) { 0 === ka ? Kb[0] = a : 1 === ka && (Kb[1] = a), ka++ })) : a.type.indexOf("touch") > -1 ? a.touches && a.touches.length > 0 && (Kb[0] = Eb(a.touches[0], Ib), a.touches.length > 1 && (Kb[1] = Eb(a.touches[1], Jb))) : (Ib.x = a.pageX, Ib.y = a.pageY, Ib.id = "", Kb[0] = Ib), Kb }, Mb = function(a, b) { var c, d, e, g, h = 0, j = oa[a] + b[a], k = b[a] > 0, l = sb.x + b.x, m = sb.x - mb.x; return c = j > ca.min[a] || j < ca.max[a] ? i.panEndFriction : 1, j = oa[a] + b[a] * c, !i.allowPanToNext && s !== f.currItem.initialZoomLevel || (da ? "h" !== fa || "x" !== a || W || (k ? (j > ca.min[a] && (c = i.panEndFriction, h = ca.min[a] - j, d = ca.min[a] - na[a]), (0 >= d || 0 > m) && _b() > 1 ? (g = l, 0 > m && l > mb.x && (g = mb.x)) : ca.min.x !== ca.max.x && (e = j)) : (j < ca.max[a] && (c = i.panEndFriction, h = j - ca.max[a], d = na[a] - ca.max[a]), (0 >= d || m > 0) && _b() > 1 ? (g = l, m > 0 && l < mb.x && (g = mb.x)) : ca.min.x !== ca.max.x && (e = j))) : g = l, "x" !== a) ? void(ea || Z || s > f.currItem.fitRatio && (oa[a] += b[a] * c)) : (void 0 !== g && (Ja(g, !0), Z = g === mb.x ? !1 : !0), ca.min.x !== ca.max.x && (void 0 !== e ? oa.x = e : Z || (oa.x += b.x * c)), void 0 !== g) }, Nb = function(a) { if (!("mousedown" === a.type && a.button > 0)) { if (Zb) return void a.preventDefault(); if (!T || "mousedown" !== a.type) { if (Db(a, !0) && a.preventDefault(), Ca("pointerDown"), F) { var b = e.arraySearch(lb, a.pointerId, "id"); 0 > b && (b = lb.length), lb[b] = { x: a.pageX, y: a.pageY, id: a.pointerId } } var c = Lb(a), d = c.length; $ = null, bb(), U && 1 !== d || (U = ga = !0, e.bind(window, p, f), R = ja = ha = S = Z = X = V = W = !1, fa = null, Ca("firstTouchStart", c), La(na, oa), ma.x = ma.y = 0, La(jb, c[0]), La(kb, jb), mb.x = sa.x * qa, nb = [{ x: jb.x, y: jb.y }], P = O = Da(), Ra(s, !0), yb(), zb()), !_ && d > 1 && !ea && !Z && (t = s, W = !1, _ = V = !0, ma.y = ma.x = 0, La(na, oa), La(gb, c[0]), La(hb, c[1]), Fb(gb, hb, ub), tb.x = Math.abs(ub.x) - oa.x, tb.y = Math.abs(ub.y) - oa.y, aa = ba = xb(gb, hb)) } } }, Ob = function(a) { if (a.preventDefault(), F) { var b = e.arraySearch(lb, a.pointerId, "id"); if (b > -1) { var c = lb[b]; c.x = a.pageX, c.y = a.pageY } } if (U) { var d = Lb(a); if (fa || X || _) $ = d; else if (sb.x !== sa.x * qa) fa = "h"; else { var f = Math.abs(d[0].x - jb.x) - Math.abs(d[0].y - jb.y); Math.abs(f) >= fb && (fa = f > 0 ? "h" : "v", $ = d) } } }, Pb = function() { if ($) { var a = $.length; if (0 !== a) if (La(gb, $[0]), ib.x = gb.x - jb.x, ib.y = gb.y - jb.y, _ && a > 1) { if (jb.x = gb.x, jb.y = gb.y, !ib.x && !ib.y && vb($[1], hb)) return; La(hb, $[1]), W || (W = !0, Ca("zoomGestureStarted")); var b = xb(gb, hb), c = Ub(b); c > f.currItem.initialZoomLevel + f.currItem.initialZoomLevel / 15 && (ja = !0); var d = 1, e = Sa(), g = Ta(); if (e > c) if (i.pinchToClose && !ja && t <= f.currItem.initialZoomLevel) { var h = e - c, j = 1 - h / (e / 1.2); Ea(j), Ca("onPinchClose", j), ha = !0 } else d = (e - c) / e, d > 1 && (d = 1), c = e - d * (e / 3); else c > g && (d = (c - g) / (6 * e), d > 1 && (d = 1), c = g + d * e); 0 > d && (d = 0), aa = b, Fb(gb, hb, qb), ma.x += qb.x - ub.x, ma.y += qb.y - ub.y, La(ub, qb), oa.x = Ka("x", c), oa.y = Ka("y", c), R = c > s, s = c, Ga() } else { if (!fa) return; if (ga && (ga = !1, Math.abs(ib.x) >= fb && (ib.x -= $[0].x - kb.x), Math.abs(ib.y) >= fb && (ib.y -= $[0].y - kb.y)), jb.x = gb.x, jb.y = gb.y, 0 === ib.x && 0 === ib.y) return; if ("v" === fa && i.closeOnVerticalDrag && !Ab()) { ma.y += ib.y, oa.y += ib.y; var k = Hb(); return S = !0, Ca("onVerticalDrag", k), Ea(k), void Ga() } Gb(Da(), gb.x, gb.y), X = !0, ca = f.currItem.bounds; var l = Mb("x", ib); l || (Mb("y", ib), Ma(oa), Ga()) } } }, Qb = function(a) { if (N.isOldAndroid) { if (T && "mouseup" === a.type) return; a.type.indexOf("touch") > -1 && (clearTimeout(T), T = setTimeout(function() { T = 0 }, 600)) } Ca("pointerUp"), Db(a, !1) && a.preventDefault(); var b; if (F) { var c = e.arraySearch(lb, a.pointerId, "id"); if (c > -1) if (b = lb.splice(c, 1)[0], navigator.pointerEnabled) b.type = a.pointerType || "mouse"; else { var d = { 4: "mouse", 2: "touch", 3: "pen" }; b.type = d[a.pointerType], b.type || (b.type = a.pointerType || "mouse") } } var g, h = Lb(a), j = h.length; if ("mouseup" === a.type && (j = 0), 2 === j) return $ = null, !0; 1 === j && La(kb, h[0]), 0 !== j || fa || ea || (b || ("mouseup" === a.type ? b = { x: a.pageX, y: a.pageY, type: "mouse" } : a.changedTouches && a.changedTouches[0] && (b = { x: a.changedTouches[0].pageX, y: a.changedTouches[0].pageY, type: "touch" })), Ca("touchRelease", a, b)); var k = -1; if (0 === j && (U = !1, e.unbind(window, p, f), yb(), _ ? k = 0 : -1 !== rb && (k = Da() - rb)), rb = 1 === j ? Da() : -1, g = -1 !== k && 150 > k ? "zoom" : "swipe", _ && 2 > j && (_ = !1, 1 === j && (g = "zoomPointerUp"), Ca("zoomGestureEnded")), $ = null, X || W || ea || S) if (bb(), Q || (Q = Rb()), Q.calculateSwipeSpeed("x"), S) { var l = Hb(); if (l < i.verticalDragRange) f.close(); else { var m = oa.y, n = ia; cb("verticalDrag", 0, 1, 300, e.easing.cubic.out, function(a) { oa.y = (f.currItem.initialPosition.y - m) * a + m, Ea((1 - n) * a + n), Ga() }), Ca("onVerticalDrag", 1) } } else { if ((Z || ea) && 0 === j) { var o = Tb(g, Q); if (o) return; g = "zoomPointerUp" } if (!ea) return "swipe" !== g ? void Vb() : void(!Z && s > f.currItem.fitRatio && Sb(Q)) } }, Rb = function() { var a, b, c = { lastFlickOffset: {}, lastFlickDist: {}, lastFlickSpeed: {}, slowDownRatio: {}, slowDownRatioReverse: {}, speedDecelerationRatio: {}, speedDecelerationRatioAbs: {}, distanceOffset: {}, backAnimDestination: {}, backAnimStarted: {}, calculateSwipeSpeed: function(d) { nb.length > 1 ? (a = Da() - P + 50, b = nb[nb.length - 2][d]) : (a = Da() - O, b = kb[d]), c.lastFlickOffset[d] = jb[d] - b, c.lastFlickDist[d] = Math.abs(c.lastFlickOffset[d]), c.lastFlickDist[d] > 20 ? c.lastFlickSpeed[d] = c.lastFlickOffset[d] / a : c.lastFlickSpeed[d] = 0, Math.abs(c.lastFlickSpeed[d]) < .1 && (c.lastFlickSpeed[d] = 0), c.slowDownRatio[d] = .95, c.slowDownRatioReverse[d] = 1 - c.slowDownRatio[d], c.speedDecelerationRatio[d] = 1 }, calculateOverBoundsAnimOffset: function(a, b) { c.backAnimStarted[a] || (oa[a] > ca.min[a] ? c.backAnimDestination[a] = ca.min[a] : oa[a] < ca.max[a] && (c.backAnimDestination[a] = ca.max[a]), void 0 !== c.backAnimDestination[a] && (c.slowDownRatio[a] = .7, c.slowDownRatioReverse[a] = 1 - c.slowDownRatio[a], c.speedDecelerationRatioAbs[a] < .05 && (c.lastFlickSpeed[a] = 0, c.backAnimStarted[a] = !0, cb("bounceZoomPan" + a, oa[a], c.backAnimDestination[a], b || 300, e.easing.sine.out, function(b) { oa[a] = b, Ga() })))) }, calculateAnimOffset: function(a) { c.backAnimStarted[a] || (c.speedDecelerationRatio[a] = c.speedDecelerationRatio[a] * (c.slowDownRatio[a] + c.slowDownRatioReverse[a] - c.slowDownRatioReverse[a] * c.timeDiff / 10), c.speedDecelerationRatioAbs[a] = Math.abs(c.lastFlickSpeed[a] * c.speedDecelerationRatio[a]), c.distanceOffset[a] = c.lastFlickSpeed[a] * c.speedDecelerationRatio[a] * c.timeDiff, oa[a] += c.distanceOffset[a]) }, panAnimLoop: function() { return Za.zoomPan && (Za.zoomPan.raf = H(c.panAnimLoop), c.now = Da(), c.timeDiff = c.now - c.lastNow, c.lastNow = c.now, c.calculateAnimOffset("x"), c.calculateAnimOffset("y"), Ga(), c.calculateOverBoundsAnimOffset("x"), c.calculateOverBoundsAnimOffset("y"), c.speedDecelerationRatioAbs.x < .05 && c.speedDecelerationRatioAbs.y < .05) ? (oa.x = Math.round(oa.x), oa.y = Math.round(oa.y), Ga(), void _a("zoomPan")) : void 0 } }; return c }, Sb = function(a) { return a.calculateSwipeSpeed("y"), ca = f.currItem.bounds, a.backAnimDestination = {}, a.backAnimStarted = {}, Math.abs(a.lastFlickSpeed.x) <= .05 && Math.abs(a.lastFlickSpeed.y) <= .05 ? (a.speedDecelerationRatioAbs.x = a.speedDecelerationRatioAbs.y = 0, a.calculateOverBoundsAnimOffset("x"), a.calculateOverBoundsAnimOffset("y"), !0) : (ab("zoomPan"), a.lastNow = Da(), void a.panAnimLoop()) }, Tb = function(a, b) { var c; ea || (pb = m); var d; if ("swipe" === a) { var g = jb.x - kb.x, h = b.lastFlickDist.x < 10; g > eb && (h || b.lastFlickOffset.x > 20) ? d = -1 : -eb > g && (h || b.lastFlickOffset.x < -20) && (d = 1) } var j; d && (m += d, 0 > m ? (m = i.loop ? _b() - 1 : 0, j = !0) : m >= _b() && (m = i.loop ? 0 : _b() - 1, j = !0), (!j || i.loop) && (ta += d, qa -= d, c = !0)); var k, l = sa.x * qa, n = Math.abs(l - sb.x); return c || l > sb.x == b.lastFlickSpeed.x > 0 ? (k = Math.abs(b.lastFlickSpeed.x) > 0 ? n / Math.abs(b.lastFlickSpeed.x) : 333, k = Math.min(k, 400), k = Math.max(k, 250)) : k = 333, pb === m && (c = !1), ea = !0, Ca("mainScrollAnimStart"), cb("mainScroll", sb.x, l, k, e.easing.cubic.out, Ja, function() { bb(), ea = !1, pb = -1, (c || pb !== m) && f.updateCurrItem(), Ca("mainScrollAnimComplete") }), c && f.updateCurrItem(!0), c }, Ub = function(a) { return 1 / ba * a * t }, Vb = function() { var a = s, b = Sa(), c = Ta(); b > s ? a = b : s > c && (a = c); var d, g = 1, h = ia; return ha && !R && !ja && b > s ? (f.close(), !0) : (ha && (d = function(a) { Ea((g - h) * a + h) }), f.zoomTo(a, 0, 200, e.easing.cubic.out, d), !0) }; ya("Gestures", { publicMethods: { initGestures: function() { var a = function(a, b, c, d, e) { A = a + b, B = a + c, C = a + d, D = e ? a + e : "" }; F = N.pointerEvent, F && N.touch && (N.touch = !1), F ? navigator.pointerEnabled ? a("pointer", "down", "move", "up", "cancel") : a("MSPointer", "Down", "Move", "Up", "Cancel") : N.touch ? (a("touch", "start", "move", "end", "cancel"), G = !0) : a("mouse", "down", "move", "up"), p = B + " " + C + " " + D, q = A, F && !G && (G = navigator.maxTouchPoints > 1 || navigator.msMaxTouchPoints > 1), f.likelyTouchDevice = G, r[A] = Nb, r[B] = Ob, r[C] = Qb, D && (r[D] = r[C]), N.touch && (q += " mousedown", p += " mousemove mouseup", r.mousedown = r[A], r.mousemove = r[B], r.mouseup = r[C]), G || (i.allowPanToNext = !1) } } }); var Wb, Xb, Yb, Zb, $b, _b, ac, bc = function(b, c, d, g) { Wb && clearTimeout(Wb), Zb = !0, Yb = !0; var h; b.initialLayout ? (h = b.initialLayout, b.initialLayout = null) : h = i.getThumbBoundsFn && i.getThumbBoundsFn(m); var j = d ? i.hideAnimationDuration : i.showAnimationDuration, k = function() { _a("initialZoom"), d ? (f.template.removeAttribute("style"), f.bg.removeAttribute("style")) : (Ea(1), c && (c.style.display = "block"), e.addClass(a, "pswp--animated-in"), Ca("initialZoom" + (d ? "OutEnd" : "InEnd"))), g && g(), Zb = !1 }; if (!j || !h || void 0 === h.x) return Ca("initialZoom" + (d ? "Out" : "In")), s = b.initialZoomLevel, La(oa, b.initialPosition), Ga(), a.style.opacity = d ? 0 : 1, Ea(1), void(j ? setTimeout(function() { k() }, j) : k()); var n = function() { var c = l, g = !f.currItem.src || f.currItem.loadError || i.showHideOpacity; b.miniImg && (b.miniImg.style.webkitBackfaceVisibility = "hidden"), d || (s = h.w / b.w, oa.x = h.x, oa.y = h.y - K, f[g ? "template" : "bg"].style.opacity = .001, Ga()), ab("initialZoom"), d && !c && e.removeClass(a, "pswp--animated-in"), g && (d ? e[(c ? "remove" : "add") + "Class"](a, "pswp--animate_opacity") : setTimeout(function() { e.addClass(a, "pswp--animate_opacity") }, 30)), Wb = setTimeout(function() { if (Ca("initialZoom" + (d ? "Out" : "In")), d) { var f = h.w / b.w, i = { x: oa.x, y: oa.y }, l = s, m = ia, n = function(b) { 1 === b ? (s = f, oa.x = h.x, oa.y = h.y - M) : (s = (f - l) * b + l, oa.x = (h.x - i.x) * b + i.x, oa.y = (h.y - M - i.y) * b + i.y), Ga(), g ? a.style.opacity = 1 - b : Ea(m - b * m) }; c ? cb("initialZoom", 0, 1, j, e.easing.cubic.out, n, k) : (n(1), Wb = setTimeout(k, j + 20)) } else s = b.initialZoomLevel, La(oa, b.initialPosition), Ga(), Ea(1), g ? a.style.opacity = 1 : Ea(1), Wb = setTimeout(k, j + 20) }, d ? 25 : 90) }; n() }, cc = {}, dc = [], ec = { index: 0, errorMsg: '
The image could not be loaded.
', forceProgressiveLoading: !1, preload: [1, 1], getNumItemsFn: function() { return Xb.length } }, fc = function() { return { center: { x: 0, y: 0 }, max: { x: 0, y: 0 }, min: { x: 0, y: 0 } } }, gc = function(a, b, c) { var d = a.bounds; d.center.x = Math.round((cc.x - b) / 2), d.center.y = Math.round((cc.y - c) / 2) + a.vGap.top, d.max.x = b > cc.x ? Math.round(cc.x - b) : d.center.x, d.max.y = c > cc.y ? Math.round(cc.y - c) + a.vGap.top : d.center.y, d.min.x = b > cc.x ? 0 : d.center.x, d.min.y = c > cc.y ? a.vGap.top : d.center.y }, hc = function(a, b, c) { if (a.src && !a.loadError) { var d = !c; if (d && (a.vGap || (a.vGap = { top: 0, bottom: 0 }), Ca("parseVerticalMargin", a)), cc.x = b.x, cc.y = b.y - a.vGap.top - a.vGap.bottom, d) { var e = cc.x / a.w, f = cc.y / a.h; a.fitRatio = f > e ? e : f; var g = i.scaleMode; "orig" === g ? c = 1 : "fit" === g && (c = a.fitRatio), c > 1 && (c = 1), a.initialZoomLevel = c, a.bounds || (a.bounds = fc()) } if (!c) return; return gc(a, a.w * c, a.h * c), d && c === a.initialZoomLevel && (a.initialPosition = a.bounds.center), a.bounds } return a.w = a.h = 0, a.initialZoomLevel = a.fitRatio = 1, a.bounds = fc(), a.initialPosition = a.bounds.center, a.bounds }, ic = function(a, b, c, d, e, g) { b.loadError || d && (b.imageAppended = !0, lc(b, d, b === f.currItem && xa), c.appendChild(d), g && setTimeout(function() { b && b.loaded && b.placeholder && (b.placeholder.style.display = "none", b.placeholder = null) }, 500)) }, jc = function(a) { a.loading = !0, a.loaded = !1; var b = a.img = e.createEl("pswp__img", "img"), c = function() { a.loading = !1, a.loaded = !0, a.loadComplete ? a.loadComplete(a) : a.img = null, b.onload = b.onerror = null, b = null }; return b.onload = c, b.onerror = function() { a.loadError = !0, c() }, b.src = a.src, b }, kc = function(a, b) { return a.src && a.loadError && a.container ? (b && (a.container.innerHTML = ""), a.container.innerHTML = i.errorMsg.replace("%url%", a.src), !0) : void 0 }, lc = function(a, b, c) { if (a.src) { b || (b = a.container.lastChild); var d = c ? a.w : Math.round(a.w * a.fitRatio), e = c ? a.h : Math.round(a.h * a.fitRatio); a.placeholder && !a.loaded && (a.placeholder.style.width = d + "px", a.placeholder.style.height = e + "px"), b.style.width = d + "px", b.style.height = e + "px" } }, mc = function() { if (dc.length) { for (var a, b = 0; b < dc.length; b++) a = dc[b], a.holder.index === a.index && ic(a.index, a.item, a.baseDiv, a.img, !1, a.clearPlaceholder); dc = [] } }; ya("Controller", { publicMethods: { lazyLoadItem: function(a) { a = za(a); var b = $b(a); b && (!b.loaded && !b.loading || x) && (Ca("gettingData", a, b), b.src && jc(b)) }, initController: function() { e.extend(i, ec, !0), f.items = Xb = c, $b = f.getItemAt, _b = i.getNumItemsFn, ac = i.loop, _b() < 3 && (i.loop = !1), Ba("beforeChange", function(a) { var b, c = i.preload, d = null === a ? !0 : a >= 0, e = Math.min(c[0], _b()), g = Math.min(c[1], _b()); for (b = 1; (d ? g : e) >= b; b++) f.lazyLoadItem(m + b); for (b = 1; (d ? e : g) >= b; b++) f.lazyLoadItem(m - b) }), Ba("initialLayout", function() { f.currItem.initialLayout = i.getThumbBoundsFn && i.getThumbBoundsFn(m) }), Ba("mainScrollAnimComplete", mc), Ba("initialZoomInEnd", mc), Ba("destroy", function() { for (var a, b = 0; b < Xb.length; b++) a = Xb[b], a.container && (a.container = null), a.placeholder && (a.placeholder = null), a.img && (a.img = null), a.preloader && (a.preloader = null), a.loadError && (a.loaded = a.loadError = !1); dc = null }) }, getItemAt: function(a) { return a >= 0 && void 0 !== Xb[a] ? Xb[a] : !1 }, allowProgressiveImg: function() { return i.forceProgressiveLoading || !G || i.mouseUsed || screen.width > 1200 }, setContent: function(a, b) { i.loop && (b = za(b)); var c = f.getItemAt(a.index); c && (c.container = null); var d, g = f.getItemAt(b); if (!g) return void(a.el.innerHTML = ""); Ca("gettingData", b, g), a.index = b, a.item = g; var h = g.container = e.createEl("pswp__zoom-wrap"); if (!g.src && g.html && (g.html.tagName ? h.appendChild(g.html) : h.innerHTML = g.html), kc(g), hc(g, pa), !g.src || g.loadError || g.loaded) g.src && !g.loadError && (d = e.createEl("pswp__img", "img"), d.style.opacity = 1, d.src = g.src, lc(g, d), ic(b, g, h, d, !0)); else { if (g.loadComplete = function(c) { if (j) { if (a && a.index === b) { if (kc(c, !0)) return c.loadComplete = c.img = null, hc(c, pa), Ha(c), void(a.index === m && f.updateCurrZoomItem()); c.imageAppended ? !Zb && c.placeholder && (c.placeholder.style.display = "none", c.placeholder = null) : N.transform && (ea || Zb) ? dc.push({ item: c, baseDiv: h, img: c.img, index: b, holder: a, clearPlaceholder: !0 }) : ic(b, c, h, c.img, ea || Zb, !0) } c.loadComplete = null, c.img = null, Ca("imageLoadComplete", b, c) } }, e.features.transform) { var k = "pswp__img pswp__img--placeholder"; k += g.msrc ? "" : " pswp__img--placeholder--blank"; var l = e.createEl(k, g.msrc ? "img" : ""); g.msrc && (l.src = g.msrc), lc(g, l), h.appendChild(l), g.placeholder = l } g.loading || jc(g), f.allowProgressiveImg() && (!Yb && N.transform ? dc.push({ item: g, baseDiv: h, img: g.img, index: b, holder: a }) : ic(b, g, h, g.img, !0, !0)) } Yb || b !== m ? Ha(g) : (da = h.style, bc(g, d || g.img)), a.el.innerHTML = "", a.el.appendChild(h) }, cleanSlide: function(a) { a.img && (a.img.onload = a.img.onerror = null), a.loaded = a.loading = a.img = a.imageAppended = !1 } } }); var nc, oc = {}, pc = function(a, b, c) { var d = document.createEvent("CustomEvent"), e = { origEvent: a, target: a.target, releasePoint: b, pointerType: c || "touch" }; d.initCustomEvent("pswpTap", !0, !0, e), a.target.dispatchEvent(d) }; ya("Tap", { publicMethods: { initTap: function() { Ba("firstTouchStart", f.onTapStart), Ba("touchRelease", f.onTapRelease), Ba("destroy", function() { oc = {}, nc = null }) }, onTapStart: function(a) { a.length > 1 && (clearTimeout(nc), nc = null) }, onTapRelease: function(a, b) { if (b && !X && !V && !$a) { var c = b; if (nc && (clearTimeout(nc), nc = null, wb(c, oc))) return void Ca("doubleTap", c); if ("mouse" === b.type) return void pc(a, b, "mouse"); var d = a.target.tagName.toUpperCase(); if ("BUTTON" === d || e.hasClass(a.target, "pswp__single-tap")) return void pc(a, b); La(oc, c), nc = setTimeout(function() { pc(a, b), nc = null }, 300) } } } }); var qc; ya("DesktopZoom", { publicMethods: { initDesktopZoom: function() { L || (G ? Ba("mouseUsed", function() { f.setupDesktopZoom() }) : f.setupDesktopZoom(!0)) }, setupDesktopZoom: function(b) { qc = {}; var c = "wheel mousewheel DOMMouseScroll"; Ba("bindEvents", function() { e.bind(a, c, f.handleMouseWheel) }), Ba("unbindEvents", function() { qc && e.unbind(a, c, f.handleMouseWheel) }), f.mouseZoomedIn = !1; var d, g = function() { f.mouseZoomedIn && (e.removeClass(a, "pswp--zoomed-in"), f.mouseZoomedIn = !1), 1 > s ? e.addClass(a, "pswp--zoom-allowed") : e.removeClass(a, "pswp--zoom-allowed"), h() }, h = function() { d && (e.removeClass(a, "pswp--dragging"), d = !1) }; Ba("resize", g), Ba("afterChange", g), Ba("pointerDown", function() { f.mouseZoomedIn && (d = !0, e.addClass(a, "pswp--dragging")) }), Ba("pointerUp", h), b || g() }, handleMouseWheel: function(a) { if (s <= f.currItem.fitRatio) return i.modal && (!i.closeOnScroll || $a || U ? a.preventDefault() : E && Math.abs(a.deltaY) > 2 && (l = !0, f.close())), !0; if (a.stopPropagation(), qc.x = 0, "deltaX" in a) 1 === a.deltaMode ? (qc.x = 18 * a.deltaX, qc.y = 18 * a.deltaY) : (qc.x = a.deltaX, qc.y = a.deltaY); else if ("wheelDelta" in a) a.wheelDeltaX && (qc.x = -.16 * a.wheelDeltaX), a.wheelDeltaY ? qc.y = -.16 * a.wheelDeltaY : qc.y = -.16 * a.wheelDelta; else { if (!("detail" in a)) return; qc.y = a.detail } Ra(s, !0); var b = oa.x - qc.x, c = oa.y - qc.y; (i.modal || b <= ca.min.x && b >= ca.max.x && c <= ca.min.y && c >= ca.max.y) && a.preventDefault(), f.panTo(b, c) }, toggleDesktopZoom: function(b) { b = b || { x: pa.x / 2 + ra.x, y: pa.y / 2 + ra.y }; var c = i.getDoubleTapZoom(!0, f.currItem), d = s === c; f.mouseZoomedIn = !d, f.zoomTo(d ? f.currItem.initialZoomLevel : c, b, 333), e[(d ? "remove" : "add") + "Class"](a, "pswp--zoomed-in") } } }); var rc, sc, tc, uc, vc, wc, xc, yc, zc, Ac, Bc, Cc, Dc = { history: !0, galleryUID: 1 }, Ec = function() { return Bc.hash.substring(1) }, Fc = function() { rc && clearTimeout(rc), tc && clearTimeout(tc) }, Gc = function() { var a = Ec(), b = {}; if (a.length < 5) return b; var c, d = a.split("&"); for (c = 0; c < d.length; c++) if (d[c]) { var e = d[c].split("="); e.length < 2 || (b[e[0]] = e[1]) } if (i.galleryPIDs) { var f = b.pid; for (b.pid = 0, c = 0; c < Xb.length; c++) if (Xb[c].pid === f) { b.pid = c; break } } else b.pid = parseInt(b.pid, 10) - 1; return b.pid < 0 && (b.pid = 0), b }, Hc = function() { if (tc && clearTimeout(tc), $a || U) return void(tc = setTimeout(Hc, 500)); uc ? clearTimeout(sc) : uc = !0; var a = m + 1, b = $b(m); b.hasOwnProperty("pid") && (a = b.pid); var c = xc + "&gid=" + i.galleryUID + "&pid=" + a; yc || -1 === Bc.hash.indexOf(c) && (Ac = !0); var d = Bc.href.split("#")[0] + "#" + c; Cc ? "#" + c !== window.location.hash && history[yc ? "replaceState" : "pushState"]("", document.title, d) : yc ? Bc.replace(d) : Bc.hash = c, yc = !0, sc = setTimeout(function() { uc = !1 }, 60) }; ya("History", { publicMethods: { initHistory: function() { if (e.extend(i, Dc, !0), i.history) { Bc = window.location, Ac = !1, zc = !1, yc = !1, xc = Ec(), Cc = "pushState" in history, xc.indexOf("gid=") > -1 && (xc = xc.split("&gid=")[0], xc = xc.split("?gid=")[0]), Ba("afterChange", f.updateURL), Ba("unbindEvents", function() { e.unbind(window, "hashchange", f.onHashChange) }); var a = function() { wc = !0, zc || (Ac ? history.back() : xc ? Bc.hash = xc : Cc ? history.pushState("", document.title, Bc.pathname + Bc.search) : Bc.hash = ""), Fc() }; Ba("unbindEvents", function() { l && a() }), Ba("destroy", function() { wc || a() }), Ba("firstUpdate", function() { m = Gc().pid }); var b = xc.indexOf("pid="); b > -1 && (xc = xc.substring(0, b), "&" === xc.slice(-1) && (xc = xc.slice(0, -1))), setTimeout(function() { j && e.bind(window, "hashchange", f.onHashChange) }, 40) } }, onHashChange: function() { return Ec() === xc ? (zc = !0, void f.close()) : void(uc || (vc = !0, f.goTo(Gc().pid), vc = !1)) }, updateURL: function() { Fc(), vc || (yc ? rc = setTimeout(Hc, 800) : Hc()) } } }), e.extend(f, db) }; return a }); /** * @module PhotoSwipe Default UI * @author Dmitry Semenov * @see http://photoswipe.com * @version 4.1.1 */ ! function(a, b) { "function" == typeof define && define.amd ? define(b) : "object" == typeof exports ? module.exports = b() : a.PhotoSwipeUI_Default = b() }(this, function() { "use strict"; var a = function(a, b) { var c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v = this, w = !1, x = !0, y = !0, z = { barsSize: { top: 44, bottom: "auto" }, closeElClasses: ["item", "caption", "zoom-wrap", "ui", "top-bar"], timeToIdle: 4e3, timeToIdleOutside: 1e3, loadingIndicatorDelay: 1e3, addCaptionHTMLFn: function(a, b) { return a.title ? (b.children[0].innerHTML = a.title, !0) : (b.children[0].innerHTML = "", !1) }, closeEl: !0, captionEl: !1, fullscreenEl: !0, zoomEl: !0, shareEl: !0, counterEl: !0, arrowEl: !0, preloaderEl: !0, tapToClose: !1, tapToToggleControls: !0, clickToCloseNonZoomable: !0, shareButtons: [{ id: "facebook", label: "Share on Facebook", url: "https://www.facebook.com/sharer/sharer.php?u={{url}}" }, { id: "twitter", label: "Tweet", url: "https://twitter.com/intent/tweet?text={{text}}&url={{url}}" }, { id: "pinterest", label: "Pin it", url: "http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}" }, { id: "download", label: "Download image", url: "{{raw_image_url}}", download: !0 }], getImageURLForShare: function() { return a.currItem.src || "" }, getPageURLForShare: function() { return window.location.href }, getTextForShare: function() { return a.currItem.title || "" }, indexIndicatorSep: " / ", fitControlsWidth: 1200 }, A = function(a) { if (r) return !0; a = a || window.event, q.timeToIdle && q.mouseUsed && !k && K(); for (var c, d, e = a.target || a.srcElement, f = e.getAttribute("class") || "", g = 0; g < S.length; g++) c = S[g], c.onTap && f.indexOf("pswp__" + c.name) > -1 && (c.onTap(), d = !0); if (d) { a.stopPropagation && a.stopPropagation(), r = !0; var h = b.features.isOldAndroid ? 600 : 30; s = setTimeout(function() { r = !1 }, h) } }, B = function() { return !a.likelyTouchDevice || q.mouseUsed || screen.width > q.fitControlsWidth }, C = function(a, c, d) { b[(d ? "add" : "remove") + "Class"](a, "pswp__" + c) }, D = function() { var a = 1 === q.getNumItemsFn(); a !== p && (C(d, "ui--one-slide", a), p = a) }, E = function() { C(i, "share-modal--hidden", y) }, F = function() { return y = !y, y ? (b.removeClass(i, "pswp__share-modal--fade-in"), setTimeout(function() { y && E() }, 300)) : (E(), setTimeout(function() { y || b.addClass(i, "pswp__share-modal--fade-in") }, 30)), y || H(), !1 }, G = function(b) { b = b || window.event; var c = b.target || b.srcElement; return a.shout("shareLinkClick", b, c), c.href ? c.hasAttribute("download") ? !0 : (window.open(c.href, "pswp_share", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left=" + (window.screen ? Math.round(screen.width / 2 - 275) : 100)), y || F(), !1) : !1 }, H = function() { for (var a, b, c, d, e, f = "", g = 0; g < q.shareButtons.length; g++) a = q.shareButtons[g], c = q.getImageURLForShare(a), d = q.getPageURLForShare(a), e = q.getTextForShare(a), b = a.url.replace("{{url}}", encodeURIComponent(d)).replace("{{image_url}}", encodeURIComponent(c)).replace("{{raw_image_url}}", c).replace("{{text}}", encodeURIComponent(e)), f += '", q.parseShareButtonOut && (f = q.parseShareButtonOut(a, f)); i.children[0].innerHTML = f, i.children[0].onclick = G }, I = function(a) { for (var c = 0; c < q.closeElClasses.length; c++) if (b.hasClass(a, "pswp__" + q.closeElClasses[c])) return !0 }, J = 0, K = function() { clearTimeout(u), J = 0, k && v.setIdle(!1) }, L = function(a) { a = a ? a : window.event; var b = a.relatedTarget || a.toElement; b && "HTML" !== b.nodeName || (clearTimeout(u), u = setTimeout(function() { v.setIdle(!0) }, q.timeToIdleOutside)) }, M = function() { q.fullscreenEl && !b.features.isOldAndroid && (c || (c = v.getFullscreenAPI()), c ? (b.bind(document, c.eventK, v.updateFullscreen), v.updateFullscreen(), b.addClass(a.template, "pswp--supports-fs")) : b.removeClass(a.template, "pswp--supports-fs")) }, N = function() { q.preloaderEl && (O(!0), l("beforeChange", function() { clearTimeout(o), o = setTimeout(function() { a.currItem && a.currItem.loading ? (!a.allowProgressiveImg() || a.currItem.img && !a.currItem.img.naturalWidth) && O(!1) : O(!0) }, q.loadingIndicatorDelay) }), l("imageLoadComplete", function(b, c) { a.currItem === c && O(!0) })) }, O = function(a) { n !== a && (C(m, "preloader--active", !a), n = a) }, P = function(a) { var c = a.vGap; if (B()) { var g = q.barsSize; if (q.captionEl && "auto" === g.bottom) if (f || (f = b.createEl("pswp__caption pswp__caption--fake"), f.appendChild(b.createEl("pswp__caption__center")), d.insertBefore(f, e), b.addClass(d, "pswp__ui--fit")), q.addCaptionHTMLFn(a, f, !0)) { var h = f.clientHeight; c.bottom = parseInt(h, 10) || 44 } else c.bottom = g.top; else c.bottom = "auto" === g.bottom ? 0 : g.bottom; c.top = g.top } else c.top = c.bottom = 0 }, Q = function() { q.timeToIdle && l("mouseUsed", function() { b.bind(document, "mousemove", K), b.bind(document, "mouseout", L), t = setInterval(function() { J++, 2 === J && v.setIdle(!0) }, q.timeToIdle / 2) }) }, R = function() { l("onVerticalDrag", function(a) { x && .95 > a ? v.hideControls() : !x && a >= .95 && v.showControls() }); var a; l("onPinchClose", function(b) { x && .9 > b ? (v.hideControls(), a = !0) : a && !x && b > .9 && v.showControls() }), l("zoomGestureEnded", function() { a = !1, a && !x && v.showControls() }) }, S = [{ name: "caption", option: "captionEl", onInit: function(a) { e = a } }, { name: "share-modal", option: "shareEl", onInit: function(a) { i = a }, onTap: function() { F() } }, { name: "button--share", option: "shareEl", onInit: function(a) { h = a }, onTap: function() { F() } }, { name: "button--zoom", option: "zoomEl", onTap: a.toggleDesktopZoom }, { name: "counter", option: "counterEl", onInit: function(a) { g = a } }, { name: "button--close", option: "closeEl", onTap: a.close }, { name: "button--arrow--left", option: "arrowEl", onTap: a.prev }, { name: "button--arrow--right", option: "arrowEl", onTap: a.next }, { name: "button--fs", option: "fullscreenEl", onTap: function() { c.isFullscreen() ? c.exit() : c.enter() } }, { name: "preloader", option: "preloaderEl", onInit: function(a) { m = a } }], T = function() { var a, c, e, f = function(d) { if (d) for (var f = d.length, g = 0; f > g; g++) { a = d[g], c = a.className; for (var h = 0; h < S.length; h++) e = S[h], c.indexOf("pswp__" + e.name) > -1 && (q[e.option] ? (b.removeClass(a, "pswp__element--disabled"), e.onInit && e.onInit(a)) : b.addClass(a, "pswp__element--disabled")) } }; f(d.children); var g = b.getChildByClass(d, "pswp__top-bar"); g && f(g.children) }; v.init = function() { b.extend(a.options, z, !0), q = a.options, d = b.getChildByClass(a.scrollWrap, "pswp__ui"), l = a.listen, R(), l("beforeChange", v.update), l("doubleTap", function(b) { var c = a.currItem.initialZoomLevel; a.getZoomLevel() !== c ? a.zoomTo(c, b, 333) : a.zoomTo(q.getDoubleTapZoom(!1, a.currItem), b, 333) }), l("preventDragEvent", function(a, b, c) { var d = a.target || a.srcElement; d && d.getAttribute("class") && a.type.indexOf("mouse") > -1 && (d.getAttribute("class").indexOf("__caption") > 0 || /(SMALL|STRONG|EM)/i.test(d.tagName)) && (c.prevent = !1) }), l("bindEvents", function() { b.bind(d, "pswpTap click", A), b.bind(a.scrollWrap, "pswpTap", v.onGlobalTap), a.likelyTouchDevice || b.bind(a.scrollWrap, "mouseover", v.onMouseOver) }), l("unbindEvents", function() { y || F(), t && clearInterval(t), b.unbind(document, "mouseout", L), b.unbind(document, "mousemove", K), b.unbind(d, "pswpTap click", A), b.unbind(a.scrollWrap, "pswpTap", v.onGlobalTap), b.unbind(a.scrollWrap, "mouseover", v.onMouseOver), c && (b.unbind(document, c.eventK, v.updateFullscreen), c.isFullscreen() && (q.hideAnimationDuration = 0, c.exit()), c = null) }), l("destroy", function() { q.captionEl && (f && d.removeChild(f), b.removeClass(e, "pswp__caption--empty")), i && (i.children[0].onclick = null), b.removeClass(d, "pswp__ui--over-close"), b.addClass(d, "pswp__ui--hidden"), v.setIdle(!1) }), q.showAnimationDuration || b.removeClass(d, "pswp__ui--hidden"), l("initialZoomIn", function() { q.showAnimationDuration && b.removeClass(d, "pswp__ui--hidden") }), l("initialZoomOut", function() { b.addClass(d, "pswp__ui--hidden") }), l("parseVerticalMargin", P), T(), q.shareEl && h && i && (y = !0), D(), Q(), M(), N() }, v.setIdle = function(a) { k = a, C(d, "ui--idle", a) }, v.update = function() { x && a.currItem ? (v.updateIndexIndicator(), q.captionEl && (q.addCaptionHTMLFn(a.currItem, e), C(e, "caption--empty", !a.currItem.title)), w = !0) : w = !1, y || F(), D() }, v.updateFullscreen = function(d) { d && setTimeout(function() { a.setScrollOffset(0, b.getScrollY()) }, 50), b[(c.isFullscreen() ? "add" : "remove") + "Class"](a.template, "pswp--fs") }, v.updateIndexIndicator = function() { q.counterEl && (g.innerHTML = a.getCurrentIndex() + 1 + q.indexIndicatorSep + q.getNumItemsFn()) }, v.onGlobalTap = function(c) { c = c || window.event; var d = c.target || c.srcElement; if (!r) if (c.detail && "mouse" === c.detail.pointerType) { if (I(d)) return void a.close(); b.hasClass(d, "pswp__img") && (1 === a.getZoomLevel() && a.getZoomLevel() <= a.currItem.fitRatio ? q.clickToCloseNonZoomable && a.close() : a.toggleDesktopZoom(c.detail.releasePoint)) } else if (q.tapToToggleControls && (x ? v.hideControls() : v.showControls()), q.tapToClose && (b.hasClass(d, "pswp__img") || I(d))) return void a.close() }, v.onMouseOver = function(a) { a = a || window.event; var b = a.target || a.srcElement; C(d, "ui--over-close", I(b)) }, v.hideControls = function() { b.addClass(d, "pswp__ui--hidden"), x = !1 }, v.showControls = function() { x = !0, w || v.update(), b.removeClass(d, "pswp__ui--hidden") }, v.supportsFullscreen = function() { var a = document; return !!(a.exitFullscreen || a.mozCancelFullScreen || a.webkitExitFullscreen || a.msExitFullscreen) }, v.getFullscreenAPI = function() { var b, c = document.documentElement, d = "fullscreenchange"; return c.requestFullscreen ? b = { enterK: "requestFullscreen", exitK: "exitFullscreen", elementK: "fullscreenElement", eventK: d } : c.mozRequestFullScreen ? b = { enterK: "mozRequestFullScreen", exitK: "mozCancelFullScreen", elementK: "mozFullScreenElement", eventK: "moz" + d } : c.webkitRequestFullscreen ? b = { enterK: "webkitRequestFullscreen", exitK: "webkitExitFullscreen", elementK: "webkitFullscreenElement", eventK: "webkit" + d } : c.msRequestFullscreen && (b = { enterK: "msRequestFullscreen", exitK: "msExitFullscreen", elementK: "msFullscreenElement", eventK: "MSFullscreenChange" }), b && (b.enter = function() { return j = q.closeOnScroll, q.closeOnScroll = !1, "webkitRequestFullscreen" !== this.enterK ? a.template[this.enterK]() : void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT) }, b.exit = function() { return q.closeOnScroll = j, document[this.exitK]() }, b.isFullscreen = function() { return document[this.elementK] }), b } }; return a }); /** * @module RD Navbar * @author Evgeniy Gusarov * @see https://ua.linkedin.com/pub/evgeniy-gusarov/8a/a40/54a * @version 2.1.7 */ (function() { var a; a = "ontouchstart" in window, function(b, c, d) { var e; return e = function() { function e(a, e) { this.options = b.extend(!1, {}, this.Defaults, e), this.$element = b(a), this.$clone = null, this.$win = b(d), this.$doc = b(c), this.currentLayout = this.options.layout, this.loaded = !1, this.focusOnHover = this.options.focusOnHover, this.focusTimer = !1, this.cloneTimer = !1, this.isStuck = !1, this.initialize() } return e.prototype.Defaults = { layout: "rd-navbar-static", deviceLayout: "rd-navbar-fixed", focusOnHover: !0, focusOnHoverTimeout: 800, linkedElements: ["html"], domAppend: !0, stickUp: !0, stickUpClone: !0, stickUpOffset: "100%", anchorNavSpeed: 400, anchorNavOffset: 0, anchorNavEasing: "swing", autoHeight: !0, responsive: { 0: { layout: "rd-navbar-fixed", deviceLayout: "rd-navbar-fixed", focusOnHover: !1, stickUp: !1 }, 992: { layout: "rd-navbar-static", deviceLayout: "rd-navbar-static", focusOnHover: !0, stickUp: !0 } }, callbacks: { onToggleSwitch: !1, onToggleClose: !1, onDomAppend: !1, onDropdownOver: !1, onDropdownOut: !1, onDropdownToggle: !1, onDropdownClose: !1, onStuck: !1, onUnstuck: !1, onAnchorChange: !1 } }, e.prototype.initialize = function() { var b; return b = this, b.$element.addClass("rd-navbar").addClass(b.options.layout), a && b.$element.addClass("rd-navbar--is-touch"), b.setDataAPI(b), b.options.domAppend && b.createNav(b), b.options.stickUpClone && b.createClone(b), b.$element.addClass("rd-navbar-original"), b.addAdditionalClassToToggles(".rd-navbar-original", "toggle-original", "toggle-original-elements"), b.applyHandlers(b), b.offset = b.$element.offset().top, b.height = b.$element.outerHeight(), b.loaded = !0, b }, e.prototype.resize = function(c, d) { var e, f; return f = a ? c.getOption("deviceLayout") : c.getOption("layout"), e = c.$element.add(c.$clone), f === c.currentLayout && c.loaded || (c.switchClass(e, c.currentLayout, f), null != c.options.linkedElements && b.grep(c.options.linkedElements, function(a, b) { return c.switchClass(a, c.currentLayout + "-linked", f + "-linked") }), c.currentLayout = f), c.focusOnHover = c.getOption("focusOnHover"), c }, e.prototype.stickUp = function(a, c) { var d, e, f, g, h; return e = a.getOption("stickUp"), d = a.$doc.scrollTop(), g = null != a.$clone ? a.$clone : a.$element, f = a.getOption("stickUpOffset"), h = "string" == typeof f ? f.indexOf("%") > 0 ? parseFloat(f) * a.height / 100 : parseFloat(f) : f, e ? (d >= h && !a.isStuck || d < h && a.isStuck) && (a.$element.add(a.$clone).find("[data-rd-navbar-toggle]").each(function() { b.proxy(a.closeToggle, this)(a, !1) }).end().find(".rd-navbar-submenu").removeClass("opened").removeClass("focus"), d >= h && !a.isStuck && !a.$element.hasClass("rd-navbar-fixed") ? ("resize" === c.type ? a.switchClass(g, "", "rd-navbar--is-stuck") : g.addClass("rd-navbar--is-stuck"), a.isStuck = !0, a.options.callbacks.onStuck && a.options.callbacks.onStuck.call(a)) : ("resize" === c.type ? a.switchClass(g, "rd-navbar--is-stuck", "") : g.removeClass("rd-navbar--is-stuck").one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", b.proxy(a.resizeWrap, a, c)), a.isStuck = !1, a.options.callbacks.onUnstuck && a.options.callbacks.onUnstuck.call(a))) : a.isStuck && (a.switchClass(g, "rd-navbar--is-stuck", ""), a.isStuck = !1, a.resizeWrap(c)), a }, e.prototype.resizeWrap = function(a) { var b, c; if (c = this, null == c.$clone && !c.isStuck) return b = c.$element.parent(), c.getOption("autoHeight") ? (c.height = c.$element.outerHeight(), "resize" === a.type ? (b.addClass("rd-navbar--no-transition").css("height", c.height), b[0].offsetHeight, b.removeClass("rd-navbar--no-transition")) : b.css("height", c.height)) : void b.css("height", "auto") }, e.prototype.createNav = function(a) { return a.$element.find(".rd-navbar-dropdown, .rd-navbar-megamenu").each(function() { var a, c; return a = b(this), c = this.getBoundingClientRect(), c.left + a.outerWidth() >= d.innerWidth - 10 ? this.className += " rd-navbar-open-left" : c.left - a.outerWidth() <= 10 && (this.className += " rd-navbar-open-right"), a.hasClass("rd-navbar-megamenu") ? a.parent().addClass("rd-navbar--has-megamenu") : a.parent().addClass("rd-navbar--has-dropdown") }).parents("li").addClass("rd-navbar-submenu").append(b("", { class: "rd-navbar-submenu-toggle" })), a.options.callbacks.onDomAppend && a.options.callbacks.onDomAppend.call(this), a }, e.prototype.createClone = function(a) { return a.$clone = a.$element.clone().insertAfter(a.$element).addClass("rd-navbar--is-clone"), a.addAdditionalClassToToggles(".rd-navbar--is-clone", "toggle-cloned", "toggle-cloned-elements"), a }, e.prototype.closeToggle = function(a, c) { var d, e, f, g, h, i, j; return e = b(c.target), h = !1, i = this.getAttribute("data-rd-navbar-toggle"), a.options.stickUpClone && a.isStuck ? (g = ".toggle-cloned", f = ".toggle-cloned-elements", j = !e.hasClass("toggle-cloned")) : (g = ".toggle-original", f = ".toggle-original-elements", j = !e.hasClass("toggle-original")), c.target !== this && !e.parents(g + "[data-rd-navbar-toggle]").length && !e.parents(f).length && i && j && (d = b(this).parents("body").find(i).add(b(this).parents(".rd-navbar")[0]), d.each(function() { if (!h) return h = (c.target === this || b.contains(this, c.target)) === !0 }), h || (d.add(this).removeClass("active"), a.options.callbacks.onToggleClose && a.options.callbacks.onToggleClose.call(this, a))), this }, e.prototype.switchToggle = function(a, c) { var d, e, f; return c.preventDefault(), b(this).hasClass("toggle-cloned") ? (f = ".rd-navbar--is-clone", d = ".toggle-cloned-elements") : (f = ".rd-navbar-original", d = ".toggle-original-elements"), (e = this.getAttribute("data-rd-navbar-toggle")) && (b(f + " [data-rd-navbar-toggle]").not(this).each(function() { var a; if (a = this.getAttribute("data-rd-navbar-toggle")) return b(this).parents("body").find(f + " " + a + d).add(this).add(b.inArray(".rd-navbar", a.split(/\s*,\s*/i)) > -1 && b(this).parents("body")[0]).removeClass("active") }), b(this).parents("body").find(f + " " + e + d).add(this).add(b.inArray(".rd-navbar", e.split(/\s*,\s*/i)) > -1 && b(this).parents(".rd-navbar")[0]).toggleClass("active")), a.options.callbacks.onToggleSwitch && a.options.callbacks.onToggleSwitch.call(this, a), this }, e.prototype.dropdownOver = function(a, c) { var d; return a.focusOnHover && (d = b(this), clearTimeout(c), d.addClass("focus").siblings().removeClass("opened").each(a.dropdownUnfocus), a.options.callbacks.onDropdownOver && a.options.callbacks.onDropdownOver.call(this, a)), this }, e.prototype.dropdownTouch = function(a, c) { var d, e; if (d = b(this), clearTimeout(c), a.focusOnHover) { if (e = !1, d.hasClass("focus") && (e = !0), !e) return d.addClass("focus").siblings().removeClass("opened").each(a.dropdownUnfocus), !1; a.options.callbacks.onDropdownOver && a.options.callbacks.onDropdownOver.call(this, a) } return this }, e.prototype.dropdownOut = function(a, c) { var d; return a.focusOnHover && (d = b(this), d.one("mouseenter.navbar", function() { return clearTimeout(c) }), clearTimeout(c), c = setTimeout(b.proxy(a.dropdownUnfocus, this, a), a.options.focusOnHoverTimeout), a.options.callbacks.onDropdownOut && a.options.callbacks.onDropdownOut.call(this, a)), this }, e.prototype.dropdownUnfocus = function(a) { var c; return c = b(this), c.find("li.focus").add(this).removeClass("focus"), this }, e.prototype.dropdownClose = function(a, c) { var d; return c.target === this || b(c.target).parents(".rd-navbar-submenu").length || (d = b(this), d.find("li.focus").add(this).removeClass("focus").removeClass("opened"), a.options.callbacks.onDropdownClose && a.options.callbacks.onDropdownClose.call(this, a)), this }, e.prototype.dropdownToggle = function(a) { return b(this).toggleClass("opened").siblings().removeClass("opened"), a.options.callbacks.onDropdownToggle && a.options.callbacks.onDropdownToggle.call(this, a), this }, e.prototype.goToAnchor = function(a, c) { var d, e; return e = this.hash, d = b(e), d.length && (c.preventDefault(), b("html, body").stop().animate({ scrollTop: d.offset().top + a.getOption("anchorNavOffset") + 1 }, a.getOption("anchorNavSpeed"), a.getOption("anchorNavEasing"), function() { return a.changeAnchor(e) })), this }, e.prototype.activateAnchor = function(a) { var c, d, e, f, g, h, i, j, k, l, m, n; if (f = this, m = f.$doc.scrollTop(), n = f.$win.height(), g = f.$doc.height(), l = f.getOption("anchorNavOffset"), m + n > g - 50) return c = b('[data-type="anchor"]').last(), c.length && c.offset().top >= m && (h = "#" + c.attr("id"), d = b('.rd-navbar-nav a[href^="' + h + '"]').parent(), d.hasClass("active") || (d.addClass("active").siblings().removeClass("active"), f.options.callbacks.onAnchorChange && f.options.callbacks.onAnchorChange.call(c[0], f))), c; k = b('.rd-navbar-nav a[href^="#"]').get(); for (i in k) j = k[i], e = b(j), h = e.attr("href"), c = b(h), c.length && c.offset().top + l <= m && c.offset().top + c.outerHeight() > m && (e.parent().addClass("active").siblings().removeClass("active"), f.options.callbacks.onAnchorChange && f.options.callbacks.onAnchorChange.call(c[0], f)); return null }, e.prototype.getAnchor = function() { return history && history.state ? history.state.id : null }, e.prototype.changeAnchor = function(a) { return history && (history.state && history.state.id !== a ? history.replaceState({ anchorId: a }, null, a) : history.pushState({ anchorId: a }, null, a)), this }, e.prototype.applyHandlers = function(a) { return null != a.options.responsive && a.$win.on("resize.navbar", b.proxy(a.resize, a.$win[0], a)).on("resize.navbar", b.proxy(a.resizeWrap, a)).on("resize.navbar", b.proxy(a.stickUp, null != a.$clone ? a.$clone : a.$element, a)).on("orientationchange.navbar", b.proxy(a.resize, a.$win[0], a)).trigger("resize.navbar"), a.$doc.on("scroll.navbar", b.proxy(a.stickUp, null != a.$clone ? a.$clone : a.$element, a)).on("scroll.navbar", b.proxy(a.activateAnchor, a)), a.$element.add(a.$clone).find("[data-rd-navbar-toggle]").each(function() { var c; return c = b(this), c.on("click", b.proxy(a.switchToggle, this, a)), c.parents("body").on("click", b.proxy(a.closeToggle, this, a)) }), a.$element.add(a.$clone).find(".rd-navbar-submenu").each(function() { var c, d; return c = b(this), d = c.parents(".rd-navbar--is-clone").length ? a.cloneTimer : a.focusTimer, c.on("mouseleave.navbar", b.proxy(a.dropdownOut, this, a, d)), c.find("> a").on("mouseenter.navbar", b.proxy(a.dropdownOver, this, a, d)), c.find("> a").on("touchstart.navbar", b.proxy(a.dropdownTouch, this, a, d)), c.find("> .rd-navbar-submenu-toggle").on("click", b.proxy(a.dropdownToggle, this, a)), c.parents("body").on("click", b.proxy(a.dropdownClose, this, a)) }), a.$element.add(a.$clone).find('.rd-navbar-nav a[href^="#"]').each(function() { return b(this).on("click", b.proxy(a.goToAnchor, this, a)) }), a }, e.prototype.switchClass = function(a, c, d) { var e; return e = a instanceof jQuery ? a : b(a), e.addClass("rd-navbar--no-transition").removeClass(c).addClass(d), e[0].offsetHeight, e.removeClass("rd-navbar--no-transition") }, e.prototype.setDataAPI = function(a) { var b, c, d, e, f, g; for (b = ["-", "-xs-", "-sm-", "-md-", "-lg-", "-xl-"], e = [0, 480, 768, 992, 1200, 1800], c = f = 0, g = e.length; f < g; c = ++f) d = e[c], this.$element.attr("data" + b[c] + "layout") && (this.options.responsive[e[c]] || (this.options.responsive[e[c]] = {}), this.options.responsive[e[c]].layout = this.$element.attr("data" + b[c] + "layout")), this.$element.attr("data" + b[c] + "device-layout") && (this.options.responsive[e[c]] || (this.options.responsive[e[c]] = {}), this.options.responsive[e[c]].deviceLayout = this.$element.attr("data" + b[c] + "device-layout")), this.$element.attr("data" + b[c] + "hover-on") && (this.options.responsive[e[c]] || (this.options.responsive[e[c]] = {}), this.options.responsive[e[c]].focusOnHover = "true" === this.$element.attr("data" + b[c] + "hover-on")), this.$element.attr("data" + b[c] + "auto-height") && (this.options.responsive[e[c]] || (this.options.responsive[e[c]] = {}), this.options.responsive[e[c]].autoHeight = "true" === this.$element.attr("data" + b[c] + "auto-height")), this.$element.attr("data" + b[c] + "stick-up-offset") && (this.options.responsive[e[c]] || (this.options.responsive[e[c]] = {}), this.options.responsive[e[c]].stickUpOffset = this.$element.attr("data" + b[c] + "stick-up-offset")) }, e.prototype.getOption = function(a) { var b, c; for (b in this.options.responsive) b <= d.innerWidth && (c = b); return null != this.options.responsive && null != this.options.responsive[c][a] ? this.options.responsive[c][a] : this.options[a] }, e.prototype.addAdditionalClassToToggles = function(a, c, d) { return b(a).find("[data-rd-navbar-toggle]").each(function() { var e; return b(this).addClass(c), e = this.getAttribute("data-rd-navbar-toggle"), b(this).parents("body").find(a).find(e).addClass(d) }) }, e }(), b.fn.extend({ RDNavbar: function(a) { var c; if (c = b(this), !c.data("RDNavbar")) return c.data("RDNavbar", new e(this, a)) } }), d.RDNavbar = e }(window.jQuery, document, window), "undefined" != typeof module && null !== module ? module.exports = window.RDNavbar : "function" == typeof define && define.amd && define(["jquery"], function() { "use strict"; return window.RDNavbar }) }).call(this); /** * @module jQuery RD Twitter Feed * @author Rafael Shayvolodyan (raffa) * @version 1.0.3 */ (function() { ! function(a, b, c) { var d; return d = function() { function d(b, c) { this.options = a.extend(!0, {}, this.Defaults, c), this.$element = a(b), this.initialize() } return d.prototype.Defaults = { username: "themeforest", list: null, hashtag: null, hideReplies: !0, dateFormat: "%b/%d/%Y", apiPath: "bat/twitter_api/tweet.php", loadingText: "Loading...", localTemplate: { message: "This is sample tweet for local testing. Upload your project to the live hosting server for get data from twitter.com", serverMessage: "RD Twitter Feed: Please upload project to the server for enable plugin!", user_name: "TemplateMonster", date: "Fri Nov 06 11:20:43 +0000 2015", tweet: "Check Out NEW #Photographer Portfolio Responsive Photo - goo.gl/ECjPvq", avatar: "images/tm-logo.jpg", url: "#", screen_name: "@themeforest", media_url: ["images/twitter-blank.jpg"] }, dateText: { seconds: "less 1m", minutes: "m", hours: "h", yesterday: "yd" }, callback: !1 }, d.prototype.initialize = function() { var a; if (a = this.$element, this.options.list && !this.options.username && console.error("If you want to fetch tweets from a list, you must define the username of the list owner."), this.isLocal()) a.prepend("
" + this.options.localTemplate.message + "
"); else if (!this.isServer()) return void a.prepend("
" + this.options.localTemplate.serverMessage + "
"); a.append('' + (a.attr("data-twitter-loading") ? a.attr("data-twitter-loading") : this.options.loadingText + "")), this.fetch() }, d.prototype.linking = function(a, b) { var c, d, e, f, g, h, i, j, k, l; if (k = a.replace(/#([a-zA-Z0-9_]+)/g, '#$1').replace(/@([a-zA-Z0-9_]+)/g, '@$1'), i = a.match(/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/gi), null !== i) for (d = 0, f = i.length; d < f; d++) { for (h = i[d], c = !1, j = b.entities.urls, e = 0, g = j.length; e < g; e++) l = j[e], k = k.replace(h, '' + l.display_url + " "); c || (k = k.replace(h, "")) } return k }, d.prototype.dating = function(a, b) { var c, d, e, f, g, h, i, j, k, l; if (l = a.split(" "), a = new Date(Date.parse(l[1] + " " + l[2] + ", " + l[5] + " " + l[3] + " UTC")), d = new Date, f = (d.getTime() - a.getTime()) / 1e3, k = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], c = { "%d": a.getDate(), "%m": a.getMonth() + 1, "%b": k[a.getMonth()].substr(0, 3), "%B": k[a.getMonth()], "%y": String(a.getFullYear()).slice(-2), "%Y": a.getFullYear() }, e = b ? "%Y-%m-%d" : this.$element.attr("data-twitter-date-format") ? this.$element.attr("data-twitter-date-format") : this.options.dateFormat, f < 60) return this.$element.attr("data-twitter-date-seconds") ? this.$element.attr("data-twitter-date-seconds") : this.options.dateText.seconds; if (f / 60 < 60) return Math.round(f / 60) + (this.$element.attr("data-twitter-date-minutes") ? this.$element.attr("data-twitter-date-minutes") : this.options.dateText.minutes); if (f / 60 / 60 < 24) return Math.round(f / 60 / 60) + (this.$element.attr("data-twitter-date-hours") ? this.$element.attr("data-twitter-date-hours") : this.options.dateText.hours); if (f / 60 / 60 / 24 < 2) return this.$element.attr("data-twitter-date-yesterday") ? this.$element.attr("data-twitter-date-yesterday") : this.options.dateText.yesterday; for (h = e.match(/%[dmbByY]/g), i = 0, j = h.length; i < j; i++) g = h[i], e = e.replace(g, c[g]); return e }, d.prototype.isLocal = function() { var a, c, d, e; for (e = ["127.0.0.1", "192.168", "localhost"], c = 0, d = e.length; c < d; c++) if (a = e[c], b.location.hostname.indexOf(a) > -1) return !0; return !1 }, d.prototype.isServer = function() { var a; return a = c.location.href, a.indexOf("http://") > -1 || a.indexOf("https://") > -1 }, d.prototype.getMedia = function(a) { var b, c, d, e, f; if (!a.extended_entities) return a.entities && a.entities.media ? a.entities.media[0].media_url : null; if (a.extended_entities.media) { for (e = [], f = a.extended_entities.media, c = 0, d = f.length; c < d; c++) b = f[c], e.push(b.media_url); return e } }, d.prototype.getTempData = function(a, b) { var c, d, e, f, g, h, i, j, k; if (g = a.$element.find('[data-twitter-type="tweet"]').length, j = Array(), a.isLocal()) for (d = e = 0, h = g; 0 <= h ? e < h : e > h; d = 0 <= h ? ++e : --e) c = { user_name: a.options.localTemplate.user_name, date: a.dating(a.options.localTemplate.date, !1), datetime: a.dating(a.options.localTemplate.date, !0), tweet: a.linking(a.options.localTemplate.tweet), avatar: a.options.localTemplate.avatar, url: a.options.localTemplate.url, retweeted: !1, screen_name: a.linking(a.options.localTemplate.screen_name), media_url: a.options.localTemplate.media_url }, j.push(c); else for (d = f = 0, i = g; 0 <= i ? f < i : f > i; d = 0 <= i ? ++f : --f) { if (k = !1, b[d]) k = b[d]; else { if (!b.statuses || !b.statuses[d]) break; k = b.statuses[d] } c = { user_name: k.user.name, date: a.dating(k.created_at, !1), datetime: a.dating(k.created_at, !0), tweet: a.linking(k.text, k), avatar: k.user.profile_image_url, url: "https://twitter.com/" + k.user.screen_name + "/status/" + k.id_str, retweeted: k.retweeted, screen_name: a.linking("@" + k.user.screen_name, k) }, c.media_url = a.getMedia(k), j.push(c) } return j }, d.prototype.fetch = function() { var b; b = this.$element, a.getJSON(this.options.apiPath, { username: b.attr("data-twitter-username") ? b.attr("data-twitter-username") : this.options.username, list: b.attr("data-twitter-listname") ? b.attr("data-twitter-listname") : this.options.list, hashtag: b.attr("data-twitter-hashtag") ? b.attr("data-twitter-hashtag") : this.options.hashtag, count: b.find('[data-twitter-type="tweet"]').length + 3, exclude_replies: this.options.hideReplies }, a.proxy(function(a) { b.find("#loading_tweet").fadeOut("fast"), this.construct(this.getTempData(this, a)) }, this)), "function" == typeof this.options.callback && this.options.callback() }, d.prototype.construct = function(a) { var b, c, d, e, f, g; for (c = this, b = c.$element.find('[data-twitter-type="tweet"]'), d = e = 0, g = b.length; 0 <= g ? e < g : e > g; d = 0 <= g ? ++e : --e) "A" === b.prop("tagName") && this.tweetLink(b.eq(d), a[d]), f = 0, b.eq(d).find("*").each(function() { c.parseAttributes(this, a[d], f), this.hasAttribute("data-media_url") && f++ }), b.css("opacity", "1") }, d.prototype.tweetLink = function(a, b) { a.attr("href", b.url) }, d.prototype.parseAttributes = function(b, c, d) { var e, f, g, h, i, j, k; e = a(b), h = e.data(); for (i in h) if (h.hasOwnProperty(i) && "xId" !== i && "xImg" !== i && "xText" !== i) for (g = h[i].split(/\s?,\s?/i), j = 0, k = g.length; j < k; j++) f = g[j], "text" === f.toLowerCase() ? b.innerHTML = c[i] : "media_url" === i ? a.isArray(c[i]) && c[i].length > d ? b.setAttribute(f, c[i][d]) : null !== c[i] && 0 === d ? b.setAttribute(f, c[i]) : e.remove() : b.setAttribute(f, c[i]) }, a.fn.extend({ RDTwitter: function(b) { var c; if (this.each(function() {}), c = a(this), !c.data("RDTwitter")) return c.data("RDTwitter", new d(this, b)) } }), d }() }(window.jQuery, document, window), "undefined" != typeof module && null !== module ? module.exports = window.RDTwitter : "function" == typeof define && define.amd && define(["jquery"], function() { "use strict"; return window.RDTwitter }) }).call(this); /** * @module Custom Waypoints * @author Evgeniy Gusarov * @see https://ua.linkedin.com/pub/evgeniy-gusarov/8a/a40/54a * @license MIT License */ ! function(t) { var o = t("[data-waypoint-to]"); o.length && t(document).ready(function() { o.each(function() { var o = t(this); o.on("click", function(n) { n.preventDefault(), t("body, html").stop().animate({ scrollTop: t(o.attr("data-waypoint-to")).offset().top }, 800) }) }) }) }(jQuery); /** * @module UIToTop * @author Matt Varone * @see http://www.mattvarone.com/web-design/uitotop-jquery-plugin/ * @license MIT License */ ! function(o) { o.fn.UItoTop = function(n) { var e = { text: "", min: 500, scrollSpeed: 800, containerID: "ui-to-top", containerClass: "ui-to-top fa fa-angle-up", easingType: "easeIn" }, t = o.extend(e, n), i = "#" + t.containerID; o("body").append('' + t.text + ""), o(i).click(function() { return o("html, body").stop().animate({ scrollTop: 0 }, t.scrollSpeed, t.easingType), !1 }), o(window).scroll(function() { var n = o(window).scrollTop(); "undefined" == typeof document.body.style.maxHeight && o(i).css({ position: "absolute", top: o(window).scrollTop() + o(window).height() - 50 }), n > t.min ? o(i).stop(!0, !0).addClass("active") : o(i).removeClass("active") }) } }(jQuery); /** * @module ScrollTo * @license MIT License * @version 1.0.0 */ ! function(o) { o.fn.scrollTo = function(e) { function n(e) { if (e.preventDefault(), a.hasClass("toTop")) return o("html, body").stop().animate({ scrollTop: 0 }, s.scrollSpeed), o(a).removeClass("toTop"), !1; for (var n = 0; n < r.length; n++) if (window.scrollY < r[n].offsetTop + r[n].offsetHeight) { var t = r[n + 1].offsetTop; return t > o(document).height() - window.innerHeight && !a.hasClass("toTop") && a.addClass("toTop"), void 0 === r[n + 2] && a.addClass("toTop"), o("html, body").stop().animate({ scrollTop: t }, s.scrollSpeed, function() { void 0 === r[n + 2] && a.addClass("toTop") }), !1 } return !1 } var t = { containerID: "scrollTo", containerHoverID: "scrollTopHover", scrollSpeed: 1200, easingType: "linear" }, s = o.extend(t, e), l = o(window), r = this; o("body").append(''); var a = o("#" + s.containerID); a.hide().on("click", n), l.on("scroll", function(e) { window.scrollY > window.innerHeight ? o(a).fadeIn() : o(a).fadeOut(), window.scrollY > r[r.length - 1].offsetTop - 1 ? a.addClass("toTop") : a.removeClass("toTop"), window.scrollY === o(document).height() - window.innerHeight && a.addClass("toTop") }) } }(jQuery); /** * Bootstrap v3.3.6 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under the MIT license */ if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery"); + function(a) { "use strict"; var b = a.fn.jquery.split(" ")[0].split("."); if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 2) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3") }(jQuery), + function(a) { "use strict"; function b() { var a = document.createElement("bootstrap"), b = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend" }; for (var c in b) if (void 0 !== a.style[c]) return { end: b[c] }; return !1 } a.fn.emulateTransitionEnd = function(b) { var c = !1, d = this; a(this).one("bsTransitionEnd", function() { c = !0 }); var e = function() { c || a(d).trigger(a.support.transition.end) }; return setTimeout(e, b), this }, a(function() { a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = { bindType: a.support.transition.end, delegateType: a.support.transition.end, handle: function(b) { return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0 } }) }) }(jQuery), + function(a) { "use strict"; function b(b) { return this.each(function() { var c = a(this), e = c.data("bs.alert"); e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c) }) } var c = '[data-dismiss="alert"]', d = function(b) { a(b).on("click", c, this.close) }; d.VERSION = "3.3.6", d.TRANSITION_DURATION = 150, d.prototype.close = function(b) { function c() { g.detach().trigger("closed.bs.alert").remove() } var e = a(this), f = e.attr("data-target"); f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, "")); var g = a(f); b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c()) }; var e = a.fn.alert; a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function() { return a.fn.alert = e, this }, a(document).on("click.bs.alert.data-api", c, d.prototype.close) }(jQuery), + function(a) { "use strict"; function b(b) { return this.each(function() { var d = a(this), e = d.data("bs.button"), f = "object" == typeof b && b; e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b) }) } var c = function(b, d) { this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1 }; c.VERSION = "3.3.6", c.DEFAULTS = { loadingText: "loading..." }, c.prototype.setState = function(b) { var c = "disabled", d = this.$element, e = d.is("input") ? "val" : "html", f = d.data(); b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function() { d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c)) }, this), 0) }, c.prototype.toggle = function() { var a = !0, b = this.$element.closest('[data-toggle="buttons"]'); if (b.length) { var c = this.$element.find("input"); "radio" == c.prop("type") ? (c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change") } else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active") }; var d = a.fn.button; a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function() { return a.fn.button = d, this }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(c) { var d = a(c.target); d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault() }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(b) { a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type)) }) }(jQuery), + function(a) { "use strict"; function b(b) { return this.each(function() { var d = a(this), e = d.data("bs.carousel"), f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b), g = "string" == typeof b ? b : f.slide; e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle() }) } var c = function(b, c) { this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this)) }; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 600, c.DEFAULTS = { interval: 5e3, pause: "hover", wrap: !0, keyboard: !0 }, c.prototype.keydown = function(a) { if (!/input|textarea/i.test(a.target.tagName)) { switch (a.which) { case 37: this.prev(); break; case 39: this.next(); break; default: return } a.preventDefault() } }, c.prototype.cycle = function(b) { return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this }, c.prototype.getItemIndex = function(a) { return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active) }, c.prototype.getItemForDirection = function(a, b) { var c = this.getItemIndex(b), d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1; if (d && !this.options.wrap) return b; var e = "prev" == a ? -1 : 1, f = (c + e) % this.$items.length; return this.$items.eq(f) }, c.prototype.to = function(a) { var b = this, c = this.getItemIndex(this.$active = this.$element.find(".item.active")); return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() { b.to(a) }) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a)) }, c.prototype.pause = function(b) { return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this }, c.prototype.next = function() { return this.sliding ? void 0 : this.slide("next") }, c.prototype.prev = function() { return this.sliding ? void 0 : this.slide("prev") }, c.prototype.slide = function(b, d) { var e = this.$element.find(".item.active"), f = d || this.getItemForDirection(b, e), g = this.interval, h = "next" == b ? "left" : "right", i = this; if (f.hasClass("active")) return this.sliding = !1; var j = f[0], k = a.Event("slide.bs.carousel", { relatedTarget: j, direction: h }); if (this.$element.trigger(k), !k.isDefaultPrevented()) { if (this.sliding = !0, g && this.pause(), this.$indicators.length) { this.$indicators.find(".active").removeClass("active"); var l = a(this.$indicators.children()[this.getItemIndex(f)]); l && l.addClass("active") } var m = a.Event("slid.bs.carousel", { relatedTarget: j, direction: h }); return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function() { f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function() { i.$element.trigger(m) }, 0) }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this } }; var d = a.fn.carousel; a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function() { return a.fn.carousel = d, this }; var e = function(c) { var d, e = a(this), f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, "")); if (f.hasClass("carousel")) { var g = a.extend({}, f.data(), e.data()), h = e.attr("data-slide-to"); h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault() } }; a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function() { a('[data-ride="carousel"]').each(function() { var c = a(this); b.call(c, c.data()) }) }) }(jQuery), + function(a) { "use strict"; function b(b) { var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""); return a(d) } function c(b) { return this.each(function() { var c = a(this), e = c.data("bs.collapse"), f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b); !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]() }) } var d = function(b, c) { this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle() }; d.VERSION = "3.3.6", d.TRANSITION_DURATION = 350, d.DEFAULTS = { toggle: !0 }, d.prototype.dimension = function() { var a = this.$element.hasClass("width"); return a ? "width" : "height" }, d.prototype.show = function() { if (!this.transitioning && !this.$element.hasClass("in")) { var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing"); if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) { var f = a.Event("show.bs.collapse"); if (this.$element.trigger(f), !f.isDefaultPrevented()) { e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null)); var g = this.dimension(); this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1; var h = function() { this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse") }; if (!a.support.transition) return h.call(this); var i = a.camelCase(["scroll", g].join("-")); this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i]) } } } }, d.prototype.hide = function() { if (!this.transitioning && this.$element.hasClass("in")) { var b = a.Event("hide.bs.collapse"); if (this.$element.trigger(b), !b.isDefaultPrevented()) { var c = this.dimension(); this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1; var e = function() { this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse") }; return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this) } } }, d.prototype.toggle = function() { this[this.$element.hasClass("in") ? "hide" : "show"]() }, d.prototype.getParent = function() { return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function(c, d) { var e = a(d); this.addAriaAndCollapsedClass(b(e), e) }, this)).end() }, d.prototype.addAriaAndCollapsedClass = function(a, b) { var c = a.hasClass("in"); a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c) }; var e = a.fn.collapse; a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function() { return a.fn.collapse = e, this }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(d) { var e = a(this); e.attr("data-target") || d.preventDefault(); var f = b(e), g = f.data("bs.collapse"), h = g ? "toggle" : e.data(); c.call(f, h) }) }(jQuery), + function(a) { "use strict"; function b(b) { var c = b.attr("data-target"); c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, "")); var d = c && a(c); return d && d.length ? d : b.parent() } function c(c) { c && 3 === c.which || (a(e).remove(), a(f).each(function() { var d = a(this), e = b(d), f = { relatedTarget: this }; e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", f))))) })) } function d(b) { return this.each(function() { var c = a(this), d = c.data("bs.dropdown"); d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c) }) } var e = ".dropdown-backdrop", f = '[data-toggle="dropdown"]', g = function(b) { a(b).on("click.bs.dropdown", this.toggle) }; g.VERSION = "3.3.6", g.prototype.toggle = function(d) { var e = a(this); if (!e.is(".disabled, :disabled")) { var f = b(e), g = f.hasClass("open"); if (c(), !g) { "ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c); var h = { relatedTarget: this }; if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return; e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h)) } return !1 } }, g.prototype.keydown = function(c) { if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) { var d = a(this); if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) { var e = b(d), g = e.hasClass("open"); if (!g && 27 != c.which || g && 27 == c.which) return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click"); var h = " li:not(.disabled):visible a", i = e.find(".dropdown-menu" + h); if (i.length) { var j = i.index(c.target); 38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus") } } } }; var h = a.fn.dropdown; a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function() { return a.fn.dropdown = h, this }, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function(a) { a.stopPropagation() }).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown) }(jQuery), + function(a) { "use strict"; function b(b, d) { return this.each(function() { var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b); f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d) }) } var c = function(b, c) { this.options = c, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function() { this.$element.trigger("loaded.bs.modal") }, this)) }; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = { backdrop: !0, keyboard: !0, show: !0 }, c.prototype.toggle = function(a) { return this.isShown ? this.hide() : this.show(a) }, c.prototype.show = function(b) { var d = this, e = a.Event("show.bs.modal", { relatedTarget: b }); this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function() { d.$element.one("mouseup.dismiss.bs.modal", function(b) { a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0) }) }), this.backdrop(function() { var e = a.support.transition && d.$element.hasClass("fade"); d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus(); var f = a.Event("shown.bs.modal", { relatedTarget: b }); e ? d.$dialog.one("bsTransitionEnd", function() { d.$element.trigger("focus").trigger(f) }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f) })) }, c.prototype.hide = function(b) { b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal()) }, c.prototype.enforceFocus = function() { a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function(a) { this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus") }, this)) }, c.prototype.escape = function() { this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function(a) { 27 == a.which && this.hide() }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal") }, c.prototype.resize = function() { this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal") }, c.prototype.hideModal = function() { var a = this; this.$element.hide(), this.backdrop(function() { a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal") }) }, c.prototype.removeBackdrop = function() { this.$backdrop && this.$backdrop.remove(), this.$backdrop = null }, c.prototype.backdrop = function(b) { var d = this, e = this.$element.hasClass("fade") ? "fade" : ""; if (this.isShown && this.options.backdrop) { var f = a.support.transition && e; if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function(a) { return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide())) }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return; f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b() } else if (!this.isShown && this.$backdrop) { this.$backdrop.removeClass("in"); var g = function() { d.removeBackdrop(), b && b() }; a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g() } else b && b() }, c.prototype.handleUpdate = function() { this.adjustDialog() }, c.prototype.adjustDialog = function() { var a = this.$element[0].scrollHeight > document.documentElement.clientHeight; this.$element.css({ paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "", paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : "" }) }, c.prototype.resetAdjustments = function() { this.$element.css({ paddingLeft: "", paddingRight: "" }) }, c.prototype.checkScrollbar = function() { var a = window.innerWidth; if (!a) { var b = document.documentElement.getBoundingClientRect(); a = b.right - Math.abs(b.left) } this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar() }, c.prototype.setScrollbar = function() { var a = parseInt(this.$body.css("padding-right") || 0, 10); this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth) }, c.prototype.resetScrollbar = function() { this.$body.css("padding-right", this.originalBodyPad) }, c.prototype.measureScrollbar = function() { var a = document.createElement("div"); a.className = "modal-scrollbar-measure", this.$body.append(a); var b = a.offsetWidth - a.clientWidth; return this.$body[0].removeChild(a), b }; var d = a.fn.modal; a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function() { return a.fn.modal = d, this }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(c) { var d = a(this), e = d.attr("href"), f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")), g = f.data("bs.modal") ? "toggle" : a.extend({ remote: !/#/.test(e) && e }, f.data(), d.data()); d.is("a") && c.preventDefault(), f.one("show.bs.modal", function(a) { a.isDefaultPrevented() || f.one("hidden.bs.modal", function() { d.is(":visible") && d.trigger("focus") }) }), b.call(f, g, this) }) }(jQuery), + function(a) { "use strict"; function b(b) { return this.each(function() { var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof b && b; (e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]()) }) } var c = function(a, b) { this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b) }; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.DEFAULTS = { animation: !0, placement: "top", selector: !1, template: '', trigger: "hover focus", title: "", delay: 0, html: !1, container: !1, viewport: { selector: "body", padding: 0 } }, c.prototype.init = function(b, c, d) { if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = { click: !1, hover: !1, focus: !1 }, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!"); for (var e = this.options.trigger.split(" "), f = e.length; f--;) { var g = e[f]; if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) { var h = "hover" == g ? "mouseenter" : "focusin", i = "hover" == g ? "mouseleave" : "focusout"; this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this)) } } this.options.selector ? this._options = a.extend({}, this.options, { trigger: "manual", selector: "" }) : this.fixTitle() }, c.prototype.getDefaults = function() { return c.DEFAULTS }, c.prototype.getOptions = function(b) { return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = { show: b.delay, hide: b.delay }), b }, c.prototype.getDelegateOptions = function() { var b = {}, c = this.getDefaults(); return this._options && a.each(this._options, function(a, d) { c[a] != d && (b[a] = d) }), b }, c.prototype.enter = function(b) { var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type); return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type ? "focus" : "hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState ? void(c.hoverState = "in") : (clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void(c.timeout = setTimeout(function() { "in" == c.hoverState && c.show() }, c.options.delay.show)) : c.show()) }, c.prototype.isInStateTrue = function() { for (var a in this.inState) if (this.inState[a]) return !0; return !1 }, c.prototype.leave = function(b) { var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type); return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type ? "focus" : "hover"] = !1), c.isInStateTrue() ? void 0 : (clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void(c.timeout = setTimeout(function() { "out" == c.hoverState && c.hide() }, c.options.delay.hide)) : c.hide()) }, c.prototype.show = function() { var b = a.Event("show.bs." + this.type); if (this.hasContent() && this.enabled) { this.$element.trigger(b); var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]); if (b.isDefaultPrevented() || !d) return; var e = this, f = this.tip(), g = this.getUID(this.type); this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade"); var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement, i = /\s?auto?\s?/i, j = i.test(h); j && (h = h.replace(i, "") || "top"), f.detach().css({ top: 0, left: 0, display: "block" }).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type); var k = this.getPosition(), l = f[0].offsetWidth, m = f[0].offsetHeight; if (j) { var n = h, o = this.getPosition(this.$viewport); h = "bottom" == h && k.bottom + m > o.bottom ? "top" : "top" == h && k.top - m < o.top ? "bottom" : "right" == h && k.right + l > o.width ? "left" : "left" == h && k.left - l < o.left ? "right" : h, f.removeClass(n).addClass(h) } var p = this.getCalculatedOffset(h, k, l, m); this.applyPlacement(p, h); var q = function() { var a = e.hoverState; e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e) }; a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q() } }, c.prototype.applyPlacement = function(b, c) { var d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10), h = parseInt(d.css("margin-left"), 10); isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({ using: function(a) { d.css({ top: Math.round(a.top), left: Math.round(a.left) }) } }, b), 0), d.addClass("in"); var i = d[0].offsetWidth, j = d[0].offsetHeight; "top" == c && j != f && (b.top = b.top + f - j); var k = this.getViewportAdjustedDelta(c, b, i, j); k.left ? b.left += k.left : b.top += k.top; var l = /top|bottom/.test(c), m = l ? 2 * k.left - e + i : 2 * k.top - f + j, n = l ? "offsetWidth" : "offsetHeight"; d.offset(b), this.replaceArrow(m, d[0][n], l) }, c.prototype.replaceArrow = function(a, b, c) { this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "") }, c.prototype.setContent = function() { var a = this.tip(), b = this.getTitle(); a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right") }, c.prototype.hide = function(b) { function d() { "in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b() } var e = this, f = a(this.$tip), g = a.Event("hide.bs." + this.type); return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this) }, c.prototype.fixTitle = function() { var a = this.$element; (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "") }, c.prototype.hasContent = function() { return this.getTitle() }, c.prototype.getPosition = function(b) { b = b || this.$element; var c = b[0], d = "BODY" == c.tagName, e = c.getBoundingClientRect(); null == e.width && (e = a.extend({}, e, { width: e.right - e.left, height: e.bottom - e.top })); var f = d ? { top: 0, left: 0 } : b.offset(), g = { scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop() }, h = d ? { width: a(window).width(), height: a(window).height() } : null; return a.extend({}, e, g, h, f) }, c.prototype.getCalculatedOffset = function(a, b, c, d) { return "bottom" == a ? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 } : "top" == a ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 } : "left" == a ? { top: b.top + b.height / 2 - d / 2, left: b.left - c } : { top: b.top + b.height / 2 - d / 2, left: b.left + b.width } }, c.prototype.getViewportAdjustedDelta = function(a, b, c, d) { var e = { top: 0, left: 0 }; if (!this.$viewport) return e; var f = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport); if (/right|left/.test(a)) { var h = b.top - f - g.scroll, i = b.top + f - g.scroll + d; h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i) } else { var j = b.left - f, k = b.left + f + c; j < g.left ? e.left = g.left - j : k > g.right && (e.left = g.left + g.width - k) } return e }, c.prototype.getTitle = function() { var a, b = this.$element, c = this.options; return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title) }, c.prototype.getUID = function(a) { do a += ~~(1e6 * Math.random()); while (document.getElementById(a)); return a }, c.prototype.tip = function() { if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!"); return this.$tip }, c.prototype.arrow = function() { return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") }, c.prototype.enable = function() { this.enabled = !0 }, c.prototype.disable = function() { this.enabled = !1 }, c.prototype.toggleEnabled = function() { this.enabled = !this.enabled }, c.prototype.toggle = function(b) { var c = this; b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass("in") ? c.leave(c) : c.enter(c) }, c.prototype.destroy = function() { var a = this; clearTimeout(this.timeout), this.hide(function() { a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null }) }; var d = a.fn.tooltip; a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function() { return a.fn.tooltip = d, this } }(jQuery), + function(a) { "use strict"; function b(b) { return this.each(function() { var d = a(this), e = d.data("bs.popover"), f = "object" == typeof b && b; (e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]()) }) } var c = function(a, b) { this.init("popover", a, b) }; if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js"); c.VERSION = "3.3.6", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, { placement: "right", trigger: "click", content: "", template: '' }), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function() { return c.DEFAULTS }, c.prototype.setContent = function() { var a = this.tip(), b = this.getTitle(), c = this.getContent(); a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide() }, c.prototype.hasContent = function() { return this.getTitle() || this.getContent() }, c.prototype.getContent = function() { var a = this.$element, b = this.options; return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content) }, c.prototype.arrow = function() { return this.$arrow = this.$arrow || this.tip().find(".arrow") }; var d = a.fn.popover; a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function() { return a.fn.popover = d, this } }(jQuery), + function(a) { "use strict"; function b(c, d) { this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process() } function c(c) { return this.each(function() { var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c; e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]() }) } b.VERSION = "3.3.6", b.DEFAULTS = { offset: 10 }, b.prototype.getScrollHeight = function() { return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) }, b.prototype.refresh = function() { var b = this, c = "offset", d = 0; this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function() { var b = a(this), e = b.data("target") || b.attr("href"), f = /^#./.test(e) && a(e); return f && f.length && f.is(":visible") && [ [f[c]().top + d, e] ] || null }).sort(function(a, b) { return a[0] - b[0] }).each(function() { b.offsets.push(this[0]), b.targets.push(this[1]) }) }, b.prototype.process = function() { var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.getScrollHeight(), d = this.options.offset + c - this.$scrollElement.height(), e = this.offsets, f = this.targets, g = this.activeTarget; if (this.scrollHeight != c && this.refresh(), b >= d) return g != (a = f[f.length - 1]) && this.activate(a); if (g && b < e[0]) return this.activeTarget = null, this.clear(); for (a = e.length; a--;) g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a]) }, b.prototype.activate = function(b) { this.activeTarget = b, this.clear(); var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]', d = a(c).parents("li").addClass("active"); d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy") }, b.prototype.clear = function() { a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active") }; var d = a.fn.scrollspy; a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function() { return a.fn.scrollspy = d, this }, a(window).on("load.bs.scrollspy.data-api", function() { a('[data-spy="scroll"]').each(function() { var b = a(this); c.call(b, b.data()) }) }) }(jQuery), + function(a) { "use strict"; function b(b) { return this.each(function() { var d = a(this), e = d.data("bs.tab"); e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]() }) } var c = function(b) { this.element = a(b) }; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.prototype.show = function() { var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target"); if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) { var e = c.find(".active:last a"), f = a.Event("hide.bs.tab", { relatedTarget: b[0] }), g = a.Event("show.bs.tab", { relatedTarget: e[0] }); if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) { var h = a(d); this.activate(b.closest("li"), c), this.activate(h, h.parent(), function() { e.trigger({ type: "hidden.bs.tab", relatedTarget: b[0] }), b.trigger({ type: "shown.bs.tab", relatedTarget: e[0] }) }) } } }, c.prototype.activate = function(b, d, e) { function f() { g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e() } var g = d.find("> .active"), h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length); g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in") }; var d = a.fn.tab; a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function() { return a.fn.tab = d, this }; var e = function(c) { c.preventDefault(), b.call(a(this), "show") }; a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e) }(jQuery), + function(a) { "use strict"; function b(b) { return this.each(function() { var d = a(this), e = d.data("bs.affix"), f = "object" == typeof b && b; e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]() }) } var c = function(b, d) { this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition() }; c.VERSION = "3.3.6", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = { offset: 0, target: window }, c.prototype.getState = function(a, b, c, d) { var e = this.$target.scrollTop(), f = this.$element.offset(), g = this.$target.height(); if (null != c && "top" == this.affixed) return c > e ? "top" : !1; if ("bottom" == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom"; var h = null == this.affixed, i = h ? e : f.top, j = h ? g : b; return null != c && c >= e ? "top" : null != d && i + j >= a - d ? "bottom" : !1 }, c.prototype.getPinnedOffset = function() { if (this.pinnedOffset) return this.pinnedOffset; this.$element.removeClass(c.RESET).addClass("affix"); var a = this.$target.scrollTop(), b = this.$element.offset(); return this.pinnedOffset = b.top - a }, c.prototype.checkPositionWithEventLoop = function() { setTimeout(a.proxy(this.checkPosition, this), 1) }, c.prototype.checkPosition = function() { if (this.$element.is(":visible")) { var b = this.$element.height(), d = this.options.offset, e = d.top, f = d.bottom, g = Math.max(a(document).height(), a(document.body).height()); "object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element)); var h = this.getState(g, b, e, f); if (this.affixed != h) { null != this.unpin && this.$element.css("top", ""); var i = "affix" + (h ? "-" + h : ""), j = a.Event(i + ".bs.affix"); if (this.$element.trigger(j), j.isDefaultPrevented()) return; this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix") } "bottom" == h && this.$element.offset({ top: g - b - f }) } }; var d = a.fn.affix; a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function() { return a.fn.affix = d, this }, a(window).on("load", function() { a('[data-spy="affix"]').each(function() { var c = a(this), d = c.data(); d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d) }) }) }(jQuery); /** * @module RDInputLabel * @author Evgeniy Gusarov * @license MIT License */ (function() { ! function(t, e, i) { var s, n; return n = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), isWebkit = /safari|chrome/i.test(navigator.userAgent), s = function() { function s(s, n) { this.options = t.extend(!0, {}, this.Defaults, n), this.$element = t(s).addClass("rd-input-label"), this.$target = t("#" + this.$element.attr("for")), this.$win = t(i), this.$doc = t(e), this.initialize() } return s.prototype.Defaults = { callbacks: null }, s.prototype.initialize = function() { return this.$target.on("input", t.proxy(this.change, this)).on("focus", t.proxy(this.focus, this)).on("blur", t.proxy(this.blur, this)).on("hover", t.proxy(this.hover, this)).parents("form").on("reset", t.proxy(this.reset, this)), this.change(), this.hover(), this }, s.prototype.hover = function() { return isWebkit && (this.$target.is(":-webkit-autofill") ? this.$element.addClass("auto-fill") : this.$element.removeClass("auto-fill")), this }, s.prototype.change = function() { return isWebkit && (this.$target.is(":-webkit-autofill") ? this.$element.addClass("auto-fill") : this.$element.removeClass("auto-fill")), "" !== this.$target.val() ? (this.$element.hasClass("focus") || this.focus(), this.$element.addClass("not-empty")) : this.$element.removeClass("not-empty"), this }, s.prototype.focus = function() { return this.$element.addClass("focus"), this }, s.prototype.reset = function() { return setTimeout(t.proxy(this.blur, this)), this }, s.prototype.blur = function(t) { return "" === this.$target.val() && this.$element.removeClass("focus").removeClass("not-empty"), this }, s }(), t.fn.extend({ RDInputLabel: function(e) { return this.each(function() { var i; return i = t(this), i.data("RDInputLabel") ? void 0 : i.data("RDInputLabel", new s(this, e)) }) } }), i.RDInputLabel = s }(window.jQuery, document, window), "undefined" != typeof module && null !== module ? module.exports = window.RDInputLabel : "function" == typeof define && define.amd && define(["jquery"], function() { "use strict"; return window.RDInputLabel }) }).call(this); /** * @module Select2 * @version 4.0.2 * @license MIT License * @link https://github.com/select2/select2/blob/master/ */ ! function(a) { "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery) }(function(a) { var b = function() { if (a && a.fn && a.fn.select2 && a.fn.select2.amd) var b = a.fn.select2.amd; var b; return function() { if (!b || !b.requirejs) { b ? c = b : b = {}; var a, c, d; ! function(b) { function e(a, b) { return u.call(a, b) } function f(a, b) { var c, d, e, f, g, h, i, j, k, l, m, n = b && b.split("/"), o = s.map, p = o && o["*"] || {}; if (a && "." === a.charAt(0)) if (b) { for (a = a.split("/"), g = a.length - 1, s.nodeIdCompat && w.test(a[g]) && (a[g] = a[g].replace(w, "")), a = n.slice(0, n.length - 1).concat(a), k = 0; k < a.length; k += 1) if (m = a[k], "." === m) a.splice(k, 1), k -= 1; else if (".." === m) { if (1 === k && (".." === a[2] || ".." === a[0])) break; k > 0 && (a.splice(k - 1, 2), k -= 2) } a = a.join("/") } else 0 === a.indexOf("./") && (a = a.substring(2)); if ((n || p) && o) { for (c = a.split("/"), k = c.length; k > 0; k -= 1) { if (d = c.slice(0, k).join("/"), n) for (l = n.length; l > 0; l -= 1) if (e = o[n.slice(0, l).join("/")], e && (e = e[d])) { f = e, h = k; break } if (f) break; !i && p && p[d] && (i = p[d], j = k) }!f && i && (f = i, h = j), f && (c.splice(0, h, f), a = c.join("/")) } return a } function g(a, c) { return function() { var d = v.call(arguments, 0); return "string" != typeof d[0] && 1 === d.length && d.push(null), n.apply(b, d.concat([a, c])) } } function h(a) { return function(b) { return f(b, a) } } function i(a) { return function(b) { q[a] = b } } function j(a) { if (e(r, a)) { var c = r[a]; delete r[a], t[a] = !0, m.apply(b, c) } if (!e(q, a) && !e(t, a)) throw new Error("No " + a); return q[a] } function k(a) { var b, c = a ? a.indexOf("!") : -1; return c > -1 && (b = a.substring(0, c), a = a.substring(c + 1, a.length)), [b, a] } function l(a) { return function() { return s && s.config && s.config[a] || {} } } var m, n, o, p, q = {}, r = {}, s = {}, t = {}, u = Object.prototype.hasOwnProperty, v = [].slice, w = /\.js$/; o = function(a, b) { var c, d = k(a), e = d[0]; return a = d[1], e && (e = f(e, b), c = j(e)), e ? a = c && c.normalize ? c.normalize(a, h(b)) : f(a, b) : (a = f(a, b), d = k(a), e = d[0], a = d[1], e && (c = j(e))), { f: e ? e + "!" + a : a, n: a, pr: e, p: c } }, p = { require: function(a) { return g(a) }, exports: function(a) { var b = q[a]; return "undefined" != typeof b ? b : q[a] = {} }, module: function(a) { return { id: a, uri: "", exports: q[a], config: l(a) } } }, m = function(a, c, d, f) { var h, k, l, m, n, s, u = [], v = typeof d; if (f = f || a, "undefined" === v || "function" === v) { for (c = !c.length && d.length ? ["require", "exports", "module"] : c, n = 0; n < c.length; n += 1) if (m = o(c[n], f), k = m.f, "require" === k) u[n] = p.require(a); else if ("exports" === k) u[n] = p.exports(a), s = !0; else if ("module" === k) h = u[n] = p.module(a); else if (e(q, k) || e(r, k) || e(t, k)) u[n] = j(k); else { if (!m.p) throw new Error(a + " missing " + k); m.p.load(m.n, g(f, !0), i(k), {}), u[n] = q[k] } l = d ? d.apply(q[a], u) : void 0, a && (h && h.exports !== b && h.exports !== q[a] ? q[a] = h.exports : l === b && s || (q[a] = l)) } else a && (q[a] = d) }, a = c = n = function(a, c, d, e, f) { if ("string" == typeof a) return p[a] ? p[a](c) : j(o(a, c).f); if (!a.splice) { if (s = a, s.deps && n(s.deps, s.callback), !c) return; c.splice ? (a = c, c = d, d = null) : a = b } return c = c || function() {}, "function" == typeof d && (d = e, e = f), e ? m(b, a, c, d) : setTimeout(function() { m(b, a, c, d) }, 4), n }, n.config = function(a) { return n(a) }, a._defined = q, d = function(a, b, c) { if ("string" != typeof a) throw new Error("See almond README: incorrect module build, no module name"); b.splice || (c = b, b = []), e(q, a) || e(r, a) || (r[a] = [a, b, c]) }, d.amd = { jQuery: !0 } }(), b.requirejs = a, b.require = c, b.define = d } }(), b.define("almond", function() {}), b.define("jquery", [], function() { var b = a || $; return null == b && console && console.error && console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."), b }), b.define("select2/utils", ["jquery"], function(a) { function b(a) { var b = a.prototype, c = []; for (var d in b) { var e = b[d]; "function" == typeof e && "constructor" !== d && c.push(d) } return c } var c = {}; c.Extend = function(a, b) { function c() { this.constructor = a } var d = {}.hasOwnProperty; for (var e in b) d.call(b, e) && (a[e] = b[e]); return c.prototype = b.prototype, a.prototype = new c, a.__super__ = b.prototype, a }, c.Decorate = function(a, c) { function d() { var b = Array.prototype.unshift, d = c.prototype.constructor.length, e = a.prototype.constructor; d > 0 && (b.call(arguments, a.prototype.constructor), e = c.prototype.constructor), e.apply(this, arguments) } function e() { this.constructor = d } var f = b(c), g = b(a); c.displayName = a.displayName, d.prototype = new e; for (var h = 0; h < g.length; h++) { var i = g[h]; d.prototype[i] = a.prototype[i] } for (var j = (function(a) { var b = function() {}; a in d.prototype && (b = d.prototype[a]); var e = c.prototype[a]; return function() { var a = Array.prototype.unshift; return a.call(arguments, b), e.apply(this, arguments) } }), k = 0; k < f.length; k++) { var l = f[k]; d.prototype[l] = j(l) } return d }; var d = function() { this.listeners = {} }; return d.prototype.on = function(a, b) { this.listeners = this.listeners || {}, a in this.listeners ? this.listeners[a].push(b) : this.listeners[a] = [b] }, d.prototype.trigger = function(a) { var b = Array.prototype.slice; this.listeners = this.listeners || {}, a in this.listeners && this.invoke(this.listeners[a], b.call(arguments, 1)), "*" in this.listeners && this.invoke(this.listeners["*"], arguments) }, d.prototype.invoke = function(a, b) { for (var c = 0, d = a.length; d > c; c++) a[c].apply(this, b) }, c.Observable = d, c.generateChars = function(a) { for (var b = "", c = 0; a > c; c++) { var d = Math.floor(36 * Math.random()); b += d.toString(36) } return b }, c.bind = function(a, b) { return function() { a.apply(b, arguments) } }, c._convertData = function(a) { for (var b in a) { var c = b.split("-"), d = a; if (1 !== c.length) { for (var e = 0; e < c.length; e++) { var f = c[e]; f = f.substring(0, 1).toLowerCase() + f.substring(1), f in d || (d[f] = {}), e == c.length - 1 && (d[f] = a[b]), d = d[f] } delete a[b] } } return a }, c.hasScroll = function(b, c) { var d = a(c), e = c.style.overflowX, f = c.style.overflowY; return e !== f || "hidden" !== f && "visible" !== f ? "scroll" === e || "scroll" === f ? !0 : d.innerHeight() < c.scrollHeight || d.innerWidth() < c.scrollWidth : !1 }, c.escapeMarkup = function(a) { var b = { "\\": "\", "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }; return "string" != typeof a ? a : String(a).replace(/[&<>"'\/\\]/g, function(a) { return b[a] }) }, c.appendMany = function(b, c) { if ("1.7" === a.fn.jquery.substr(0, 3)) { var d = a(); a.map(c, function(a) { d = d.add(a) }), c = d } b.append(c) }, c }), b.define("select2/results", ["jquery", "./utils"], function(a, b) { function c(a, b, d) { this.$element = a, this.data = d, this.options = b, c.__super__.constructor.call(this) } return b.Extend(c, b.Observable), c.prototype.render = function() { var b = a('
    '); return this.options.get("multiple") && b.attr("aria-multiselectable", "true"), this.$results = b, b }, c.prototype.clear = function() { this.$results.empty() }, c.prototype.displayMessage = function(b) { var c = this.options.get("escapeMarkup"); this.clear(), this.hideLoading(); var d = a('
  • '), e = this.options.get("translations").get(b.message); d.append(c(e(b.args))), d[0].className += " select2-results__message", this.$results.append(d) }, c.prototype.hideMessages = function() { this.$results.find(".select2-results__message").remove() }, c.prototype.append = function(a) { this.hideLoading(); var b = []; if (null == a.results || 0 === a.results.length) return void(0 === this.$results.children().length && this.trigger("results:message", { message: "noResults" })); a.results = this.sort(a.results); for (var c = 0; c < a.results.length; c++) { var d = a.results[c], e = this.option(d); b.push(e) } this.$results.append(b) }, c.prototype.position = function(a, b) { var c = b.find(".select2-results"); c.append(a) }, c.prototype.sort = function(a) { var b = this.options.get("sorter"); return b(a) }, c.prototype.setClasses = function() { var b = this; this.data.current(function(c) { var d = a.map(c, function(a) { return a.id.toString() }), e = b.$results.find(".select2-results__option[aria-selected]"); e.each(function() { var b = a(this), c = a.data(this, "data"), e = "" + c.id; null != c.element && c.element.selected || null == c.element && a.inArray(e, d) > -1 ? b.attr("aria-selected", "true") : b.attr("aria-selected", "false") }); var f = e.filter("[aria-selected=true]"); f.length > 0 ? f.first().trigger("mouseenter") : e.first().trigger("mouseenter") }) }, c.prototype.showLoading = function(a) { this.hideLoading(); var b = this.options.get("translations").get("searching"), c = { disabled: !0, loading: !0, text: b(a) }, d = this.option(c); d.className += " loading-results", this.$results.prepend(d) }, c.prototype.hideLoading = function() { this.$results.find(".loading-results").remove() }, c.prototype.option = function(b) { var c = document.createElement("li"); c.className = "select2-results__option"; var d = { role: "treeitem", "aria-selected": "false" }; b.disabled && (delete d["aria-selected"], d["aria-disabled"] = "true"), null == b.id && delete d["aria-selected"], null != b._resultId && (c.id = b._resultId), b.title && (c.title = b.title), b.children && (d.role = "group", d["aria-label"] = b.text, delete d["aria-selected"]); for (var e in d) { var f = d[e]; c.setAttribute(e, f) } if (b.children) { var g = a(c), h = document.createElement("strong"); h.className = "select2-results__group"; a(h); this.template(b, h); for (var i = [], j = 0; j < b.children.length; j++) { var k = b.children[j], l = this.option(k); i.push(l) } var m = a("
      ", { "class": "select2-results__options select2-results__options--nested" }); m.append(i), g.append(h), g.append(m) } else this.template(b, c); return a.data(c, "data", b), c }, c.prototype.bind = function(b, c) { var d = this, e = b.id + "-results"; this.$results.attr("id", e), b.on("results:all", function(a) { d.clear(), d.append(a.data), b.isOpen() && d.setClasses() }), b.on("results:append", function(a) { d.append(a.data), b.isOpen() && d.setClasses() }), b.on("query", function(a) { d.hideMessages(), d.showLoading(a) }), b.on("select", function() { b.isOpen() && d.setClasses() }), b.on("unselect", function() { b.isOpen() && d.setClasses() }), b.on("open", function() { d.$results.attr("aria-expanded", "true"), d.$results.attr("aria-hidden", "false"), d.setClasses(), d.ensureHighlightVisible() }), b.on("close", function() { d.$results.attr("aria-expanded", "false"), d.$results.attr("aria-hidden", "true"), d.$results.removeAttr("aria-activedescendant") }), b.on("results:toggle", function() { var a = d.getHighlightedResults(); 0 !== a.length && a.trigger("mouseup") }), b.on("results:select", function() { var a = d.getHighlightedResults(); if (0 !== a.length) { var b = a.data("data"); "true" == a.attr("aria-selected") ? d.trigger("close", {}) : d.trigger("select", { data: b }) } }), b.on("results:previous", function() { var a = d.getHighlightedResults(), b = d.$results.find("[aria-selected]"), c = b.index(a); if (0 !== c) { var e = c - 1; 0 === a.length && (e = 0); var f = b.eq(e); f.trigger("mouseenter"); var g = d.$results.offset().top, h = f.offset().top, i = d.$results.scrollTop() + (h - g); 0 === e ? d.$results.scrollTop(0) : 0 > h - g && d.$results.scrollTop(i) } }), b.on("results:next", function() { var a = d.getHighlightedResults(), b = d.$results.find("[aria-selected]"), c = b.index(a), e = c + 1; if (!(e >= b.length)) { var f = b.eq(e); f.trigger("mouseenter"); var g = d.$results.offset().top + d.$results.outerHeight(!1), h = f.offset().top + f.outerHeight(!1), i = d.$results.scrollTop() + h - g; 0 === e ? d.$results.scrollTop(0) : h > g && d.$results.scrollTop(i) } }), b.on("results:focus", function(a) { a.element.addClass("select2-results__option--highlighted") }), b.on("results:message", function(a) { d.displayMessage(a) }), a.fn.mousewheel && this.$results.on("mousewheel", function(a) { var b = d.$results.scrollTop(), c = d.$results.get(0).scrollHeight - b + a.deltaY, e = a.deltaY > 0 && b - a.deltaY <= 0, f = a.deltaY < 0 && c <= d.$results.height(); e ? (d.$results.scrollTop(0), a.preventDefault(), a.stopPropagation()) : f && (d.$results.scrollTop(d.$results.get(0).scrollHeight - d.$results.height()), a.preventDefault(), a.stopPropagation()) }), this.$results.on("mouseup", ".select2-results__option[aria-selected]", function(b) { var c = a(this), e = c.data("data"); return "true" === c.attr("aria-selected") ? void(d.options.get("multiple") ? d.trigger("unselect", { originalEvent: b, data: e }) : d.trigger("close", {})) : void d.trigger("select", { originalEvent: b, data: e }) }), this.$results.on("mouseenter", ".select2-results__option[aria-selected]", function(b) { var c = a(this).data("data"); d.getHighlightedResults().removeClass("select2-results__option--highlighted"), d.trigger("results:focus", { data: c, element: a(this) }) }) }, c.prototype.getHighlightedResults = function() { var a = this.$results.find(".select2-results__option--highlighted"); return a }, c.prototype.destroy = function() { this.$results.remove() }, c.prototype.ensureHighlightVisible = function() { var a = this.getHighlightedResults(); if (0 !== a.length) { var b = this.$results.find("[aria-selected]"), c = b.index(a), d = this.$results.offset().top, e = a.offset().top, f = this.$results.scrollTop() + (e - d), g = e - d; f -= 2 * a.outerHeight(!1), 2 >= c ? this.$results.scrollTop(0) : (g > this.$results.outerHeight() || 0 > g) && this.$results.scrollTop(f) } }, c.prototype.template = function(b, c) { var d = this.options.get("templateResult"), e = this.options.get("escapeMarkup"), f = d(b, c); null == f ? c.style.display = "none" : "string" == typeof f ? c.innerHTML = e(f) : a(c).append(f) }, c }), b.define("select2/keys", [], function() { var a = { BACKSPACE: 8, TAB: 9, ENTER: 13, SHIFT: 16, CTRL: 17, ALT: 18, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46 }; return a }), b.define("select2/selection/base", ["jquery", "../utils", "../keys"], function(a, b, c) { function d(a, b) { this.$element = a, this.options = b, d.__super__.constructor.call(this) } return b.Extend(d, b.Observable), d.prototype.render = function() { var b = a(''); return this._tabindex = 0, null != this.$element.data("old-tabindex") ? this._tabindex = this.$element.data("old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), b.attr("title", this.$element.attr("title")), b.attr("tabindex", this._tabindex), this.$selection = b, b }, d.prototype.bind = function(a, b) { var d = this, e = (a.id + "-container", a.id + "-results"); this.container = a, this.$selection.on("focus", function(a) { d.trigger("focus", a) }), this.$selection.on("blur", function(a) { d._handleBlur(a) }), this.$selection.on("keydown", function(a) { d.trigger("keypress", a), a.which === c.SPACE && a.preventDefault() }), a.on("results:focus", function(a) { d.$selection.attr("aria-activedescendant", a.data._resultId) }), a.on("selection:update", function(a) { d.update(a.data) }), a.on("open", function() { d.$selection.attr("aria-expanded", "true"), d.$selection.attr("aria-owns", e), d._attachCloseHandler(a) }), a.on("close", function() { d.$selection.attr("aria-expanded", "false"), d.$selection.removeAttr("aria-activedescendant"), d.$selection.removeAttr("aria-owns"), d.$selection.focus(), d._detachCloseHandler(a) }), a.on("enable", function() { d.$selection.attr("tabindex", d._tabindex) }), a.on("disable", function() { d.$selection.attr("tabindex", "-1") }) }, d.prototype._handleBlur = function(b) { var c = this; window.setTimeout(function() { document.activeElement == c.$selection[0] || a.contains(c.$selection[0], document.activeElement) || c.trigger("blur", b) }, 1) }, d.prototype._attachCloseHandler = function(b) { a(document.body).on("mousedown.select2." + b.id, function(b) { var c = a(b.target), d = c.closest(".select2"), e = a(".select2.select2-container--open"); e.each(function() { var b = a(this); if (this != d[0]) { var c = b.data("element"); c.select2("close") } }) }) }, d.prototype._detachCloseHandler = function(b) { a(document.body).off("mousedown.select2." + b.id) }, d.prototype.position = function(a, b) { var c = b.find(".selection"); c.append(a) }, d.prototype.destroy = function() { this._detachCloseHandler(this.container) }, d.prototype.update = function(a) { throw new Error("The `update` method must be defined in child classes.") }, d }), b.define("select2/selection/single", ["jquery", "./base", "../utils", "../keys"], function(a, b, c, d) { function e() { e.__super__.constructor.apply(this, arguments) } return c.Extend(e, b), e.prototype.render = function() { var a = e.__super__.render.call(this); return a.addClass("select2-selection--single"), a.html(''), a }, e.prototype.bind = function(a, b) { var c = this; e.__super__.bind.apply(this, arguments); var d = a.id + "-container"; this.$selection.find(".select2-selection__rendered").attr("id", d), this.$selection.attr("aria-labelledby", d), this.$selection.on("mousedown", function(a) { 1 === a.which && c.trigger("toggle", { originalEvent: a }) }), this.$selection.on("focus", function(a) {}), this.$selection.on("blur", function(a) {}), a.on("selection:update", function(a) { c.update(a.data) }) }, e.prototype.clear = function() { this.$selection.find(".select2-selection__rendered").empty() }, e.prototype.display = function(a, b) { var c = this.options.get("templateSelection"), d = this.options.get("escapeMarkup"); return d(c(a, b)) }, e.prototype.selectionContainer = function() { return a("") }, e.prototype.update = function(a) { if (0 === a.length) return void this.clear(); var b = a[0], c = this.$selection.find(".select2-selection__rendered"), d = this.display(b, c); c.empty().append(d), c.prop("title", b.title || b.text) }, e }), b.define("select2/selection/multiple", ["jquery", "./base", "../utils"], function(a, b, c) { function d(a, b) { d.__super__.constructor.apply(this, arguments) } return c.Extend(d, b), d.prototype.render = function() { var a = d.__super__.render.call(this); return a.addClass("select2-selection--multiple"), a.html('
        '), a }, d.prototype.bind = function(b, c) { var e = this; d.__super__.bind.apply(this, arguments), this.$selection.on("click", function(a) { e.trigger("toggle", { originalEvent: a }) }), this.$selection.on("click", ".select2-selection__choice__remove", function(b) { if (!e.options.get("disabled")) { var c = a(this), d = c.parent(), f = d.data("data"); e.trigger("unselect", { originalEvent: b, data: f }) } }) }, d.prototype.clear = function() { this.$selection.find(".select2-selection__rendered").empty() }, d.prototype.display = function(a, b) { var c = this.options.get("templateSelection"), d = this.options.get("escapeMarkup"); return d(c(a, b)) }, d.prototype.selectionContainer = function() { var b = a('
      • ×
      • '); return b }, d.prototype.update = function(a) { if (this.clear(), 0 !== a.length) { for (var b = [], d = 0; d < a.length; d++) { var e = a[d], f = this.selectionContainer(), g = this.display(e, f); f.append(g), f.prop("title", e.title || e.text), f.data("data", e), b.push(f) } var h = this.$selection.find(".select2-selection__rendered"); c.appendMany(h, b) } }, d }), b.define("select2/selection/placeholder", ["../utils"], function(a) { function b(a, b, c) { this.placeholder = this.normalizePlaceholder(c.get("placeholder")), a.call(this, b, c) } return b.prototype.normalizePlaceholder = function(a, b) { return "string" == typeof b && (b = { id: "", text: b }), b }, b.prototype.createPlaceholder = function(a, b) { var c = this.selectionContainer(); return c.html(this.display(b)), c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"), c }, b.prototype.update = function(a, b) { var c = 1 == b.length && b[0].id != this.placeholder.id, d = b.length > 1; if (d || c) return a.call(this, b); this.clear(); var e = this.createPlaceholder(this.placeholder); this.$selection.find(".select2-selection__rendered").append(e) }, b }), b.define("select2/selection/allowClear", ["jquery", "../keys"], function(a, b) { function c() {} return c.prototype.bind = function(a, b, c) { var d = this; a.call(this, b, c), null == this.placeholder && this.options.get("debug") && window.console && console.error && console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."), this.$selection.on("mousedown", ".select2-selection__clear", function(a) { d._handleClear(a) }), b.on("keypress", function(a) { d._handleKeyboardClear(a, b) }) }, c.prototype._handleClear = function(a, b) { if (!this.options.get("disabled")) { var c = this.$selection.find(".select2-selection__clear"); if (0 !== c.length) { b.stopPropagation(); for (var d = c.data("data"), e = 0; e < d.length; e++) { var f = { data: d[e] }; if (this.trigger("unselect", f), f.prevented) return } this.$element.val(this.placeholder.id).trigger("change"), this.trigger("toggle", {}) } } }, c.prototype._handleKeyboardClear = function(a, c, d) { d.isOpen() || (c.which == b.DELETE || c.which == b.BACKSPACE) && this._handleClear(c) }, c.prototype.update = function(b, c) { if (b.call(this, c), !(this.$selection.find(".select2-selection__placeholder").length > 0 || 0 === c.length)) { var d = a('×'); d.data("data", c), this.$selection.find(".select2-selection__rendered").prepend(d) } }, c }), b.define("select2/selection/search", ["jquery", "../utils", "../keys"], function(a, b, c) { function d(a, b, c) { a.call(this, b, c) } return d.prototype.render = function(b) { var c = a(''); this.$searchContainer = c, this.$search = c.find("input"); var d = b.call(this); return this._transferTabIndex(), d }, d.prototype.bind = function(a, b, d) { var e = this; a.call(this, b, d), b.on("open", function() { e.$search.trigger("focus") }), b.on("close", function() { e.$search.val(""), e.$search.removeAttr("aria-activedescendant"), e.$search.trigger("focus") }), b.on("enable", function() { e.$search.prop("disabled", !1), e._transferTabIndex() }), b.on("disable", function() { e.$search.prop("disabled", !0) }), b.on("focus", function(a) { e.$search.trigger("focus") }), b.on("results:focus", function(a) { e.$search.attr("aria-activedescendant", a.id) }), this.$selection.on("focusin", ".select2-search--inline", function(a) { e.trigger("focus", a) }), this.$selection.on("focusout", ".select2-search--inline", function(a) { e._handleBlur(a) }), this.$selection.on("keydown", ".select2-search--inline", function(a) { a.stopPropagation(), e.trigger("keypress", a), e._keyUpPrevented = a.isDefaultPrevented(); var b = a.which; if (b === c.BACKSPACE && "" === e.$search.val()) { var d = e.$searchContainer.prev(".select2-selection__choice"); if (d.length > 0) { var f = d.data("data"); e.searchRemoveChoice(f), a.preventDefault() } } }); var f = document.documentMode, g = f && 11 >= f; this.$selection.on("input.searchcheck", ".select2-search--inline", function(a) { return g ? void e.$selection.off("input.search input.searchcheck") : void e.$selection.off("keyup.search") }), this.$selection.on("keyup.search input.search", ".select2-search--inline", function(a) { if (g && "input" === a.type) return void e.$selection.off("input.search input.searchcheck"); var b = a.which; b != c.SHIFT && b != c.CTRL && b != c.ALT && b != c.TAB && e.handleSearch(a) }) }, d.prototype._transferTabIndex = function(a) { this.$search.attr("tabindex", this.$selection.attr("tabindex")), this.$selection.attr("tabindex", "-1") }, d.prototype.createPlaceholder = function(a, b) { this.$search.attr("placeholder", b.text) }, d.prototype.update = function(a, b) { var c = this.$search[0] == document.activeElement; this.$search.attr("placeholder", ""), a.call(this, b), this.$selection.find(".select2-selection__rendered").append(this.$searchContainer), this.resizeSearch(), c && this.$search.focus() }, d.prototype.handleSearch = function() { if (this.resizeSearch(), !this._keyUpPrevented) { var a = this.$search.val(); this.trigger("query", { term: a }) } this._keyUpPrevented = !1 }, d.prototype.searchRemoveChoice = function(a, b) { this.trigger("unselect", { data: b }), this.$search.val(b.text), this.handleSearch() }, d.prototype.resizeSearch = function() { this.$search.css("width", "25px"); var a = ""; if ("" !== this.$search.attr("placeholder")) a = this.$selection.find(".select2-selection__rendered").innerWidth(); else { var b = this.$search.val().length + 1; a = .75 * b + "em" } this.$search.css("width", a) }, d }), b.define("select2/selection/eventRelay", ["jquery"], function(a) { function b() {} return b.prototype.bind = function(b, c, d) { var e = this, f = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting"], g = ["opening", "closing", "selecting", "unselecting"]; b.call(this, c, d), c.on("*", function(b, c) { if (-1 !== a.inArray(b, f)) { c = c || {}; var d = a.Event("select2:" + b, { params: c }); e.$element.trigger(d), -1 !== a.inArray(b, g) && (c.prevented = d.isDefaultPrevented()) } }) }, b }), b.define("select2/translation", ["jquery", "require"], function(a, b) { function c(a) { this.dict = a || {} } return c.prototype.all = function() { return this.dict }, c.prototype.get = function(a) { return this.dict[a] }, c.prototype.extend = function(b) { this.dict = a.extend({}, b.all(), this.dict) }, c._cache = {}, c.loadPath = function(a) { if (!(a in c._cache)) { var d = b(a); c._cache[a] = d } return new c(c._cache[a]) }, c }), b.define("select2/diacritics", [], function() { var a = { "Ⓐ": "A", "A": "A", "À": "A", "Á": "A", "Â": "A", "Ầ": "A", "Ấ": "A", "Ẫ": "A", "Ẩ": "A", "Ã": "A", "Ā": "A", "Ă": "A", "Ằ": "A", "Ắ": "A", "Ẵ": "A", "Ẳ": "A", "Ȧ": "A", "Ǡ": "A", "Ä": "A", "Ǟ": "A", "Ả": "A", "Å": "A", "Ǻ": "A", "Ǎ": "A", "Ȁ": "A", "Ȃ": "A", "Ạ": "A", "Ậ": "A", "Ặ": "A", "Ḁ": "A", "Ą": "A", "Ⱥ": "A", "Ɐ": "A", "Ꜳ": "AA", "Æ": "AE", "Ǽ": "AE", "Ǣ": "AE", "Ꜵ": "AO", "Ꜷ": "AU", "Ꜹ": "AV", "Ꜻ": "AV", "Ꜽ": "AY", "Ⓑ": "B", "B": "B", "Ḃ": "B", "Ḅ": "B", "Ḇ": "B", "Ƀ": "B", "Ƃ": "B", "Ɓ": "B", "Ⓒ": "C", "C": "C", "Ć": "C", "Ĉ": "C", "Ċ": "C", "Č": "C", "Ç": "C", "Ḉ": "C", "Ƈ": "C", "Ȼ": "C", "Ꜿ": "C", "Ⓓ": "D", "D": "D", "Ḋ": "D", "Ď": "D", "Ḍ": "D", "Ḑ": "D", "Ḓ": "D", "Ḏ": "D", "Đ": "D", "Ƌ": "D", "Ɗ": "D", "Ɖ": "D", "Ꝺ": "D", "DZ": "DZ", "DŽ": "DZ", "Dz": "Dz", "Dž": "Dz", "Ⓔ": "E", "E": "E", "È": "E", "É": "E", "Ê": "E", "Ề": "E", "Ế": "E", "Ễ": "E", "Ể": "E", "Ẽ": "E", "Ē": "E", "Ḕ": "E", "Ḗ": "E", "Ĕ": "E", "Ė": "E", "Ë": "E", "Ẻ": "E", "Ě": "E", "Ȅ": "E", "Ȇ": "E", "Ẹ": "E", "Ệ": "E", "Ȩ": "E", "Ḝ": "E", "Ę": "E", "Ḙ": "E", "Ḛ": "E", "Ɛ": "E", "Ǝ": "E", "Ⓕ": "F", "F": "F", "Ḟ": "F", "Ƒ": "F", "Ꝼ": "F", "Ⓖ": "G", "G": "G", "Ǵ": "G", "Ĝ": "G", "Ḡ": "G", "Ğ": "G", "Ġ": "G", "Ǧ": "G", "Ģ": "G", "Ǥ": "G", "Ɠ": "G", "Ꞡ": "G", "Ᵹ": "G", "Ꝿ": "G", "Ⓗ": "H", "H": "H", "Ĥ": "H", "Ḣ": "H", "Ḧ": "H", "Ȟ": "H", "Ḥ": "H", "Ḩ": "H", "Ḫ": "H", "Ħ": "H", "Ⱨ": "H", "Ⱶ": "H", "Ɥ": "H", "Ⓘ": "I", "I": "I", "Ì": "I", "Í": "I", "Î": "I", "Ĩ": "I", "Ī": "I", "Ĭ": "I", "İ": "I", "Ï": "I", "Ḯ": "I", "Ỉ": "I", "Ǐ": "I", "Ȉ": "I", "Ȋ": "I", "Ị": "I", "Į": "I", "Ḭ": "I", "Ɨ": "I", "Ⓙ": "J", "J": "J", "Ĵ": "J", "Ɉ": "J", "Ⓚ": "K", "K": "K", "Ḱ": "K", "Ǩ": "K", "Ḳ": "K", "Ķ": "K", "Ḵ": "K", "Ƙ": "K", "Ⱪ": "K", "Ꝁ": "K", "Ꝃ": "K", "Ꝅ": "K", "Ꞣ": "K", "Ⓛ": "L", "L": "L", "Ŀ": "L", "Ĺ": "L", "Ľ": "L", "Ḷ": "L", "Ḹ": "L", "Ļ": "L", "Ḽ": "L", "Ḻ": "L", "Ł": "L", "Ƚ": "L", "Ɫ": "L", "Ⱡ": "L", "Ꝉ": "L", "Ꝇ": "L", "Ꞁ": "L", "LJ": "LJ", "Lj": "Lj", "Ⓜ": "M", "M": "M", "Ḿ": "M", "Ṁ": "M", "Ṃ": "M", "Ɱ": "M", "Ɯ": "M", "Ⓝ": "N", "N": "N", "Ǹ": "N", "Ń": "N", "Ñ": "N", "Ṅ": "N", "Ň": "N", "Ṇ": "N", "Ņ": "N", "Ṋ": "N", "Ṉ": "N", "Ƞ": "N", "Ɲ": "N", "Ꞑ": "N", "Ꞥ": "N", "NJ": "NJ", "Nj": "Nj", "Ⓞ": "O", "O": "O", "Ò": "O", "Ó": "O", "Ô": "O", "Ồ": "O", "Ố": "O", "Ỗ": "O", "Ổ": "O", "Õ": "O", "Ṍ": "O", "Ȭ": "O", "Ṏ": "O", "Ō": "O", "Ṑ": "O", "Ṓ": "O", "Ŏ": "O", "Ȯ": "O", "Ȱ": "O", "Ö": "O", "Ȫ": "O", "Ỏ": "O", "Ő": "O", "Ǒ": "O", "Ȍ": "O", "Ȏ": "O", "Ơ": "O", "Ờ": "O", "Ớ": "O", "Ỡ": "O", "Ở": "O", "Ợ": "O", "Ọ": "O", "Ộ": "O", "Ǫ": "O", "Ǭ": "O", "Ø": "O", "Ǿ": "O", "Ɔ": "O", "Ɵ": "O", "Ꝋ": "O", "Ꝍ": "O", "Ƣ": "OI", "Ꝏ": "OO", "Ȣ": "OU", "Ⓟ": "P", "P": "P", "Ṕ": "P", "Ṗ": "P", "Ƥ": "P", "Ᵽ": "P", "Ꝑ": "P", "Ꝓ": "P", "Ꝕ": "P", "Ⓠ": "Q", "Q": "Q", "Ꝗ": "Q", "Ꝙ": "Q", "Ɋ": "Q", "Ⓡ": "R", "R": "R", "Ŕ": "R", "Ṙ": "R", "Ř": "R", "Ȑ": "R", "Ȓ": "R", "Ṛ": "R", "Ṝ": "R", "Ŗ": "R", "Ṟ": "R", "Ɍ": "R", "Ɽ": "R", "Ꝛ": "R", "Ꞧ": "R", "Ꞃ": "R", "Ⓢ": "S", "S": "S", "ẞ": "S", "Ś": "S", "Ṥ": "S", "Ŝ": "S", "Ṡ": "S", "Š": "S", "Ṧ": "S", "Ṣ": "S", "Ṩ": "S", "Ș": "S", "Ş": "S", "Ȿ": "S", "Ꞩ": "S", "Ꞅ": "S", "Ⓣ": "T", "T": "T", "Ṫ": "T", "Ť": "T", "Ṭ": "T", "Ț": "T", "Ţ": "T", "Ṱ": "T", "Ṯ": "T", "Ŧ": "T", "Ƭ": "T", "Ʈ": "T", "Ⱦ": "T", "Ꞇ": "T", "Ꜩ": "TZ", "Ⓤ": "U", "U": "U", "Ù": "U", "Ú": "U", "Û": "U", "Ũ": "U", "Ṹ": "U", "Ū": "U", "Ṻ": "U", "Ŭ": "U", "Ü": "U", "Ǜ": "U", "Ǘ": "U", "Ǖ": "U", "Ǚ": "U", "Ủ": "U", "Ů": "U", "Ű": "U", "Ǔ": "U", "Ȕ": "U", "Ȗ": "U", "Ư": "U", "Ừ": "U", "Ứ": "U", "Ữ": "U", "Ử": "U", "Ự": "U", "Ụ": "U", "Ṳ": "U", "Ų": "U", "Ṷ": "U", "Ṵ": "U", "Ʉ": "U", "Ⓥ": "V", "V": "V", "Ṽ": "V", "Ṿ": "V", "Ʋ": "V", "Ꝟ": "V", "Ʌ": "V", "Ꝡ": "VY", "Ⓦ": "W", "W": "W", "Ẁ": "W", "Ẃ": "W", "Ŵ": "W", "Ẇ": "W", "Ẅ": "W", "Ẉ": "W", "Ⱳ": "W", "Ⓧ": "X", "X": "X", "Ẋ": "X", "Ẍ": "X", "Ⓨ": "Y", "Y": "Y", "Ỳ": "Y", "Ý": "Y", "Ŷ": "Y", "Ỹ": "Y", "Ȳ": "Y", "Ẏ": "Y", "Ÿ": "Y", "Ỷ": "Y", "Ỵ": "Y", "Ƴ": "Y", "Ɏ": "Y", "Ỿ": "Y", "Ⓩ": "Z", "Z": "Z", "Ź": "Z", "Ẑ": "Z", "Ż": "Z", "Ž": "Z", "Ẓ": "Z", "Ẕ": "Z", "Ƶ": "Z", "Ȥ": "Z", "Ɀ": "Z", "Ⱬ": "Z", "Ꝣ": "Z", "ⓐ": "a", "a": "a", "ẚ": "a", "à": "a", "á": "a", "â": "a", "ầ": "a", "ấ": "a", "ẫ": "a", "ẩ": "a", "ã": "a", "ā": "a", "ă": "a", "ằ": "a", "ắ": "a", "ẵ": "a", "ẳ": "a", "ȧ": "a", "ǡ": "a", "ä": "a", "ǟ": "a", "ả": "a", "å": "a", "ǻ": "a", "ǎ": "a", "ȁ": "a", "ȃ": "a", "ạ": "a", "ậ": "a", "ặ": "a", "ḁ": "a", "ą": "a", "ⱥ": "a", "ɐ": "a", "ꜳ": "aa", "æ": "ae", "ǽ": "ae", "ǣ": "ae", "ꜵ": "ao", "ꜷ": "au", "ꜹ": "av", "ꜻ": "av", "ꜽ": "ay", "ⓑ": "b", "b": "b", "ḃ": "b", "ḅ": "b", "ḇ": "b", "ƀ": "b", "ƃ": "b", "ɓ": "b", "ⓒ": "c", "c": "c", "ć": "c", "ĉ": "c", "ċ": "c", "č": "c", "ç": "c", "ḉ": "c", "ƈ": "c", "ȼ": "c", "ꜿ": "c", "ↄ": "c", "ⓓ": "d", "d": "d", "ḋ": "d", "ď": "d", "ḍ": "d", "ḑ": "d", "ḓ": "d", "ḏ": "d", "đ": "d", "ƌ": "d", "ɖ": "d", "ɗ": "d", "ꝺ": "d", "dz": "dz", "dž": "dz", "ⓔ": "e", "e": "e", "è": "e", "é": "e", "ê": "e", "ề": "e", "ế": "e", "ễ": "e", "ể": "e", "ẽ": "e", "ē": "e", "ḕ": "e", "ḗ": "e", "ĕ": "e", "ė": "e", "ë": "e", "ẻ": "e", "ě": "e", "ȅ": "e", "ȇ": "e", "ẹ": "e", "ệ": "e", "ȩ": "e", "ḝ": "e", "ę": "e", "ḙ": "e", "ḛ": "e", "ɇ": "e", "ɛ": "e", "ǝ": "e", "ⓕ": "f", "f": "f", "ḟ": "f", "ƒ": "f", "ꝼ": "f", "ⓖ": "g", "g": "g", "ǵ": "g", "ĝ": "g", "ḡ": "g", "ğ": "g", "ġ": "g", "ǧ": "g", "ģ": "g", "ǥ": "g", "ɠ": "g", "ꞡ": "g", "ᵹ": "g", "ꝿ": "g", "ⓗ": "h", "h": "h", "ĥ": "h", "ḣ": "h", "ḧ": "h", "ȟ": "h", "ḥ": "h", "ḩ": "h", "ḫ": "h", "ẖ": "h", "ħ": "h", "ⱨ": "h", "ⱶ": "h", "ɥ": "h", "ƕ": "hv", "ⓘ": "i", "i": "i", "ì": "i", "í": "i", "î": "i", "ĩ": "i", "ī": "i", "ĭ": "i", "ï": "i", "ḯ": "i", "ỉ": "i", "ǐ": "i", "ȉ": "i", "ȋ": "i", "ị": "i", "į": "i", "ḭ": "i", "ɨ": "i", "ı": "i", "ⓙ": "j", "j": "j", "ĵ": "j", "ǰ": "j", "ɉ": "j", "ⓚ": "k", "k": "k", "ḱ": "k", "ǩ": "k", "ḳ": "k", "ķ": "k", "ḵ": "k", "ƙ": "k", "ⱪ": "k", "ꝁ": "k", "ꝃ": "k", "ꝅ": "k", "ꞣ": "k", "ⓛ": "l", "l": "l", "ŀ": "l", "ĺ": "l", "ľ": "l", "ḷ": "l", "ḹ": "l", "ļ": "l", "ḽ": "l", "ḻ": "l", "ſ": "l", "ł": "l", "ƚ": "l", "ɫ": "l", "ⱡ": "l", "ꝉ": "l", "ꞁ": "l", "ꝇ": "l", "lj": "lj", "ⓜ": "m", "m": "m", "ḿ": "m", "ṁ": "m", "ṃ": "m", "ɱ": "m", "ɯ": "m", "ⓝ": "n", "n": "n", "ǹ": "n", "ń": "n", "ñ": "n", "ṅ": "n", "ň": "n", "ṇ": "n", "ņ": "n", "ṋ": "n", "ṉ": "n", "ƞ": "n", "ɲ": "n", "ʼn": "n", "ꞑ": "n", "ꞥ": "n", "nj": "nj", "ⓞ": "o", "o": "o", "ò": "o", "ó": "o", "ô": "o", "ồ": "o", "ố": "o", "ỗ": "o", "ổ": "o", "õ": "o", "ṍ": "o", "ȭ": "o", "ṏ": "o", "ō": "o", "ṑ": "o", "ṓ": "o", "ŏ": "o", "ȯ": "o", "ȱ": "o", "ö": "o", "ȫ": "o", "ỏ": "o", "ő": "o", "ǒ": "o", "ȍ": "o", "ȏ": "o", "ơ": "o", "ờ": "o", "ớ": "o", "ỡ": "o", "ở": "o", "ợ": "o", "ọ": "o", "ộ": "o", "ǫ": "o", "ǭ": "o", "ø": "o", "ǿ": "o", "ɔ": "o", "ꝋ": "o", "ꝍ": "o", "ɵ": "o", "ƣ": "oi", "ȣ": "ou", "ꝏ": "oo", "ⓟ": "p", "p": "p", "ṕ": "p", "ṗ": "p", "ƥ": "p", "ᵽ": "p", "ꝑ": "p", "ꝓ": "p", "ꝕ": "p", "ⓠ": "q", "q": "q", "ɋ": "q", "ꝗ": "q", "ꝙ": "q", "ⓡ": "r", "r": "r", "ŕ": "r", "ṙ": "r", "ř": "r", "ȑ": "r", "ȓ": "r", "ṛ": "r", "ṝ": "r", "ŗ": "r", "ṟ": "r", "ɍ": "r", "ɽ": "r", "ꝛ": "r", "ꞧ": "r", "ꞃ": "r", "ⓢ": "s", "s": "s", "ß": "s", "ś": "s", "ṥ": "s", "ŝ": "s", "ṡ": "s", "š": "s", "ṧ": "s", "ṣ": "s", "ṩ": "s", "ș": "s", "ş": "s", "ȿ": "s", "ꞩ": "s", "ꞅ": "s", "ẛ": "s", "ⓣ": "t", "t": "t", "ṫ": "t", "ẗ": "t", "ť": "t", "ṭ": "t", "ț": "t", "ţ": "t", "ṱ": "t", "ṯ": "t", "ŧ": "t", "ƭ": "t", "ʈ": "t", "ⱦ": "t", "ꞇ": "t", "ꜩ": "tz", "ⓤ": "u", "u": "u", "ù": "u", "ú": "u", "û": "u", "ũ": "u", "ṹ": "u", "ū": "u", "ṻ": "u", "ŭ": "u", "ü": "u", "ǜ": "u", "ǘ": "u", "ǖ": "u", "ǚ": "u", "ủ": "u", "ů": "u", "ű": "u", "ǔ": "u", "ȕ": "u", "ȗ": "u", "ư": "u", "ừ": "u", "ứ": "u", "ữ": "u", "ử": "u", "ự": "u", "ụ": "u", "ṳ": "u", "ų": "u", "ṷ": "u", "ṵ": "u", "ʉ": "u", "ⓥ": "v", "v": "v", "ṽ": "v", "ṿ": "v", "ʋ": "v", "ꝟ": "v", "ʌ": "v", "ꝡ": "vy", "ⓦ": "w", "w": "w", "ẁ": "w", "ẃ": "w", "ŵ": "w", "ẇ": "w", "ẅ": "w", "ẘ": "w", "ẉ": "w", "ⱳ": "w", "ⓧ": "x", "x": "x", "ẋ": "x", "ẍ": "x", "ⓨ": "y", "y": "y", "ỳ": "y", "ý": "y", "ŷ": "y", "ỹ": "y", "ȳ": "y", "ẏ": "y", "ÿ": "y", "ỷ": "y", "ẙ": "y", "ỵ": "y", "ƴ": "y", "ɏ": "y", "ỿ": "y", "ⓩ": "z", "z": "z", "ź": "z", "ẑ": "z", "ż": "z", "ž": "z", "ẓ": "z", "ẕ": "z", "ƶ": "z", "ȥ": "z", "ɀ": "z", "ⱬ": "z", "ꝣ": "z", "Ά": "Α", "Έ": "Ε", "Ή": "Η", "Ί": "Ι", "Ϊ": "Ι", "Ό": "Ο", "Ύ": "Υ", "Ϋ": "Υ", "Ώ": "Ω", "ά": "α", "έ": "ε", "ή": "η", "ί": "ι", "ϊ": "ι", "ΐ": "ι", "ό": "ο", "ύ": "υ", "ϋ": "υ", "ΰ": "υ", "ω": "ω", "ς": "σ" }; return a }), b.define("select2/data/base", ["../utils"], function(a) { function b(a, c) { b.__super__.constructor.call(this) } return a.Extend(b, a.Observable), b.prototype.current = function(a) { throw new Error("The `current` method must be defined in child classes.") }, b.prototype.query = function(a, b) { throw new Error("The `query` method must be defined in child classes.") }, b.prototype.bind = function(a, b) {}, b.prototype.destroy = function() {}, b.prototype.generateResultId = function(b, c) { var d = b.id + "-result-"; return d += a.generateChars(4), d += null != c.id ? "-" + c.id.toString() : "-" + a.generateChars(4) }, b }), b.define("select2/data/select", ["./base", "../utils", "jquery"], function(a, b, c) { function d(a, b) { this.$element = a, this.options = b, d.__super__.constructor.call(this) } return b.Extend(d, a), d.prototype.current = function(a) { var b = [], d = this; this.$element.find(":selected").each(function() { var a = c(this), e = d.item(a); b.push(e) }), a(b) }, d.prototype.select = function(a) { var b = this; if (a.selected = !0, c(a.element).is("option")) return a.element.selected = !0, void this.$element.trigger("change"); if (this.$element.prop("multiple")) this.current(function(d) { var e = []; a = [a], a.push.apply(a, d); for (var f = 0; f < a.length; f++) { var g = a[f].id; - 1 === c.inArray(g, e) && e.push(g) } b.$element.val(e), b.$element.trigger("change") }); else { var d = a.id; this.$element.val(d), this.$element.trigger("change") } }, d.prototype.unselect = function(a) { var b = this; if (this.$element.prop("multiple")) return a.selected = !1, c(a.element).is("option") ? (a.element.selected = !1, void this.$element.trigger("change")) : void this.current(function(d) { for (var e = [], f = 0; f < d.length; f++) { var g = d[f].id; g !== a.id && -1 === c.inArray(g, e) && e.push(g) } b.$element.val(e), b.$element.trigger("change") }) }, d.prototype.bind = function(a, b) { var c = this; this.container = a, a.on("select", function(a) { c.select(a.data) }), a.on("unselect", function(a) { c.unselect(a.data) }) }, d.prototype.destroy = function() { this.$element.find("*").each(function() { c.removeData(this, "data") }) }, d.prototype.query = function(a, b) { var d = [], e = this, f = this.$element.children(); f.each(function() { var b = c(this); if (b.is("option") || b.is("optgroup")) { var f = e.item(b), g = e.matches(a, f); null !== g && d.push(g) } }), b({ results: d }) }, d.prototype.addOptions = function(a) { b.appendMany(this.$element, a) }, d.prototype.option = function(a) { var b; a.children ? (b = document.createElement("optgroup"), b.label = a.text) : (b = document.createElement("option"), void 0 !== b.textContent ? b.textContent = a.text : b.innerText = a.text), a.id && (b.value = a.id), a.disabled && (b.disabled = !0), a.selected && (b.selected = !0), a.title && (b.title = a.title); var d = c(b), e = this._normalizeItem(a); return e.element = b, c.data(b, "data", e), d }, d.prototype.item = function(a) { var b = {}; if (b = c.data(a[0], "data"), null != b) return b; if (a.is("option")) b = { id: a.val(), text: a.text(), disabled: a.prop("disabled"), selected: a.prop("selected"), title: a.prop("title") }; else if (a.is("optgroup")) { b = { text: a.prop("label"), children: [], title: a.prop("title") }; for (var d = a.children("option"), e = [], f = 0; f < d.length; f++) { var g = c(d[f]), h = this.item(g); e.push(h) } b.children = e } return b = this._normalizeItem(b), b.element = a[0], c.data(a[0], "data", b), b }, d.prototype._normalizeItem = function(a) { c.isPlainObject(a) || (a = { id: a, text: a }), a = c.extend({}, { text: "" }, a); var b = { selected: !1, disabled: !1 }; return null != a.id && (a.id = a.id.toString()), null != a.text && (a.text = a.text.toString()), null == a._resultId && a.id && null != this.container && (a._resultId = this.generateResultId(this.container, a)), c.extend({}, b, a) }, d.prototype.matches = function(a, b) { var c = this.options.get("matcher"); return c(a, b) }, d }), b.define("select2/data/array", ["./select", "../utils", "jquery"], function(a, b, c) { function d(a, b) { var c = b.get("data") || []; d.__super__.constructor.call(this, a, b), this.addOptions(this.convertToOptions(c)) } return b.Extend(d, a), d.prototype.select = function(a) { var b = this.$element.find("option").filter(function(b, c) { return c.value == a.id.toString() }); 0 === b.length && (b = this.option(a), this.addOptions(b)), d.__super__.select.call(this, a) }, d.prototype.convertToOptions = function(a) { function d(a) { return function() { return c(this).val() == a.id } } for (var e = this, f = this.$element.find("option"), g = f.map(function() { return e.item(c(this)).id }).get(), h = [], i = 0; i < a.length; i++) { var j = this._normalizeItem(a[i]); if (c.inArray(j.id, g) >= 0) { var k = f.filter(d(j)), l = this.item(k), m = c.extend(!0, {}, j, l), n = this.option(m); k.replaceWith(n) } else { var o = this.option(j); if (j.children) { var p = this.convertToOptions(j.children); b.appendMany(o, p) } h.push(o) } } return h }, d }), b.define("select2/data/ajax", ["./array", "../utils", "jquery"], function(a, b, c) { function d(a, b) { this.ajaxOptions = this._applyDefaults(b.get("ajax")), null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults), d.__super__.constructor.call(this, a, b) } return b.Extend(d, a), d.prototype._applyDefaults = function(a) { var b = { data: function(a) { return c.extend({}, a, { q: a.term }) }, transport: function(a, b, d) { var e = c.ajax(a); return e.then(b), e.fail(d), e } }; return c.extend({}, b, a, !0) }, d.prototype.processResults = function(a) { return a }, d.prototype.query = function(a, b) { function d() { var d = f.transport(f, function(d) { var f = e.processResults(d, a); e.options.get("debug") && window.console && console.error && (f && f.results && c.isArray(f.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")), b(f) }, function() { e.trigger("results:message", { message: "errorLoading" }) }); e._request = d } var e = this; null != this._request && (c.isFunction(this._request.abort) && this._request.abort(), this._request = null); var f = c.extend({ type: "GET" }, this.ajaxOptions); "function" == typeof f.url && (f.url = f.url.call(this.$element, a)), "function" == typeof f.data && (f.data = f.data.call(this.$element, a)), this.ajaxOptions.delay && "" !== a.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout), this._queryTimeout = window.setTimeout(d, this.ajaxOptions.delay)) : d() }, d }), b.define("select2/data/tags", ["jquery"], function(a) { function b(b, c, d) { var e = d.get("tags"), f = d.get("createTag"); void 0 !== f && (this.createTag = f); var g = d.get("insertTag"); if (void 0 !== g && (this.insertTag = g), b.call(this, c, d), a.isArray(e)) for (var h = 0; h < e.length; h++) { var i = e[h], j = this._normalizeItem(i), k = this.option(j); this.$element.append(k) } } return b.prototype.query = function(a, b, c) { function d(a, f) { for (var g = a.results, h = 0; h < g.length; h++) { var i = g[h], j = null != i.children && !d({ results: i.children }, !0), k = i.text === b.term; if (k || j) return f ? !1 : (a.data = g, void c(a)) } if (f) return !0; var l = e.createTag(b); if (null != l) { var m = e.option(l); m.attr("data-select2-tag", !0), e.addOptions([m]), e.insertTag(g, l) } a.results = g, c(a) } var e = this; return this._removeOldTags(), null == b.term || null != b.page ? void a.call(this, b, c) : void a.call(this, b, d) }, b.prototype.createTag = function(b, c) { var d = a.trim(c.term); return "" === d ? null : { id: d, text: d } }, b.prototype.insertTag = function(a, b, c) { b.unshift(c) }, b.prototype._removeOldTags = function(b) { var c = (this._lastTag, this.$element.find("option[data-select2-tag]")); c.each(function() { this.selected || a(this).remove() }) }, b }), b.define("select2/data/tokenizer", ["jquery"], function(a) { function b(a, b, c) { var d = c.get("tokenizer"); void 0 !== d && (this.tokenizer = d), a.call(this, b, c) } return b.prototype.bind = function(a, b, c) { a.call(this, b, c), this.$search = b.dropdown.$search || b.selection.$search || c.find(".select2-search__field") }, b.prototype.query = function(a, b, c) { function d(a) { e.trigger("select", { data: a }) } var e = this; b.term = b.term || ""; var f = this.tokenizer(b, this.options, d); f.term !== b.term && (this.$search.length && (this.$search.val(f.term), this.$search.focus()), b.term = f.term), a.call(this, b, c) }, b.prototype.tokenizer = function(b, c, d, e) { for (var f = d.get("tokenSeparators") || [], g = c.term, h = 0, i = this.createTag || function(a) { return { id: a.term, text: a.term } }; h < g.length;) { var j = g[h]; if (-1 !== a.inArray(j, f)) { var k = g.substr(0, h), l = a.extend({}, c, { term: k }), m = i(l); null != m ? (e(m), g = g.substr(h + 1) || "", h = 0) : h++ } else h++ } return { term: g } }, b }), b.define("select2/data/minimumInputLength", [], function() { function a(a, b, c) { this.minimumInputLength = c.get("minimumInputLength"), a.call(this, b, c) } return a.prototype.query = function(a, b, c) { return b.term = b.term || "", b.term.length < this.minimumInputLength ? void this.trigger("results:message", { message: "inputTooShort", args: { minimum: this.minimumInputLength, input: b.term, params: b } }) : void a.call(this, b, c) }, a }), b.define("select2/data/maximumInputLength", [], function() { function a(a, b, c) { this.maximumInputLength = c.get("maximumInputLength"), a.call(this, b, c) } return a.prototype.query = function(a, b, c) { return b.term = b.term || "", this.maximumInputLength > 0 && b.term.length > this.maximumInputLength ? void this.trigger("results:message", { message: "inputTooLong", args: { maximum: this.maximumInputLength, input: b.term, params: b } }) : void a.call(this, b, c) }, a }), b.define("select2/data/maximumSelectionLength", [], function() { function a(a, b, c) { this.maximumSelectionLength = c.get("maximumSelectionLength"), a.call(this, b, c) } return a.prototype.query = function(a, b, c) { var d = this; this.current(function(e) { var f = null != e ? e.length : 0; return d.maximumSelectionLength > 0 && f >= d.maximumSelectionLength ? void d.trigger("results:message", { message: "maximumSelected", args: { maximum: d.maximumSelectionLength } }) : void a.call(d, b, c) }) }, a }), b.define("select2/dropdown", ["jquery", "./utils"], function(a, b) { function c(a, b) { this.$element = a, this.options = b, c.__super__.constructor.call(this) } return b.Extend(c, b.Observable), c.prototype.render = function() { var b = a(''); return b.attr("dir", this.options.get("dir")), this.$dropdown = b, b }, c.prototype.bind = function() {}, c.prototype.position = function(a, b) {}, c.prototype.destroy = function() { this.$dropdown.remove() }, c }), b.define("select2/dropdown/search", ["jquery", "../utils"], function(a, b) { function c() {} return c.prototype.render = function(b) { var c = b.call(this), d = a(''); return this.$searchContainer = d, this.$search = d.find("input"), c.prepend(d), c }, c.prototype.bind = function(b, c, d) { var e = this; b.call(this, c, d), this.$search.on("keydown", function(a) { e.trigger("keypress", a), e._keyUpPrevented = a.isDefaultPrevented() }), this.$search.on("input", function(b) { a(this).off("keyup") }), this.$search.on("keyup input", function(a) { e.handleSearch(a) }), c.on("open", function() { e.$search.attr("tabindex", 0), e.$search.focus(), window.setTimeout(function() { e.$search.focus() }, 0) }), c.on("close", function() { e.$search.attr("tabindex", -1), e.$search.val("") }), c.on("results:all", function(a) { if (null == a.query.term || "" === a.query.term) { var b = e.showSearch(a); b ? e.$searchContainer.removeClass("select2-search--hide") : e.$searchContainer.addClass("select2-search--hide") } }) }, c.prototype.handleSearch = function(a) { if (!this._keyUpPrevented) { var b = this.$search.val(); this.trigger("query", { term: b }) } this._keyUpPrevented = !1 }, c.prototype.showSearch = function(a, b) { return !0 }, c }), b.define("select2/dropdown/hidePlaceholder", [], function() { function a(a, b, c, d) { this.placeholder = this.normalizePlaceholder(c.get("placeholder")), a.call(this, b, c, d) } return a.prototype.append = function(a, b) { b.results = this.removePlaceholder(b.results), a.call(this, b) }, a.prototype.normalizePlaceholder = function(a, b) { return "string" == typeof b && (b = { id: "", text: b }), b }, a.prototype.removePlaceholder = function(a, b) { for (var c = b.slice(0), d = b.length - 1; d >= 0; d--) { var e = b[d]; this.placeholder.id === e.id && c.splice(d, 1) } return c }, a }), b.define("select2/dropdown/infiniteScroll", ["jquery"], function(a) { function b(a, b, c, d) { this.lastParams = {}, a.call(this, b, c, d), this.$loadingMore = this.createLoadingMore(), this.loading = !1 } return b.prototype.append = function(a, b) { this.$loadingMore.remove(), this.loading = !1, a.call(this, b), this.showLoadingMore(b) && this.$results.append(this.$loadingMore) }, b.prototype.bind = function(b, c, d) { var e = this; b.call(this, c, d), c.on("query", function(a) { e.lastParams = a, e.loading = !0 }), c.on("query:append", function(a) { e.lastParams = a, e.loading = !0 }), this.$results.on("scroll", function() { var b = a.contains(document.documentElement, e.$loadingMore[0]); if (!e.loading && b) { var c = e.$results.offset().top + e.$results.outerHeight(!1), d = e.$loadingMore.offset().top + e.$loadingMore.outerHeight(!1); c + 50 >= d && e.loadMore() } }) }, b.prototype.loadMore = function() { this.loading = !0; var b = a.extend({}, { page: 1 }, this.lastParams); b.page++, this.trigger("query:append", b) }, b.prototype.showLoadingMore = function(a, b) { return b.pagination && b.pagination.more }, b.prototype.createLoadingMore = function() { var b = a('
      • '), c = this.options.get("translations").get("loadingMore"); return b.html(c(this.lastParams)), b }, b }), b.define("select2/dropdown/attachBody", ["jquery", "../utils"], function(a, b) { function c(b, c, d) { this.$dropdownParent = d.get("dropdownParent") || a(document.body), b.call(this, c, d) } return c.prototype.bind = function(a, b, c) { var d = this, e = !1; a.call(this, b, c), b.on("open", function() { d._showDropdown(), d._attachPositioningHandler(b), e || (e = !0, b.on("results:all", function() { d._positionDropdown(), d._resizeDropdown() }), b.on("results:append", function() { d._positionDropdown(), d._resizeDropdown() })) }), b.on("close", function() { d._hideDropdown(), d._detachPositioningHandler(b) }), this.$dropdownContainer.on("mousedown", function(a) { a.stopPropagation() }) }, c.prototype.destroy = function(a) { a.call(this), this.$dropdownContainer.remove() }, c.prototype.position = function(a, b, c) { b.attr("class", c.attr("class")), b.removeClass("select2"), b.addClass("select2-container--open"), b.css({ position: "absolute", top: -999999 }), this.$container = c }, c.prototype.render = function(b) { var c = a(""), d = b.call(this); return c.append(d), this.$dropdownContainer = c, c }, c.prototype._hideDropdown = function(a) { this.$dropdownContainer.detach() }, c.prototype._attachPositioningHandler = function(c, d) { var e = this, f = "scroll.select2." + d.id, g = "resize.select2." + d.id, h = "orientationchange.select2." + d.id, i = this.$container.parents().filter(b.hasScroll); i.each(function() { a(this).data("select2-scroll-position", { x: a(this).scrollLeft(), y: a(this).scrollTop() }) }), i.on(f, function(b) { var c = a(this).data("select2-scroll-position"); a(this).scrollTop(c.y) }), a(window).on(f + " " + g + " " + h, function(a) { e._positionDropdown(), e._resizeDropdown() }) }, c.prototype._detachPositioningHandler = function(c, d) { var e = "scroll.select2." + d.id, f = "resize.select2." + d.id, g = "orientationchange.select2." + d.id, h = this.$container.parents().filter(b.hasScroll); h.off(e), a(window).off(e + " " + f + " " + g) }, c.prototype._positionDropdown = function() { var b = a(window), c = this.$dropdown.hasClass("select2-dropdown--above"), d = this.$dropdown.hasClass("select2-dropdown--below"), e = null, f = this.$container.offset(); f.bottom = f.top + this.$container.outerHeight(!1); var g = { height: this.$container.outerHeight(!1) }; g.top = f.top, g.bottom = f.top + g.height; var h = { height: this.$dropdown.outerHeight(!1) }, i = { top: b.scrollTop(), bottom: b.scrollTop() + b.height() }, j = i.top < f.top - h.height, k = i.bottom > f.bottom + h.height, l = { left: f.left, top: g.bottom }, m = this.$dropdownParent; "static" === m.css("position") && (m = m.offsetParent()); var n = m.offset(); l.top -= n.top, l.left -= n.left, c || d || (e = "below"), k || !j || c ? !j && k && c && (e = "below") : e = "above", ("above" == e || c && "below" !== e) && (l.top = g.top - h.height), null != e && (this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--" + e), this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--" + e)), this.$dropdownContainer.css(l) }, c.prototype._resizeDropdown = function() { var a = { width: this.$container.outerWidth(!1) + "px" }; this.options.get("dropdownAutoWidth") && (a.minWidth = a.width, a.width = "auto"), this.$dropdown.css(a) }, c.prototype._showDropdown = function(a) { this.$dropdownContainer.appendTo(this.$dropdownParent), this._positionDropdown(), this._resizeDropdown() }, c }), b.define("select2/dropdown/minimumResultsForSearch", [], function() { function a(b) { for (var c = 0, d = 0; d < b.length; d++) { var e = b[d]; e.children ? c += a(e.children) : c++ } return c } function b(a, b, c, d) { this.minimumResultsForSearch = c.get("minimumResultsForSearch"), this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0), a.call(this, b, c, d) } return b.prototype.showSearch = function(b, c) { return a(c.data.results) < this.minimumResultsForSearch ? !1 : b.call(this, c) }, b }), b.define("select2/dropdown/selectOnClose", [], function() { function a() {} return a.prototype.bind = function(a, b, c) { var d = this; a.call(this, b, c), b.on("close", function() { d._handleSelectOnClose() }) }, a.prototype._handleSelectOnClose = function() { var a = this.getHighlightedResults(); if (!(a.length < 1)) { var b = a.data("data"); null != b.element && b.element.selected || null == b.element && b.selected || this.trigger("select", { data: b }) } }, a }), b.define("select2/dropdown/closeOnSelect", [], function() { function a() {} return a.prototype.bind = function(a, b, c) { var d = this; a.call(this, b, c), b.on("select", function(a) { d._selectTriggered(a) }), b.on("unselect", function(a) { d._selectTriggered(a) }) }, a.prototype._selectTriggered = function(a, b) { var c = b.originalEvent; c && c.ctrlKey || this.trigger("close", {}) }, a }), b.define("select2/i18n/en", [], function() { return { errorLoading: function() { return "The results could not be loaded." }, inputTooLong: function(a) { var b = a.input.length - a.maximum, c = "Please delete " + b + " character"; return 1 != b && (c += "s"), c }, inputTooShort: function(a) { var b = a.minimum - a.input.length, c = "Please enter " + b + " or more characters"; return c }, loadingMore: function() { return "Loading more results…" }, maximumSelected: function(a) { var b = "You can only select " + a.maximum + " item"; return 1 != a.maximum && (b += "s"), b }, noResults: function() { return "No results found" }, searching: function() { return "Searching…" } } }), b.define("select2/defaults", ["jquery", "require", "./results", "./selection/single", "./selection/multiple", "./selection/placeholder", "./selection/allowClear", "./selection/search", "./selection/eventRelay", "./utils", "./translation", "./diacritics", "./data/select", "./data/array", "./data/ajax", "./data/tags", "./data/tokenizer", "./data/minimumInputLength", "./data/maximumInputLength", "./data/maximumSelectionLength", "./dropdown", "./dropdown/search", "./dropdown/hidePlaceholder", "./dropdown/infiniteScroll", "./dropdown/attachBody", "./dropdown/minimumResultsForSearch", "./dropdown/selectOnClose", "./dropdown/closeOnSelect", "./i18n/en"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C) { function D() { this.reset() } D.prototype.apply = function(l) { if (l = a.extend(!0, {}, this.defaults, l), null == l.dataAdapter) { if (null != l.ajax ? l.dataAdapter = o : null != l.data ? l.dataAdapter = n : l.dataAdapter = m, l.minimumInputLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, r)), l.maximumInputLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, s)), l.maximumSelectionLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, t)), l.tags && (l.dataAdapter = j.Decorate(l.dataAdapter, p)), (null != l.tokenSeparators || null != l.tokenizer) && (l.dataAdapter = j.Decorate(l.dataAdapter, q)), null != l.query) { var C = b(l.amdBase + "compat/query"); l.dataAdapter = j.Decorate(l.dataAdapter, C) } if (null != l.initSelection) { var D = b(l.amdBase + "compat/initSelection"); l.dataAdapter = j.Decorate(l.dataAdapter, D) } } if (null == l.resultsAdapter && (l.resultsAdapter = c, null != l.ajax && (l.resultsAdapter = j.Decorate(l.resultsAdapter, x)), null != l.placeholder && (l.resultsAdapter = j.Decorate(l.resultsAdapter, w)), l.selectOnClose && (l.resultsAdapter = j.Decorate(l.resultsAdapter, A))), null == l.dropdownAdapter) { if (l.multiple) l.dropdownAdapter = u; else { var E = j.Decorate(u, v); l.dropdownAdapter = E } if (0 !== l.minimumResultsForSearch && (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, z)), l.closeOnSelect && (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, B)), null != l.dropdownCssClass || null != l.dropdownCss || null != l.adaptDropdownCssClass) { var F = b(l.amdBase + "compat/dropdownCss"); l.dropdownAdapter = j.Decorate(l.dropdownAdapter, F) } l.dropdownAdapter = j.Decorate(l.dropdownAdapter, y) } if (null == l.selectionAdapter) { if (l.multiple ? l.selectionAdapter = e : l.selectionAdapter = d, null != l.placeholder && (l.selectionAdapter = j.Decorate(l.selectionAdapter, f)), l.allowClear && (l.selectionAdapter = j.Decorate(l.selectionAdapter, g)), l.multiple && (l.selectionAdapter = j.Decorate(l.selectionAdapter, h)), null != l.containerCssClass || null != l.containerCss || null != l.adaptContainerCssClass) { var G = b(l.amdBase + "compat/containerCss"); l.selectionAdapter = j.Decorate(l.selectionAdapter, G) } l.selectionAdapter = j.Decorate(l.selectionAdapter, i) } if ("string" == typeof l.language) if (l.language.indexOf("-") > 0) { var H = l.language.split("-"), I = H[0]; l.language = [l.language, I] } else l.language = [l.language]; if (a.isArray(l.language)) { var J = new k; l.language.push("en"); for (var K = l.language, L = 0; L < K.length; L++) { var M = K[L], N = {}; try { N = k.loadPath(M) } catch (O) { try { M = this.defaults.amdLanguageBase + M, N = k.loadPath(M) } catch (P) { l.debug && window.console && console.warn && console.warn('Select2: The language file for "' + M + '" could not be automatically loaded. A fallback will be used instead.'); continue } } J.extend(N) } l.translations = J } else { var Q = k.loadPath(this.defaults.amdLanguageBase + "en"), R = new k(l.language); R.extend(Q), l.translations = R } return l }, D.prototype.reset = function() { function b(a) { function b(a) { return l[a] || a } return a.replace(/[^\u0000-\u007E]/g, b) } function c(d, e) { if ("" === a.trim(d.term)) return e; if (e.children && e.children.length > 0) { for (var f = a.extend(!0, {}, e), g = e.children.length - 1; g >= 0; g--) { var h = e.children[g], i = c(d, h); null == i && f.children.splice(g, 1) } return f.children.length > 0 ? f : c(d, f) } var j = b(e.text).toUpperCase(), k = b(d.term).toUpperCase(); return j.indexOf(k) > -1 ? e : null } this.defaults = { amdBase: "./", amdLanguageBase: "./i18n/", closeOnSelect: !0, debug: !1, dropdownAutoWidth: !1, escapeMarkup: j.escapeMarkup, language: C, matcher: c, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: !1, sorter: function(a) { return a }, templateResult: function(a) { return a.text }, templateSelection: function(a) { return a.text }, theme: "default", width: "resolve" } }, D.prototype.set = function(b, c) { var d = a.camelCase(b), e = {}; e[d] = c; var f = j._convertData(e); a.extend(this.defaults, f) }; var E = new D; return E }), b.define("select2/options", ["require", "jquery", "./defaults", "./utils"], function(a, b, c, d) { function e(b, e) { if (this.options = b, null != e && this.fromElement(e), this.options = c.apply(this.options), e && e.is("input")) { var f = a(this.get("amdBase") + "compat/inputData"); this.options.dataAdapter = d.Decorate(this.options.dataAdapter, f) } } return e.prototype.fromElement = function(a) { var c = ["select2"]; null == this.options.multiple && (this.options.multiple = a.prop("multiple")), null == this.options.disabled && (this.options.disabled = a.prop("disabled")), null == this.options.language && (a.prop("lang") ? this.options.language = a.prop("lang").toLowerCase() : a.closest("[lang]").prop("lang") && (this.options.language = a.closest("[lang]").prop("lang"))), null == this.options.dir && (a.prop("dir") ? this.options.dir = a.prop("dir") : a.closest("[dir]").prop("dir") ? this.options.dir = a.closest("[dir]").prop("dir") : this.options.dir = "ltr"), a.prop("disabled", this.options.disabled), a.prop("multiple", this.options.multiple), a.data("select2Tags") && (this.options.debug && window.console && console.warn && console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'), a.data("data", a.data("select2Tags")), a.data("tags", !0)), a.data("ajaxUrl") && (this.options.debug && window.console && console.warn && console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."), a.attr("ajax--url", a.data("ajaxUrl")), a.data("ajax--url", a.data("ajaxUrl"))); var e = {}; e = b.fn.jquery && "1." == b.fn.jquery.substr(0, 2) && a[0].dataset ? b.extend(!0, {}, a[0].dataset, a.data()) : a.data(); var f = b.extend(!0, {}, e); f = d._convertData(f); for (var g in f) b.inArray(g, c) > -1 || (b.isPlainObject(this.options[g]) ? b.extend(this.options[g], f[g]) : this.options[g] = f[g]); return this }, e.prototype.get = function(a) { return this.options[a] }, e.prototype.set = function(a, b) { this.options[a] = b }, e }), b.define("select2/core", ["jquery", "./options", "./utils", "./keys"], function(a, b, c, d) { var e = function(a, c) { null != a.data("select2") && a.data("select2").destroy(), this.$element = a, this.id = this._generateId(a), c = c || {}, this.options = new b(c, a), e.__super__.constructor.call(this); var d = a.attr("tabindex") || 0; a.data("old-tabindex", d), a.attr("tabindex", "-1"); var f = this.options.get("dataAdapter"); this.dataAdapter = new f(a, this.options); var g = this.render(); this._placeContainer(g); var h = this.options.get("selectionAdapter"); this.selection = new h(a, this.options), this.$selection = this.selection.render(), this.selection.position(this.$selection, g); var i = this.options.get("dropdownAdapter"); this.dropdown = new i(a, this.options), this.$dropdown = this.dropdown.render(), this.dropdown.position(this.$dropdown, g); var j = this.options.get("resultsAdapter"); this.results = new j(a, this.options, this.dataAdapter), this.$results = this.results.render(), this.results.position(this.$results, this.$dropdown); var k = this; this._bindAdapters(), this._registerDomEvents(), this._registerDataEvents(), this._registerSelectionEvents(), this._registerDropdownEvents(), this._registerResultsEvents(), this._registerEvents(), this.dataAdapter.current(function(a) { k.trigger("selection:update", { data: a }) }), a.addClass("select2-hidden-accessible"), a.attr("aria-hidden", "true"), this._syncAttributes(), a.data("select2", this) }; return c.Extend(e, c.Observable), e.prototype._generateId = function(a) { var b = ""; return b = null != a.attr("id") ? a.attr("id") : null != a.attr("name") ? a.attr("name") + "-" + c.generateChars(2) : c.generateChars(4), b = b.replace(/(:|\.|\[|\]|,)/g, ""), b = "select2-" + b }, e.prototype._placeContainer = function(a) { a.insertAfter(this.$element); var b = this._resolveWidth(this.$element, this.options.get("width")); null != b && a.css("width", b) }, e.prototype._resolveWidth = function(a, b) { var c = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; if ("resolve" == b) { var d = this._resolveWidth(a, "style"); return null != d ? d : this._resolveWidth(a, "element") } if ("element" == b) { var e = a.outerWidth(!1); return 0 >= e ? "auto" : e + "px" } if ("style" == b) { var f = a.attr("style"); if ("string" != typeof f) return null; for (var g = f.split(";"), h = 0, i = g.length; i > h; h += 1) { var j = g[h].replace(/\s/g, ""), k = j.match(c); if (null !== k && k.length >= 1) return k[1] } return null } return b }, e.prototype._bindAdapters = function() { this.dataAdapter.bind(this, this.$container), this.selection.bind(this, this.$container), this.dropdown.bind(this, this.$container), this.results.bind(this, this.$container) }, e.prototype._registerDomEvents = function() { var b = this; this.$element.on("change.select2", function() { b.dataAdapter.current(function(a) { b.trigger("selection:update", { data: a }) }) }), this._sync = c.bind(this._syncAttributes, this), this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._sync); var d = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; null != d ? (this._observer = new d(function(c) { a.each(c, b._sync) }), this._observer.observe(this.$element[0], { attributes: !0, subtree: !1 })) : this.$element[0].addEventListener && this.$element[0].addEventListener("DOMAttrModified", b._sync, !1) }, e.prototype._registerDataEvents = function() { var a = this; this.dataAdapter.on("*", function(b, c) { a.trigger(b, c) }) }, e.prototype._registerSelectionEvents = function() { var b = this, c = ["toggle", "focus"]; this.selection.on("toggle", function() { b.toggleDropdown() }), this.selection.on("focus", function(a) { b.focus(a) }), this.selection.on("*", function(d, e) { -1 === a.inArray(d, c) && b.trigger(d, e) }) }, e.prototype._registerDropdownEvents = function() { var a = this; this.dropdown.on("*", function(b, c) { a.trigger(b, c) }) }, e.prototype._registerResultsEvents = function() { var a = this; this.results.on("*", function(b, c) { a.trigger(b, c) }) }, e.prototype._registerEvents = function() { var a = this; this.on("open", function() { a.$container.addClass("select2-container--open") }), this.on("close", function() { a.$container.removeClass("select2-container--open") }), this.on("enable", function() { a.$container.removeClass("select2-container--disabled") }), this.on("disable", function() { a.$container.addClass("select2-container--disabled") }), this.on("blur", function() { a.$container.removeClass("select2-container--focus") }), this.on("query", function(b) { a.isOpen() || a.trigger("open", {}), this.dataAdapter.query(b, function(c) { a.trigger("results:all", { data: c, query: b }) }) }), this.on("query:append", function(b) { this.dataAdapter.query(b, function(c) { a.trigger("results:append", { data: c, query: b }) }) }), this.on("keypress", function(b) { var c = b.which; a.isOpen() ? c === d.ESC || c === d.TAB || c === d.UP && b.altKey ? (a.close(), b.preventDefault()) : c === d.ENTER ? (a.trigger("results:select", {}), b.preventDefault()) : c === d.SPACE && b.ctrlKey ? (a.trigger("results:toggle", {}), b.preventDefault()) : c === d.UP ? (a.trigger("results:previous", {}), b.preventDefault()) : c === d.DOWN && (a.trigger("results:next", {}), b.preventDefault()) : (c === d.ENTER || c === d.SPACE || c === d.DOWN && b.altKey) && (a.open(), b.preventDefault()) }) }, e.prototype._syncAttributes = function() { this.options.set("disabled", this.$element.prop("disabled")), this.options.get("disabled") ? (this.isOpen() && this.close(), this.trigger("disable", {})) : this.trigger("enable", {}) }, e.prototype.trigger = function(a, b) { var c = e.__super__.trigger, d = { open: "opening", close: "closing", select: "selecting", unselect: "unselecting" }; if (void 0 === b && (b = {}), a in d) { var f = d[a], g = { prevented: !1, name: a, args: b }; if (c.call(this, f, g), g.prevented) return void(b.prevented = !0) } c.call(this, a, b) }, e.prototype.toggleDropdown = function() { this.options.get("disabled") || (this.isOpen() ? this.close() : this.open()) }, e.prototype.open = function() { this.isOpen() || this.trigger("query", {}) }, e.prototype.close = function() { this.isOpen() && this.trigger("close", {}) }, e.prototype.isOpen = function() { return this.$container.hasClass("select2-container--open") }, e.prototype.hasFocus = function() { return this.$container.hasClass("select2-container--focus") }, e.prototype.focus = function(a) { this.hasFocus() || (this.$container.addClass("select2-container--focus"), this.trigger("focus", {})) }, e.prototype.enable = function(a) { this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'), (null == a || 0 === a.length) && (a = [!0]); var b = !a[0]; this.$element.prop("disabled", b) }, e.prototype.data = function() { this.options.get("debug") && arguments.length > 0 && window.console && console.warn && console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.'); var a = []; return this.dataAdapter.current(function(b) { a = b }), a }, e.prototype.val = function(b) { if (this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'), null == b || 0 === b.length) return this.$element.val(); var c = b[0]; a.isArray(c) && (c = a.map(c, function(a) { return a.toString() })), this.$element.val(c).trigger("change") }, e.prototype.destroy = function() { this.$container.remove(), this.$element[0].detachEvent && this.$element[0].detachEvent("onpropertychange", this._sync), null != this._observer ? (this._observer.disconnect(), this._observer = null) : this.$element[0].removeEventListener && this.$element[0].removeEventListener("DOMAttrModified", this._sync, !1), this._sync = null, this.$element.off(".select2"), this.$element.attr("tabindex", this.$element.data("old-tabindex")), this.$element.removeClass("select2-hidden-accessible"), this.$element.attr("aria-hidden", "false"), this.$element.removeData("select2"), this.dataAdapter.destroy(), this.selection.destroy(), this.dropdown.destroy(), this.results.destroy(), this.dataAdapter = null, this.selection = null, this.dropdown = null, this.results = null }, e.prototype.render = function() { var b = a(''); return b.attr("dir", this.options.get("dir")), this.$container = b, this.$container.addClass("select2-container--" + this.options.get("theme")), b.data("element", this.$element), b }, e }), b.define("jquery-mousewheel", ["jquery"], function(a) { return a }), b.define("jquery.select2", ["jquery", "jquery-mousewheel", "./select2/core", "./select2/defaults"], function(a, b, c, d) { if (null == a.fn.select2) { var e = ["open", "close", "destroy"]; a.fn.select2 = function(b) { if (b = b || {}, "object" == typeof b) return this.each(function() { var d = a.extend(!0, {}, b); new c(a(this), d) }), this; if ("string" == typeof b) { var d; return this.each(function() { var c = a(this).data("select2"); null == c && window.console && console.error && console.error("The select2('" + b + "') method was called on an element that is not using Select2."); var e = Array.prototype.slice.call(arguments, 1); d = c[b].apply(c, e) }), a.inArray(b, e) > -1 ? this : d } throw new Error("Invalid arguments for Select2: " + b) } } return null == a.fn.select2.defaults && (a.fn.select2.defaults = d), c }), { define: b.define, require: b.require } }(), c = b.require("jquery.select2"); return a.fn.select2.amd = b, c }); /** * @module RD-Google Map * @author Evgeniy Gusarov * @see https://ua.linkedin.com/pub/evgeniy-gusarov/8a/a40/54a * @version 0.1.5 */ ! function(a) { "use strict"; var t = { cntClass: "map", mapClass: "map_model", locationsClass: "map_locations", marker: { basic: "images/gmap_marker.png", active: "images/gmap_marker_active.png" }, styles: [], onInit: !1 }, o = { map: { x: -73.9924068, y: 40.646197, zoom: 14 }, locations: [] }, n = function(t, o) { var n = t.parent().find("." + o.locationsClass).find("li"), e = []; return n.length > 0 && n.each(function(t) { var n = a(this); n.data("x") && n.data("y") && (e[t] = { x: n.data("x"), y: n.data("y"), basic: n.data("basic") ? n.data("basic") : o.marker.basic, active: n.data("active") ? n.data("active") : o.marker.active }, a.trim(n.html()) ? e[t].content = '
        ' + n.html() + "
        " : e[t].content = !1) }), e }; a.fn.googleMap = function(e) { e = a.extend(!0, {}, t, e), a(this).each(function() { var t = a(this), s = a.extend(!0, {}, o, { map: { x: t.data("x"), y: t.data("y"), zoom: t.data("zoom") }, locations: n(t, e) }), i = new google.maps.Map(this, { center: new google.maps.LatLng(parseFloat(s.map.y), parseFloat(s.map.x)), styles: e.styles, zoom: s.map.zoom, scrollwheel: !1 }); e.onInit && e.onInit.call(this, i); var c = new google.maps.InfoWindow, l = []; for (var r in s.locations) l[r] = new google.maps.Marker({ position: new google.maps.LatLng(parseFloat(s.locations[r].y), parseFloat(s.locations[r].x)), map: i, icon: s.locations[r].basic, index: r }), s.locations[r].content && (google.maps.event.addListener(l[r], "click", function() { for (var t in l) l[t].setIcon(s.locations[t].basic); c.setContent(s.locations[this.index].content), c.open(i, this), a(".gm-style-iw").parent().parent().addClass("gm-wrapper"), this.setIcon(s.locations[this.index].active) }), google.maps.event.addListener(c, "closeclick", function() { for (var a in l) l[a].setIcon(s.locations[a].basic) })); google.maps.event.addDomListener(window, "resize", function() { i.setCenter(new google.maps.LatLng(parseFloat(s.map.y), parseFloat(s.map.x))) }) }) } }(jQuery); /** * @module Stepper * @version 3.0.8 * @license MIT License * @link http://classic.formstone.it/stepper/ */ ! function(a, b) { "use strict"; function c(b) { b = a.extend({}, m, b || {}); for (var c = a(this), e = 0, f = c.length; f > e; e++) d(c.eq(e), b); return c } function d(b, c) { if (!b.hasClass("stepper-input")) { c = a.extend({}, c, b.data("stepper-options")); var d = parseFloat(b.attr("min")), g = parseFloat(b.attr("max")), h = parseFloat(b.attr("step")) || 1; b.addClass("stepper-input").wrap('
        ').after('' + c.labels.up + '' + c.labels.down + ""); var i = b.parent(".stepper"), j = a.extend({ $stepper: i, $input: b, $arrow: i.find(".stepper-arrow"), min: void 0 === typeof d || isNaN(d) ? !1 : d, max: void 0 === typeof g || isNaN(g) ? !1 : g, step: void 0 === typeof h || isNaN(h) ? 1 : h, timer: null }, c); j.digits = k(j.step), b.is(":disabled") && i.addClass("disabled"), i.on("keypress", ".stepper-input", j, e), i.on("touchstart.stepper mousedown.stepper", ".stepper-arrow", j, f).data("stepper", j) } } function e(a) { var b = a.data; (38 === a.keyCode || 40 === a.keyCode) && (a.preventDefault(), h(b, 38 === a.keyCode ? b.step : -b.step)) } function f(b) { b.preventDefault(), b.stopPropagation(), g(b); var c = b.data; if (!c.$input.is(":disabled") && !c.$stepper.hasClass("disabled")) { var d = a(b.target).hasClass("up") ? c.step : -c.step; c.timer = i(c.timer, 125, function() { h(c, d, !1) }), h(c, d), a("body").on("touchend.stepper mouseup.stepper", c, g) } } function g(b) { b.preventDefault(), b.stopPropagation(); var c = b.data; j(c.timer), a("body").off(".stepper") } function h(a, b) { var c = parseFloat(a.$input.val()), d = b; void 0 === typeof c || isNaN(c) ? d = a.min !== !1 ? a.min : 0 : a.min !== !1 && c < a.min ? d = a.min : d += c; var e = (d - a.min) % a.step; 0 !== e && (d -= e), a.min !== !1 && d < a.min && (d = a.min), a.max !== !1 && d > a.max && (d -= a.step), d !== c && (d = l(d, a.digits), a.$input.val(d).trigger("change")) } function i(a, b, c) { return j(a), setInterval(c, b) } function j(a) { a && (clearInterval(a), a = null) } function k(a) { var b = String(a); return b.indexOf(".") > -1 ? b.length - b.indexOf(".") - 1 : 0 } function l(a, b) { var c = Math.pow(10, b); return Math.round(a * c) / c } var m = { customClass: "", labels: { up: "Up", down: "Down" } }, n = { defaults: function(b) { return m = a.extend(m, b || {}), "object" == typeof this ? a(this) : !0 }, destroy: function() { return a(this).each(function(b) { var c = a(this).data("stepper"); c && (c.$stepper.off(".stepper").find(".stepper-arrow").remove(), c.$input.unwrap().removeClass("stepper-input")) }) }, disable: function() { return a(this).each(function(b) { var c = a(this).data("stepper"); c && (c.$input.attr("disabled", "disabled"), c.$stepper.addClass("disabled")) }) }, enable: function() { return a(this).each(function(b) { var c = a(this).data("stepper"); c && (c.$input.attr("disabled", null), c.$stepper.removeClass("disabled")) }) } }; a.fn.stepper = function(a) { return n[a] ? n[a].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof a && a ? this : c.apply(this, arguments) }, a.stepper = function(a) { "defaults" === a && n.defaults.apply(this, Array.prototype.slice.call(arguments, 1)) } }(jQuery, this); /** * @module Abstract base class for collection plugins v1.0.1. * @author Keith Wood * @see http://keith-wood.name/countdown.html * @license MIT License */ (function() { var j = false; window.JQClass = function() {}; JQClass.classes = {}; JQClass.extend = function extender(f) { var g = this.prototype; j = true; var h = new this(); j = false; for (var i in f) { h[i] = typeof f[i] == 'function' && typeof g[i] == 'function' ? (function(d, e) { return function() { var b = this._super; this._super = function(a) { return g[d].apply(this, a || []) }; var c = e.apply(this, arguments); this._super = b; return c } })(i, f[i]) : f[i] } function JQClass() { if (!j && this._init) { this._init.apply(this, arguments) } } JQClass.prototype = h; JQClass.prototype.constructor = JQClass; JQClass.extend = extender; return JQClass } })(); (function($) { JQClass.classes.JQPlugin = JQClass.extend({ name: 'plugin', defaultOptions: {}, regionalOptions: {}, _getters: [], _getMarker: function() { return 'is-' + this.name }, _init: function() { $.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {}); var c = camelCase(this.name); $[c] = this; $.fn[c] = function(a) { var b = Array.prototype.slice.call(arguments, 1); if ($[c]._isNotChained(a, b)) { return $[c][a].apply($[c], [this[0]].concat(b)) } return this.each(function() { if (typeof a === 'string') { if (a[0] === '_' || !$[c][a]) { throw 'Unknown method: ' + a; } $[c][a].apply($[c], [this].concat(b)) } else { $[c]._attach(this, a) } }) } }, setDefaults: function(a) { $.extend(this.defaultOptions, a || {}) }, _isNotChained: function(a, b) { if (a === 'option' && (b.length === 0 || (b.length === 1 && typeof b[0] === 'string'))) { return true } return $.inArray(a, this._getters) > -1 }, _attach: function(a, b) { a = $(a); if (a.hasClass(this._getMarker())) { return } a.addClass(this._getMarker()); b = $.extend({}, this.defaultOptions, this._getMetadata(a), b || {}); var c = $.extend({ name: this.name, elem: a, options: b }, this._instSettings(a, b)); a.data(this.name, c); this._postAttach(a, c); this.option(a, b) }, _instSettings: function(a, b) { return {} }, _postAttach: function(a, b) {}, _getMetadata: function(d) { try { var f = d.data(this.name.toLowerCase()) || ''; f = f.replace(/'/g, '"'); f = f.replace(/([a-zA-Z0-9]+):/g, function(a, b, i) { var c = f.substring(0, i).match(/"/g); return (!c || c.length % 2 === 0 ? '"' + b + '":' : b + ':') }); f = $.parseJSON('{' + f + '}'); for (var g in f) { var h = f[g]; if (typeof h === 'string' && h.match(/^new Date\((.*)\)$/)) { f[g] = eval(h) } } return f } catch (e) { return {} } }, _getInst: function(a) { return $(a).data(this.name) || {} }, option: function(a, b, c) { a = $(a); var d = a.data(this.name); if (!b || (typeof b === 'string' && c == null)) { var e = (d || {}).options; return (e && b ? e[b] : e) } if (!a.hasClass(this._getMarker())) { return } var e = b || {}; if (typeof b === 'string') { e = {}; e[b] = c } this._optionsChanged(a, d, e); $.extend(d.options, e) }, _optionsChanged: function(a, b, c) {}, destroy: function(a) { a = $(a); if (!a.hasClass(this._getMarker())) { return } this._preDestroy(a, this._getInst(a)); a.removeData(this.name).removeClass(this._getMarker()) }, _preDestroy: function(a, b) {} }); function camelCase(c) { return c.replace(/-([a-z])/g, function(a, b) { return b.toUpperCase() }) } $.JQPlugin = { createPlugin: function(a, b) { if (typeof a === 'object') { b = a; a = 'JQPlugin' } a = camelCase(a); var c = camelCase(b.name); JQClass.classes[c] = JQClass.classes[a].extend(b); new JQClass.classes[c]() } } })(jQuery); /** * @module Countdown for jQuery v2.0.2. * @author Keith Wood * @see http://keith-wood.name/countdown.html * @license MIT License */ (function($) { var w = 'countdown'; var Y = 0; var O = 1; var W = 2; var D = 3; var H = 4; var M = 5; var S = 6; $.JQPlugin.createPlugin({ name: w, defaultOptions: { until: null, since: null, timezone: null, serverSync: null, format: 'dHMS', layout: '', compact: false, padZeroes: false, significant: 0, description: '', expiryUrl: '', expiryText: '', alwaysExpire: false, onExpiry: null, onTick: null, tickInterval: 1 }, regionalOptions: { '': { labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'], labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'], compactLabels: ['y', 'm', 'w', 'd'], whichLabels: null, digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], timeSeparator: ':', isRTL: false } }, _getters: ['getTimes'], _rtlClass: w + '-rtl', _sectionClass: w + '-section', _amountClass: w + '-amount', _periodClass: w + '-period', _rowClass: w + '-row', _holdingClass: w + '-holding', _showClass: w + '-show', _descrClass: w + '-descr', _timerElems: [], _init: function() { var c = this; this._super(); this._serverSyncs = []; var d = (typeof Date.now == 'function' ? Date.now : function() { return new Date().getTime() }); var e = (window.performance && typeof window.performance.now == 'function'); function timerCallBack(a) { var b = (a < 1e12 ? (e ? (performance.now() + performance.timing.navigationStart) : d()) : a || d()); if (b - g >= 1000) { c._updateElems(); g = b } f(timerCallBack) } var f = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || null; var g = 0; if (!f || $.noRequestAnimationFrame) { $.noRequestAnimationFrame = null; setInterval(function() { c._updateElems() }, 980) } else { g = window.animationStartTime || window.webkitAnimationStartTime || window.mozAnimationStartTime || window.oAnimationStartTime || window.msAnimationStartTime || d(); f(timerCallBack) } }, UTCDate: function(a, b, c, e, f, g, h, i) { if (typeof b == 'object' && b.constructor == Date) { i = b.getMilliseconds(); h = b.getSeconds(); g = b.getMinutes(); f = b.getHours(); e = b.getDate(); c = b.getMonth(); b = b.getFullYear() } var d = new Date(); d.setUTCFullYear(b); d.setUTCDate(1); d.setUTCMonth(c || 0); d.setUTCDate(e || 1); d.setUTCHours(f || 0); d.setUTCMinutes((g || 0) - (Math.abs(a) < 30 ? a * 60 : a)); d.setUTCSeconds(h || 0); d.setUTCMilliseconds(i || 0); return d }, periodsToSeconds: function(a) { return a[0] * 31557600 + a[1] * 2629800 + a[2] * 604800 + a[3] * 86400 + a[4] * 3600 + a[5] * 60 + a[6] }, resync: function() { var d = this; $('.' + this._getMarker()).each(function() { var a = $.data(this, d.name); if (a.options.serverSync) { var b = null; for (var i = 0; i < d._serverSyncs.length; i++) { if (d._serverSyncs[i][0] == a.options.serverSync) { b = d._serverSyncs[i]; break } } if (b[2] == null) { var c = ($.isFunction(a.options.serverSync) ? a.options.serverSync.apply(this, []) : null); b[2] = (c ? new Date().getTime() - c.getTime() : 0) - b[1] } if (a._since) { a._since.setMilliseconds(a._since.getMilliseconds() + b[2]) } a._until.setMilliseconds(a._until.getMilliseconds() + b[2]) } }); for (var i = 0; i < d._serverSyncs.length; i++) { if (d._serverSyncs[i][2] != null) { d._serverSyncs[i][1] += d._serverSyncs[i][2]; delete d._serverSyncs[i][2] } } }, _instSettings: function(a, b) { return { _periods: [0, 0, 0, 0, 0, 0, 0] } }, _addElem: function(a) { if (!this._hasElem(a)) { this._timerElems.push(a) } }, _hasElem: function(a) { return ($.inArray(a, this._timerElems) > -1) }, _removeElem: function(b) { this._timerElems = $.map(this._timerElems, function(a) { return (a == b ? null : a) }) }, _updateElems: function() { for (var i = this._timerElems.length - 1; i >= 0; i--) { this._updateCountdown(this._timerElems[i]) } }, _optionsChanged: function(a, b, c) { if (c.layout) { c.layout = c.layout.replace(/</g, '<').replace(/>/g, '>') } this._resetExtraLabels(b.options, c); var d = (b.options.timezone != c.timezone); $.extend(b.options, c); this._adjustSettings(a, b, c.until != null || c.since != null || d); var e = new Date(); if ((b._since && b._since < e) || (b._until && b._until > e)) { this._addElem(a[0]) } this._updateCountdown(a, b) }, _updateCountdown: function(a, b) { a = a.jquery ? a : $(a); b = b || this._getInst(a); if (!b) { return } a.html(this._generateHTML(b)).toggleClass(this._rtlClass, b.options.isRTL); if ($.isFunction(b.options.onTick)) { var c = b._hold != 'lap' ? b._periods : this._calculatePeriods(b, b._show, b.options.significant, new Date()); if (b.options.tickInterval == 1 || this.periodsToSeconds(c) % b.options.tickInterval == 0) { b.options.onTick.apply(a[0], [c]) } } var d = b._hold != 'pause' && (b._since ? b._now.getTime() < b._since.getTime() : b._now.getTime() >= b._until.getTime()); if (d && !b._expiring) { b._expiring = true; if (this._hasElem(a[0]) || b.options.alwaysExpire) { this._removeElem(a[0]); if ($.isFunction(b.options.onExpiry)) { b.options.onExpiry.apply(a[0], []) } if (b.options.expiryText) { var e = b.options.layout; b.options.layout = b.options.expiryText; this._updateCountdown(a[0], b); b.options.layout = e } if (b.options.expiryUrl) { window.location = b.options.expiryUrl } } b._expiring = false } else if (b._hold == 'pause') { this._removeElem(a[0]) } }, _resetExtraLabels: function(a, b) { for (var n in b) { if (n.match(/[Ll]abels[02-9]|compactLabels1/)) { a[n] = b[n] } } for (var n in a) { if (n.match(/[Ll]abels[02-9]|compactLabels1/) && typeof b[n] === 'undefined') { a[n] = null } } }, _adjustSettings: function(a, b, c) { var d = null; for (var i = 0; i < this._serverSyncs.length; i++) { if (this._serverSyncs[i][0] == b.options.serverSync) { d = this._serverSyncs[i][1]; break } } if (d != null) { var e = (b.options.serverSync ? d : 0); var f = new Date() } else { var g = ($.isFunction(b.options.serverSync) ? b.options.serverSync.apply(a[0], []) : null); var f = new Date(); var e = (g ? f.getTime() - g.getTime() : 0); this._serverSyncs.push([b.options.serverSync, e]) } var h = b.options.timezone; h = (h == null ? -f.getTimezoneOffset() : h); if (c || (!c && b._until == null && b._since == null)) { b._since = b.options.since; if (b._since != null) { b._since = this.UTCDate(h, this._determineTime(b._since, null)); if (b._since && e) { b._since.setMilliseconds(b._since.getMilliseconds() + e) } } b._until = this.UTCDate(h, this._determineTime(b.options.until, f)); if (e) { b._until.setMilliseconds(b._until.getMilliseconds() + e) } } b._show = this._determineShow(b) }, _preDestroy: function(a, b) { this._removeElem(a[0]); a.empty() }, pause: function(a) { this._hold(a, 'pause') }, lap: function(a) { this._hold(a, 'lap') }, resume: function(a) { this._hold(a, null) }, toggle: function(a) { var b = $.data(a, this.name) || {}; this[!b._hold ? 'pause' : 'resume'](a) }, toggleLap: function(a) { var b = $.data(a, this.name) || {}; this[!b._hold ? 'lap' : 'resume'](a) }, _hold: function(a, b) { var c = $.data(a, this.name); if (c) { if (c._hold == 'pause' && !b) { c._periods = c._savePeriods; var d = (c._since ? '-' : '+'); c[c._since ? '_since' : '_until'] = this._determineTime(d + c._periods[0] + 'y' + d + c._periods[1] + 'o' + d + c._periods[2] + 'w' + d + c._periods[3] + 'd' + d + c._periods[4] + 'h' + d + c._periods[5] + 'm' + d + c._periods[6] + 's'); this._addElem(a) } c._hold = b; c._savePeriods = (b == 'pause' ? c._periods : null); $.data(a, this.name, c); this._updateCountdown(a, c) } }, getTimes: function(a) { var b = $.data(a, this.name); return (!b ? null : (b._hold == 'pause' ? b._savePeriods : (!b._hold ? b._periods : this._calculatePeriods(b, b._show, b.options.significant, new Date())))) }, _determineTime: function(k, l) { var m = this; var n = function(a) { var b = new Date(); b.setTime(b.getTime() + a * 1000); return b }; var o = function(a) { a = a.toLowerCase(); var b = new Date(); var c = b.getFullYear(); var d = b.getMonth(); var e = b.getDate(); var f = b.getHours(); var g = b.getMinutes(); var h = b.getSeconds(); var i = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g; var j = i.exec(a); while (j) { switch (j[2] || 's') { case 's': h += parseInt(j[1], 10); break; case 'm': g += parseInt(j[1], 10); break; case 'h': f += parseInt(j[1], 10); break; case 'd': e += parseInt(j[1], 10); break; case 'w': e += parseInt(j[1], 10) * 7; break; case 'o': d += parseInt(j[1], 10); e = Math.min(e, m._getDaysInMonth(c, d)); break; case 'y': c += parseInt(j[1], 10); e = Math.min(e, m._getDaysInMonth(c, d)); break } j = i.exec(a) } return new Date(c, d, e, f, g, h, 0) }; var p = (k == null ? l : (typeof k == 'string' ? o(k) : (typeof k == 'number' ? n(k) : k))); if (p) p.setMilliseconds(0); return p }, _getDaysInMonth: function(a, b) { return 32 - new Date(a, b, 32).getDate() }, _normalLabels: function(a) { return a }, _generateHTML: function(c) { var d = this; c._periods = (c._hold ? c._periods : this._calculatePeriods(c, c._show, c.options.significant, new Date())); var e = false; var f = 0; var g = c.options.significant; var h = $.extend({}, c._show); for (var i = Y; i <= S; i++) { e |= (c._show[i] == '?' && c._periods[i] > 0); h[i] = (c._show[i] == '?' && !e ? null : c._show[i]); f += (h[i] ? 1 : 0); g -= (c._periods[i] > 0 ? 1 : 0) } var j = [false, false, false, false, false, false, false]; for (var i = S; i >= Y; i--) { if (c._show[i]) { if (c._periods[i]) { j[i] = true } else { j[i] = g > 0; g-- } } } var k = (c.options.compact ? c.options.compactLabels : c.options.labels); var l = c.options.whichLabels || this._normalLabels; var m = function(a) { var b = c.options['compactLabels' + l(c._periods[a])]; return (h[a] ? d._translateDigits(c, c._periods[a]) + (b ? b[a] : k[a]) + ' ' : '') }; var n = (c.options.padZeroes ? 2 : 1); var o = function(a) { var b = c.options['labels' + l(c._periods[a])]; return ((!c.options.significant && h[a]) || (c.options.significant && j[a]) ? '' + '' + d._minDigits(c, c._periods[a], n) + '' + '' + (b ? b[a] : k[a]) + '' : '') }; return (c.options.layout ? this._buildLayout(c, h, c.options.layout, c.options.compact, c.options.significant, j) : ((c.options.compact ? '' + m(Y) + m(O) + m(W) + m(D) + (h[H] ? this._minDigits(c, c._periods[H], 2) : '') + (h[M] ? (h[H] ? c.options.timeSeparator : '') + this._minDigits(c, c._periods[M], 2) : '') + (h[S] ? (h[H] || h[M] ? c.options.timeSeparator : '') + this._minDigits(c, c._periods[S], 2) : '') : '' + o(Y) + o(O) + o(W) + o(D) + o(H) + o(M) + o(S)) + '' + (c.options.description ? '' + c.options.description + '' : ''))) }, _buildLayout: function(c, d, e, f, g, h) { var j = c.options[f ? 'compactLabels' : 'labels']; var k = c.options.whichLabels || this._normalLabels; var l = function(a) { return (c.options[(f ? 'compactLabels' : 'labels') + k(c._periods[a])] || j)[a] }; var m = function(a, b) { return c.options.digits[Math.floor(a / b) % 10] }; var o = { desc: c.options.description, sep: c.options.timeSeparator, yl: l(Y), yn: this._minDigits(c, c._periods[Y], 1), ynn: this._minDigits(c, c._periods[Y], 2), ynnn: this._minDigits(c, c._periods[Y], 3), y1: m(c._periods[Y], 1), y10: m(c._periods[Y], 10), y100: m(c._periods[Y], 100), y1000: m(c._periods[Y], 1000), ol: l(O), on: this._minDigits(c, c._periods[O], 1), onn: this._minDigits(c, c._periods[O], 2), onnn: this._minDigits(c, c._periods[O], 3), o1: m(c._periods[O], 1), o10: m(c._periods[O], 10), o100: m(c._periods[O], 100), o1000: m(c._periods[O], 1000), wl: l(W), wn: this._minDigits(c, c._periods[W], 1), wnn: this._minDigits(c, c._periods[W], 2), wnnn: this._minDigits(c, c._periods[W], 3), w1: m(c._periods[W], 1), w10: m(c._periods[W], 10), w100: m(c._periods[W], 100), w1000: m(c._periods[W], 1000), dl: l(D), dn: this._minDigits(c, c._periods[D], 1), dnn: this._minDigits(c, c._periods[D], 2), dnnn: this._minDigits(c, c._periods[D], 3), d1: m(c._periods[D], 1), d10: m(c._periods[D], 10), d100: m(c._periods[D], 100), d1000: m(c._periods[D], 1000), hl: l(H), hn: this._minDigits(c, c._periods[H], 1), hnn: this._minDigits(c, c._periods[H], 2), hnnn: this._minDigits(c, c._periods[H], 3), h1: m(c._periods[H], 1), h10: m(c._periods[H], 10), h100: m(c._periods[H], 100), h1000: m(c._periods[H], 1000), ml: l(M), mn: this._minDigits(c, c._periods[M], 1), mnn: this._minDigits(c, c._periods[M], 2), mnnn: this._minDigits(c, c._periods[M], 3), m1: m(c._periods[M], 1), m10: m(c._periods[M], 10), m100: m(c._periods[M], 100), m1000: m(c._periods[M], 1000), sl: l(S), sn: this._minDigits(c, c._periods[S], 1), snn: this._minDigits(c, c._periods[S], 2), snnn: this._minDigits(c, c._periods[S], 3), s1: m(c._periods[S], 1), s10: m(c._periods[S], 10), s100: m(c._periods[S], 100), s1000: m(c._periods[S], 1000) }; var p = e; for (var i = Y; i <= S; i++) { var q = 'yowdhms'.charAt(i); var r = new RegExp('\\{' + q + '<\\}([\\s\\S]*)\\{' + q + '>\\}', 'g'); p = p.replace(r, ((!g && d[i]) || (g && h[i]) ? '$1' : '')) } $.each(o, function(n, v) { var a = new RegExp('\\{' + n + '\\}', 'g'); p = p.replace(a, v) }); return p }, _minDigits: function(a, b, c) { b = '' + b; if (b.length >= c) { return this._translateDigits(a, b) } b = '0000000000' + b; return this._translateDigits(a, b.substr(b.length - c)) }, _translateDigits: function(b, c) { return ('' + c).replace(/[0-9]/g, function(a) { return b.options.digits[a] }) }, _determineShow: function(a) { var b = a.options.format; var c = []; c[Y] = (b.match('y') ? '?' : (b.match('Y') ? '!' : null)); c[O] = (b.match('o') ? '?' : (b.match('O') ? '!' : null)); c[W] = (b.match('w') ? '?' : (b.match('W') ? '!' : null)); c[D] = (b.match('d') ? '?' : (b.match('D') ? '!' : null)); c[H] = (b.match('h') ? '?' : (b.match('H') ? '!' : null)); c[M] = (b.match('m') ? '?' : (b.match('M') ? '!' : null)); c[S] = (b.match('s') ? '?' : (b.match('S') ? '!' : null)); return c }, _calculatePeriods: function(c, d, e, f) { c._now = f; c._now.setMilliseconds(0); var g = new Date(c._now.getTime()); if (c._since) { if (f.getTime() < c._since.getTime()) { c._now = f = g } else { f = c._since } } else { g.setTime(c._until.getTime()); if (f.getTime() > c._until.getTime()) { c._now = f = g } } var h = [0, 0, 0, 0, 0, 0, 0]; if (d[Y] || d[O]) { var i = this._getDaysInMonth(f.getFullYear(), f.getMonth()); var j = this._getDaysInMonth(g.getFullYear(), g.getMonth()); var k = (g.getDate() == f.getDate() || (g.getDate() >= Math.min(i, j) && f.getDate() >= Math.min(i, j))); var l = function(a) { return (a.getHours() * 60 + a.getMinutes()) * 60 + a.getSeconds() }; var m = Math.max(0, (g.getFullYear() - f.getFullYear()) * 12 + g.getMonth() - f.getMonth() + ((g.getDate() < f.getDate() && !k) || (k && l(g) < l(f)) ? -1 : 0)); h[Y] = (d[Y] ? Math.floor(m / 12) : 0); h[O] = (d[O] ? m - h[Y] * 12 : 0); f = new Date(f.getTime()); var n = (f.getDate() == i); var o = this._getDaysInMonth(f.getFullYear() + h[Y], f.getMonth() + h[O]); if (f.getDate() > o) { f.setDate(o) } f.setFullYear(f.getFullYear() + h[Y]); f.setMonth(f.getMonth() + h[O]); if (n) { f.setDate(o) } } var p = Math.floor((g.getTime() - f.getTime()) / 1000); var q = function(a, b) { h[a] = (d[a] ? Math.floor(p / b) : 0); p -= h[a] * b }; q(W, 604800); q(D, 86400); q(H, 3600); q(M, 60); q(S, 1); if (p > 0 && !c._since) { var r = [1, 12, 4.3482, 7, 24, 60, 60]; var s = S; var t = 1; for (var u = S; u >= Y; u--) { if (d[u]) { if (h[s] >= t) { h[s] = 0; p = 1 } if (p > 0) { h[u]++; p = 0; s = u; t = 1 } } t *= r[u] } } if (e) { for (var u = Y; u <= S; u++) { if (e && h[u]) { e-- } else if (!e) { h[u] = 0 } } } return h } }) })(jQuery); /** * @module Moment JS * @authors Tim Wood, Iskren Chernev, Moment.js contributors * @see https://ua.linkedin.com/in/rafael-shayvolodyan-3a297b96 * @version 2.12.0 * @license MIT license */ ! function(t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.moment = e() }(this, function() { "use strict"; function t() { return Xn.apply(null, arguments) } function e(t) { Xn = t } function n(t) { return t instanceof Array || "[object Array]" === Object.prototype.toString.call(t) } function i(t) { return t instanceof Date || "[object Date]" === Object.prototype.toString.call(t) } function s(t, e) { var n, i = []; for (n = 0; n < t.length; ++n) i.push(e(t[n], n)); return i } function r(t, e) { return Object.prototype.hasOwnProperty.call(t, e) } function a(t, e) { for (var n in e) r(e, n) && (t[n] = e[n]); return r(e, "toString") && (t.toString = e.toString), r(e, "valueOf") && (t.valueOf = e.valueOf), t } function o(t, e, n, i) { return Ct(t, e, n, i, !0).utc() } function u() { return { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1 } } function d(t) { return null == t._pf && (t._pf = u()), t._pf } function l(t) { if (null == t._isValid) { var e = d(t); t._isValid = !(isNaN(t._d.getTime()) || !(e.overflow < 0) || e.empty || e.invalidMonth || e.invalidWeekday || e.nullInput || e.invalidFormat || e.userInvalidated), t._strict && (t._isValid = t._isValid && 0 === e.charsLeftOver && 0 === e.unusedTokens.length && void 0 === e.bigHour) } return t._isValid } function h(t) { var e = o(NaN); return null != t ? a(d(e), t) : d(e).userInvalidated = !0, e } function c(t) { return void 0 === t } function f(t, e) { var n, i, s; if (c(e._isAMomentObject) || (t._isAMomentObject = e._isAMomentObject), c(e._i) || (t._i = e._i), c(e._f) || (t._f = e._f), c(e._l) || (t._l = e._l), c(e._strict) || (t._strict = e._strict), c(e._tzm) || (t._tzm = e._tzm), c(e._isUTC) || (t._isUTC = e._isUTC), c(e._offset) || (t._offset = e._offset), c(e._pf) || (t._pf = d(e)), c(e._locale) || (t._locale = e._locale), Kn.length > 0) for (n in Kn) i = Kn[n], s = e[i], c(s) || (t[i] = s); return t } function m(e) { f(this, e), this._d = new Date(null != e._d ? e._d.getTime() : NaN), ti === !1 && (ti = !0, t.updateOffset(this), ti = !1) } function _(t) { return t instanceof m || null != t && null != t._isAMomentObject } function y(t) { return 0 > t ? Math.ceil(t) : Math.floor(t) } function g(t) { var e = +t, n = 0; return 0 !== e && isFinite(e) && (n = y(e)), n } function p(t, e, n) { var i, s = Math.min(t.length, e.length), r = Math.abs(t.length - e.length), a = 0; for (i = 0; s > i; i++)(n && t[i] !== e[i] || !n && g(t[i]) !== g(e[i])) && a++; return a + r } function v(e) { t.suppressDeprecationWarnings === !1 && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + e) } function D(t, e) { var n = !0; return a(function() { return n && (v(t + "\nArguments: " + Array.prototype.slice.call(arguments).join(", ") + "\n" + (new Error).stack), n = !1), e.apply(this, arguments) }, e) } function M(t, e) { ei[t] || (v(e), ei[t] = !0) } function S(t) { return t instanceof Function || "[object Function]" === Object.prototype.toString.call(t) } function Y(t) { return "[object Object]" === Object.prototype.toString.call(t) } function w(t) { var e, n; for (n in t) e = t[n], S(e) ? this[n] = e : this["_" + n] = e; this._config = t, this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source) } function k(t, e) { var n, i = a({}, t); for (n in e) r(e, n) && (Y(t[n]) && Y(e[n]) ? (i[n] = {}, a(i[n], t[n]), a(i[n], e[n])) : null != e[n] ? i[n] = e[n] : delete i[n]); return i } function T(t) { null != t && this.set(t) } function b(t) { return t ? t.toLowerCase().replace("_", "-") : t } function O(t) { for (var e, n, i, s, r = 0; r < t.length;) { for (s = b(t[r]).split("-"), e = s.length, n = b(t[r + 1]), n = n ? n.split("-") : null; e > 0;) { if (i = W(s.slice(0, e).join("-"))) return i; if (n && n.length >= e && p(s, n, !0) >= e - 1) break; e-- } r++ } return null } function W(t) { var e = null; if (!ii[t] && "undefined" != typeof module && module && module.exports) try { e = ni._abbr, require("./locale/" + t), x(e) } catch (n) {} return ii[t] } function x(t, e) { var n; return t && (n = c(e) ? P(t) : U(t, e), n && (ni = n)), ni._abbr } function U(t, e) { return null !== e ? (e.abbr = t, null != ii[t] ? (M("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"), e = k(ii[t]._config, e)) : null != e.parentLocale && (null != ii[e.parentLocale] ? e = k(ii[e.parentLocale]._config, e) : M("parentLocaleUndefined", "specified parentLocale is not defined yet")), ii[t] = new T(e), x(t), ii[t]) : (delete ii[t], null) } function G(t, e) { if (null != e) { var n; null != ii[t] && (e = k(ii[t]._config, e)), n = new T(e), n.parentLocale = ii[t], ii[t] = n, x(t) } else null != ii[t] && (null != ii[t].parentLocale ? ii[t] = ii[t].parentLocale : null != ii[t] && delete ii[t]); return ii[t] } function P(t) { var e; if (t && t._locale && t._locale._abbr && (t = t._locale._abbr), !t) return ni; if (!n(t)) { if (e = W(t)) return e; t = [t] } return O(t) } function C() { return Object.keys(ii) } function F(t, e) { var n = t.toLowerCase(); si[n] = si[n + "s"] = si[e] = t } function H(t) { return "string" == typeof t ? si[t] || si[t.toLowerCase()] : void 0 } function L(t) { var e, n, i = {}; for (n in t) r(t, n) && (e = H(n), e && (i[e] = t[n])); return i } function V(e, n) { return function(i) { return null != i ? (I(this, e, i), t.updateOffset(this, n), this) : N(this, e) } } function N(t, e) { return t.isValid() ? t._d["get" + (t._isUTC ? "UTC" : "") + e]() : NaN } function I(t, e, n) { t.isValid() && t._d["set" + (t._isUTC ? "UTC" : "") + e](n) } function A(t, e) { var n; if ("object" == typeof t) for (n in t) this.set(n, t[n]); else if (t = H(t), S(this[t])) return this[t](e); return this } function R(t, e, n) { var i = "" + Math.abs(t), s = e - i.length, r = t >= 0; return (r ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, s)).toString().substr(1) + i } function E(t, e, n, i) { var s = i; "string" == typeof i && (s = function() { return this[i]() }), t && (ui[t] = s), e && (ui[e[0]] = function() { return R(s.apply(this, arguments), e[1], e[2]) }), n && (ui[n] = function() { return this.localeData().ordinal(s.apply(this, arguments), t) }) } function j(t) { return t.match(/\[[\s\S]/) ? t.replace(/^\[|\]$/g, "") : t.replace(/\\/g, "") } function z(t) { var e, n, i = t.match(ri); for (e = 0, n = i.length; n > e; e++) ui[i[e]] ? i[e] = ui[i[e]] : i[e] = j(i[e]); return function(s) { var r = ""; for (e = 0; n > e; e++) r += i[e] instanceof Function ? i[e].call(s, t) : i[e]; return r } } function Z(t, e) { return t.isValid() ? (e = $(e, t.localeData()), oi[e] = oi[e] || z(e), oi[e](t)) : t.localeData().invalidDate() } function $(t, e) { function n(t) { return e.longDateFormat(t) || t } var i = 5; for (ai.lastIndex = 0; i >= 0 && ai.test(t);) t = t.replace(ai, n), ai.lastIndex = 0, i -= 1; return t } function q(t, e, n) { Ti[t] = S(e) ? e : function(t, i) { return t && n ? n : e } } function J(t, e) { return r(Ti, t) ? Ti[t](e._strict, e._locale) : new RegExp(B(t)) } function B(t) { return Q(t.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(t, e, n, i, s) { return e || n || i || s })) } function Q(t) { return t.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") } function X(t, e) { var n, i = e; for ("string" == typeof t && (t = [t]), "number" == typeof e && (i = function(t, n) { n[e] = g(t) }), n = 0; n < t.length; n++) bi[t[n]] = i } function K(t, e) { X(t, function(t, n, i, s) { i._w = i._w || {}, e(t, i._w, i, s) }) } function tt(t, e, n) { null != e && r(bi, t) && bi[t](e, n._a, n, t) } function et(t, e) { return new Date(Date.UTC(t, e + 1, 0)).getUTCDate() } function nt(t, e) { return n(this._months) ? this._months[t.month()] : this._months[Li.test(e) ? "format" : "standalone"][t.month()] } function it(t, e) { return n(this._monthsShort) ? this._monthsShort[t.month()] : this._monthsShort[Li.test(e) ? "format" : "standalone"][t.month()] } function st(t, e, n) { var i, s, r; for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), i = 0; 12 > i; i++) { if (s = o([2e3, i]), n && !this._longMonthsParse[i] && (this._longMonthsParse[i] = new RegExp("^" + this.months(s, "").replace(".", "") + "$", "i"), this._shortMonthsParse[i] = new RegExp("^" + this.monthsShort(s, "").replace(".", "") + "$", "i")), n || this._monthsParse[i] || (r = "^" + this.months(s, "") + "|^" + this.monthsShort(s, ""), this._monthsParse[i] = new RegExp(r.replace(".", ""), "i")), n && "MMMM" === e && this._longMonthsParse[i].test(t)) return i; if (n && "MMM" === e && this._shortMonthsParse[i].test(t)) return i; if (!n && this._monthsParse[i].test(t)) return i } } function rt(t, e) { var n; if (!t.isValid()) return t; if ("string" == typeof e) if (/^\d+$/.test(e)) e = g(e); else if (e = t.localeData().monthsParse(e), "number" != typeof e) return t; return n = Math.min(t.date(), et(t.year(), e)), t._d["set" + (t._isUTC ? "UTC" : "") + "Month"](e, n), t } function at(e) { return null != e ? (rt(this, e), t.updateOffset(this, !0), this) : N(this, "Month") } function ot() { return et(this.year(), this.month()) } function ut(t) { return this._monthsParseExact ? (r(this, "_monthsRegex") || lt.call(this), t ? this._monthsShortStrictRegex : this._monthsShortRegex) : this._monthsShortStrictRegex && t ? this._monthsShortStrictRegex : this._monthsShortRegex } function dt(t) { return this._monthsParseExact ? (r(this, "_monthsRegex") || lt.call(this), t ? this._monthsStrictRegex : this._monthsRegex) : this._monthsStrictRegex && t ? this._monthsStrictRegex : this._monthsRegex } function lt() { function t(t, e) { return e.length - t.length } var e, n, i = [], s = [], r = []; for (e = 0; 12 > e; e++) n = o([2e3, e]), i.push(this.monthsShort(n, "")), s.push(this.months(n, "")), r.push(this.months(n, "")), r.push(this.monthsShort(n, "")); for (i.sort(t), s.sort(t), r.sort(t), e = 0; 12 > e; e++) i[e] = Q(i[e]), s[e] = Q(s[e]), r[e] = Q(r[e]); this._monthsRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + s.join("|") + ")$", "i"), this._monthsShortStrictRegex = new RegExp("^(" + i.join("|") + ")$", "i") } function ht(t) { var e, n = t._a; return n && -2 === d(t).overflow && (e = n[Wi] < 0 || n[Wi] > 11 ? Wi : n[xi] < 1 || n[xi] > et(n[Oi], n[Wi]) ? xi : n[Ui] < 0 || n[Ui] > 24 || 24 === n[Ui] && (0 !== n[Gi] || 0 !== n[Pi] || 0 !== n[Ci]) ? Ui : n[Gi] < 0 || n[Gi] > 59 ? Gi : n[Pi] < 0 || n[Pi] > 59 ? Pi : n[Ci] < 0 || n[Ci] > 999 ? Ci : -1, d(t)._overflowDayOfYear && (Oi > e || e > xi) && (e = xi), d(t)._overflowWeeks && -1 === e && (e = Fi), d(t)._overflowWeekday && -1 === e && (e = Hi), d(t).overflow = e), t } function ct(t) { var e, n, i, s, r, a, o = t._i, u = Ri.exec(o) || Ei.exec(o); if (u) { for (d(t).iso = !0, e = 0, n = zi.length; n > e; e++) if (zi[e][1].exec(u[1])) { s = zi[e][0], i = zi[e][2] !== !1; break } if (null == s) return void(t._isValid = !1); if (u[3]) { for (e = 0, n = Zi.length; n > e; e++) if (Zi[e][1].exec(u[3])) { r = (u[2] || " ") + Zi[e][0]; break } if (null == r) return void(t._isValid = !1) } if (!i && null != r) return void(t._isValid = !1); if (u[4]) { if (!ji.exec(u[4])) return void(t._isValid = !1); a = "Z" } t._f = s + (r || "") + (a || ""), bt(t) } else t._isValid = !1 } function ft(e) { var n = $i.exec(e._i); return null !== n ? void(e._d = new Date(+n[1])) : (ct(e), void(e._isValid === !1 && (delete e._isValid, t.createFromInputFallback(e)))) } function mt(t, e, n, i, s, r, a) { var o = new Date(t, e, n, i, s, r, a); return 100 > t && t >= 0 && isFinite(o.getFullYear()) && o.setFullYear(t), o } function _t(t) { var e = new Date(Date.UTC.apply(null, arguments)); return 100 > t && t >= 0 && isFinite(e.getUTCFullYear()) && e.setUTCFullYear(t), e } function yt(t) { return gt(t) ? 366 : 365 } function gt(t) { return t % 4 === 0 && t % 100 !== 0 || t % 400 === 0 } function pt() { return gt(this.year()) } function vt(t, e, n) { var i = 7 + e - n, s = (7 + _t(t, 0, i).getUTCDay() - e) % 7; return -s + i - 1 } function Dt(t, e, n, i, s) { var r, a, o = (7 + n - i) % 7, u = vt(t, i, s), d = 1 + 7 * (e - 1) + o + u; return 0 >= d ? (r = t - 1, a = yt(r) + d) : d > yt(t) ? (r = t + 1, a = d - yt(t)) : (r = t, a = d), { year: r, dayOfYear: a } } function Mt(t, e, n) { var i, s, r = vt(t.year(), e, n), a = Math.floor((t.dayOfYear() - r - 1) / 7) + 1; return 1 > a ? (s = t.year() - 1, i = a + St(s, e, n)) : a > St(t.year(), e, n) ? (i = a - St(t.year(), e, n), s = t.year() + 1) : (s = t.year(), i = a), { week: i, year: s } } function St(t, e, n) { var i = vt(t, e, n), s = vt(t + 1, e, n); return (yt(t) - i + s) / 7 } function Yt(t, e, n) { return null != t ? t : null != e ? e : n } function wt(e) { var n = new Date(t.now()); return e._useUTC ? [n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()] : [n.getFullYear(), n.getMonth(), n.getDate()] } function kt(t) { var e, n, i, s, r = []; if (!t._d) { for (i = wt(t), t._w && null == t._a[xi] && null == t._a[Wi] && Tt(t), t._dayOfYear && (s = Yt(t._a[Oi], i[Oi]), t._dayOfYear > yt(s) && (d(t)._overflowDayOfYear = !0), n = _t(s, 0, t._dayOfYear), t._a[Wi] = n.getUTCMonth(), t._a[xi] = n.getUTCDate()), e = 0; 3 > e && null == t._a[e]; ++e) t._a[e] = r[e] = i[e]; for (; 7 > e; e++) t._a[e] = r[e] = null == t._a[e] ? 2 === e ? 1 : 0 : t._a[e]; 24 === t._a[Ui] && 0 === t._a[Gi] && 0 === t._a[Pi] && 0 === t._a[Ci] && (t._nextDay = !0, t._a[Ui] = 0), t._d = (t._useUTC ? _t : mt).apply(null, r), null != t._tzm && t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), t._nextDay && (t._a[Ui] = 24) } } function Tt(t) { var e, n, i, s, r, a, o, u; e = t._w, null != e.GG || null != e.W || null != e.E ? (r = 1, a = 4, n = Yt(e.GG, t._a[Oi], Mt(Ft(), 1, 4).year), i = Yt(e.W, 1), s = Yt(e.E, 1), (1 > s || s > 7) && (u = !0)) : (r = t._locale._week.dow, a = t._locale._week.doy, n = Yt(e.gg, t._a[Oi], Mt(Ft(), r, a).year), i = Yt(e.w, 1), null != e.d ? (s = e.d, (0 > s || s > 6) && (u = !0)) : null != e.e ? (s = e.e + r, (e.e < 0 || e.e > 6) && (u = !0)) : s = r), 1 > i || i > St(n, r, a) ? d(t)._overflowWeeks = !0 : null != u ? d(t)._overflowWeekday = !0 : (o = Dt(n, i, s, r, a), t._a[Oi] = o.year, t._dayOfYear = o.dayOfYear) } function bt(e) { if (e._f === t.ISO_8601) return void ct(e); e._a = [], d(e).empty = !0; var n, i, s, r, a, o = "" + e._i, u = o.length, l = 0; for (s = $(e._f, e._locale).match(ri) || [], n = 0; n < s.length; n++) r = s[n], i = (o.match(J(r, e)) || [])[0], i && (a = o.substr(0, o.indexOf(i)), a.length > 0 && d(e).unusedInput.push(a), o = o.slice(o.indexOf(i) + i.length), l += i.length), ui[r] ? (i ? d(e).empty = !1 : d(e).unusedTokens.push(r), tt(r, i, e)) : e._strict && !i && d(e).unusedTokens.push(r); d(e).charsLeftOver = u - l, o.length > 0 && d(e).unusedInput.push(o), d(e).bigHour === !0 && e._a[Ui] <= 12 && e._a[Ui] > 0 && (d(e).bigHour = void 0), e._a[Ui] = Ot(e._locale, e._a[Ui], e._meridiem), kt(e), ht(e) } function Ot(t, e, n) { var i; return null == n ? e : null != t.meridiemHour ? t.meridiemHour(e, n) : null != t.isPM ? (i = t.isPM(n), i && 12 > e && (e += 12), i || 12 !== e || (e = 0), e) : e } function Wt(t) { var e, n, i, s, r; if (0 === t._f.length) return d(t).invalidFormat = !0, void(t._d = new Date(NaN)); for (s = 0; s < t._f.length; s++) r = 0, e = f({}, t), null != t._useUTC && (e._useUTC = t._useUTC), e._f = t._f[s], bt(e), l(e) && (r += d(e).charsLeftOver, r += 10 * d(e).unusedTokens.length, d(e).score = r, (null == i || i > r) && (i = r, n = e)); a(t, n || e) } function xt(t) { if (!t._d) { var e = L(t._i); t._a = s([e.year, e.month, e.day || e.date, e.hour, e.minute, e.second, e.millisecond], function(t) { return t && parseInt(t, 10) }), kt(t) } } function Ut(t) { var e = new m(ht(Gt(t))); return e._nextDay && (e.add(1, "d"), e._nextDay = void 0), e } function Gt(t) { var e = t._i, s = t._f; return t._locale = t._locale || P(t._l), null === e || void 0 === s && "" === e ? h({ nullInput: !0 }) : ("string" == typeof e && (t._i = e = t._locale.preparse(e)), _(e) ? new m(ht(e)) : (n(s) ? Wt(t) : s ? bt(t) : i(e) ? t._d = e : Pt(t), l(t) || (t._d = null), t)) } function Pt(e) { var r = e._i; void 0 === r ? e._d = new Date(t.now()) : i(r) ? e._d = new Date(+r) : "string" == typeof r ? ft(e) : n(r) ? (e._a = s(r.slice(0), function(t) { return parseInt(t, 10) }), kt(e)) : "object" == typeof r ? xt(e) : "number" == typeof r ? e._d = new Date(r) : t.createFromInputFallback(e) } function Ct(t, e, n, i, s) { var r = {}; return "boolean" == typeof n && (i = n, n = void 0), r._isAMomentObject = !0, r._useUTC = r._isUTC = s, r._l = n, r._i = t, r._f = e, r._strict = i, Ut(r) } function Ft(t, e, n, i) { return Ct(t, e, n, i, !1) } function Ht(t, e) { var i, s; if (1 === e.length && n(e[0]) && (e = e[0]), !e.length) return Ft(); for (i = e[0], s = 1; s < e.length; ++s)(!e[s].isValid() || e[s][t](i)) && (i = e[s]); return i } function Lt() { var t = [].slice.call(arguments, 0); return Ht("isBefore", t) } function Vt() { var t = [].slice.call(arguments, 0); return Ht("isAfter", t) } function Nt(t) { var e = L(t), n = e.year || 0, i = e.quarter || 0, s = e.month || 0, r = e.week || 0, a = e.day || 0, o = e.hour || 0, u = e.minute || 0, d = e.second || 0, l = e.millisecond || 0; this._milliseconds = +l + 1e3 * d + 6e4 * u + 36e5 * o, this._days = +a + 7 * r, this._months = +s + 3 * i + 12 * n, this._data = {}, this._locale = P(), this._bubble() } function It(t) { return t instanceof Nt } function At(t, e) { E(t, 0, 0, function() { var t = this.utcOffset(), n = "+"; return 0 > t && (t = -t, n = "-"), n + R(~~(t / 60), 2) + e + R(~~t % 60, 2) }) } function Rt(t, e) { var n = (e || "").match(t) || [], i = n[n.length - 1] || [], s = (i + "").match(Xi) || ["-", 0, 0], r = +(60 * s[1]) + g(s[2]); return "+" === s[0] ? r : -r } function Et(e, n) { var s, r; return n._isUTC ? (s = n.clone(), r = (_(e) || i(e) ? +e : +Ft(e)) - +s, s._d.setTime(+s._d + r), t.updateOffset(s, !1), s) : Ft(e).local() } function jt(t) { return 15 * -Math.round(t._d.getTimezoneOffset() / 15) } function zt(e, n) { var i, s = this._offset || 0; return this.isValid() ? null != e ? ("string" == typeof e ? e = Rt(Yi, e) : Math.abs(e) < 16 && (e = 60 * e), !this._isUTC && n && (i = jt(this)), this._offset = e, this._isUTC = !0, null != i && this.add(i, "m"), s !== e && (!n || this._changeInProgress ? ue(this, ne(e - s, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, t.updateOffset(this, !0), this._changeInProgress = null)), this) : this._isUTC ? s : jt(this) : null != e ? this : NaN } function Zt(t, e) { return null != t ? ("string" != typeof t && (t = -t), this.utcOffset(t, e), this) : -this.utcOffset() } function $t(t) { return this.utcOffset(0, t) } function qt(t) { return this._isUTC && (this.utcOffset(0, t), this._isUTC = !1, t && this.subtract(jt(this), "m")), this } function Jt() { return this._tzm ? this.utcOffset(this._tzm) : "string" == typeof this._i && this.utcOffset(Rt(Si, this._i)), this } function Bt(t) { return this.isValid() ? (t = t ? Ft(t).utcOffset() : 0, (this.utcOffset() - t) % 60 === 0) : !1 } function Qt() { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() } function Xt() { if (!c(this._isDSTShifted)) return this._isDSTShifted; var t = {}; if (f(t, this), t = Gt(t), t._a) { var e = t._isUTC ? o(t._a) : Ft(t._a); this._isDSTShifted = this.isValid() && p(t._a, e.toArray()) > 0 } else this._isDSTShifted = !1; return this._isDSTShifted } function Kt() { return this.isValid() ? !this._isUTC : !1 } function te() { return this.isValid() ? this._isUTC : !1 } function ee() { return this.isValid() ? this._isUTC && 0 === this._offset : !1 } function ne(t, e) { var n, i, s, a = t, o = null; return It(t) ? a = { ms: t._milliseconds, d: t._days, M: t._months } : "number" == typeof t ? (a = {}, e ? a[e] = t : a.milliseconds = t) : (o = Ki.exec(t)) ? (n = "-" === o[1] ? -1 : 1, a = { y: 0, d: g(o[xi]) * n, h: g(o[Ui]) * n, m: g(o[Gi]) * n, s: g(o[Pi]) * n, ms: g(o[Ci]) * n }) : (o = ts.exec(t)) ? (n = "-" === o[1] ? -1 : 1, a = { y: ie(o[2], n), M: ie(o[3], n), w: ie(o[4], n), d: ie(o[5], n), h: ie(o[6], n), m: ie(o[7], n), s: ie(o[8], n) }) : null == a ? a = {} : "object" == typeof a && ("from" in a || "to" in a) && (s = re(Ft(a.from), Ft(a.to)), a = {}, a.ms = s.milliseconds, a.M = s.months), i = new Nt(a), It(t) && r(t, "_locale") && (i._locale = t._locale), i } function ie(t, e) { var n = t && parseFloat(t.replace(",", ".")); return (isNaN(n) ? 0 : n) * e } function se(t, e) { var n = { milliseconds: 0, months: 0 }; return n.months = e.month() - t.month() + 12 * (e.year() - t.year()), t.clone().add(n.months, "M").isAfter(e) && --n.months, n.milliseconds = +e - +t.clone().add(n.months, "M"), n } function re(t, e) { var n; return t.isValid() && e.isValid() ? (e = Et(e, t), t.isBefore(e) ? n = se(t, e) : (n = se(e, t), n.milliseconds = -n.milliseconds, n.months = -n.months), n) : { milliseconds: 0, months: 0 } } function ae(t) { return 0 > t ? -1 * Math.round(-1 * t) : Math.round(t) } function oe(t, e) { return function(n, i) { var s, r; return null === i || isNaN(+i) || (M(e, "moment()." + e + "(period, number) is deprecated. Please use moment()." + e + "(number, period)."), r = n, n = i, i = r), n = "string" == typeof n ? +n : n, s = ne(n, i), ue(this, s, t), this } } function ue(e, n, i, s) { var r = n._milliseconds, a = ae(n._days), o = ae(n._months); e.isValid() && (s = null == s ? !0 : s, r && e._d.setTime(+e._d + r * i), a && I(e, "Date", N(e, "Date") + a * i), o && rt(e, N(e, "Month") + o * i), s && t.updateOffset(e, a || o)) } function de(t, e) { var n = t || Ft(), i = Et(n, this).startOf("day"), s = this.diff(i, "days", !0), r = -6 > s ? "sameElse" : -1 > s ? "lastWeek" : 0 > s ? "lastDay" : 1 > s ? "sameDay" : 2 > s ? "nextDay" : 7 > s ? "nextWeek" : "sameElse", a = e && (S(e[r]) ? e[r]() : e[r]); return this.format(a || this.localeData().calendar(r, this, Ft(n))) } function le() { return new m(this) } function he(t, e) { var n = _(t) ? t : Ft(t); return this.isValid() && n.isValid() ? (e = H(c(e) ? "millisecond" : e), "millisecond" === e ? +this > +n : +n < +this.clone().startOf(e)) : !1 } function ce(t, e) { var n = _(t) ? t : Ft(t); return this.isValid() && n.isValid() ? (e = H(c(e) ? "millisecond" : e), "millisecond" === e ? +n > +this : +this.clone().endOf(e) < +n) : !1 } function fe(t, e, n) { return this.isAfter(t, n) && this.isBefore(e, n) } function me(t, e) { var n, i = _(t) ? t : Ft(t); return this.isValid() && i.isValid() ? (e = H(e || "millisecond"), "millisecond" === e ? +this === +i : (n = +i, +this.clone().startOf(e) <= n && n <= +this.clone().endOf(e))) : !1 } function _e(t, e) { return this.isSame(t, e) || this.isAfter(t, e) } function ye(t, e) { return this.isSame(t, e) || this.isBefore(t, e) } function ge(t, e, n) { var i, s, r, a; return this.isValid() ? (i = Et(t, this), i.isValid() ? (s = 6e4 * (i.utcOffset() - this.utcOffset()), e = H(e), "year" === e || "month" === e || "quarter" === e ? (a = pe(this, i), "quarter" === e ? a /= 3 : "year" === e && (a /= 12)) : (r = this - i, a = "second" === e ? r / 1e3 : "minute" === e ? r / 6e4 : "hour" === e ? r / 36e5 : "day" === e ? (r - s) / 864e5 : "week" === e ? (r - s) / 6048e5 : r), n ? a : y(a)) : NaN) : NaN } function pe(t, e) { var n, i, s = 12 * (e.year() - t.year()) + (e.month() - t.month()), r = t.clone().add(s, "months"); return 0 > e - r ? (n = t.clone().add(s - 1, "months"), i = (e - r) / (r - n)) : (n = t.clone().add(s + 1, "months"), i = (e - r) / (n - r)), -(s + i) } function ve() { return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ") } function De() { var t = this.clone().utc(); return 0 < t.year() && t.year() <= 9999 ? S(Date.prototype.toISOString) ? this.toDate().toISOString() : Z(t, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") : Z(t, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]") } function Me(e) { var n = Z(this, e || t.defaultFormat); return this.localeData().postformat(n) } function Se(t, e) { return this.isValid() && (_(t) && t.isValid() || Ft(t).isValid()) ? ne({ to: this, from: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate() } function Ye(t) { return this.from(Ft(), t) } function we(t, e) { return this.isValid() && (_(t) && t.isValid() || Ft(t).isValid()) ? ne({ from: this, to: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate() } function ke(t) { return this.to(Ft(), t) } function Te(t) { var e; return void 0 === t ? this._locale._abbr : (e = P(t), null != e && (this._locale = e), this) } function be() { return this._locale } function Oe(t) { switch (t = H(t)) { case "year": this.month(0); case "quarter": case "month": this.date(1); case "week": case "isoWeek": case "day": this.hours(0); case "hour": this.minutes(0); case "minute": this.seconds(0); case "second": this.milliseconds(0) } return "week" === t && this.weekday(0), "isoWeek" === t && this.isoWeekday(1), "quarter" === t && this.month(3 * Math.floor(this.month() / 3)), this } function We(t) { return t = H(t), void 0 === t || "millisecond" === t ? this : this.startOf(t).add(1, "isoWeek" === t ? "week" : t).subtract(1, "ms") } function xe() { return +this._d - 6e4 * (this._offset || 0) } function Ue() { return Math.floor(+this / 1e3) } function Ge() { return this._offset ? new Date(+this) : this._d } function Pe() { var t = this; return [t.year(), t.month(), t.date(), t.hour(), t.minute(), t.second(), t.millisecond()] } function Ce() { var t = this; return { years: t.year(), months: t.month(), date: t.date(), hours: t.hours(), minutes: t.minutes(), seconds: t.seconds(), milliseconds: t.milliseconds() } } function Fe() { return this.isValid() ? this.toISOString() : null } function He() { return l(this) } function Le() { return a({}, d(this)) } function Ve() { return d(this).overflow } function Ne() { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict } } function Ie(t, e) { E(0, [t, t.length], 0, e) } function Ae(t) { return ze.call(this, t, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy) } function Re(t) { return ze.call(this, t, this.isoWeek(), this.isoWeekday(), 1, 4) } function Ee() { return St(this.year(), 1, 4) } function je() { var t = this.localeData()._week; return St(this.year(), t.dow, t.doy) } function ze(t, e, n, i, s) { var r; return null == t ? Mt(this, i, s).year : (r = St(t, i, s), e > r && (e = r), Ze.call(this, t, e, n, i, s)) } function Ze(t, e, n, i, s) { var r = Dt(t, e, n, i, s), a = _t(r.year, 0, r.dayOfYear); return this.year(a.getUTCFullYear()), this.month(a.getUTCMonth()), this.date(a.getUTCDate()), this } function $e(t) { return null == t ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (t - 1) + this.month() % 3) } function qe(t) { return Mt(t, this._week.dow, this._week.doy).week } function Je() { return this._week.dow } function Be() { return this._week.doy } function Qe(t) { var e = this.localeData().week(this); return null == t ? e : this.add(7 * (t - e), "d") } function Xe(t) { var e = Mt(this, 1, 4).week; return null == t ? e : this.add(7 * (t - e), "d") } function Ke(t, e) { return "string" != typeof t ? t : isNaN(t) ? (t = e.weekdaysParse(t), "number" == typeof t ? t : null) : parseInt(t, 10) } function tn(t, e) { return n(this._weekdays) ? this._weekdays[t.day()] : this._weekdays[this._weekdays.isFormat.test(e) ? "format" : "standalone"][t.day()] } function en(t) { return this._weekdaysShort[t.day()] } function nn(t) { return this._weekdaysMin[t.day()] } function sn(t, e, n) { var i, s, r; for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), i = 0; 7 > i; i++) { if (s = Ft([2e3, 1]).day(i), n && !this._fullWeekdaysParse[i] && (this._fullWeekdaysParse[i] = new RegExp("^" + this.weekdays(s, "").replace(".", ".?") + "$", "i"), this._shortWeekdaysParse[i] = new RegExp("^" + this.weekdaysShort(s, "").replace(".", ".?") + "$", "i"), this._minWeekdaysParse[i] = new RegExp("^" + this.weekdaysMin(s, "").replace(".", ".?") + "$", "i")), this._weekdaysParse[i] || (r = "^" + this.weekdays(s, "") + "|^" + this.weekdaysShort(s, "") + "|^" + this.weekdaysMin(s, ""), this._weekdaysParse[i] = new RegExp(r.replace(".", ""), "i")), n && "dddd" === e && this._fullWeekdaysParse[i].test(t)) return i; if (n && "ddd" === e && this._shortWeekdaysParse[i].test(t)) return i; if (n && "dd" === e && this._minWeekdaysParse[i].test(t)) return i; if (!n && this._weekdaysParse[i].test(t)) return i } } function rn(t) { if (!this.isValid()) return null != t ? this : NaN; var e = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return null != t ? (t = Ke(t, this.localeData()), this.add(t - e, "d")) : e } function an(t) { if (!this.isValid()) return null != t ? this : NaN; var e = (this.day() + 7 - this.localeData()._week.dow) % 7; return null == t ? e : this.add(t - e, "d") } function on(t) { return this.isValid() ? null == t ? this.day() || 7 : this.day(this.day() % 7 ? t : t - 7) : null != t ? this : NaN } function un(t) { var e = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; return null == t ? e : this.add(t - e, "d") } function dn() { return this.hours() % 12 || 12 } function ln(t, e) { E(t, 0, 0, function() { return this.localeData().meridiem(this.hours(), this.minutes(), e) }) } function hn(t, e) { return e._meridiemParse } function cn(t) { return "p" === (t + "").toLowerCase().charAt(0) } function fn(t, e, n) { return t > 11 ? n ? "pm" : "PM" : n ? "am" : "AM" } function mn(t, e) { e[Ci] = g(1e3 * ("0." + t)) } function _n() { return this._isUTC ? "UTC" : "" } function yn() { return this._isUTC ? "Coordinated Universal Time" : "" } function gn(t) { return Ft(1e3 * t) } function pn() { return Ft.apply(null, arguments).parseZone() } function vn(t, e, n) { var i = this._calendar[t]; return S(i) ? i.call(e, n) : i } function Dn(t) { var e = this._longDateFormat[t], n = this._longDateFormat[t.toUpperCase()]; return e || !n ? e : (this._longDateFormat[t] = n.replace(/MMMM|MM|DD|dddd/g, function(t) { return t.slice(1) }), this._longDateFormat[t]) } function Mn() { return this._invalidDate } function Sn(t) { return this._ordinal.replace("%d", t) } function Yn(t) { return t } function wn(t, e, n, i) { var s = this._relativeTime[n]; return S(s) ? s(t, e, n, i) : s.replace(/%d/i, t) } function kn(t, e) { var n = this._relativeTime[t > 0 ? "future" : "past"]; return S(n) ? n(e) : n.replace(/%s/i, e) } function Tn(t, e, n, i) { var s = P(), r = o().set(i, e); return s[n](r, t) } function bn(t, e, n, i, s) { if ("number" == typeof t && (e = t, t = void 0), t = t || "", null != e) return Tn(t, e, n, s); var r, a = []; for (r = 0; i > r; r++) a[r] = Tn(t, r, n, s); return a } function On(t, e) { return bn(t, e, "months", 12, "month") } function Wn(t, e) { return bn(t, e, "monthsShort", 12, "month") } function xn(t, e) { return bn(t, e, "weekdays", 7, "day") } function Un(t, e) { return bn(t, e, "weekdaysShort", 7, "day") } function Gn(t, e) { return bn(t, e, "weekdaysMin", 7, "day") } function Pn() { var t = this._data; return this._milliseconds = ws(this._milliseconds), this._days = ws(this._days), this._months = ws(this._months), t.milliseconds = ws(t.milliseconds), t.seconds = ws(t.seconds), t.minutes = ws(t.minutes), t.hours = ws(t.hours), t.months = ws(t.months), t.years = ws(t.years), this } function Cn(t, e, n, i) { var s = ne(e, n); return t._milliseconds += i * s._milliseconds, t._days += i * s._days, t._months += i * s._months, t._bubble() } function Fn(t, e) { return Cn(this, t, e, 1) } function Hn(t, e) { return Cn(this, t, e, -1) } function Ln(t) { return 0 > t ? Math.floor(t) : Math.ceil(t) } function Vn() { var t, e, n, i, s, r = this._milliseconds, a = this._days, o = this._months, u = this._data; return r >= 0 && a >= 0 && o >= 0 || 0 >= r && 0 >= a && 0 >= o || (r += 864e5 * Ln(In(o) + a), a = 0, o = 0), u.milliseconds = r % 1e3, t = y(r / 1e3), u.seconds = t % 60, e = y(t / 60), u.minutes = e % 60, n = y(e / 60), u.hours = n % 24, a += y(n / 24), s = y(Nn(a)), o += s, a -= Ln(In(s)), i = y(o / 12), o %= 12, u.days = a, u.months = o, u.years = i, this } function Nn(t) { return 4800 * t / 146097 } function In(t) { return 146097 * t / 4800 } function An(t) { var e, n, i = this._milliseconds; if (t = H(t), "month" === t || "year" === t) return e = this._days + i / 864e5, n = this._months + Nn(e), "month" === t ? n : n / 12; switch (e = this._days + Math.round(In(this._months)), t) { case "week": return e / 7 + i / 6048e5; case "day": return e + i / 864e5; case "hour": return 24 * e + i / 36e5; case "minute": return 1440 * e + i / 6e4; case "second": return 86400 * e + i / 1e3; case "millisecond": return Math.floor(864e5 * e) + i; default: throw new Error("Unknown unit " + t) } } function Rn() { return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * g(this._months / 12) } function En(t) { return function() { return this.as(t) } } function jn(t) { return t = H(t), this[t + "s"]() } function zn(t) { return function() { return this._data[t] } } function Zn() { return y(this.days() / 7) } function $n(t, e, n, i, s) { return s.relativeTime(e || 1, !!n, t, i) } function qn(t, e, n) { var i = ne(t).abs(), s = Is(i.as("s")), r = Is(i.as("m")), a = Is(i.as("h")), o = Is(i.as("d")), u = Is(i.as("M")), d = Is(i.as("y")), l = s < As.s && ["s", s] || 1 >= r && ["m"] || r < As.m && ["mm", r] || 1 >= a && ["h"] || a < As.h && ["hh", a] || 1 >= o && ["d"] || o < As.d && ["dd", o] || 1 >= u && ["M"] || u < As.M && ["MM", u] || 1 >= d && ["y"] || ["yy", d]; return l[2] = e, l[3] = +t > 0, l[4] = n, $n.apply(null, l) } function Jn(t, e) { return void 0 === As[t] ? !1 : void 0 === e ? As[t] : (As[t] = e, !0) } function Bn(t) { var e = this.localeData(), n = qn(this, !t, e); return t && (n = e.pastFuture(+this, n)), e.postformat(n) } function Qn() { var t, e, n, i = Rs(this._milliseconds) / 1e3, s = Rs(this._days), r = Rs(this._months); t = y(i / 60), e = y(t / 60), i %= 60, t %= 60, n = y(r / 12), r %= 12; var a = n, o = r, u = s, d = e, l = t, h = i, c = this.asSeconds(); return c ? (0 > c ? "-" : "") + "P" + (a ? a + "Y" : "") + (o ? o + "M" : "") + (u ? u + "D" : "") + (d || l || h ? "T" : "") + (d ? d + "H" : "") + (l ? l + "M" : "") + (h ? h + "S" : "") : "P0D" } var Xn, Kn = t.momentProperties = [], ti = !1, ei = {}; t.suppressDeprecationWarnings = !1; var ni, ii = {}, si = {}, ri = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, ai = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, oi = {}, ui = {}, di = /\d/, li = /\d\d/, hi = /\d{3}/, ci = /\d{4}/, fi = /[+-]?\d{6}/, mi = /\d\d?/, _i = /\d\d\d\d?/, yi = /\d\d\d\d\d\d?/, gi = /\d{1,3}/, pi = /\d{1,4}/, vi = /[+-]?\d{1,6}/, Di = /\d+/, Mi = /[+-]?\d+/, Si = /Z|[+-]\d\d:?\d\d/gi, Yi = /Z|[+-]\d\d(?::?\d\d)?/gi, wi = /[+-]?\d+(\.\d{1,3})?/, ki = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, Ti = {}, bi = {}, Oi = 0, Wi = 1, xi = 2, Ui = 3, Gi = 4, Pi = 5, Ci = 6, Fi = 7, Hi = 8; E("M", ["MM", 2], "Mo", function() { return this.month() + 1 }), E("MMM", 0, 0, function(t) { return this.localeData().monthsShort(this, t) }), E("MMMM", 0, 0, function(t) { return this.localeData().months(this, t) }), F("month", "M"), q("M", mi), q("MM", mi, li), q("MMM", function(t, e) { return e.monthsShortRegex(t) }), q("MMMM", function(t, e) { return e.monthsRegex(t) }), X(["M", "MM"], function(t, e) { e[Wi] = g(t) - 1 }), X(["MMM", "MMMM"], function(t, e, n, i) { var s = n._locale.monthsParse(t, i, n._strict); null != s ? e[Wi] = s : d(n).invalidMonth = t }); var Li = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/, Vi = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), Ni = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), Ii = ki, Ai = ki, Ri = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/, Ei = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/, ji = /Z|[+-]\d\d(?::?\d\d)?/, zi = [ ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/] ], Zi = [ ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/] ], $i = /^\/?Date\((\-?\d+)/i; t.createFromInputFallback = D("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.", function(t) { t._d = new Date(t._i + (t._useUTC ? " UTC" : "")) }), E("Y", 0, 0, function() { var t = this.year(); return 9999 >= t ? "" + t : "+" + t }), E(0, ["YY", 2], 0, function() { return this.year() % 100 }), E(0, ["YYYY", 4], 0, "year"), E(0, ["YYYYY", 5], 0, "year"), E(0, ["YYYYYY", 6, !0], 0, "year"), F("year", "y"), q("Y", Mi), q("YY", mi, li), q("YYYY", pi, ci), q("YYYYY", vi, fi), q("YYYYYY", vi, fi), X(["YYYYY", "YYYYYY"], Oi), X("YYYY", function(e, n) { n[Oi] = 2 === e.length ? t.parseTwoDigitYear(e) : g(e); }), X("YY", function(e, n) { n[Oi] = t.parseTwoDigitYear(e) }), X("Y", function(t, e) { e[Oi] = parseInt(t, 10) }), t.parseTwoDigitYear = function(t) { return g(t) + (g(t) > 68 ? 1900 : 2e3) }; var qi = V("FullYear", !1); t.ISO_8601 = function() {}; var Ji = D("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548", function() { var t = Ft.apply(null, arguments); return this.isValid() && t.isValid() ? this > t ? this : t : h() }), Bi = D("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548", function() { var t = Ft.apply(null, arguments); return this.isValid() && t.isValid() ? t > this ? this : t : h() }), Qi = function() { return Date.now ? Date.now() : +new Date }; At("Z", ":"), At("ZZ", ""), q("Z", Yi), q("ZZ", Yi), X(["Z", "ZZ"], function(t, e, n) { n._useUTC = !0, n._tzm = Rt(Yi, t) }); var Xi = /([\+\-]|\d\d)/gi; t.updateOffset = function() {}; var Ki = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/, ts = /^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/; ne.fn = Nt.prototype; var es = oe(1, "add"), ns = oe(-1, "subtract"); t.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ"; var is = D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(t) { return void 0 === t ? this.localeData() : this.locale(t) }); E(0, ["gg", 2], 0, function() { return this.weekYear() % 100 }), E(0, ["GG", 2], 0, function() { return this.isoWeekYear() % 100 }), Ie("gggg", "weekYear"), Ie("ggggg", "weekYear"), Ie("GGGG", "isoWeekYear"), Ie("GGGGG", "isoWeekYear"), F("weekYear", "gg"), F("isoWeekYear", "GG"), q("G", Mi), q("g", Mi), q("GG", mi, li), q("gg", mi, li), q("GGGG", pi, ci), q("gggg", pi, ci), q("GGGGG", vi, fi), q("ggggg", vi, fi), K(["gggg", "ggggg", "GGGG", "GGGGG"], function(t, e, n, i) { e[i.substr(0, 2)] = g(t) }), K(["gg", "GG"], function(e, n, i, s) { n[s] = t.parseTwoDigitYear(e) }), E("Q", 0, "Qo", "quarter"), F("quarter", "Q"), q("Q", di), X("Q", function(t, e) { e[Wi] = 3 * (g(t) - 1) }), E("w", ["ww", 2], "wo", "week"), E("W", ["WW", 2], "Wo", "isoWeek"), F("week", "w"), F("isoWeek", "W"), q("w", mi), q("ww", mi, li), q("W", mi), q("WW", mi, li), K(["w", "ww", "W", "WW"], function(t, e, n, i) { e[i.substr(0, 1)] = g(t) }); var ss = { dow: 0, doy: 6 }; E("D", ["DD", 2], "Do", "date"), F("date", "D"), q("D", mi), q("DD", mi, li), q("Do", function(t, e) { return t ? e._ordinalParse : e._ordinalParseLenient }), X(["D", "DD"], xi), X("Do", function(t, e) { e[xi] = g(t.match(mi)[0], 10) }); var rs = V("Date", !0); E("d", 0, "do", "day"), E("dd", 0, 0, function(t) { return this.localeData().weekdaysMin(this, t) }), E("ddd", 0, 0, function(t) { return this.localeData().weekdaysShort(this, t) }), E("dddd", 0, 0, function(t) { return this.localeData().weekdays(this, t) }), E("e", 0, 0, "weekday"), E("E", 0, 0, "isoWeekday"), F("day", "d"), F("weekday", "e"), F("isoWeekday", "E"), q("d", mi), q("e", mi), q("E", mi), q("dd", ki), q("ddd", ki), q("dddd", ki), K(["dd", "ddd", "dddd"], function(t, e, n, i) { var s = n._locale.weekdaysParse(t, i, n._strict); null != s ? e.d = s : d(n).invalidWeekday = t }), K(["d", "e", "E"], function(t, e, n, i) { e[i] = g(t) }); var as = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), os = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), us = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"); E("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), F("dayOfYear", "DDD"), q("DDD", gi), q("DDDD", hi), X(["DDD", "DDDD"], function(t, e, n) { n._dayOfYear = g(t) }), E("H", ["HH", 2], 0, "hour"), E("h", ["hh", 2], 0, dn), E("hmm", 0, 0, function() { return "" + dn.apply(this) + R(this.minutes(), 2) }), E("hmmss", 0, 0, function() { return "" + dn.apply(this) + R(this.minutes(), 2) + R(this.seconds(), 2) }), E("Hmm", 0, 0, function() { return "" + this.hours() + R(this.minutes(), 2) }), E("Hmmss", 0, 0, function() { return "" + this.hours() + R(this.minutes(), 2) + R(this.seconds(), 2) }), ln("a", !0), ln("A", !1), F("hour", "h"), q("a", hn), q("A", hn), q("H", mi), q("h", mi), q("HH", mi, li), q("hh", mi, li), q("hmm", _i), q("hmmss", yi), q("Hmm", _i), q("Hmmss", yi), X(["H", "HH"], Ui), X(["a", "A"], function(t, e, n) { n._isPm = n._locale.isPM(t), n._meridiem = t }), X(["h", "hh"], function(t, e, n) { e[Ui] = g(t), d(n).bigHour = !0 }), X("hmm", function(t, e, n) { var i = t.length - 2; e[Ui] = g(t.substr(0, i)), e[Gi] = g(t.substr(i)), d(n).bigHour = !0 }), X("hmmss", function(t, e, n) { var i = t.length - 4, s = t.length - 2; e[Ui] = g(t.substr(0, i)), e[Gi] = g(t.substr(i, 2)), e[Pi] = g(t.substr(s)), d(n).bigHour = !0 }), X("Hmm", function(t, e, n) { var i = t.length - 2; e[Ui] = g(t.substr(0, i)), e[Gi] = g(t.substr(i)) }), X("Hmmss", function(t, e, n) { var i = t.length - 4, s = t.length - 2; e[Ui] = g(t.substr(0, i)), e[Gi] = g(t.substr(i, 2)), e[Pi] = g(t.substr(s)) }); var ds = /[ap]\.?m?\.?/i, ls = V("Hours", !0); E("m", ["mm", 2], 0, "minute"), F("minute", "m"), q("m", mi), q("mm", mi, li), X(["m", "mm"], Gi); var hs = V("Minutes", !1); E("s", ["ss", 2], 0, "second"), F("second", "s"), q("s", mi), q("ss", mi, li), X(["s", "ss"], Pi); var cs = V("Seconds", !1); E("S", 0, 0, function() { return ~~(this.millisecond() / 100) }), E(0, ["SS", 2], 0, function() { return ~~(this.millisecond() / 10) }), E(0, ["SSS", 3], 0, "millisecond"), E(0, ["SSSS", 4], 0, function() { return 10 * this.millisecond() }), E(0, ["SSSSS", 5], 0, function() { return 100 * this.millisecond() }), E(0, ["SSSSSS", 6], 0, function() { return 1e3 * this.millisecond() }), E(0, ["SSSSSSS", 7], 0, function() { return 1e4 * this.millisecond() }), E(0, ["SSSSSSSS", 8], 0, function() { return 1e5 * this.millisecond() }), E(0, ["SSSSSSSSS", 9], 0, function() { return 1e6 * this.millisecond() }), F("millisecond", "ms"), q("S", gi, di), q("SS", gi, li), q("SSS", gi, hi); var fs; for (fs = "SSSS"; fs.length <= 9; fs += "S") q(fs, Di); for (fs = "S"; fs.length <= 9; fs += "S") X(fs, mn); var ms = V("Milliseconds", !1); E("z", 0, 0, "zoneAbbr"), E("zz", 0, 0, "zoneName"); var _s = m.prototype; _s.add = es, _s.calendar = de, _s.clone = le, _s.diff = ge, _s.endOf = We, _s.format = Me, _s.from = Se, _s.fromNow = Ye, _s.to = we, _s.toNow = ke, _s.get = A, _s.invalidAt = Ve, _s.isAfter = he, _s.isBefore = ce, _s.isBetween = fe, _s.isSame = me, _s.isSameOrAfter = _e, _s.isSameOrBefore = ye, _s.isValid = He, _s.lang = is, _s.locale = Te, _s.localeData = be, _s.max = Bi, _s.min = Ji, _s.parsingFlags = Le, _s.set = A, _s.startOf = Oe, _s.subtract = ns, _s.toArray = Pe, _s.toObject = Ce, _s.toDate = Ge, _s.toISOString = De, _s.toJSON = Fe, _s.toString = ve, _s.unix = Ue, _s.valueOf = xe, _s.creationData = Ne, _s.year = qi, _s.isLeapYear = pt, _s.weekYear = Ae, _s.isoWeekYear = Re, _s.quarter = _s.quarters = $e, _s.month = at, _s.daysInMonth = ot, _s.week = _s.weeks = Qe, _s.isoWeek = _s.isoWeeks = Xe, _s.weeksInYear = je, _s.isoWeeksInYear = Ee, _s.date = rs, _s.day = _s.days = rn, _s.weekday = an, _s.isoWeekday = on, _s.dayOfYear = un, _s.hour = _s.hours = ls, _s.minute = _s.minutes = hs, _s.second = _s.seconds = cs, _s.millisecond = _s.milliseconds = ms, _s.utcOffset = zt, _s.utc = $t, _s.local = qt, _s.parseZone = Jt, _s.hasAlignedHourOffset = Bt, _s.isDST = Qt, _s.isDSTShifted = Xt, _s.isLocal = Kt, _s.isUtcOffset = te, _s.isUtc = ee, _s.isUTC = ee, _s.zoneAbbr = _n, _s.zoneName = yn, _s.dates = D("dates accessor is deprecated. Use date instead.", rs), _s.months = D("months accessor is deprecated. Use month instead", at), _s.years = D("years accessor is deprecated. Use year instead", qi), _s.zone = D("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779", Zt); var ys = _s, gs = { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, ps = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, vs = "Invalid date", Ds = "%d", Ms = /\d{1,2}/, Ss = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, Ys = T.prototype; Ys._calendar = gs, Ys.calendar = vn, Ys._longDateFormat = ps, Ys.longDateFormat = Dn, Ys._invalidDate = vs, Ys.invalidDate = Mn, Ys._ordinal = Ds, Ys.ordinal = Sn, Ys._ordinalParse = Ms, Ys.preparse = Yn, Ys.postformat = Yn, Ys._relativeTime = Ss, Ys.relativeTime = wn, Ys.pastFuture = kn, Ys.set = w, Ys.months = nt, Ys._months = Vi, Ys.monthsShort = it, Ys._monthsShort = Ni, Ys.monthsParse = st, Ys._monthsRegex = Ai, Ys.monthsRegex = dt, Ys._monthsShortRegex = Ii, Ys.monthsShortRegex = ut, Ys.week = qe, Ys._week = ss, Ys.firstDayOfYear = Be, Ys.firstDayOfWeek = Je, Ys.weekdays = tn, Ys._weekdays = as, Ys.weekdaysMin = nn, Ys._weekdaysMin = us, Ys.weekdaysShort = en, Ys._weekdaysShort = os, Ys.weekdaysParse = sn, Ys.isPM = cn, Ys._meridiemParse = ds, Ys.meridiem = fn, x("en", { ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function(t) { var e = t % 10, n = 1 === g(t % 100 / 10) ? "th" : 1 === e ? "st" : 2 === e ? "nd" : 3 === e ? "rd" : "th"; return t + n } }), t.lang = D("moment.lang is deprecated. Use moment.locale instead.", x), t.langData = D("moment.langData is deprecated. Use moment.localeData instead.", P); var ws = Math.abs, ks = En("ms"), Ts = En("s"), bs = En("m"), Os = En("h"), Ws = En("d"), xs = En("w"), Us = En("M"), Gs = En("y"), Ps = zn("milliseconds"), Cs = zn("seconds"), Fs = zn("minutes"), Hs = zn("hours"), Ls = zn("days"), Vs = zn("months"), Ns = zn("years"), Is = Math.round, As = { s: 45, m: 45, h: 22, d: 26, M: 11 }, Rs = Math.abs, Es = Nt.prototype; Es.abs = Pn, Es.add = Fn, Es.subtract = Hn, Es.as = An, Es.asMilliseconds = ks, Es.asSeconds = Ts, Es.asMinutes = bs, Es.asHours = Os, Es.asDays = Ws, Es.asWeeks = xs, Es.asMonths = Us, Es.asYears = Gs, Es.valueOf = Rn, Es._bubble = Vn, Es.get = jn, Es.milliseconds = Ps, Es.seconds = Cs, Es.minutes = Fs, Es.hours = Hs, Es.days = Ls, Es.weeks = Zn, Es.months = Vs, Es.years = Ns, Es.humanize = Bn, Es.toISOString = Qn, Es.toString = Qn, Es.toJSON = Qn, Es.locale = Te, Es.localeData = be, Es.toIsoString = D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", Qn), Es.lang = is, E("X", 0, 0, "unix"), E("x", 0, 0, "valueOf"), q("x", Mi), q("X", wi), X("X", function(t, e, n) { n._d = new Date(1e3 * parseFloat(t, 10)) }), X("x", function(t, e, n) { n._d = new Date(g(t)) }), t.version = "2.12.0", e(Ft), t.fn = ys, t.min = Lt, t.max = Vt, t.now = Qi, t.utc = o, t.unix = gn, t.months = On, t.isDate = i, t.locale = x, t.invalid = h, t.duration = ne, t.isMoment = _, t.weekdays = xn, t.parseZone = pn, t.localeData = P, t.isDuration = It, t.monthsShort = Wn, t.weekdaysMin = Gn, t.defineLocale = U, t.updateLocale = G, t.locales = C, t.weekdaysShort = Un, t.normalizeUnits = H, t.relativeTimeThreshold = Jn, t.prototype = ys; var js = t; return js }); /** * @module Bootstrap Material Datetimepicker * @see https://github.com/T00rk/bootstrap-material-datetimepicker * @version 2.0 */ ! function(t, e) { function i(e, i) { this.currentView = 0, this.minDate, this.maxDate, this._attachedEvents = [], this.element = e, this.$element = t(e), this.params = { date: !0, time: !0, format: "YYYY-MM-DD", minDate: null, maxDate: null, currentDate: null, lang: "en", weekStart: 0, shortTime: !1, cancelText: "Cancel", okText: "OK" }, this.params = t.fn.extend(this.params, i), this.name = "dtp_" + this.setName(), this.$element.attr("data-dtp", this.name), this.init() } var a = "bootstrapMaterialDatePicker", s = "plugin_" + a; e.locale("en"), t.fn[a] = function(e, a) { return this.each(function() { t.data(this, s) ? ("function" == typeof t.data(this, s)[e] && t.data(this, s)[e](a), "destroy" === e && delete t.data(this, s)) : t.data(this, s, new i(this, e)) }), this }, i.prototype = { init: function() { this.initDays(), this.initDates(), this.initTemplate(), this.initButtons(), this._attachEvent(t(window), "resize", this._centerBox(this)), this._attachEvent(this.$dtpElement.find(".dtp-content"), "click", this._onElementClick.bind(this)), this._attachEvent(this.$dtpElement, "click", this._onBackgroundClick.bind(this)), this._attachEvent(this.$dtpElement.find(".dtp-close > a"), "click", this._onCloseClick.bind(this)), this._attachEvent(this.$element, "click", this._onClick.bind(this)) }, initDays: function() { this.days = []; for (var t = this.params.weekStart; this.days.length < 7; t++) t > 6 && (t = 0), this.days.push(t.toString()) }, initDates: function() { if (this.$element.val().length > 0) "undefined" != typeof this.params.format && null !== this.params.format ? this.currentDate = e(this.$element.val(), this.params.format).locale(this.params.lang) : this.currentDate = e(this.$element.val()).locale(this.params.lang); else if ("undefined" != typeof this.$element.attr("value") && null !== this.$element.attr("value") && "" !== this.$element.attr("value")) "string" == typeof this.$element.attr("value") && ("undefined" != typeof this.params.format && null !== this.params.format ? this.currentDate = e(this.$element.attr("value"), this.params.format).locale(this.params.lang) : this.currentDate = e(this.$element.attr("value")).locale(this.params.lang)); else if ("undefined" != typeof this.params.currentDate && null !== this.params.currentDate) { if ("string" == typeof this.params.currentDate) "undefined" != typeof this.params.format && null !== this.params.format ? this.currentDate = e(this.params.currentDate, this.params.format).locale(this.params.lang) : this.currentDate = e(this.params.currentDate).locale(this.params.lang); else if ("undefined" == typeof this.params.currentDate.isValid || "function" != typeof this.params.currentDate.isValid) { var t = this.params.currentDate.getTime(); this.currentDate = e(t, "x").locale(this.params.lang) } else this.currentDate = this.params.currentDate; this.$element.val(this.currentDate.format(this.params.format)) } else this.currentDate = e(); if ("undefined" != typeof this.params.minDate && null !== this.params.minDate) if ("string" == typeof this.params.minDate) "undefined" != typeof this.params.format && null !== this.params.format ? this.minDate = e(this.params.minDate, this.params.format).locale(this.params.lang) : this.minDate = e(this.params.minDate).locale(this.params.lang); else if ("undefined" == typeof this.params.minDate.isValid || "function" != typeof this.params.minDate.isValid) { var t = this.params.minDate.getTime(); this.minDate = e(t, "x").locale(this.params.lang) } else this.minDate = this.params.minDate; if ("undefined" != typeof this.params.maxDate && null !== this.params.maxDate) if ("string" == typeof this.params.maxDate) "undefined" != typeof this.params.format && null !== this.params.format ? this.maxDate = e(this.params.maxDate, this.params.format).locale(this.params.lang) : this.maxDate = e(this.params.maxDate).locale(this.params.lang); else if ("undefined" == typeof this.params.maxDate.isValid || "function" != typeof this.params.maxDate.isValid) { var t = this.params.maxDate.getTime(); this.maxDate = e(t, "x").locale(this.params.lang) } else this.maxDate = this.params.maxDate; this.isAfterMinDate(this.currentDate) || (this.currentDate = e(this.minDate)), this.isBeforeMaxDate(this.currentDate) || (this.currentDate = e(this.maxDate)) }, initTemplate: function() { this.template = '', t("body").find("#" + this.name).length <= 0 && (t("body").append(this.template), this.dtpElement = t("body").find("#" + this.name), this.$dtpElement = t(this.dtpElement)) }, initButtons: function() { this._attachEvent(this.$dtpElement.find(".dtp-btn-cancel"), "click", this._onCancelClick.bind(this)), this._attachEvent(this.$dtpElement.find(".dtp-btn-ok"), "click", this._onOKClick.bind(this)), this._attachEvent(this.$dtpElement.find("a.dtp-select-month-before"), "click", this._onMonthBeforeClick.bind(this)), this._attachEvent(this.$dtpElement.find("a.dtp-select-month-after"), "click", this._onMonthAfterClick.bind(this)), this._attachEvent(this.$dtpElement.find("a.dtp-select-year-before"), "click", this._onYearBeforeClick.bind(this)), this._attachEvent(this.$dtpElement.find("a.dtp-select-year-after"), "click", this._onYearAfterClick.bind(this)) }, initMeridienButtons: function() { this.$dtpElement.find("a.dtp-meridien-am").off("click").on("click", this._onSelectAM.bind(this)), this.$dtpElement.find("a.dtp-meridien-pm").off("click").on("click", this._onSelectPM.bind(this)) }, initDate: function(t) { this.currentView = 0, this.$dtpElement.find(".dtp-picker-calendar").removeClass("hidden"), this.$dtpElement.find(".dtp-picker-datetime").addClass("hidden"); var e = "undefined" != typeof this.currentDate && null !== this.currentDate ? this.currentDate : null, i = this.generateCalendar(this.currentDate); if ("undefined" != typeof i.week && "undefined" != typeof i.days) { var a = this.constructHTMLCalendar(e, i); this.$dtpElement.find("a.dtp-select-day").off("click"), this.$dtpElement.find(".dtp-picker-calendar").html(a), this.$dtpElement.find("a.dtp-select-day").on("click", this._onSelectDate.bind(this)), this.toggleButtons(e) } this._centerBox(), this.showDate(e) }, initHours: function() { var _this = this; setTimeout(function() { if (_this.currentView = 1, !_this.params.date) { var e = _this.$dtpElement.find(".dtp-content").width(), i = _this.$dtpElement.find(".dtp-picker-clock").css("marginLeft").replace("px", ""), a = _this.$dtpElement.find(".dtp-picker-clock").css("marginRight").replace("px", ""), s = _this.$dtpElement.find(".dtp-picker").css("paddingLeft").replace("px", ""), n = _this.$dtpElement.find(".dtp-picker").css("paddingRight").replace("px", ""); _this.$dtpElement.find(".dtp-picker-clock").innerWidth(e - (parseInt(i) + parseInt(a) + parseInt(s) + parseInt(n))) } _this.showTime(_this.currentDate), _this.initMeridienButtons(), _this.$dtpElement.find(".dtp-picker-datetime").removeClass("hidden"), _this.$dtpElement.find(".dtp-picker-calendar").addClass("hidden"), _this.currentDate.hour() < 12 ? _this.$dtpElement.find("a.dtp-meridien-am").click() : _this.$dtpElement.find("a.dtp-meridien-pm").click(); for (var d = _this.$dtpElement.find(".dtp-picker-clock").parent().parent().css("paddingLeft").replace("px", ""), r = _this.$dtpElement.find(".dtp-picker-clock").parent().parent().css("paddingTop").replace("px", ""), l = _this.$dtpElement.find(".dtp-picker-clock").css("marginLeft").replace("px", ""), h = _this.$dtpElement.find(".dtp-picker-clock").css("marginTop").replace("px", ""), c = _this.$dtpElement.find(".dtp-picker-clock").innerWidth() / 2, p = c / 1.2, m = [], o = 0; 12 > o; ++o) { var f = p * Math.sin(2 * Math.PI * (o / 12)), u = p * Math.cos(2 * Math.PI * (o / 12)), v = t("
        ", { "class": "dtp-picker-time" }).css({ marginLeft: c + f + parseInt(d) / 2 - (parseInt(d) + parseInt(l)) + "px", marginTop: c - u - parseInt(h) / 2 - (parseInt(r) + parseInt(h)) + "px" }), D = 12 == _this.currentDate.format("h") ? 0 : _this.currentDate.format("h"), k = t("", { href: "javascript:void(0);", "class": "dtp-select-hour" }).data("hour", o).text(0 == o ? 12 : o); o == parseInt(D) && k.addClass("selected"), v.append(k), m.push(v) } _this.$dtpElement.find("a.dtp-select-hour").off("click"), _this.$dtpElement.find(".dtp-picker-clock").html(m), _this.toggleTime(!0), _this.$dtpElement.find(".dtp-picker-clock").css("height", _this.$dtpElement.find(".dtp-picker-clock").width() + (parseInt(r) + parseInt(h)) + "px"), _this.initHands(!0) }, 100); }, initMinutes: function() { this.currentView = 2, this.showTime(this.currentDate), this.initMeridienButtons(), this.currentDate.hour() < 12 ? this.$dtpElement.find("a.dtp-meridien-am").click() : this.$dtpElement.find("a.dtp-meridien-pm").click(), this.$dtpElement.find(".dtp-picker-calendar").addClass("hidden"), this.$dtpElement.find(".dtp-picker-datetime").removeClass("hidden"); for (var e = this.$dtpElement.find(".dtp-picker-clock").parent().parent().css("paddingLeft").replace("px", ""), i = this.$dtpElement.find(".dtp-picker-clock").parent().parent().css("paddingTop").replace("px", ""), a = this.$dtpElement.find(".dtp-picker-clock").css("marginLeft").replace("px", ""), s = this.$dtpElement.find(".dtp-picker-clock").css("marginTop").replace("px", ""), n = this.$dtpElement.find(".dtp-picker-clock").innerWidth() / 2, d = n / 1.2, r = [], l = 0; 60 > l; l += 5) { var h = d * Math.sin(2 * Math.PI * (l / 60)), c = d * Math.cos(2 * Math.PI * (l / 60)), p = t("
        ", { "class": "dtp-picker-time" }).css({ marginLeft: n + h + parseInt(e) / 2 - (parseInt(e) + parseInt(a)) + "px", marginTop: n - c - parseInt(s) / 2 - (parseInt(i) + parseInt(s)) + "px" }), m = t("", { href: "javascript:void(0);", "class": "dtp-select-minute" }).data("minute", l).text(2 == l.toString().length ? l : "0" + l); l == 5 * Math.round(this.currentDate.minute() / 5) && (m.addClass("selected"), this.currentDate.minute(l)), p.append(m), r.push(p) } this.$dtpElement.find("a.dtp-select-minute").off("click"), this.$dtpElement.find(".dtp-picker-clock").html(r), this.toggleTime(!1), this.$dtpElement.find(".dtp-picker-clock").css("height", this.$dtpElement.find(".dtp-picker-clock").width() + (parseInt(i) + parseInt(s)) + "px"), this.initHands(!1), this._centerBox() }, initHands: function(t) { this.$dtpElement.find(".dtp-picker-clock").append('
        '); var e = this.$dtpElement.find(".dtp-picker-clock").parent().parent().css("paddingLeft").replace("px", ""), i = (this.$dtpElement.find(".dtp-picker-clock").parent().parent().css("paddingTop").replace("px", ""), this.$dtpElement.find(".dtp-picker-clock").css("marginLeft").replace("px", "")), a = (this.$dtpElement.find(".dtp-picker-clock").css("marginTop").replace("px", ""), this.$dtpElement.find(".dtp-clock-center").width() / 2), s = this.$dtpElement.find(".dtp-clock-center").height() / 2, n = this.$dtpElement.find(".dtp-picker-clock").innerWidth() / 2, d = n / 1.7, r = n / 1.5; this.$dtpElement.find(".dtp-hour-hand").css({ left: n + 1.5 * parseInt(i) + "px", height: d + "px", marginTop: n - d - parseInt(e) + "px" }).addClass(t === !0 ? "on" : ""), this.$dtpElement.find(".dtp-minute-hand").css({ left: n + 1.5 * parseInt(i) + "px", height: r + "px", marginTop: n - r - parseInt(e) + "px" }).addClass(t === !1 ? "on" : ""), this.$dtpElement.find(".dtp-clock-center").css({ left: n + parseInt(e) + parseInt(i) - a + "px", marginTop: n - parseInt(i) / 2 - s + "px" }), this.animateHands(), this._centerBox() }, animateHands: function() { var t = this.currentDate.hour(); this.currentDate.minute(); this.rotateElement(this.$dtpElement.find(".dtp-hour-hand"), 30 * t), this.rotateElement(this.$dtpElement.find(".dtp-minute-hand"), 6 * (5 * Math.round(this.currentDate.minute() / 5))) }, isAfterMinDate: function(t, i, a) { var s = !0; if ("undefined" != typeof this.minDate && null !== this.minDate) { var n = e(this.minDate), d = e(t); i || a || (n.hour(0), n.minute(0), d.hour(0), d.minute(0)), n.second(0), d.second(0), n.millisecond(0), d.millisecond(0), a ? s = parseInt(d.format("X")) >= parseInt(n.format("X")) : (d.minute(0), n.minute(0), s = parseInt(d.format("X")) >= parseInt(n.format("X"))) } return s }, isBeforeMaxDate: function(t, i, a) { var s = !0; if ("undefined" != typeof this.maxDate && null !== this.maxDate) { var n = e(this.maxDate), d = e(t); i || a || (n.hour(0), n.minute(0), d.hour(0), d.minute(0)), n.second(0), d.second(0), n.millisecond(0), d.millisecond(0), a ? s = parseInt(d.format("X")) <= parseInt(n.format("X")) : (d.minute(0), n.minute(0), s = parseInt(d.format("X")) <= parseInt(n.format("X"))) } return s }, rotateElement: function(e, i) { t(e).css({ WebkitTransform: "rotate(" + i + "deg)", "-moz-transform": "rotate(" + i + "deg)" }) }, showDate: function(t) { t && (this.$dtpElement.find(".dtp-actual-day").html(t.locale(this.params.lang).format("dddd")), this.$dtpElement.find(".dtp-actual-month").html(t.locale(this.params.lang).format("MMM").toUpperCase()), this.$dtpElement.find(".dtp-actual-num").html(t.locale(this.params.lang).format("DD")), this.$dtpElement.find(".dtp-actual-year").html(t.locale(this.params.lang).format("YYYY"))) }, showTime: function(t) { if (t) { var e = 5 * Math.round(t.minute() / 5), i = (this.params.shortTime ? t.format("hh") : t.format("HH")) + ":" + (2 == e.toString().length ? e : "0" + e); this.params.date ? this.$dtpElement.find(".dtp-actual-time").html(i) : (this.params.shortTime ? this.$dtpElement.find(".dtp-actual-day").html(t.format("A")) : this.$dtpElement.find(".dtp-actual-day").html(" "), this.$dtpElement.find(".dtp-actual-maxtime").html(i)) } }, selectDate: function(t) { t && (this.currentDate.date(t), this.showDate(this.currentDate), this.$element.trigger("dateSelected", this.currentDate)) }, generateCalendar: function(t) { var i = {}; if (null !== t) { var a = e(t).locale(this.params.lang).startOf("month"), s = e(t).locale(this.params.lang).endOf("month"), n = a.format("d"); i.week = this.days, i.days = []; for (var d = a.date(); d <= s.date(); d++) { if (d === a.date()) { var r = i.week.indexOf(n.toString()); if (r > 0) for (var l = 0; r > l; l++) i.days.push(0) } i.days.push(e(a).locale(this.params.lang).date(d)) } } return i }, constructHTMLCalendar: function(t, i) { var a = ""; a += '
        ' + t.locale(this.params.lang).format("MMMM YYYY") + "
        ", a += '
        '; for (var s = 0; s < i.week.length; s++) a += ""; a += "", a += ""; for (var s = 0; s < i.days.length; s++) s % 7 == 0 && (a += ""), a += '"); return a += "
        " + e(parseInt(i.week[s]), "d").locale(this.params.lang).format("dd").substring(0, 1) + "
        ', 0 != i.days[s] && (a += this.isBeforeMaxDate(e(i.days[s]), !1, !1) === !1 || this.isAfterMinDate(e(i.days[s]), !1, !1) === !1 ? '' + e(i.days[s]).locale(this.params.lang).format("DD") + "" : e(i.days[s]).locale(this.params.lang).format("DD") === e(this.currentDate).locale(this.params.lang).format("DD") ? '' + e(i.days[s]).locale(this.params.lang).format("DD") + "" : '' + e(i.days[s]).locale(this.params.lang).format("DD") + "", a += "
        " }, setName: function() { for (var t = "", e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; 5 > i; i++) t += e.charAt(Math.floor(Math.random() * e.length)); return t }, isPM: function() { return this.$dtpElement.find("a.dtp-meridien-pm").hasClass("selected") }, setElementValue: function() { this.$element.trigger("beforeChange", this.currentDate), "undefined" != typeof t.material && this.$element.removeClass("empty"), this.$element.val(e(this.currentDate).locale(this.params.lang).format(this.params.format)), this.$element.parent().find(".rd-input-label").addClass("focus"), this.$element.trigger("change", this.currentDate) }, toggleButtons: function(t) { if (t && t.isValid()) { var i = e(t).locale(this.params.lang).startOf("month"), a = e(t).locale(this.params.lang).endOf("month"); this.isAfterMinDate(i, !1, !1) ? this.$dtpElement.find("a.dtp-select-month-before").removeClass("invisible") : this.$dtpElement.find("a.dtp-select-month-before").addClass("invisible"), this.isBeforeMaxDate(a, !1, !1) ? this.$dtpElement.find("a.dtp-select-month-after").removeClass("invisible") : this.$dtpElement.find("a.dtp-select-month-after").addClass("invisible"); var s = e(t).locale(this.params.lang).startOf("year"), n = e(t).locale(this.params.lang).endOf("year"); this.isAfterMinDate(s, !1, !1) ? this.$dtpElement.find("a.dtp-select-year-before").removeClass("invisible") : this.$dtpElement.find("a.dtp-select-year-before").addClass("invisible"), this.isBeforeMaxDate(n, !1, !1) ? this.$dtpElement.find("a.dtp-select-year-after").removeClass("invisible") : this.$dtpElement.find("a.dtp-select-year-after").addClass("invisible") } }, toggleTime: function(i) { if (i) { this.$dtpElement.find("a.dtp-select-hour").removeClass("disabled"), this.$dtpElement.find("a.dtp-select-hour").removeProp("disabled"), this.$dtpElement.find("a.dtp-select-hour").off("click"); var a = this; this.$dtpElement.find("a.dtp-select-hour").each(function() { var i = t(this).data("hour"), s = e(a.currentDate); s.hour(a.convertHours(i)).minute(0).second(0), a.isAfterMinDate(s, !0, !1) === !1 || a.isBeforeMaxDate(s, !0, !1) === !1 ? (t(this).prop("disabled"), t(this).addClass("disabled")) : t(this).on("click", a._onSelectHour.bind(a)) }) } else { this.$dtpElement.find("a.dtp-select-minute").removeClass("disabled"), this.$dtpElement.find("a.dtp-select-minute").removeProp("disabled"), this.$dtpElement.find("a.dtp-select-minute").off("click"); var a = this; this.$dtpElement.find("a.dtp-select-minute").each(function() { var i = t(this).data("minute"), s = e(a.currentDate); s.minute(i).second(0), a.isAfterMinDate(s, !0, !0) === !1 || a.isBeforeMaxDate(s, !0, !0) === !1 ? (t(this).prop("disabled"), t(this).addClass("disabled")) : t(this).on("click", a._onSelectMinute.bind(a)) }) } }, _attachEvent: function(t, e, i) { t.on(e, i), this._attachedEvents.push([t, e, i]) }, _detachEvents: function() { for (var t = this._attachedEvents.length - 1; t >= 0; t--) this._attachedEvents[t][0].off(this._attachedEvents[t][1], this._attachedEvents[t][2]), this._attachedEvents.splice(t, 1) }, _onClick: function() { this.currentView = 0, this.$element.blur(), this.initDates(), this.show(), this.params.date ? (this.$dtpElement.find(".dtp-date").removeClass("hidden"), this.initDate()) : this.params.time && (this.$dtpElement.find(".dtp-time").removeClass("hidden"), this.initHours()) }, _onBackgroundClick: function(t) { t.stopPropagation(), this.hide() }, _onElementClick: function(t) { t.stopPropagation() }, _onCloseClick: function() { this.hide() }, _onOKClick: function() { switch (this.currentView) { case 0: this.params.time === !0 ? this.initHours() : (this.setElementValue(), this.hide()); break; case 1: this.initMinutes(); break; case 2: this.setElementValue(), this.hide() } }, _onCancelClick: function() { if (this.params.time) switch (this.currentView) { case 0: this.hide(); break; case 1: this.params.date ? this.initDate() : this.hide(); break; case 2: this.initHours() } else this.hide() }, _onMonthBeforeClick: function() { this.currentDate.subtract(1, "months"), this.initDate(this.currentDate) }, _onMonthAfterClick: function() { this.currentDate.add(1, "months"), this.initDate(this.currentDate) }, _onYearBeforeClick: function() { this.currentDate.subtract(1, "years"), this.initDate(this.currentDate) }, _onYearAfterClick: function() { this.currentDate.add(1, "years"), this.initDate(this.currentDate) }, _onSelectDate: function(e) { this.$dtpElement.find("a.dtp-select-day").removeClass("selected"), t(e.currentTarget).addClass("selected"), this.selectDate(t(e.currentTarget).parent().data("date")) }, _onSelectHour: function(e) { this.$dtpElement.find("a.dtp-select-hour").removeClass("selected"), t(e.currentTarget).addClass("selected"); var i = parseInt(t(e.currentTarget).data("hour")); this.isPM() && (i += 12), this.currentDate.hour(i), this.showTime(this.currentDate), this.animateHands() }, _onSelectMinute: function(e) { this.$dtpElement.find("a.dtp-select-minute").removeClass("selected"), t(e.currentTarget).addClass("selected"), this.currentDate.minute(parseInt(t(e.currentTarget).data("minute"))), this.showTime(this.currentDate), this.animateHands() }, _onSelectAM: function(e) { t(".dtp-actual-meridien").find("a").removeClass("selected"), t(e.currentTarget).addClass("selected"), this.currentDate.hour() >= 12 && this.currentDate.subtract(12, "hours") && this.showTime(this.currentDate), this.toggleTime(1 === this.currentView) }, _onSelectPM: function(e) { t(".dtp-actual-meridien").find("a").removeClass("selected"), t(e.currentTarget).addClass("selected"), this.currentDate.hour() < 12 && this.currentDate.add(12, "hours") && this.showTime(this.currentDate), this.toggleTime(1 === this.currentView) }, convertHours: function(t) { var e = t; return 12 > t && this.isPM() && (e += 12), e }, setDate: function(t) { this.params.currentDate = t, this.initDates() }, setMinDate: function(t) { this.params.minDate = t, this.initDates() }, setMaxDate: function(t) { this.params.maxDate = t, this.initDates() }, destroy: function() { this._detachEvents(), this.$dtpElement.remove() }, show: function() { var _this = this; setTimeout(function() { _this.$dtpElement.removeClass("hidden"), _this._centerBox() }, 100); }, hide: function() { this.$dtpElement.addClass("hidden") }, resetDate: function() {}, _centerBox: function() { var t = (this.$dtpElement.height() - this.$dtpElement.find(".dtp-content").height()) / 2; this.$dtpElement.find(".dtp-content").css("marginLeft", -(this.$dtpElement.find(".dtp-content").width() / 2) + "px"), this.$dtpElement.find(".dtp-content").css("top", t + "px") } } }(jQuery, moment); /** * @module TimeCircles * @author Wim Barelds * @version 1.5.3 * @see http://www.wimbarelds.nl/ * @license MIT License */ (function(f) { function A(a) { a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(a, b, d, e) { return b + b + d + d + e + e }); return (a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a)) ? { r: parseInt(a[1], 16), g: parseInt(a[2], 16), b: parseInt(a[3], 16) } : null } function B() { var a = document.createElement("canvas"); return !(!a.getContext || !a.getContext("2d")) } function n() { return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1) } function z(a, c, b, d, e) { for (var h = {}, l = {}, f = {}, g = {}, m = {}, k = {}, r = null, q = 0; q < d.length; q++) { var p = d[q], r = null === r ? b / t[p] : t[r] / t[p], u = a / t[p], v = c / t[p]; e && (u = 0 < u ? Math.floor(u) : Math.ceil(u), v = 0 < v ? Math.floor(v) : Math.ceil(v)); "Days" !== p && (u %= r, v %= r); h[p] = u; f[p] = Math.abs(u); l[p] = v; k[p] = Math.abs(v); g[p] = Math.abs(u) / r; m[p] = Math.abs(v) / r; r = p } return { raw_time: h, raw_old_time: l, time: f, old_time: k, pct: g, old_pct: m } } function C(a) { for (var c = ["webkit", "moz"], b = 0; b < c.length && !a.requestAnimationFrame; ++b) a.requestAnimationFrame = a[c[b] + "RequestAnimationFrame"], a.cancelAnimationFrame = a[c[b] + "CancelAnimationFrame"]; a.requestAnimationFrame && a.cancelAnimationFrame || (a.requestAnimationFrame = function(c, b, h) { "undefined" === typeof h && (h = { data: { last_frame: 0 } }); var l = (new Date).getTime(), f = Math.max(0, 16 - (l - h.data.last_frame)); b = a.setTimeout(function() { c(l + f) }, f); h.data.last_frame = l + f; return b }, a.cancelAnimationFrame = function(a) { clearTimeout(a) }) } var m = window; Object.keys || (Object.keys = function() { var a = Object.prototype.hasOwnProperty, c = !{ toString: null }.propertyIsEnumerable("toString"), b = "toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "), d = b.length; return function(e) { if ("object" !== typeof e && ("function" !== typeof e || null === e)) throw new TypeError("Object.keys called on non-object"); var h = [], l; for (l in e) a.call(e, l) && h.push(l); if (c) for (l = 0; l < d; l++) a.call(e, b[l]) && h.push(b[l]); return h } }()); var x = !1, y = ["Days", "Hours", "Minutes", "Seconds"], D = { Seconds: "Minutes", Minutes: "Hours", Hours: "Days", Days: "Years" }, t = { Seconds: 1, Minutes: 60, Hours: 3600, Days: 86400, Months: 2678400, Years: 31536E3 }; Array.prototype.indexOf || (Array.prototype.indexOf = function(a, c) { var b = this.length >>> 0, d = Number(c) || 0, d = 0 > d ? Math.ceil(d) : Math.floor(d); for (0 > d && (d += b); d < b; d++) if (d in this && this[d] === a) return d; return -1 }); var w = {}, g = function(a, c) { this.element = a; this.container; this.listeners = null; this.data = { paused: !1, last_frame: 0, animation_frame: null, interval_fallback: null, timer: !1, total_duration: null, prev_time: null, drawn_units: [], text_elements: { Days: null, Hours: null, Minutes: null, Seconds: null }, attributes: { canvas: null, context: null, item_size: null, line_width: null, radius: null, outer_radius: null }, state: { fading: { Days: !1, Hours: !1, Minutes: !1, Seconds: !1 } } }; this.config = null; this.setOptions(c); this.initialize() }; g.prototype.clearListeners = function() { this.listeners = { all: [], visible: [] } }; g.prototype.addTime = function(a) { if (this.data.attributes.ref_date instanceof Date) { var c = this.data.attributes.ref_date; c.setSeconds(c.getSeconds() + a) } else isNaN(this.data.attributes.ref_date) || (this.data.attributes.ref_date += 1E3 * a) }; g.prototype.initialize = function(a) { this.data.drawn_units = []; for (var c = 0; c < Object.keys(this.config.time).length; c++) { var b = Object.keys(this.config.time)[c]; this.config.time[b].show && this.data.drawn_units.push(b) } f(this.element).children("div.time_circles").remove(); "undefined" === typeof a && (a = !0); (a || null === this.listeners) && this.clearListeners(); this.container = f("
        "); this.container.addClass("time_circles"); this.container.appendTo(this.element); c = this.element.offsetHeight; a = this.element.offsetWidth; 0 === c && (c = f(this.element).height()); 0 === a && (a = f(this.element).width()); 0 === c && 0 < a ? c = a / this.data.drawn_units.length : 0 === a && 0 < c && (a = c * this.data.drawn_units.length); b = document.createElement("canvas"); b.width = a; b.height = c; this.data.attributes.canvas = f(b); this.data.attributes.canvas.appendTo(this.container); var d = B(); d || "undefined" === typeof G_vmlCanvasManager || (G_vmlCanvasManager.initElement(b), d = x = !0); d && (this.data.attributes.context = b.getContext("2d")); this.data.attributes.item_size = Math.min(a / this.data.drawn_units.length, c); this.data.attributes.line_width = this.data.attributes.item_size * this.config.fg_width; this.data.attributes.radius = (.8 * this.data.attributes.item_size - this.data.attributes.line_width) / 2; this.data.attributes.outer_radius = this.data.attributes.radius + .5 * Math.max(this.data.attributes.line_width, this.data.attributes.line_width * this.config.bg_width); var c = 0, e; for (e in this.data.text_elements) this.config.time[e].show && (a = f("
        "), a.addClass("textDiv_" + e), a.css("top", Math.round(.35 * this.data.attributes.item_size)), a.css("left", Math.round(c++ * this.data.attributes.item_size)), a.css("width", this.data.attributes.item_size), a.appendTo(this.container), b = f("

        "), b.text(this.config.time[e].text), b.css("font-size", Math.round(this.config.text_size * this.data.attributes.item_size)), b.css("line-height", Math.round(this.config.text_size * this.data.attributes.item_size) + "px"), b.appendTo(a), b = f(""), b.css("font-size", Math.round(3 * this.config.text_size * this.data.attributes.item_size)), b.css("line-height", Math.round(this.config.text_size * this.data.attributes.item_size) + "px"), b.appendTo(a), this.data.text_elements[e] = b); this.start(); this.config.start || (this.data.paused = !0); var h = this; this.data.interval_fallback = m.setInterval(function() { h.update.call(h, !0) }, 100) }; g.prototype.update = function(a) { if ("undefined" === typeof a) a = !1; else if (a && this.data.paused) return; x && this.data.attributes.context.clearRect(0, 0, this.data.attributes.canvas[0].width, this.data.attributes.canvas[0].hright); var c, b, d = this.data.prev_time; c = new Date; this.data.prev_time = c; null === d && (d = c); if (!this.config.count_past_zero && c > this.data.attributes.ref_date) { for (b = 0; b < this.data.drawn_units.length; b++) { var e = this.data.drawn_units[b]; this.data.text_elements[e].text("0"); var h = b * this.data.attributes.item_size + this.data.attributes.item_size / 2, l = this.data.attributes.item_size / 2, f = this.config.time[e].color; this.drawArc(h, l, f, 0) } this.stop() } else { c = (this.data.attributes.ref_date - c) / 1E3; b = (this.data.attributes.ref_date - d) / 1E3; var e = "smooth" !== this.config.animation, d = z(c, b, this.data.total_duration, this.data.drawn_units, e), g = z(c, b, t.Years, y, e), k = b = 0, n = null, r = this.data.drawn_units.slice(); for (b in y) e = y[b], Math.floor(g.raw_time[e]) !== Math.floor(g.raw_old_time[e]) && this.notifyListeners(e, Math.floor(g.time[e]), Math.floor(c), "all"), 0 > r.indexOf(e) || (Math.floor(d.raw_time[e]) !== Math.floor(d.raw_old_time[e]) && this.notifyListeners(e, Math.floor(d.time[e]), Math.floor(c), "visible"), a || (this.data.text_elements[e].text(Math.floor(Math.abs(d.time[e]))), h = k * this.data.attributes.item_size + this.data.attributes.item_size / 2, l = this.data.attributes.item_size / 2, f = this.config.time[e].color, "smooth" === this.config.animation ? (null === n || x || (Math.floor(d.time[n]) > Math.floor(d.old_time[n]) ? (this.radialFade(h, l, f, 1, e), this.data.state.fading[e] = !0) : Math.floor(d.time[n]) < Math.floor(d.old_time[n]) && (this.radialFade(h, l, f, 0, e), this.data.state.fading[e] = !0)), this.data.state.fading[e] || this.drawArc(h, l, f, d.pct[e])) : this.animateArc(h, l, f, d.pct[e], d.old_pct[e], (new Date).getTime() + 200)), n = e, k++); if (!this.data.paused && !a) { var q = this, p = function() { q.update.call(q) }; "smooth" === this.config.animation ? this.data.animation_frame = m.requestAnimationFrame(p, q.element, q) : (a = c % 1 * 1E3, 0 > a && (a = 1E3 + a), q.data.animation_frame = m.setTimeout(function() { q.data.animation_frame = m.requestAnimationFrame(p, q.element, q) }, a + 50)) } } }; g.prototype.animateArc = function(a, c, b, d, e, h) { if (null !== this.data.attributes.context) if (.5 < Math.abs(e - d)) 0 === d ? this.radialFade(a, c, b, 1) : this.radialFade(a, c, b, 0); else { var f = (200 - (h - (new Date).getTime())) / 200; 1 < f && (f = 1); this.drawArc(a, c, b, e * (1 - f) + d * f); if (!(1 <= f)) { var g = this; m.requestAnimationFrame(function() { g.animateArc(a, c, b, d, e, h) }, this.element) } } }; g.prototype.drawArc = function(a, c, b, d) { if (null !== this.data.attributes.context) { var e = Math.max(this.data.attributes.outer_radius, this.data.attributes.item_size / 2); x || this.data.attributes.context.clearRect(a - e, c - e, 2 * e, 2 * e); this.config.use_background && (this.data.attributes.context.beginPath(), this.data.attributes.context.arc(a, c, this.data.attributes.radius, 0, 2 * Math.PI, !1), this.data.attributes.context.lineWidth = this.data.attributes.line_width * this.config.bg_width, this.data.attributes.context.strokeStyle = this.config.circle_bg_color, this.data.attributes.context.stroke()); var f, e = -.5 * Math.PI + this.config.start_angle / 360 * 2 * Math.PI; f = 2 * d * Math.PI; "Both" === this.config.direction ? (d = !1, e -= f / 2, f = e + f) : "Clockwise" === this.config.direction ? (d = !1, f = e + f) : (d = !0, f = e - f); this.data.attributes.context.beginPath(); this.data.attributes.context.arc(a, c, this.data.attributes.radius, e, f, d); this.data.attributes.context.lineWidth = this.data.attributes.line_width; this.data.attributes.context.strokeStyle = b; this.data.attributes.context.stroke() } }; g.prototype.radialFade = function(a, c, b, d, e) { var f = A(b), g = this; b = .2 * (1 === d ? -1 : 1); var k; for (k = 0; 1 >= d && 0 <= d; k++)(function() { var b = "rgba(" + f.r + ", " + f.g + ", " + f.b + ", " + Math.round(10 * d) / 10 + ")"; m.setTimeout(function() { g.drawArc(a, c, b, 1) }, 50 * k) })(), d += b; m.setTimeout(function() { g.data.state.fading[e] = !1 }, 50 * k) }; g.prototype.timeLeft = function() { return this.data.paused && "number" === typeof this.data.timer ? this.data.timer : (this.data.attributes.ref_date - new Date) / 1E3 }; g.prototype.start = function() { m.cancelAnimationFrame(this.data.animation_frame); m.clearTimeout(this.data.animation_frame); var a = f(this.element).data("date"); "undefined" === typeof a && (a = f(this.element).attr("data-date")); if ("string" === typeof a) { var c = this.data.attributes; var b = a.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{1,2}:[0-9]{2}:[0-9]{2}$/); null !== b && 0 < b.length ? (b = a.split(" "), a = b[0].split("-"), b = b[1].split(":"), a = new Date(a[0], a[1] - 1, a[2], b[0], b[1], b[2])) : (b = Date.parse(a), isNaN(b) ? (b = Date.parse(a.replace(/-/g, "/").replace("T", " ")), a = isNaN(b) ? new Date : b) : a = b); c.ref_date = a } else "number" === typeof this.data.timer ? this.data.paused && (this.data.attributes.ref_date = (new Date).getTime() + 1E3 * this.data.timer) : (c = f(this.element).data("timer"), "undefined" === typeof c && (c = f(this.element).attr("data-timer")), "string" === typeof c && (c = parseFloat(c)), "number" === typeof c ? (this.data.timer = c, this.data.attributes.ref_date = (new Date).getTime() + 1E3 * c) : this.data.attributes.ref_date = this.config.ref_date); this.data.paused = !1; this.update.call(this) }; g.prototype.restart = function() { this.data.timer = !1; this.start() }; g.prototype.stop = function() { "number" === typeof this.data.timer && (this.data.timer = this.timeLeft(this)); this.data.paused = !0; m.cancelAnimationFrame(this.data.animation_frame) }; g.prototype.destroy = function() { this.clearListeners(); this.stop(); m.clearInterval(this.data.interval_fallback); this.data.interval_fallback = null; this.container.remove(); f(this.element).removeAttr("data-tc-id"); f(this.element).removeData("tc-id") }; g.prototype.setOptions = function(a) { null === this.config && (this.default_options.ref_date = new Date, this.config = f.extend(!0, {}, this.default_options)); f.extend(!0, this.config, a); m = this.config.use_top_frame ? window.top : window; "undefined" !== typeof m.TC_Instance_List ? w = m.TC_Instance_List : m.TC_Instance_List = w; C(m); this.data.total_duration = this.config.total_duration; if ("string" === typeof this.data.total_duration) if ("undefined" !== typeof t[this.data.total_duration]) this.data.total_duration = t[this.data.total_duration]; else if ("Auto" === this.data.total_duration) for (a = 0; a < Object.keys(this.config.time).length; a++) { var c = Object.keys(this.config.time)[a]; if (this.config.time[c].show) { this.data.total_duration = t[D[c]]; break } } else this.data.total_duration = t.Years, console.error("Valid values for TimeCircles config.total_duration are either numeric, or (string) Years, Months, Days, Hours, Minutes, Auto") }; g.prototype.addListener = function(a, c, b) { "function" === typeof a && ("undefined" === typeof b && (b = "visible"), this.listeners[b].push({ func: a, scope: c })) }; g.prototype.notifyListeners = function(a, c, b, d) { for (var e = 0; e < this.listeners[d].length; e++) { var f = this.listeners[d][e]; f.func.apply(f.scope, [a, c, b]) } }; g.prototype.default_options = { ref_date: new Date, start: !0, animation: "smooth", count_past_zero: !0, circle_bg_color: "#60686F", use_background: !0, fg_width: .1, bg_width: 1.2, text_size: .07, total_duration: "Auto", direction: "Clockwise", use_top_frame: !1, start_angle: 0, time: { Days: { show: !0, text: "Days", color: "#FC6" }, Hours: { show: !0, text: "Hours", color: "#9CF" }, Minutes: { show: !0, text: "Minutes", color: "#BFB" }, Seconds: { show: !0, text: "Seconds", color: "#F99" } } }; var k = function(a, c) { this.elements = a; this.options = c; this.foreach() }; k.prototype.getInstance = function(a) { var c = f(a).data("tc-id"); "undefined" === typeof c && (c = n() + n() + "-" + n() + "-" + n() + "-" + n() + "-" + n() + n() + n(), f(a).attr("data-tc-id", c)); if ("undefined" === typeof w[c]) { var b = this.options, d = f(a).data("options"); "string" === typeof d && (d = JSON.parse(d)); "object" === typeof d && (b = f.extend(!0, {}, this.options, d)); a = new g(a, b); w[c] = a } else a = w[c], "undefined" !== typeof this.options && a.setOptions(this.options); return a }; k.prototype.addTime = function(a) { this.foreach(function(c) { c.addTime(a) }) }; k.prototype.foreach = function(a) { var c = this; this.elements.each(function() { var b = c.getInstance(this); "function" === typeof a && a(b) }); return this }; k.prototype.start = function() { this.foreach(function(a) { a.start() }); return this }; k.prototype.stop = function() { this.foreach(function(a) { a.stop() }); return this }; k.prototype.restart = function() { this.foreach(function(a) { a.restart() }); return this }; k.prototype.rebuild = function() { this.foreach(function(a) { a.initialize(!1) }); return this }; k.prototype.getTime = function() { return this.getInstance(this.elements[0]).timeLeft() }; k.prototype.addListener = function(a, c) { "undefined" === typeof c && (c = "visible"); var b = this; this.foreach(function(d) { d.addListener(a, b.elements, c) }); return this }; k.prototype.destroy = function() { this.foreach(function(a) { a.destroy() }); return this }; k.prototype.end = function() { return this.elements }; f.fn.TimeCircles = function(a) { return new k(this, a) } })(jQuery); /** * @module Slick * @author Ken Wheeler * @see http://kenwheeler.github.io/slick * @version 1.6.0 */ ! function(a) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], a) : "undefined" != typeof exports ? module.exports = a(require("jquery")) : a(jQuery) }(function(a) { "use strict"; var b = window.Slick || {}; b = function() { function c(c, d) { var f, e = this; e.defaults = { accessibility: !0, adaptiveHeight: !1, appendArrows: a(c), appendDots: a(c), arrows: !0, asNavFor: null, prevArrow: '', nextArrow: '', autoplay: !1, autoplaySpeed: 3e3, centerMode: !1, centerPadding: "50px", cssEase: "ease", customPaging: function(b, c) { return a('', tClose: "Close (Esc)", tLoading: "Loading..." } }, a.fn.magnificPopup = function(c) { A(); var d = a(this); if ("string" == typeof c) if ("open" === c) { var e, f = u ? d.data("magnificPopup") : d[0].magnificPopup, g = parseInt(arguments[1], 10) || 0; f.items ? e = f.items[g] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(g)), b._openClick({ mfpEl: e }, d, f) } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1)); else c = a.extend(!0, {}, c), u ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c); return d }; var C, D, E, F = "inline", G = function() { E && (D.after(E.addClass(C)).detach(), E = null) }; a.magnificPopup.registerModule(F, { options: { hiddenClass: "hide", markup: "", tNotFound: "Content not found" }, proto: { initInline: function() { b.types.push(F), w(h + "." + F, function() { G() }) }, getInline: function(c, d) { if (G(), c.src) { var e = b.st.inline, f = a(c.src); if (f.length) { var g = f[0].parentNode; g && g.tagName && (D || (C = e.hiddenClass, D = x(C), C = "mfp-" + C), E = f.after(D).detach().removeClass(C)), b.updateStatus("ready") } else b.updateStatus("error", e.tNotFound), f = a("
        "); return c.inlineElement = f, f } return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d } } }); var H, I = "ajax", J = function() { H && a(document.body).removeClass(H) }, K = function() { J(), b.req && b.req.abort() }; a.magnificPopup.registerModule(I, { options: { settings: null, cursor: "mfp-ajax-cur", tError: 'The content could not be loaded.' }, proto: { initAjax: function() { b.types.push(I), H = b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K) }, getAjax: function(c) { H && a(document.body).addClass(H), b.updateStatus("loading"); var d = a.extend({ url: c.src, success: function(d, e, f) { var g = { data: d, xhr: f }; y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function() { b.wrap.addClass(q) }, 16), b.updateStatus("ready"), y("AjaxContentAdded") }, error: function() { J(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src)) } }, b.st.ajax.settings); return b.req = a.ajax(d), "" } } }); var L, M = function(c) { if (c.data && void 0 !== c.data.title) return c.data.title; var d = b.st.image.titleSrc; if (d) { if (a.isFunction(d)) return d.call(b, c); if (c.el) return c.el.attr(d) || "" } return "" }; a.magnificPopup.registerModule("image", { options: { markup: '
        ', cursor: "mfp-zoom-out-cur", titleSrc: "title", verticalFit: !0, tError: 'The image could not be loaded.' }, proto: { initImage: function() { var c = b.st.image, d = ".image"; b.types.push("image"), w(m + d, function() { "image" === b.currItem.type && c.cursor && a(document.body).addClass(c.cursor) }), w(h + d, function() { c.cursor && a(document.body).removeClass(c.cursor), v.off("resize" + p) }), w("Resize" + d, b.resizeImage), b.isLowIE && w("AfterChange", b.resizeImage) }, resizeImage: function() { var a = b.currItem; if (a && a.img && b.st.image.verticalFit) { var c = 0; b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)), a.img.css("max-height", b.wH - c) } }, _onImageHasSize: function(a) { a.img && (a.hasSize = !0, L && clearInterval(L), a.isCheckingImgSize = !1, y("ImageHasSize", a), a.imgHidden && (b.content && b.content.removeClass("mfp-loading"), a.imgHidden = !1)) }, findImageSize: function(a) { var c = 0, d = a.img[0], e = function(f) { L && clearInterval(L), L = setInterval(function() { return d.naturalWidth > 0 ? void b._onImageHasSize(a) : (c > 200 && clearInterval(L), c++, void(3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500))) }, f) }; e(1) }, getImage: function(c, d) { var e = 0, f = function() { c && (c.img[0].complete ? (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("ready")), c.hasSize = !0, c.loaded = !0, y("ImageLoadComplete")) : (e++, 200 > e ? setTimeout(f, 100) : g())) }, g = function() { c && (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("error", h.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0) }, h = b.st.image, i = d.find(".mfp-img"); if (i.length) { var j = document.createElement("img"); j.className = "mfp-img", c.el && c.el.find("img").length && (j.alt = c.el.find("img").attr("alt")), c.img = a(j).on("load.mfploader", f).on("error.mfploader", g), j.src = c.src, i.is("img") && (c.img = c.img.clone()), j = c.img[0], j.naturalWidth > 0 ? c.hasSize = !0 : j.width || (c.hasSize = !1) } return b._parseMarkup(d, { title: M(c), img_replaceWith: c.img }, c), b.resizeImage(), c.hasSize ? (L && clearInterval(L), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", h.tError.replace("%url%", c.src))) : (d.removeClass("mfp-loading"), b.updateStatus("ready")), d) : (b.updateStatus("loading"), c.loading = !0, c.hasSize || (c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d) } } }); var N, O = function() { return void 0 === N && (N = void 0 !== document.createElement("p").style.MozTransform), N }; a.magnificPopup.registerModule("zoom", { options: { enabled: !1, easing: "ease-in-out", duration: 300, opener: function(a) { return a.is("img") ? a : a.find("img") } }, proto: { initZoom: function() { var a, c = b.st.zoom, d = ".zoom"; if (c.enabled && b.supportsTransition) { var e, f, g = c.duration, j = function(a) { var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), d = "all " + c.duration / 1e3 + "s " + c.easing, e = { position: "fixed", zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden" }, f = "transition"; return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b }, k = function() { b.content.css("visibility", "visible") }; w("BuildControls" + d, function() { if (b._allowZoom()) { if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return void k(); f = j(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function() { f.css(b._getOffset(!0)), e = setTimeout(function() { k(), setTimeout(function() { f.remove(), a = f = null, y("ZoomAnimationEnded") }, 16) }, g) }, 16) } }), w(i + d, function() { if (b._allowZoom()) { if (clearTimeout(e), b.st.removalDelay = g, !a) { if (a = b._getItemToZoom(), !a) return; f = j(a) } f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function() { f.css(b._getOffset()) }, 16) } }), w(h + d, function() { b._allowZoom() && (k(), f && f.remove(), a = null) }) } }, _allowZoom: function() { return "image" === b.currItem.type }, _getItemToZoom: function() { return b.currItem.hasSize ? b.currItem.img : !1 }, _getOffset: function(c) { var d; d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem); var e = d.offset(), f = parseInt(d.css("padding-top"), 10), g = parseInt(d.css("padding-bottom"), 10); e.top -= a(window).scrollTop() - f; var h = { width: d.width(), height: (u ? d.innerHeight() : d[0].offsetHeight) - g - f }; return O() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h } } }); var P = "iframe", Q = "//about:blank", R = function(a) { if (b.currTemplate[P]) { var c = b.currTemplate[P].find("iframe"); c.length && (a || (c[0].src = Q), b.isIE8 && c.css("display", a ? "block" : "none")) } }; a.magnificPopup.registerModule(P, { options: { markup: '
        ', srcAction: "iframe_src", patterns: { youtube: { index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1" }, vimeo: { index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1" }, gmaps: { index: "//maps.google.", src: "%id%&output=embed" } } }, proto: { initIframe: function() { b.types.push(P), w("BeforeChange", function(a, b, c) { b !== c && (b === P ? R() : c === P && R(!0)) }), w(h + "." + P, function() { R() }) }, getIframe: function(c, d) { var e = c.src, f = b.st.iframe; a.each(f.patterns, function() { return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id) + this.id.length, e.length) : this.id.call(this, e)), e = this.src.replace("%id%", e), !1) : void 0 }); var g = {}; return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d } } }); var S = function(a) { var c = b.items.length; return a > c - 1 ? a - c : 0 > a ? c + a : a }, T = function(a, b, c) { return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c) }; a.magnificPopup.registerModule("gallery", { options: { enabled: !1, arrowMarkup: '', preload: [0, 2], navigateByImgClick: !0, arrows: !0, tPrev: "Previous (Left arrow key)", tNext: "Next (Right arrow key)", tCounter: "%curr% of %total%" }, proto: { initGallery: function() { var c = b.st.gallery, e = ".mfp-gallery", g = Boolean(a.fn.mfpFastClick); return b.direction = !0, c && c.enabled ? (f += " mfp-gallery", w(m + e, function() { c.navigateByImgClick && b.wrap.on("click" + e, ".mfp-img", function() { return b.items.length > 1 ? (b.next(), !1) : void 0 }), d.on("keydown" + e, function(a) { 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next() }) }), w("UpdateStatus" + e, function(a, c) { c.text && (c.text = T(c.text, b.currItem.index, b.items.length)) }), w(l + e, function(a, d, e, f) { var g = b.items.length; e.counter = g > 1 ? T(c.tCounter, f.index, g) : "" }), w("BuildControls" + e, function() { if (b.items.length > 1 && c.arrows && !b.arrowLeft) { var d = c.arrowMarkup, e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s), f = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s), h = g ? "mfpFastClick" : "click"; e[h](function() { b.prev() }), f[h](function() { b.next() }), b.isIE7 && (x("b", e[0], !1, !0), x("a", e[0], !1, !0), x("b", f[0], !1, !0), x("a", f[0], !1, !0)), b.container.append(e.add(f)) } }), w(n + e, function() { b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function() { b.preloadNearbyImages(), b._preloadTimeout = null }, 16) }), void w(h + e, function() { d.off(e), b.wrap.off("click" + e), b.arrowLeft && g && b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(), b.arrowRight = b.arrowLeft = null })) : !1 }, next: function() { b.direction = !0, b.index = S(b.index + 1), b.updateItemHTML() }, prev: function() { b.direction = !1, b.index = S(b.index - 1), b.updateItemHTML() }, goTo: function(a) { b.direction = a >= b.index, b.index = a, b.updateItemHTML() }, preloadNearbyImages: function() { var a, c = b.st.gallery.preload, d = Math.min(c[0], b.items.length), e = Math.min(c[1], b.items.length); for (a = 1; a <= (b.direction ? e : d); a++) b._preloadItem(b.index + a); for (a = 1; a <= (b.direction ? d : e); a++) b._preloadItem(b.index - a) }, _preloadItem: function(c) { if (c = S(c), !b.items[c].preloaded) { var d = b.items[c]; d.parsed || (d = b.parseEl(c)), y("LazyLoad", d), "image" === d.type && (d.img = a('').on("load.mfploader", function() { d.hasSize = !0 }).on("error.mfploader", function() { d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d) }).attr("src", d.src)), d.preloaded = !0 } } } }); var U = "retina"; a.magnificPopup.registerModule(U, { options: { replaceSrc: function(a) { return a.src.replace(/\.\w+$/, function(a) { return "@2x" + a }) }, ratio: 1 }, proto: { initRetina: function() { if (window.devicePixelRatio > 1) { var a = b.st.retina, c = a.ratio; c = isNaN(c) ? c() : c, c > 1 && (w("ImageHasSize." + U, function(a, b) { b.img.css({ "max-width": b.img[0].naturalWidth / c, width: "100%" }) }), w("ElementParse." + U, function(b, d) { d.src = a.replaceSrc(d, c) })) } } } }), function() { var b = 1e3, c = "ontouchstart" in window, d = function() { v.off("touchmove" + f + " touchend" + f) }, e = "mfpFastClick", f = "." + e; a.fn.mfpFastClick = function(e) { return a(this).each(function() { var g, h = a(this); if (c) { var i, j, k, l, m, n; h.on("touchstart" + f, function(a) { l = !1, n = 1, m = a.originalEvent ? a.originalEvent.touches[0] : a.touches[0], j = m.clientX, k = m.clientY, v.on("touchmove" + f, function(a) { m = a.originalEvent ? a.originalEvent.touches : a.touches, n = m.length, m = m[0], (Math.abs(m.clientX - j) > 10 || Math.abs(m.clientY - k) > 10) && (l = !0, d()) }).on("touchend" + f, function(a) { d(), l || n > 1 || (g = !0, a.preventDefault(), clearTimeout(i), i = setTimeout(function() { g = !1 }, b), e()) }) }) } h.on("click" + f, function() { g || e() }) }) }, a.fn.destroyMfpFastClick = function() { a(this).off("touchstart" + f + " click" + f), c && v.off("touchmove" + f + " touchend" + f) } }(), A() });