(() => {
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn2, res) => function __init() {
return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// node_modules/jquery/dist/jquery.js
var require_jquery = __commonJS({
"node_modules/jquery/dist/jquery.js"(exports, module) {
(function(global, factory) {
"use strict";
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = global.document ? factory(global, true) : function(w2) {
if (!w2.document) {
throw new Error("jQuery requires a window with a document");
}
return factory(w2);
};
} else {
factory(global);
}
})(typeof window !== "undefined" ? window : exports, function(window2, noGlobal) {
"use strict";
var arr = [];
var getProto = Object.getPrototypeOf;
var slice = arr.slice;
var flat = arr.flat ? function(array) {
return arr.flat.call(array);
} : function(array) {
return arr.concat.apply([], array);
};
var push = arr.push;
var indexOf2 = arr.indexOf;
var class2type = {};
var toString = class2type.toString;
var hasOwn = class2type.hasOwnProperty;
var fnToString = hasOwn.toString;
var ObjectFunctionString = fnToString.call(Object);
var support = {};
var isFunction = function isFunction2(obj) {
return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
};
var isWindow = function isWindow2(obj) {
return obj != null && obj === obj.window;
};
var document2 = window2.document;
var preservedScriptAttributes = {
type: true,
src: true,
nonce: true,
noModule: true
};
function DOMEval(code, node, doc) {
doc = doc || document2;
var i2, val, script = doc.createElement("script");
script.text = code;
if (node) {
for (i2 in preservedScriptAttributes) {
val = node[i2] || node.getAttribute && node.getAttribute(i2);
if (val) {
script.setAttribute(i2, val);
}
}
}
doc.head.appendChild(script).parentNode.removeChild(script);
}
function toType(obj) {
if (obj == null) {
return obj + "";
}
return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
}
var version = "3.7.0", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) {
return new jQuery.fn.init(selector, context);
};
jQuery.fn = jQuery.prototype = {
// The current version of jQuery being used
jquery: version,
constructor: jQuery,
// 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) {
if (num == null) {
return slice.call(this);
}
return num < 0 ? this[num + this.length] : this[num];
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack: function(elems) {
var ret = jQuery.merge(this.constructor(), elems);
ret.prevObject = this;
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, i2) {
return callback.call(elem, i2, elem);
}));
},
slice: function() {
return this.pushStack(slice.apply(this, arguments));
},
first: function() {
return this.eq(0);
},
last: function() {
return this.eq(-1);
},
even: function() {
return this.pushStack(jQuery.grep(this, function(_elem, i2) {
return (i2 + 1) % 2;
}));
},
odd: function() {
return this.pushStack(jQuery.grep(this, function(_elem, i2) {
return i2 % 2;
}));
},
eq: function(i2) {
var len = this.length, j2 = +i2 + (i2 < 0 ? len : 0);
return this.pushStack(j2 >= 0 && j2 < len ? [this[j2]] : []);
},
end: function() {
return this.prevObject || this.constructor();
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push,
sort: arr.sort,
splice: arr.splice
};
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i2 = 1, length = arguments.length, deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[i2] || {};
i2++;
}
if (typeof target !== "object" && !isFunction(target)) {
target = {};
}
if (i2 === length) {
target = this;
i2--;
}
for (; i2 < length; i2++) {
if ((options = arguments[i2]) != null) {
for (name in options) {
copy = options[name];
if (name === "__proto__" || target === copy) {
continue;
}
if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
src = target[name];
if (copyIsArray && !Array.isArray(src)) {
clone = [];
} else if (!copyIsArray && !jQuery.isPlainObject(src)) {
clone = {};
} else {
clone = src;
}
copyIsArray = false;
target[name] = jQuery.extend(deep, clone, copy);
} else if (copy !== void 0) {
target[name] = copy;
}
}
}
}
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() {
},
isPlainObject: function(obj) {
var proto, Ctor;
if (!obj || toString.call(obj) !== "[object Object]") {
return false;
}
proto = getProto(obj);
if (!proto) {
return true;
}
Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
},
isEmptyObject: function(obj) {
var name;
for (name in obj) {
return false;
}
return true;
},
// Evaluates a script in a provided context; falls back to the global one
// if not specified.
globalEval: function(code, options, doc) {
DOMEval(code, { nonce: options && options.nonce }, doc);
},
each: function(obj, callback) {
var length, i2 = 0;
if (isArrayLike(obj)) {
length = obj.length;
for (; i2 < length; i2++) {
if (callback.call(obj[i2], i2, obj[i2]) === false) {
break;
}
}
} else {
for (i2 in obj) {
if (callback.call(obj[i2], i2, obj[i2]) === false) {
break;
}
}
}
return obj;
},
// Retrieve the text value of an array of DOM nodes
text: function(elem) {
var node, ret = "", i2 = 0, nodeType = elem.nodeType;
if (!nodeType) {
while (node = elem[i2++]) {
ret += jQuery.text(node);
}
} else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
return elem.textContent;
} else if (nodeType === 3 || nodeType === 4) {
return elem.nodeValue;
}
return ret;
},
// results is for internal usage only
makeArray: function(arr2, results) {
var ret = results || [];
if (arr2 != null) {
if (isArrayLike(Object(arr2))) {
jQuery.merge(
ret,
typeof arr2 === "string" ? [arr2] : arr2
);
} else {
push.call(ret, arr2);
}
}
return ret;
},
inArray: function(elem, arr2, i2) {
return arr2 == null ? -1 : indexOf2.call(arr2, elem, i2);
},
isXMLDoc: function(elem) {
var namespace = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement;
return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML");
},
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
merge: function(first, second) {
var len = +second.length, j2 = 0, i2 = first.length;
for (; j2 < len; j2++) {
first[i2++] = second[j2];
}
first.length = i2;
return first;
},
grep: function(elems, callback, invert) {
var callbackInverse, matches = [], i2 = 0, length = elems.length, callbackExpect = !invert;
for (; i2 < length; i2++) {
callbackInverse = !callback(elems[i2], i2);
if (callbackInverse !== callbackExpect) {
matches.push(elems[i2]);
}
}
return matches;
},
// arg is for internal usage only
map: function(elems, callback, arg) {
var length, value, i2 = 0, ret = [];
if (isArrayLike(elems)) {
length = elems.length;
for (; i2 < length; i2++) {
value = callback(elems[i2], i2, arg);
if (value != null) {
ret.push(value);
}
}
} else {
for (i2 in elems) {
value = callback(elems[i2], i2, arg);
if (value != null) {
ret.push(value);
}
}
}
return flat(ret);
},
// A global GUID counter for objects
guid: 1,
// jQuery.support is not used in Core but other projects attach their
// properties to it so it needs to exist.
support
});
if (typeof Symbol === "function") {
jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
}
jQuery.each(
"Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
function(_i2, name) {
class2type["[object " + name + "]"] = name.toLowerCase();
}
);
function isArrayLike(obj) {
var length = !!obj && "length" in obj && obj.length, type = toType(obj);
if (isFunction(obj) || isWindow(obj)) {
return false;
}
return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
}
function nodeName(elem, name) {
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
}
var pop = arr.pop;
var sort = arr.sort;
var splice = arr.splice;
var whitespace = "[\\x20\\t\\r\\n\\f]";
var rtrimCSS = new RegExp(
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
"g"
);
jQuery.contains = function(a2, b2) {
var bup = b2 && b2.parentNode;
return a2 === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+
// IE doesn't have `contains` on SVG.
(a2.contains ? a2.contains(bup) : a2.compareDocumentPosition && a2.compareDocumentPosition(bup) & 16));
};
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
function fcssescape(ch, asCodePoint) {
if (asCodePoint) {
if (ch === "\0") {
return "\uFFFD";
}
return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
}
return "\\" + ch;
}
jQuery.escapeSelector = function(sel) {
return (sel + "").replace(rcssescape, fcssescape);
};
var preferredDoc = document2, pushNative = push;
(function() {
var i2, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a2, b2) {
if (a2 === b2) {
hasDuplicate = true;
}
return 0;
}, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", 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 + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), 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, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape, nonHex) {
var high = "0x" + escape.slice(1) - 65536;
if (nonHex) {
return nonHex;
}
return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
}, unloadHandler = function() {
setDocument();
}, inDisabledFieldset = addCombinator(
function(elem) {
return elem.disabled === true && nodeName(elem, "fieldset");
},
{ dir: "parentNode", next: "legend" }
);
function safeActiveElement() {
try {
return document3.activeElement;
} catch (err) {
}
}
try {
push2.apply(
arr = slice.call(preferredDoc.childNodes),
preferredDoc.childNodes
);
arr[preferredDoc.childNodes.length].nodeType;
} catch (e2) {
push2 = {
apply: function(target, els) {
pushNative.apply(target, slice.call(els));
},
call: function(target) {
pushNative.apply(target, slice.call(arguments, 1));
}
};
}
function find(selector, context, results, seed) {
var m2, i3, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9;
results = results || [];
if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
return results;
}
if (!seed) {
setDocument(context);
context = context || document3;
if (documentIsHTML) {
if (nodeType !== 11 && (match = rquickExpr2.exec(selector))) {
if (m2 = match[1]) {
if (nodeType === 9) {
if (elem = context.getElementById(m2)) {
if (elem.id === m2) {
push2.call(results, elem);
return results;
}
} else {
return results;
}
} else {
if (newContext && (elem = newContext.getElementById(m2)) && find.contains(context, elem) && elem.id === m2) {
push2.call(results, elem);
return results;
}
}
} else if (match[2]) {
push2.apply(results, context.getElementsByTagName(selector));
return results;
} else if ((m2 = match[3]) && context.getElementsByClassName) {
push2.apply(results, context.getElementsByClassName(m2));
return results;
}
}
if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
newSelector = selector;
newContext = context;
if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {
newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
if (newContext != context || !support.scope) {
if (nid = context.getAttribute("id")) {
nid = jQuery.escapeSelector(nid);
} else {
context.setAttribute("id", nid = expando);
}
}
groups = tokenize2(selector);
i3 = groups.length;
while (i3--) {
groups[i3] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i3]);
}
newSelector = groups.join(",");
}
try {
push2.apply(
results,
newContext.querySelectorAll(newSelector)
);
return results;
} catch (qsaError) {
nonnativeSelectorCache(selector, true);
} finally {
if (nid === expando) {
context.removeAttribute("id");
}
}
}
}
}
return select(selector.replace(rtrimCSS, "$1"), context, results, seed);
}
function createCache() {
var keys = [];
function cache2(key, value) {
if (keys.push(key + " ") > Expr.cacheLength) {
delete cache2[keys.shift()];
}
return cache2[key + " "] = value;
}
return cache2;
}
function markFunction(fn2) {
fn2[expando] = true;
return fn2;
}
function assert(fn2) {
var el = document3.createElement("fieldset");
try {
return !!fn2(el);
} catch (e2) {
return false;
} finally {
if (el.parentNode) {
el.parentNode.removeChild(el);
}
el = null;
}
}
function createInputPseudo(type) {
return function(elem) {
return nodeName(elem, "input") && elem.type === type;
};
}
function createButtonPseudo(type) {
return function(elem) {
return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type;
};
}
function createDisabledPseudo(disabled) {
return function(elem) {
if ("form" in elem) {
if (elem.parentNode && elem.disabled === false) {
if ("label" in elem) {
if ("label" in elem.parentNode) {
return elem.parentNode.disabled === disabled;
} else {
return elem.disabled === disabled;
}
}
return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
}
return elem.disabled === disabled;
} else if ("label" in elem) {
return elem.disabled === disabled;
}
return false;
};
}
function createPositionalPseudo(fn2) {
return markFunction(function(argument) {
argument = +argument;
return markFunction(function(seed, matches2) {
var j2, matchIndexes = fn2([], seed.length, argument), i3 = matchIndexes.length;
while (i3--) {
if (seed[j2 = matchIndexes[i3]]) {
seed[j2] = !(matches2[j2] = seed[j2]);
}
}
});
});
}
function testContext(context) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
}
function setDocument(node) {
var subWindow, doc = node ? node.ownerDocument || node : preferredDoc;
if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) {
return document3;
}
document3 = doc;
documentElement2 = document3.documentElement;
documentIsHTML = !jQuery.isXMLDoc(document3);
matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector;
if (preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) {
subWindow.addEventListener("unload", unloadHandler);
}
support.getById = assert(function(el) {
documentElement2.appendChild(el).id = jQuery.expando;
return !document3.getElementsByName || !document3.getElementsByName(jQuery.expando).length;
});
support.disconnectedMatch = assert(function(el) {
return matches.call(el, "*");
});
support.scope = assert(function() {
return document3.querySelectorAll(":scope");
});
support.cssHas = assert(function() {
try {
document3.querySelector(":has(*,:jqfake)");
return false;
} catch (e2) {
return true;
}
});
if (support.getById) {
Expr.filter.ID = function(id2) {
var attrId = id2.replace(runescape, funescape);
return function(elem) {
return elem.getAttribute("id") === attrId;
};
};
Expr.find.ID = function(id2, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var elem = context.getElementById(id2);
return elem ? [elem] : [];
}
};
} else {
Expr.filter.ID = function(id2) {
var attrId = id2.replace(runescape, funescape);
return function(elem) {
var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
return node2 && node2.value === attrId;
};
};
Expr.find.ID = function(id2, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var node2, i3, elems, elem = context.getElementById(id2);
if (elem) {
node2 = elem.getAttributeNode("id");
if (node2 && node2.value === id2) {
return [elem];
}
elems = context.getElementsByName(id2);
i3 = 0;
while (elem = elems[i3++]) {
node2 = elem.getAttributeNode("id");
if (node2 && node2.value === id2) {
return [elem];
}
}
}
return [];
}
};
}
Expr.find.TAG = function(tag, context) {
if (typeof context.getElementsByTagName !== "undefined") {
return context.getElementsByTagName(tag);
} else {
return context.querySelectorAll(tag);
}
};
Expr.find.CLASS = function(className, context) {
if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
return context.getElementsByClassName(className);
}
};
rbuggyQSA = [];
assert(function(el) {
var input;
documentElement2.appendChild(el).innerHTML = "";
if (!el.querySelectorAll("[selected]").length) {
rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
}
if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
rbuggyQSA.push("~=");
}
if (!el.querySelectorAll("a#" + expando + "+*").length) {
rbuggyQSA.push(".#.+[+~]");
}
if (!el.querySelectorAll(":checked").length) {
rbuggyQSA.push(":checked");
}
input = document3.createElement("input");
input.setAttribute("type", "hidden");
el.appendChild(input).setAttribute("name", "D");
documentElement2.appendChild(el).disabled = true;
if (el.querySelectorAll(":disabled").length !== 2) {
rbuggyQSA.push(":enabled", ":disabled");
}
input = document3.createElement("input");
input.setAttribute("name", "");
el.appendChild(input);
if (!el.querySelectorAll("[name='']").length) {
rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + `*(?:''|"")`);
}
});
if (!support.cssHas) {
rbuggyQSA.push(":has");
}
rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
sortOrder = function(a2, b2) {
if (a2 === b2) {
hasDuplicate = true;
return 0;
}
var compare = !a2.compareDocumentPosition - !b2.compareDocumentPosition;
if (compare) {
return compare;
}
compare = (a2.ownerDocument || a2) == (b2.ownerDocument || b2) ? a2.compareDocumentPosition(b2) : (
// Otherwise we know they are disconnected
1
);
if (compare & 1 || !support.sortDetached && b2.compareDocumentPosition(a2) === compare) {
if (a2 === document3 || a2.ownerDocument == preferredDoc && find.contains(preferredDoc, a2)) {
return -1;
}
if (b2 === document3 || b2.ownerDocument == preferredDoc && find.contains(preferredDoc, b2)) {
return 1;
}
return sortInput ? indexOf2.call(sortInput, a2) - indexOf2.call(sortInput, b2) : 0;
}
return compare & 4 ? -1 : 1;
};
return document3;
}
find.matches = function(expr, elements) {
return find(expr, null, null, elements);
};
find.matchesSelector = function(elem, expr) {
setDocument(elem);
if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
try {
var ret = matches.call(elem, expr);
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 (e2) {
nonnativeSelectorCache(expr, true);
}
}
return find(expr, document3, null, [elem]).length > 0;
};
find.contains = function(context, elem) {
if ((context.ownerDocument || context) != document3) {
setDocument(context);
}
return jQuery.contains(context, elem);
};
find.attr = function(elem, name) {
if ((elem.ownerDocument || elem) != document3) {
setDocument(elem);
}
var fn2 = Expr.attrHandle[name.toLowerCase()], val = fn2 && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn2(elem, name, !documentIsHTML) : void 0;
if (val !== void 0) {
return val;
}
return elem.getAttribute(name);
};
find.error = function(msg) {
throw new Error("Syntax error, unrecognized expression: " + msg);
};
jQuery.uniqueSort = function(results) {
var elem, duplicates = [], j2 = 0, i3 = 0;
hasDuplicate = !support.sortStable;
sortInput = !support.sortStable && slice.call(results, 0);
sort.call(results, sortOrder);
if (hasDuplicate) {
while (elem = results[i3++]) {
if (elem === results[i3]) {
j2 = duplicates.push(i3);
}
}
while (j2--) {
splice.call(results, duplicates[j2], 1);
}
}
sortInput = null;
return results;
};
jQuery.fn.uniqueSort = function() {
return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
};
Expr = jQuery.expr = {
// 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);
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) {
match[1] = match[1].toLowerCase();
if (match[1].slice(0, 3) === "nth") {
if (!match[3]) {
find.error(match[0]);
}
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");
} else if (match[3]) {
find.error(match[0]);
}
return match;
},
PSEUDO: function(match) {
var excess, unquoted = !match[6] && match[2];
if (matchExpr.CHILD.test(match[0])) {
return null;
}
if (match[3]) {
match[2] = match[4] || match[5] || "";
} else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively)
(excess = tokenize2(unquoted, true)) && // advance to the next closing parenthesis
(excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
match[0] = match[0].slice(0, excess);
match[2] = unquoted.slice(0, excess);
}
return match.slice(0, 3);
}
},
filter: {
TAG: function(nodeNameSelector) {
var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
return nodeNameSelector === "*" ? function() {
return true;
} : function(elem) {
return nodeName(elem, expectedNodeName);
};
},
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 = find.attr(elem, name);
if (result == null) {
return operator === "!=";
}
if (!operator) {
return true;
}
result += "";
if (operator === "=") {
return result === check;
}
if (operator === "!=") {
return result !== check;
}
if (operator === "^=") {
return check && result.indexOf(check) === 0;
}
if (operator === "*=") {
return check && result.indexOf(check) > -1;
}
if (operator === "$=") {
return check && result.slice(-check.length) === check;
}
if (operator === "~=") {
return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1;
}
if (operator === "|=") {
return result === check || result.slice(0, check.length + 1) === check + "-";
}
return 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 cache2, outerCache, node, nodeIndex, start3, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
if (parent) {
if (simple) {
while (dir2) {
node = elem;
while (node = node[dir2]) {
if (ofType ? nodeName(node, name) : node.nodeType === 1) {
return false;
}
}
start3 = dir2 = type === "only" && !start3 && "nextSibling";
}
return true;
}
start3 = [forward ? parent.firstChild : parent.lastChild];
if (forward && useCache) {
outerCache = parent[expando] || (parent[expando] = {});
cache2 = outerCache[type] || [];
nodeIndex = cache2[0] === dirruns && cache2[1];
diff = nodeIndex && cache2[2];
node = nodeIndex && parent.childNodes[nodeIndex];
while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start
(diff = nodeIndex = 0) || start3.pop()) {
if (node.nodeType === 1 && ++diff && node === elem) {
outerCache[type] = [dirruns, nodeIndex, diff];
break;
}
}
} else {
if (useCache) {
outerCache = elem[expando] || (elem[expando] = {});
cache2 = outerCache[type] || [];
nodeIndex = cache2[0] === dirruns && cache2[1];
diff = nodeIndex;
}
if (diff === false) {
while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start3.pop()) {
if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) {
if (useCache) {
outerCache = node[expando] || (node[expando] = {});
outerCache[type] = [dirruns, diff];
}
if (node === elem) {
break;
}
}
}
}
}
diff -= last;
return diff === first || diff % first === 0 && diff / first >= 0;
}
};
},
PSEUDO: function(pseudo, argument) {
var args, fn2 = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find.error("unsupported pseudo: " + pseudo);
if (fn2[expando]) {
return fn2(argument);
}
if (fn2.length > 1) {
args = [pseudo, pseudo, "", argument];
return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches2) {
var idx, matched = fn2(seed, argument), i3 = matched.length;
while (i3--) {
idx = indexOf2.call(seed, matched[i3]);
seed[idx] = !(matches2[idx] = matched[i3]);
}
}) : function(elem) {
return fn2(elem, 0, args);
};
}
return fn2;
}
},
pseudos: {
// Potentially complex pseudos
not: markFunction(function(selector) {
var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1"));
return matcher[expando] ? markFunction(function(seed, matches2, _context, xml) {
var elem, unmatched = matcher(seed, null, xml, []), i3 = seed.length;
while (i3--) {
if (elem = unmatched[i3]) {
seed[i3] = !(matches2[i3] = elem);
}
}
}) : function(elem, _context, xml) {
input[0] = elem;
matcher(input, null, xml, results);
input[0] = null;
return !results.pop();
};
}),
has: markFunction(function(selector) {
return function(elem) {
return find(selector, elem).length > 0;
};
}),
contains: markFunction(function(text) {
text = text.replace(runescape, funescape);
return function(elem) {
return (elem.textContent || jQuery.text(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."
// https://www.w3.org/TR/selectors/#lang-pseudo
lang: markFunction(function(lang) {
if (!ridentifier.test(lang || "")) {
find.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 = window2.location && window2.location.hash;
return hash && hash.slice(1) === elem.id;
},
root: function(elem) {
return elem === documentElement2;
},
focus: function(elem) {
return elem === safeActiveElement() && document3.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
enabled: createDisabledPseudo(false),
disabled: createDisabledPseudo(true),
checked: function(elem) {
return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected;
},
selected: function(elem) {
if (elem.parentNode) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
// Contents
empty: function(elem) {
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) {
return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button");
},
text: function(elem) {
var attr;
return nodeName(elem, "input") && elem.type === "text" && // Support: IE <10 only
// 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 i3 = 0;
for (; i3 < length; i3 += 2) {
matchIndexes.push(i3);
}
return matchIndexes;
}),
odd: createPositionalPseudo(function(matchIndexes, length) {
var i3 = 1;
for (; i3 < length; i3 += 2) {
matchIndexes.push(i3);
}
return matchIndexes;
}),
lt: createPositionalPseudo(function(matchIndexes, length, argument) {
var i3;
if (argument < 0) {
i3 = argument + length;
} else if (argument > length) {
i3 = length;
} else {
i3 = argument;
}
for (; --i3 >= 0; ) {
matchIndexes.push(i3);
}
return matchIndexes;
}),
gt: createPositionalPseudo(function(matchIndexes, length, argument) {
var i3 = argument < 0 ? argument + length : argument;
for (; ++i3 < length; ) {
matchIndexes.push(i3);
}
return matchIndexes;
})
}
};
Expr.pseudos.nth = Expr.pseudos.eq;
for (i2 in { radio: true, checkbox: true, file: true, password: true, image: true }) {
Expr.pseudos[i2] = createInputPseudo(i2);
}
for (i2 in { submit: true, reset: true }) {
Expr.pseudos[i2] = createButtonPseudo(i2);
}
function setFilters() {
}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
function tokenize2(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) {
if (!matched || (match = rcomma.exec(soFar))) {
if (match) {
soFar = soFar.slice(match[0].length) || soFar;
}
groups.push(tokens = []);
}
matched = false;
if (match = rleadingCombinator.exec(soFar)) {
matched = match.shift();
tokens.push({
value: matched,
// Cast descendant combinators to space
type: match[0].replace(rtrimCSS, " ")
});
soFar = soFar.slice(matched.length);
}
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,
matches: match
});
soFar = soFar.slice(matched.length);
}
}
if (!matched) {
break;
}
}
if (parseOnly) {
return soFar.length;
}
return soFar ? find.error(selector) : (
// Cache the tokens
tokenCache(selector, groups).slice(0)
);
}
function toSelector(tokens) {
var i3 = 0, len = tokens.length, selector = "";
for (; i3 < len; i3++) {
selector += tokens[i3].value;
}
return selector;
}
function addCombinator(matcher, combinator, base) {
var dir2 = combinator.dir, skip = combinator.next, key = skip || dir2, checkNonElements = base && key === "parentNode", doneName = done++;
return combinator.first ? (
// Check against closest ancestor/preceding element
function(elem, context, xml) {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
return matcher(elem, context, xml);
}
}
return false;
}
) : (
// Check against all ancestor/preceding elements
function(elem, context, xml) {
var oldCache, outerCache, newCache = [dirruns, doneName];
if (xml) {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
if (matcher(elem, context, xml)) {
return true;
}
}
}
} else {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
outerCache = elem[expando] || (elem[expando] = {});
if (skip && nodeName(elem, skip)) {
elem = elem[dir2] || elem;
} else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
return newCache[2] = oldCache[2];
} else {
outerCache[key] = newCache;
if (newCache[2] = matcher(elem, context, xml)) {
return true;
}
}
}
}
}
return false;
}
);
}
function elementMatcher(matchers) {
return matchers.length > 1 ? function(elem, context, xml) {
var i3 = matchers.length;
while (i3--) {
if (!matchers[i3](elem, context, xml)) {
return false;
}
}
return true;
} : matchers[0];
}
function multipleContexts(selector, contexts, results) {
var i3 = 0, len = contexts.length;
for (; i3 < len; i3++) {
find(selector, contexts[i3], results);
}
return results;
}
function condense(unmatched, map, filter, context, xml) {
var elem, newUnmatched = [], i3 = 0, len = unmatched.length, mapped = map != null;
for (; i3 < len; i3++) {
if (elem = unmatched[i3]) {
if (!filter || filter(elem, context, xml)) {
newUnmatched.push(elem);
if (mapped) {
map.push(i3);
}
}
}
}
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, i3, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(
selector || "*",
context.nodeType ? [context] : context,
[]
), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems;
if (matcher) {
matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? (
// ...intermediate processing is necessary
[]
) : (
// ...otherwise use results directly
results
);
matcher(matcherIn, matcherOut, context, xml);
} else {
matcherOut = matcherIn;
}
if (postFilter) {
temp = condense(matcherOut, postMap);
postFilter(temp, [], context, xml);
i3 = temp.length;
while (i3--) {
if (elem = temp[i3]) {
matcherOut[postMap[i3]] = !(matcherIn[postMap[i3]] = elem);
}
}
}
if (seed) {
if (postFinder || preFilter) {
if (postFinder) {
temp = [];
i3 = matcherOut.length;
while (i3--) {
if (elem = matcherOut[i3]) {
temp.push(matcherIn[i3] = elem);
}
}
postFinder(null, matcherOut = [], temp, xml);
}
i3 = matcherOut.length;
while (i3--) {
if ((elem = matcherOut[i3]) && (temp = postFinder ? indexOf2.call(seed, elem) : preMap[i3]) > -1) {
seed[temp] = !(results[temp] = elem);
}
}
}
} else {
matcherOut = condense(
matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut
);
if (postFinder) {
postFinder(null, results, matcherOut, xml);
} else {
push2.apply(results, matcherOut);
}
}
});
}
function matcherFromTokens(tokens) {
var checkContext, matcher, j2, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i3 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) {
return elem === checkContext;
}, implicitRelative, true), matchAnyContext = addCombinator(function(elem) {
return indexOf2.call(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));
checkContext = null;
return ret;
}];
for (; i3 < len; i3++) {
if (matcher = Expr.relative[tokens[i3].type]) {
matchers = [addCombinator(elementMatcher(matchers), matcher)];
} else {
matcher = Expr.filter[tokens[i3].type].apply(null, tokens[i3].matches);
if (matcher[expando]) {
j2 = ++i3;
for (; j2 < len; j2++) {
if (Expr.relative[tokens[j2].type]) {
break;
}
}
return setMatcher(
i3 > 1 && elementMatcher(matchers),
i3 > 1 && toSelector(
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
tokens.slice(0, i3 - 1).concat({ value: tokens[i3 - 2].type === " " ? "*" : "" })
).replace(rtrimCSS, "$1"),
matcher,
i3 < j2 && matcherFromTokens(tokens.slice(i3, j2)),
j2 < len && matcherFromTokens(tokens = tokens.slice(j2)),
j2 < 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, j2, matcher, matchedCount = 0, i3 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
if (outermost) {
outermostContext = context == document3 || context || outermost;
}
for (; i3 !== len && (elem = elems[i3]) != null; i3++) {
if (byElement && elem) {
j2 = 0;
if (!context && elem.ownerDocument != document3) {
setDocument(elem);
xml = !documentIsHTML;
}
while (matcher = elementMatchers[j2++]) {
if (matcher(elem, context || document3, xml)) {
push2.call(results, elem);
break;
}
}
if (outermost) {
dirruns = dirrunsUnique;
}
}
if (bySet) {
if (elem = !matcher && elem) {
matchedCount--;
}
if (seed) {
unmatched.push(elem);
}
}
}
matchedCount += i3;
if (bySet && i3 !== matchedCount) {
j2 = 0;
while (matcher = setMatchers[j2++]) {
matcher(unmatched, setMatched, context, xml);
}
if (seed) {
if (matchedCount > 0) {
while (i3--) {
if (!(unmatched[i3] || setMatched[i3])) {
setMatched[i3] = pop.call(results);
}
}
}
setMatched = condense(setMatched);
}
push2.apply(results, setMatched);
if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
jQuery.uniqueSort(results);
}
}
if (outermost) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}
return unmatched;
};
return bySet ? markFunction(superMatcher) : superMatcher;
}
function compile(selector, match) {
var i3, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "];
if (!cached) {
if (!match) {
match = tokenize2(selector);
}
i3 = match.length;
while (i3--) {
cached = matcherFromTokens(match[i3]);
if (cached[expando]) {
setMatchers.push(cached);
} else {
elementMatchers.push(cached);
}
}
cached = compilerCache(
selector,
matcherFromGroupMatchers(elementMatchers, setMatchers)
);
cached.selector = selector;
}
return cached;
}
function select(selector, context, results, seed) {
var i3, tokens, token, type, find2, compiled = typeof selector === "function" && selector, match = !seed && tokenize2(selector = compiled.selector || selector);
results = results || [];
if (match.length === 1) {
tokens = match[0] = match[0].slice(0);
if (tokens.length > 2 && (token = tokens[0]).type === "ID" && 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;
} else if (compiled) {
context = context.parentNode;
}
selector = selector.slice(tokens.shift().value.length);
}
i3 = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
while (i3--) {
token = tokens[i3];
if (Expr.relative[type = token.type]) {
break;
}
if (find2 = Expr.find[type]) {
if (seed = find2(
token.matches[0].replace(runescape, funescape),
rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
)) {
tokens.splice(i3, 1);
selector = seed.length && toSelector(tokens);
if (!selector) {
push2.apply(results, seed);
return results;
}
break;
}
}
}
}
(compiled || compile(selector, match))(
seed,
context,
!documentIsHTML,
results,
!context || rsibling.test(selector) && testContext(context.parentNode) || context
);
return results;
}
support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
setDocument();
support.sortDetached = assert(function(el) {
return el.compareDocumentPosition(document3.createElement("fieldset")) & 1;
});
jQuery.find = find;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = jQuery.uniqueSort;
find.compile = compile;
find.select = select;
find.setDocument = setDocument;
find.escape = jQuery.escapeSelector;
find.getText = jQuery.text;
find.isXML = jQuery.isXMLDoc;
find.selectors = jQuery.expr;
find.support = jQuery.support;
find.uniqueSort = jQuery.uniqueSort;
})();
var dir = function(elem, dir2, until) {
var matched = [], truncate = until !== void 0;
while ((elem = elem[dir2]) && elem.nodeType !== 9) {
if (elem.nodeType === 1) {
if (truncate && jQuery(elem).is(until)) {
break;
}
matched.push(elem);
}
}
return matched;
};
var siblings = function(n2, elem) {
var matched = [];
for (; n2; n2 = n2.nextSibling) {
if (n2.nodeType === 1 && n2 !== elem) {
matched.push(n2);
}
}
return matched;
};
var rneedsContext = jQuery.expr.match.needsContext;
var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
function winnow(elements, qualifier, not) {
if (isFunction(qualifier)) {
return jQuery.grep(elements, function(elem, i2) {
return !!qualifier.call(elem, i2, elem) !== not;
});
}
if (qualifier.nodeType) {
return jQuery.grep(elements, function(elem) {
return elem === qualifier !== not;
});
}
if (typeof qualifier !== "string") {
return jQuery.grep(elements, function(elem) {
return indexOf2.call(qualifier, elem) > -1 !== not;
});
}
return jQuery.filter(qualifier, elements, not);
}
jQuery.filter = function(expr, elems, not) {
var elem = elems[0];
if (not) {
expr = ":not(" + expr + ")";
}
if (elems.length === 1 && elem.nodeType === 1) {
return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
}
return jQuery.find.matches(expr, jQuery.grep(elems, function(elem2) {
return elem2.nodeType === 1;
}));
};
jQuery.fn.extend({
find: function(selector) {
var i2, ret, len = this.length, self = this;
if (typeof selector !== "string") {
return this.pushStack(jQuery(selector).filter(function() {
for (i2 = 0; i2 < len; i2++) {
if (jQuery.contains(self[i2], this)) {
return true;
}
}
}));
}
ret = this.pushStack([]);
for (i2 = 0; i2 < len; i2++) {
jQuery.find(selector, self[i2], ret);
}
return len > 1 ? jQuery.uniqueSort(ret) : 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;
}
});
var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function(selector, context, root) {
var match, elem;
if (!selector) {
return this;
}
root = root || rootjQuery;
if (typeof selector === "string") {
if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
match = [null, selector, null];
} else {
match = rquickExpr.exec(selector);
}
if (match && (match[1] || !context)) {
if (match[1]) {
context = context instanceof jQuery ? context[0] : context;
jQuery.merge(this, jQuery.parseHTML(
match[1],
context && context.nodeType ? context.ownerDocument || context : document2,
true
));
if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
for (match in context) {
if (isFunction(this[match])) {
this[match](context[match]);
} else {
this.attr(match, context[match]);
}
}
}
return this;
} else {
elem = document2.getElementById(match[2]);
if (elem) {
this[0] = elem;
this.length = 1;
}
return this;
}
} else if (!context || context.jquery) {
return (context || root).find(selector);
} else {
return this.constructor(context).find(selector);
}
} else if (selector.nodeType) {
this[0] = selector;
this.length = 1;
return this;
} else if (isFunction(selector)) {
return root.ready !== void 0 ? root.ready(selector) : (
// Execute immediately if ready is not present
selector(jQuery)
);
}
return jQuery.makeArray(selector, this);
};
init.prototype = jQuery.fn;
rootjQuery = jQuery(document2);
var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
jQuery.fn.extend({
has: function(target) {
var targets = jQuery(target, this), l2 = targets.length;
return this.filter(function() {
var i2 = 0;
for (; i2 < l2; i2++) {
if (jQuery.contains(this, targets[i2])) {
return true;
}
}
});
},
closest: function(selectors, context) {
var cur, i2 = 0, l2 = this.length, matched = [], targets = typeof selectors !== "string" && jQuery(selectors);
if (!rneedsContext.test(selectors)) {
for (; i2 < l2; i2++) {
for (cur = this[i2]; cur && cur !== context; cur = cur.parentNode) {
if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : (
// Don't pass non-elements to jQuery#find
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 set
index: function(elem) {
if (!elem) {
return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
}
if (typeof elem === "string") {
return indexOf2.call(jQuery(elem), this[0]);
}
return indexOf2.call(
this,
// If it receives a jQuery object, the first element is used
elem.jquery ? elem[0] : elem
);
},
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, dir2) {
while ((cur = cur[dir2]) && 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, _i2, 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, _i2, until) {
return dir(elem, "nextSibling", until);
},
prevUntil: function(elem, _i2, 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) {
if (elem.contentDocument != null && // Support: IE 11+
//