\").addClass(\"datehr\").append(\"
\").append(text);\n\n $(message).before(date_hr);\n }\n\n}\n\nfunction disp_add_form(plus_button_selector, form_temp_selector, form_area_selector, max_form_count = 10, input_name = \"input\", minus_button_selector = \"\", ) {\n\n $(plus_button_selector).click(function () {\n\n var form_count = $(form_area_selector).find(\".added_form\").length\n if (form_count >= max_form_count) {\n return;\n }\n\n var form = $(form_temp_selector).clone();\n var input = form.find(\"input,select,textarea\");\n\n\n if (input.length == 1) {\n var name = input_name + \"[]\"\n $(input).attr(\"name\", name).attr(\"required\", true);\n\n } else if (input.length > 1) {\n var input_count = 0;\n input.each(function () {\n input_count++;\n var id = input_name + \"_\" + form_count + \"_\" + input_count;\n $(this).attr(\"id\", id).attr(\"name\", id).attr(\"required\", true);\n });\n }\n if (minus_button_selector) {\n form.find(minus_button_selector).on('click', function () {\n $(this).parent().remove();\n });\n }\n form.removeClass(form_temp_selector.replace(/\\./, ''));\n form.addClass(\"added_form\")\n\n $(form_area_selector).append(form);\n form.removeClass(\"hidden\");\n\n });\n\n $(minus_button_selector).on('click', function () {\n $(this).parent().remove();\n });\n}\n\nfunction is_display(body_class_name) {\n return $(body_class_name).length > 0\n}\n\nfunction disp_alert(body, prepend_element_selector, style) {\n\n if (!prepend_element_selector) {\n prepend_element_selector = $(\".wrapper\");\n }\n $(\".alert\").remove();\n\n var alert = $(\".alert-temp\").clone();\n alert.addClass(\"alert\");\n alert.find(\".alert-body\").text(body);\n $(prepend_element_selector).prepend(alert);\n\n if (style) {\n alert.attr('style', style);\n }\n\n\n $(alert).show();\n\n}\n\n\n$(function () {\n $('.datepicker').datepicker({\n dateFormat: \"yy/mm/dd\"\n });\n\n});","import { __assign, __values, __read, __awaiter, __generator, __spread } from 'tslib';\nimport { Deferred } from '@firebase/util';\n/**\r\n * Component for service name T, e.g. `auth`, `auth-internal`\r\n */\n\nvar Component =\n/** @class */\nfunction () {\n /**\r\n *\r\n * @param name The public service name, e.g. app, auth, firestore, database\r\n * @param instanceFactory Service factory responsible for creating the public interface\r\n * @param type whether the service provided by the component is public or private\r\n */\n function Component(name, instanceFactory, type) {\n this.name = name;\n this.instanceFactory = instanceFactory;\n this.type = type;\n this.multipleInstances = false;\n /**\r\n * Properties to be added to the service namespace\r\n */\n\n this.serviceProps = {};\n this.instantiationMode = \"LAZY\"\n /* LAZY */\n ;\n }\n\n Component.prototype.setInstantiationMode = function (mode) {\n this.instantiationMode = mode;\n return this;\n };\n\n Component.prototype.setMultipleInstances = function (multipleInstances) {\n this.multipleInstances = multipleInstances;\n return this;\n };\n\n Component.prototype.setServiceProps = function (props) {\n this.serviceProps = props;\n return this;\n };\n\n return Component;\n}();\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar DEFAULT_ENTRY_NAME = '[DEFAULT]';\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\r\n * NameServiceMapping[T] is an alias for the type of the instance\r\n */\n\nvar Provider =\n/** @class */\nfunction () {\n function Provider(name, container) {\n this.name = name;\n this.container = container;\n this.component = null;\n this.instances = new Map();\n this.instancesDeferred = new Map();\n }\n /**\r\n * @param identifier A provider can provide mulitple instances of a service\r\n * if this.component.multipleInstances is true.\r\n */\n\n\n Provider.prototype.get = function (identifier) {\n if (identifier === void 0) {\n identifier = DEFAULT_ENTRY_NAME;\n } // if multipleInstances is not supported, use the default name\n\n\n var normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n\n if (!this.instancesDeferred.has(normalizedIdentifier)) {\n var deferred = new Deferred();\n this.instancesDeferred.set(normalizedIdentifier, deferred); // If the service instance is available, resolve the promise with it immediately\n\n try {\n var instance = this.getOrInitializeService(normalizedIdentifier);\n\n if (instance) {\n deferred.resolve(instance);\n }\n } catch (e) {// when the instance factory throws an exception during get(), it should not cause\n // a fatal error. We just return the unresolved promise in this case.\n }\n }\n\n return this.instancesDeferred.get(normalizedIdentifier).promise;\n };\n\n Provider.prototype.getImmediate = function (options) {\n var _a = __assign({\n identifier: DEFAULT_ENTRY_NAME,\n optional: false\n }, options),\n identifier = _a.identifier,\n optional = _a.optional; // if multipleInstances is not supported, use the default name\n\n\n var normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n\n try {\n var instance = this.getOrInitializeService(normalizedIdentifier);\n\n if (!instance) {\n if (optional) {\n return null;\n }\n\n throw Error(\"Service \" + this.name + \" is not available\");\n }\n\n return instance;\n } catch (e) {\n if (optional) {\n return null;\n } else {\n throw e;\n }\n }\n };\n\n Provider.prototype.getComponent = function () {\n return this.component;\n };\n\n Provider.prototype.setComponent = function (component) {\n var e_1, _a;\n\n if (component.name !== this.name) {\n throw Error(\"Mismatching Component \" + component.name + \" for Provider \" + this.name + \".\");\n }\n\n if (this.component) {\n throw Error(\"Component for \" + this.name + \" has already been provided\");\n }\n\n this.component = component; // if the service is eager, initialize the default instance\n\n if (isComponentEager(component)) {\n try {\n this.getOrInitializeService(DEFAULT_ENTRY_NAME);\n } catch (e) {// when the instance factory for an eager Component throws an exception during the eager\n // initialization, it should not cause a fatal error.\n // TODO: Investigate if we need to make it configurable, because some component may want to cause\n // a fatal error in this case?\n }\n }\n\n try {\n // Create service instances for the pending promises and resolve them\n // NOTE: if this.multipleInstances is false, only the default instance will be created\n // and all promises with resolve with it regardless of the identifier.\n for (var _b = __values(this.instancesDeferred.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2),\n instanceIdentifier = _d[0],\n instanceDeferred = _d[1];\n\n var normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\n\n try {\n // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\n var instance = this.getOrInitializeService(normalizedIdentifier);\n instanceDeferred.resolve(instance);\n } catch (e) {// when the instance factory throws an exception, it should not cause\n // a fatal error. We just leave the promise unresolved.\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b[\"return\"])) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n };\n\n Provider.prototype.clearInstance = function (identifier) {\n if (identifier === void 0) {\n identifier = DEFAULT_ENTRY_NAME;\n }\n\n this.instancesDeferred[\"delete\"](identifier);\n this.instances[\"delete\"](identifier);\n }; // app.delete() will call this method on every provider to delete the services\n // TODO: should we mark the provider as deleted?\n\n\n Provider.prototype[\"delete\"] = function () {\n return __awaiter(this, void 0, void 0, function () {\n var services;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n services = Array.from(this.instances.values());\n return [4\n /*yield*/\n , Promise.all(__spread(services.filter(function (service) {\n return 'INTERNAL' in service;\n }) // legacy services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(function (service) {\n return service.INTERNAL[\"delete\"]();\n }), services.filter(function (service) {\n return '_delete' in service;\n }) // modularized services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(function (service) {\n return service._delete();\n })))];\n\n case 1:\n _a.sent();\n\n return [2\n /*return*/\n ];\n }\n });\n });\n };\n\n Provider.prototype.isComponentSet = function () {\n return this.component != null;\n };\n\n Provider.prototype.getOrInitializeService = function (identifier) {\n var instance = this.instances.get(identifier);\n\n if (!instance && this.component) {\n instance = this.component.instanceFactory(this.container, normalizeIdentifierForFactory(identifier));\n this.instances.set(identifier, instance);\n }\n\n return instance || null;\n };\n\n Provider.prototype.normalizeInstanceIdentifier = function (identifier) {\n if (this.component) {\n return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\n } else {\n return identifier; // assume multiple instances are supported before the component is provided.\n }\n };\n\n return Provider;\n}(); // undefined should be passed to the service factory for the default instance\n\n\nfunction normalizeIdentifierForFactory(identifier) {\n return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\n}\n\nfunction isComponentEager(component) {\n return component.instantiationMode === \"EAGER\"\n /* EAGER */\n ;\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\r\n */\n\n\nvar ComponentContainer =\n/** @class */\nfunction () {\n function ComponentContainer(name) {\n this.name = name;\n this.providers = new Map();\n }\n /**\r\n *\r\n * @param component Component being added\r\n * @param overwrite When a component with the same name has already been registered,\r\n * if overwrite is true: overwrite the existing component with the new component and create a new\r\n * provider with the new component. It can be useful in tests where you want to use different mocks\r\n * for different tests.\r\n * if overwrite is false: throw an exception\r\n */\n\n\n ComponentContainer.prototype.addComponent = function (component) {\n var provider = this.getProvider(component.name);\n\n if (provider.isComponentSet()) {\n throw new Error(\"Component \" + component.name + \" has already been registered with \" + this.name);\n }\n\n provider.setComponent(component);\n };\n\n ComponentContainer.prototype.addOrOverwriteComponent = function (component) {\n var provider = this.getProvider(component.name);\n\n if (provider.isComponentSet()) {\n // delete the existing provider from the container, so we can register the new component\n this.providers[\"delete\"](component.name);\n }\n\n this.addComponent(component);\n };\n /**\r\n * getProvider provides a type safe interface where it can only be called with a field name\r\n * present in NameServiceMapping interface.\r\n *\r\n * Firebase SDKs providing services should extend NameServiceMapping interface to register\r\n * themselves.\r\n */\n\n\n ComponentContainer.prototype.getProvider = function (name) {\n if (this.providers.has(name)) {\n return this.providers.get(name);\n } // create a Provider for a service that hasn't registered with Firebase\n\n\n var provider = new Provider(name, this);\n this.providers.set(name, provider);\n return provider;\n };\n\n ComponentContainer.prototype.getProviders = function () {\n return Array.from(this.providers.values());\n };\n\n return ComponentContainer;\n}();\n\nexport { Component, ComponentContainer, Provider };","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar _a;\n/**\r\n * A container for all of the Logger instances\r\n */\n\n\nvar instances = [];\n/**\r\n * The JS SDK supports 5 log levels and also allows a user the ability to\r\n * silence the logs altogether.\r\n *\r\n * The order is a follows:\r\n * DEBUG < VERBOSE < INFO < WARN < ERROR\r\n *\r\n * All of the log types above the current log level will be captured (i.e. if\r\n * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and\r\n * `VERBOSE` logs will not)\r\n */\n\nvar LogLevel;\n\n(function (LogLevel) {\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel[LogLevel[\"VERBOSE\"] = 1] = \"VERBOSE\";\n LogLevel[LogLevel[\"INFO\"] = 2] = \"INFO\";\n LogLevel[LogLevel[\"WARN\"] = 3] = \"WARN\";\n LogLevel[LogLevel[\"ERROR\"] = 4] = \"ERROR\";\n LogLevel[LogLevel[\"SILENT\"] = 5] = \"SILENT\";\n})(LogLevel || (LogLevel = {}));\n\nvar levelStringToEnum = {\n 'debug': LogLevel.DEBUG,\n 'verbose': LogLevel.VERBOSE,\n 'info': LogLevel.INFO,\n 'warn': LogLevel.WARN,\n 'error': LogLevel.ERROR,\n 'silent': LogLevel.SILENT\n};\n/**\r\n * The default log level\r\n */\n\nvar defaultLogLevel = LogLevel.INFO;\n/**\r\n * By default, `console.debug` is not displayed in the developer console (in\r\n * chrome). To avoid forcing users to have to opt-in to these logs twice\r\n * (i.e. once for firebase, and once in the console), we are sending `DEBUG`\r\n * logs to the `console.log` function.\r\n */\n\nvar ConsoleMethod = (_a = {}, _a[LogLevel.DEBUG] = 'log', _a[LogLevel.VERBOSE] = 'log', _a[LogLevel.INFO] = 'info', _a[LogLevel.WARN] = 'warn', _a[LogLevel.ERROR] = 'error', _a);\n/**\r\n * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR\r\n * messages on to their corresponding console counterparts (if the log method\r\n * is supported by the current log level)\r\n */\n\nvar defaultLogHandler = function defaultLogHandler(instance, logType) {\n var args = [];\n\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n\n if (logType < instance.logLevel) {\n return;\n }\n\n var now = new Date().toISOString();\n var method = ConsoleMethod[logType];\n\n if (method) {\n console[method].apply(console, __spreadArrays([\"[\" + now + \"] \" + instance.name + \":\"], args));\n } else {\n throw new Error(\"Attempted to log a message with an invalid logType (value: \" + logType + \")\");\n }\n};\n\nvar Logger =\n/** @class */\nfunction () {\n /**\r\n * Gives you an instance of a Logger to capture messages according to\r\n * Firebase's logging scheme.\r\n *\r\n * @param name The name that the logs will be associated with\r\n */\n function Logger(name) {\n this.name = name;\n /**\r\n * The log level of the given Logger instance.\r\n */\n\n this._logLevel = defaultLogLevel;\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\n\n this._logHandler = defaultLogHandler;\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\n\n this._userLogHandler = null;\n /**\r\n * Capture the current instance for later use\r\n */\n\n instances.push(this);\n }\n\n Object.defineProperty(Logger.prototype, \"logLevel\", {\n get: function get() {\n return this._logLevel;\n },\n set: function set(val) {\n if (!(val in LogLevel)) {\n throw new TypeError(\"Invalid value \\\"\" + val + \"\\\" assigned to `logLevel`\");\n }\n\n this._logLevel = val;\n },\n enumerable: false,\n configurable: true\n }); // Workaround for setter/getter having to be the same type.\n\n Logger.prototype.setLogLevel = function (val) {\n this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;\n };\n\n Object.defineProperty(Logger.prototype, \"logHandler\", {\n get: function get() {\n return this._logHandler;\n },\n set: function set(val) {\n if (typeof val !== 'function') {\n throw new TypeError('Value assigned to `logHandler` must be a function');\n }\n\n this._logHandler = val;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Logger.prototype, \"userLogHandler\", {\n get: function get() {\n return this._userLogHandler;\n },\n set: function set(val) {\n this._userLogHandler = val;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * The functions below are all based on the `console` interface\r\n */\n\n Logger.prototype.debug = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.DEBUG], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.DEBUG], args));\n };\n\n Logger.prototype.log = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.VERBOSE], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.VERBOSE], args));\n };\n\n Logger.prototype.info = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.INFO], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.INFO], args));\n };\n\n Logger.prototype.warn = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.WARN], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.WARN], args));\n };\n\n Logger.prototype.error = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.ERROR], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.ERROR], args));\n };\n\n return Logger;\n}();\n\nfunction setLogLevel(level) {\n instances.forEach(function (inst) {\n inst.setLogLevel(level);\n });\n}\n\nfunction setUserLogHandler(logCallback, options) {\n var _loop_1 = function _loop_1(instance) {\n var customLogLevel = null;\n\n if (options && options.level) {\n customLogLevel = levelStringToEnum[options.level];\n }\n\n if (logCallback === null) {\n instance.userLogHandler = null;\n } else {\n instance.userLogHandler = function (instance, level) {\n var args = [];\n\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n\n var message = args.map(function (arg) {\n if (arg == null) {\n return null;\n } else if (typeof arg === 'string') {\n return arg;\n } else if (typeof arg === 'number' || typeof arg === 'boolean') {\n return arg.toString();\n } else if (arg instanceof Error) {\n return arg.message;\n } else {\n try {\n return JSON.stringify(arg);\n } catch (ignored) {\n return null;\n }\n }\n }).filter(function (arg) {\n return arg;\n }).join(' ');\n\n if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {\n logCallback({\n level: LogLevel[level].toLowerCase(),\n message: message,\n args: args,\n type: instance.name\n });\n }\n };\n }\n };\n\n for (var _i = 0, instances_1 = instances; _i < instances_1.length; _i++) {\n var instance = instances_1[_i];\n\n _loop_1(instance);\n }\n}\n\nexport { LogLevel, Logger, setLogLevel, setUserLogHandler };","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { __values, __assign } from 'tslib';\nimport { ErrorFactory, deepCopy, contains, deepExtend, createSubscribe, isBrowser, isNode } from '@firebase/util';\nimport { ComponentContainer, Component } from '@firebase/component';\nimport { Logger, setLogLevel, setUserLogHandler } from '@firebase/logger';\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar _a;\n\nvar ERRORS = (_a = {}, _a[\"no-app\"\n/* NO_APP */\n] = \"No Firebase App '{$appName}' has been created - \" + 'call Firebase App.initializeApp()', _a[\"bad-app-name\"\n/* BAD_APP_NAME */\n] = \"Illegal App name: '{$appName}\", _a[\"duplicate-app\"\n/* DUPLICATE_APP */\n] = \"Firebase App named '{$appName}' already exists\", _a[\"app-deleted\"\n/* APP_DELETED */\n] = \"Firebase App named '{$appName}' already deleted\", _a[\"invalid-app-argument\"\n/* INVALID_APP_ARGUMENT */\n] = 'firebase.{$appName}() takes either no argument or a ' + 'Firebase App instance.', _a[\"invalid-log-argument\"\n/* INVALID_LOG_ARGUMENT */\n] = 'First argument to `onLog` must be null or a function.', _a);\nvar ERROR_FACTORY = new ErrorFactory('app', 'Firebase', ERRORS);\nvar name$1 = \"@firebase/app\";\nvar version = \"0.6.14\";\nvar name$2 = \"@firebase/analytics\";\nvar name$3 = \"@firebase/auth\";\nvar name$4 = \"@firebase/database\";\nvar name$5 = \"@firebase/functions\";\nvar name$6 = \"@firebase/installations\";\nvar name$7 = \"@firebase/messaging\";\nvar name$8 = \"@firebase/performance\";\nvar name$9 = \"@firebase/remote-config\";\nvar name$a = \"@firebase/storage\";\nvar name$b = \"@firebase/firestore\";\nvar name$c = \"firebase-wrapper\";\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar _a$1;\n\nvar DEFAULT_ENTRY_NAME = '[DEFAULT]';\nvar PLATFORM_LOG_STRING = (_a$1 = {}, _a$1[name$1] = 'fire-core', _a$1[name$2] = 'fire-analytics', _a$1[name$3] = 'fire-auth', _a$1[name$4] = 'fire-rtdb', _a$1[name$5] = 'fire-fn', _a$1[name$6] = 'fire-iid', _a$1[name$7] = 'fire-fcm', _a$1[name$8] = 'fire-perf', _a$1[name$9] = 'fire-rc', _a$1[name$a] = 'fire-gcs', _a$1[name$b] = 'fire-fst', _a$1['fire-js'] = 'fire-js', _a$1[name$c] = 'fire-js-all', _a$1);\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar logger = new Logger('@firebase/app');\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Global context object for a collection of services using\r\n * a shared authentication state.\r\n */\n\nvar FirebaseAppImpl =\n/** @class */\nfunction () {\n function FirebaseAppImpl(options, config, firebase_) {\n var e_1, _a;\n\n var _this = this;\n\n this.firebase_ = firebase_;\n this.isDeleted_ = false;\n this.name_ = config.name;\n this.automaticDataCollectionEnabled_ = config.automaticDataCollectionEnabled || false;\n this.options_ = deepCopy(options);\n this.container = new ComponentContainer(config.name); // add itself to container\n\n this._addComponent(new Component('app', function () {\n return _this;\n }, \"PUBLIC\"\n /* PUBLIC */\n ));\n\n try {\n // populate ComponentContainer with existing components\n for (var _b = __values(this.firebase_.INTERNAL.components.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var component = _c.value;\n\n this._addComponent(component);\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b[\"return\"])) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n }\n\n Object.defineProperty(FirebaseAppImpl.prototype, \"automaticDataCollectionEnabled\", {\n get: function get() {\n this.checkDestroyed_();\n return this.automaticDataCollectionEnabled_;\n },\n set: function set(val) {\n this.checkDestroyed_();\n this.automaticDataCollectionEnabled_ = val;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FirebaseAppImpl.prototype, \"name\", {\n get: function get() {\n this.checkDestroyed_();\n return this.name_;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FirebaseAppImpl.prototype, \"options\", {\n get: function get() {\n this.checkDestroyed_();\n return this.options_;\n },\n enumerable: false,\n configurable: true\n });\n\n FirebaseAppImpl.prototype[\"delete\"] = function () {\n var _this = this;\n\n return new Promise(function (resolve) {\n _this.checkDestroyed_();\n\n resolve();\n }).then(function () {\n _this.firebase_.INTERNAL.removeApp(_this.name_);\n\n return Promise.all(_this.container.getProviders().map(function (provider) {\n return provider[\"delete\"]();\n }));\n }).then(function () {\n _this.isDeleted_ = true;\n });\n };\n /**\r\n * Return a service instance associated with this app (creating it\r\n * on demand), identified by the passed instanceIdentifier.\r\n *\r\n * NOTE: Currently storage and functions are the only ones that are leveraging this\r\n * functionality. They invoke it by calling:\r\n *\r\n * ```javascript\r\n * firebase.app().storage('STORAGE BUCKET ID')\r\n * ```\r\n *\r\n * The service name is passed to this already\r\n * @internal\r\n */\n\n\n FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) {\n if (instanceIdentifier === void 0) {\n instanceIdentifier = DEFAULT_ENTRY_NAME;\n }\n\n this.checkDestroyed_(); // getImmediate will always succeed because _getService is only called for registered components.\n\n return this.container.getProvider(name).getImmediate({\n identifier: instanceIdentifier\n });\n };\n /**\r\n * Remove a service instance from the cache, so we will create a new instance for this service\r\n * when people try to get this service again.\r\n *\r\n * NOTE: currently only firestore is using this functionality to support firestore shutdown.\r\n *\r\n * @param name The service name\r\n * @param instanceIdentifier instance identifier in case multiple instances are allowed\r\n * @internal\r\n */\n\n\n FirebaseAppImpl.prototype._removeServiceInstance = function (name, instanceIdentifier) {\n if (instanceIdentifier === void 0) {\n instanceIdentifier = DEFAULT_ENTRY_NAME;\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n this.container.getProvider(name).clearInstance(instanceIdentifier);\n };\n /**\r\n * @param component the component being added to this app's container\r\n */\n\n\n FirebaseAppImpl.prototype._addComponent = function (component) {\n try {\n this.container.addComponent(component);\n } catch (e) {\n logger.debug(\"Component \" + component.name + \" failed to register with FirebaseApp \" + this.name, e);\n }\n };\n\n FirebaseAppImpl.prototype._addOrOverwriteComponent = function (component) {\n this.container.addOrOverwriteComponent(component);\n };\n\n FirebaseAppImpl.prototype.toJSON = function () {\n return {\n name: this.name,\n automaticDataCollectionEnabled: this.automaticDataCollectionEnabled,\n options: this.options\n };\n };\n /**\r\n * This function will throw an Error if the App has already been deleted -\r\n * use before performing API actions on the App.\r\n */\n\n\n FirebaseAppImpl.prototype.checkDestroyed_ = function () {\n if (this.isDeleted_) {\n throw ERROR_FACTORY.create(\"app-deleted\"\n /* APP_DELETED */\n , {\n appName: this.name_\n });\n }\n };\n\n return FirebaseAppImpl;\n}(); // Prevent dead-code elimination of these methods w/o invalid property\n// copying.\n\n\nFirebaseAppImpl.prototype.name && FirebaseAppImpl.prototype.options || FirebaseAppImpl.prototype[\"delete\"] || console.log('dc');\nvar version$1 = \"8.2.5\";\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Because auth can't share code with other components, we attach the utility functions\r\n * in an internal namespace to share code.\r\n * This function return a firebase namespace object without\r\n * any utility functions, so it can be shared between the regular firebaseNamespace and\r\n * the lite version.\r\n */\n\nfunction createFirebaseNamespaceCore(firebaseAppImpl) {\n var apps = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var components = new Map(); // A namespace is a plain JavaScript Object.\n\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n // @ts-ignore\n __esModule: true,\n initializeApp: initializeApp,\n // @ts-ignore\n app: app,\n registerVersion: registerVersion,\n setLogLevel: setLogLevel,\n onLog: onLog,\n // @ts-ignore\n apps: null,\n SDK_VERSION: version$1,\n INTERNAL: {\n registerComponent: registerComponent,\n removeApp: removeApp,\n components: components,\n useAsService: useAsService\n }\n }; // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n namespace['default'] = namespace; // firebase.apps is a read-only getter.\n\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n\n function removeApp(name) {\n delete apps[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n\n\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n\n if (!contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\"\n /* NO_APP */\n , {\n appName: name\n });\n }\n\n return apps[name];\n } // @ts-ignore\n\n\n app['App'] = firebaseAppImpl;\n\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n\n if (_typeof(rawConfig) !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = {\n name: name_1\n };\n }\n\n var config = rawConfig;\n\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n\n var name = config.name;\n\n if (typeof name !== 'string' || !name) {\n throw ERROR_FACTORY.create(\"bad-app-name\"\n /* BAD_APP_NAME */\n , {\n appName: String(name)\n });\n }\n\n if (contains(apps, name)) {\n throw ERROR_FACTORY.create(\"duplicate-app\"\n /* DUPLICATE_APP */\n , {\n appName: name\n });\n }\n\n var app = new firebaseAppImpl(options, config, namespace);\n apps[name] = app;\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n\n\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }\n\n function registerComponent(component) {\n var e_1, _a;\n\n var componentName = component.name;\n\n if (components.has(componentName)) {\n logger.debug(\"There were multiple attempts to register component \" + componentName + \".\");\n return component.type === \"PUBLIC\"\n /* PUBLIC */\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n namespace[componentName] : null;\n }\n\n components.set(componentName, component); // create service namespace for public components\n\n if (component.type === \"PUBLIC\"\n /* PUBLIC */\n ) {\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n if (typeof appArg[componentName] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n appName: componentName\n });\n } // Forward service instance lookup to the FirebaseApp.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n return appArg[componentName]();\n }; // ... and a container for service-level properties.\n\n\n if (component.serviceProps !== undefined) {\n deepExtend(serviceNamespace, component.serviceProps);\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n namespace[componentName] = serviceNamespace; // Patch the FirebaseAppImpl prototype\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n firebaseAppImpl.prototype[componentName] = // TODO: The eslint disable can be removed and the 'ignoreRestArgs'\n // option added to the no-explicit-any rule when ESlint releases it.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var serviceFxn = this._getService.bind(this, componentName);\n\n return serviceFxn.apply(this, component.multipleInstances ? args : []);\n };\n }\n\n try {\n // add the component to existing app instances\n for (var _b = __values(Object.keys(apps)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var appName = _c.value;\n\n apps[appName]._addComponent(component);\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b[\"return\"])) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n\n return component.type === \"PUBLIC\"\n /* PUBLIC */\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n namespace[componentName] : null;\n }\n\n function registerVersion(libraryKeyOrName, version, variant) {\n var _a; // TODO: We can use this check to whitelist strings when/if we set up\n // a good whitelist system.\n\n\n var library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;\n\n if (variant) {\n library += \"-\" + variant;\n }\n\n var libraryMismatch = library.match(/\\s|\\//);\n var versionMismatch = version.match(/\\s|\\//);\n\n if (libraryMismatch || versionMismatch) {\n var warning = [\"Unable to register library \\\"\" + library + \"\\\" with version \\\"\" + version + \"\\\":\"];\n\n if (libraryMismatch) {\n warning.push(\"library name \\\"\" + library + \"\\\" contains illegal characters (whitespace or \\\"/\\\")\");\n }\n\n if (libraryMismatch && versionMismatch) {\n warning.push('and');\n }\n\n if (versionMismatch) {\n warning.push(\"version name \\\"\" + version + \"\\\" contains illegal characters (whitespace or \\\"/\\\")\");\n }\n\n logger.warn(warning.join(' '));\n return;\n }\n\n registerComponent(new Component(library + \"-version\", function () {\n return {\n library: library,\n version: version\n };\n }, \"VERSION\"\n /* VERSION */\n ));\n }\n\n function onLog(logCallback, options) {\n if (logCallback !== null && typeof logCallback !== 'function') {\n throw ERROR_FACTORY.create(\"invalid-log-argument\"\n /* INVALID_LOG_ARGUMENT */\n , {\n appName: name\n });\n }\n\n setUserLogHandler(logCallback, options);\n } // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n\n\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n\n var useService = name;\n return useService;\n }\n\n return namespace;\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Return a firebase namespace object.\r\n *\r\n * In production, this will be called exactly once and the result\r\n * assigned to the 'firebase' global. It may be called multiple times\r\n * in unit tests.\r\n */\n\n\nfunction createFirebaseNamespace() {\n var namespace = createFirebaseNamespaceCore(FirebaseAppImpl);\n namespace.INTERNAL = __assign(__assign({}, namespace.INTERNAL), {\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n deepExtend: deepExtend\n });\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n\n return namespace;\n}\n\nvar firebase = createFirebaseNamespace();\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar PlatformLoggerService =\n/** @class */\nfunction () {\n function PlatformLoggerService(container) {\n this.container = container;\n } // In initial implementation, this will be called by installations on\n // auth token refresh, and installations will send this string.\n\n\n PlatformLoggerService.prototype.getPlatformInfoString = function () {\n var providers = this.container.getProviders(); // Loop through providers and get library/version pairs from any that are\n // version components.\n\n return providers.map(function (provider) {\n if (isVersionServiceProvider(provider)) {\n var service = provider.getImmediate();\n return service.library + \"/\" + service.version;\n } else {\n return null;\n }\n }).filter(function (logString) {\n return logString;\n }).join(' ');\n };\n\n return PlatformLoggerService;\n}();\n/**\r\n *\r\n * @param provider check if this provider provides a VersionService\r\n *\r\n * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider\r\n * provides VersionService. The provider is not necessarily a 'app-version'\r\n * provider.\r\n */\n\n\nfunction isVersionServiceProvider(provider) {\n var component = provider.getComponent();\n return (component === null || component === void 0 ? void 0 : component.type) === \"VERSION\"\n /* VERSION */\n ;\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction registerCoreComponents(firebase, variant) {\n firebase.INTERNAL.registerComponent(new Component('platform-logger', function (container) {\n return new PlatformLoggerService(container);\n }, \"PRIVATE\"\n /* PRIVATE */\n )); // Register `app` package.\n\n firebase.registerVersion(name$1, version, variant); // Register platform SDK identifier (no version).\n\n firebase.registerVersion('fire-js', '');\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Firebase Lite detection test\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nif (isBrowser() && self.firebase !== undefined) {\n logger.warn(\"\\n Warning: Firebase is already defined in the global scope. Please make sure\\n Firebase library is only loaded once.\\n \"); // eslint-disable-next-line\n\n var sdkVersion = self.firebase.SDK_VERSION;\n\n if (sdkVersion && sdkVersion.indexOf('LITE') >= 0) {\n logger.warn(\"\\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\\n \");\n }\n}\n\nvar initializeApp = firebase.initializeApp; // TODO: This disable can be removed and the 'ignoreRestArgs' option added to\n// the no-explicit-any rule when ESlint releases it.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nfirebase.initializeApp = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n } // Environment check before initializing app\n // Do the check in initializeApp, so people have a chance to disable it by setting logLevel\n // in @firebase/logger\n\n\n if (isNode()) {\n logger.warn(\"\\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\\n run in a Node environment. If running in a Node environment, make sure you\\n are using the bundle specified by the \\\"main\\\" field in package.json.\\n \\n If you are using Webpack, you can specify \\\"main\\\" as the first item in\\n \\\"resolve.mainFields\\\":\\n https://webpack.js.org/configuration/resolve/#resolvemainfields\\n \\n If using Rollup, use the @rollup/plugin-node-resolve plugin and specify \\\"main\\\"\\n as the first item in \\\"mainFields\\\", e.g. ['main', 'module'].\\n https://github.com/rollup/@rollup/plugin-node-resolve\\n \");\n }\n\n return initializeApp.apply(undefined, args);\n};\n\nvar firebase$1 = firebase;\nregisterCoreComponents(firebase$1);\nexport default firebase$1;\nexport { firebase$1 as firebase };","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * jQuery JavaScript Library v1.12.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:17Z\n */\n(function (global, factory) {\n if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === \"object\" && _typeof(module.exports) === \"object\") {\n // For CommonJS and CommonJS-like environments where a proper `window`\n // is present, execute the factory and get jQuery.\n // For environments that do not have a `window` with a `document`\n // (such as Node.js), expose a factory as module.exports.\n // This accentuates the need for the creation of a real `window`.\n // e.g. var jQuery = require(\"jquery\")(window);\n // See ticket #14549 for more info.\n module.exports = global.document ? factory(global, true) : function (w) {\n if (!w.document) {\n throw new Error(\"jQuery requires a window with a document\");\n }\n\n return factory(w);\n };\n } else {\n factory(global);\n } // Pass this if window is not defined yet\n\n})(typeof window !== \"undefined\" ? window : this, function (window, noGlobal) {\n // Support: Firefox 18+\n // Can't be in strict mode, several libs including ASP.NET trace\n // the stack via arguments.caller.callee and Firefox dies if\n // you try to trace through \"use strict\" call chains. (#13335)\n //\"use strict\";\n var deletedIds = [];\n var document = window.document;\n var _slice = deletedIds.slice;\n var concat = deletedIds.concat;\n var push = deletedIds.push;\n var indexOf = deletedIds.indexOf;\n var class2type = {};\n var toString = class2type.toString;\n var hasOwn = class2type.hasOwnProperty;\n var support = {};\n\n var version = \"1.12.4\",\n // Define a local copy of jQuery\n jQuery = function jQuery(selector, context) {\n // The jQuery object is actually just the init constructor 'enhanced'\n // Need init if jQuery is called (just allow error to be thrown if not included)\n return new jQuery.fn.init(selector, context);\n },\n // Support: Android<4.1, IE<9\n // Make sure we trim BOM and NBSP\n rtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n // Matches dashed string for camelizing\n rmsPrefix = /^-ms-/,\n rdashAlpha = /-([\\da-z])/gi,\n // Used by jQuery.camelCase as callback to replace()\n fcamelCase = function fcamelCase(all, letter) {\n return letter.toUpperCase();\n };\n\n jQuery.fn = jQuery.prototype = {\n // The current version of jQuery being used\n jquery: version,\n constructor: jQuery,\n // Start with an empty selector\n selector: \"\",\n // The default length of a jQuery object is 0\n length: 0,\n toArray: function toArray() {\n return _slice.call(this);\n },\n // Get the Nth element in the matched element set OR\n // Get the whole matched element set as a clean array\n get: function get(num) {\n return num != null ? // Return just the one element from the set\n num < 0 ? this[num + this.length] : this[num] : // Return all the elements in a clean array\n _slice.call(this);\n },\n // Take an array of elements and push it onto the stack\n // (returning the new matched element set)\n pushStack: function pushStack(elems) {\n // Build a new jQuery matched element set\n var ret = jQuery.merge(this.constructor(), elems); // Add the old object onto the stack (as a reference)\n\n ret.prevObject = this;\n ret.context = this.context; // Return the newly-formed element set\n\n return ret;\n },\n // Execute a callback for every element in the matched set.\n each: function each(callback) {\n return jQuery.each(this, callback);\n },\n map: function map(callback) {\n return this.pushStack(jQuery.map(this, function (elem, i) {\n return callback.call(elem, i, elem);\n }));\n },\n slice: function slice() {\n return this.pushStack(_slice.apply(this, arguments));\n },\n first: function first() {\n return this.eq(0);\n },\n last: function last() {\n return this.eq(-1);\n },\n eq: function eq(i) {\n var len = this.length,\n j = +i + (i < 0 ? len : 0);\n return this.pushStack(j >= 0 && j < len ? [this[j]] : []);\n },\n end: function end() {\n return this.prevObject || this.constructor();\n },\n // For internal use only.\n // Behaves like an Array's method, not like a jQuery method.\n push: push,\n sort: deletedIds.sort,\n splice: deletedIds.splice\n };\n\n jQuery.extend = jQuery.fn.extend = function () {\n var src,\n copyIsArray,\n copy,\n name,\n options,\n clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false; // Handle a deep copy situation\n\n if (typeof target === \"boolean\") {\n deep = target; // skip the boolean and the target\n\n target = arguments[i] || {};\n i++;\n } // Handle case when target is a string or something (possible in deep copy)\n\n\n if (_typeof(target) !== \"object\" && !jQuery.isFunction(target)) {\n target = {};\n } // extend jQuery itself if only one argument is passed\n\n\n if (i === length) {\n target = this;\n i--;\n }\n\n for (; i < length; i++) {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null) {\n // Extend the base object\n for (name in options) {\n src = target[name];\n copy = options[name]; // Prevent never-ending loop\n\n if (target === copy) {\n continue;\n } // Recurse if we're merging plain objects or arrays\n\n\n if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {\n if (copyIsArray) {\n copyIsArray = false;\n clone = src && jQuery.isArray(src) ? src : [];\n } else {\n clone = src && jQuery.isPlainObject(src) ? src : {};\n } // Never move original objects, clone them\n\n\n target[name] = jQuery.extend(deep, clone, copy); // Don't bring in undefined values\n } else if (copy !== undefined) {\n target[name] = copy;\n }\n }\n }\n } // Return the modified object\n\n\n return target;\n };\n\n jQuery.extend({\n // Unique for each copy of jQuery on the page\n expando: \"jQuery\" + (version + Math.random()).replace(/\\D/g, \"\"),\n // Assume jQuery is ready without the ready module\n isReady: true,\n error: function error(msg) {\n throw new Error(msg);\n },\n noop: function noop() {},\n // See test/unit/core.js for details concerning isFunction.\n // Since version 1.3, DOM methods and functions like alert\n // aren't supported. They return false on IE (#2968).\n isFunction: function isFunction(obj) {\n return jQuery.type(obj) === \"function\";\n },\n isArray: Array.isArray || function (obj) {\n return jQuery.type(obj) === \"array\";\n },\n isWindow: function isWindow(obj) {\n /* jshint eqeqeq: false */\n return obj != null && obj == obj.window;\n },\n isNumeric: function isNumeric(obj) {\n // parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n // ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n // subtraction forces infinities to NaN\n // adding 1 corrects loss of precision from parseFloat (#15100)\n var realStringObj = obj && obj.toString();\n return !jQuery.isArray(obj) && realStringObj - parseFloat(realStringObj) + 1 >= 0;\n },\n isEmptyObject: function isEmptyObject(obj) {\n var name;\n\n for (name in obj) {\n return false;\n }\n\n return true;\n },\n isPlainObject: function isPlainObject(obj) {\n var key; // Must be an Object.\n // Because of IE, we also have to check the presence of the constructor property.\n // Make sure that DOM nodes and window objects don't pass through, as well\n\n if (!obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow(obj)) {\n return false;\n }\n\n try {\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwn.call(obj, \"constructor\") && !hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\")) {\n return false;\n }\n } catch (e) {\n // IE8,9 Will throw exceptions on certain host objects #9897\n return false;\n } // Support: IE<9\n // Handle iteration over inherited properties before own properties.\n\n\n if (!support.ownFirst) {\n for (key in obj) {\n return hasOwn.call(obj, key);\n }\n } // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n\n\n for (key in obj) {}\n\n return key === undefined || hasOwn.call(obj, key);\n },\n type: function type(obj) {\n if (obj == null) {\n return obj + \"\";\n }\n\n return _typeof(obj) === \"object\" || typeof obj === \"function\" ? class2type[toString.call(obj)] || \"object\" : _typeof(obj);\n },\n // Workarounds based on findings by Jim Driscoll\n // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n globalEval: function globalEval(data) {\n if (data && jQuery.trim(data)) {\n // We use execScript on Internet Explorer\n // We use an anonymous function so that context is window\n // rather than jQuery in Firefox\n (window.execScript || function (data) {\n window[\"eval\"].call(window, data); // jscs:ignore requireDotNotation\n })(data);\n }\n },\n // Convert dashed to camelCase; used by the css and data modules\n // Microsoft forgot to hump their vendor prefix (#9572)\n camelCase: function camelCase(string) {\n return string.replace(rmsPrefix, \"ms-\").replace(rdashAlpha, fcamelCase);\n },\n nodeName: function nodeName(elem, name) {\n return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n },\n each: function each(obj, callback) {\n var length,\n i = 0;\n\n if (isArrayLike(obj)) {\n length = obj.length;\n\n for (; i < length; i++) {\n if (callback.call(obj[i], i, obj[i]) === false) {\n break;\n }\n }\n } else {\n for (i in obj) {\n if (callback.call(obj[i], i, obj[i]) === false) {\n break;\n }\n }\n }\n\n return obj;\n },\n // Support: Android<4.1, IE<9\n trim: function trim(text) {\n return text == null ? \"\" : (text + \"\").replace(rtrim, \"\");\n },\n // results is for internal usage only\n makeArray: function makeArray(arr, results) {\n var ret = results || [];\n\n if (arr != null) {\n if (isArrayLike(Object(arr))) {\n jQuery.merge(ret, typeof arr === \"string\" ? [arr] : arr);\n } else {\n push.call(ret, arr);\n }\n }\n\n return ret;\n },\n inArray: function inArray(elem, arr, i) {\n var len;\n\n if (arr) {\n if (indexOf) {\n return indexOf.call(arr, elem, i);\n }\n\n len = arr.length;\n i = i ? i < 0 ? Math.max(0, len + i) : i : 0;\n\n for (; i < len; i++) {\n // Skip accessing in sparse arrays\n if (i in arr && arr[i] === elem) {\n return i;\n }\n }\n }\n\n return -1;\n },\n merge: function merge(first, second) {\n var len = +second.length,\n j = 0,\n i = first.length;\n\n while (j < len) {\n first[i++] = second[j++];\n } // Support: IE<9\n // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)\n\n\n if (len !== len) {\n while (second[j] !== undefined) {\n first[i++] = second[j++];\n }\n }\n\n first.length = i;\n return first;\n },\n grep: function grep(elems, callback, invert) {\n var callbackInverse,\n matches = [],\n i = 0,\n length = elems.length,\n callbackExpect = !invert; // Go through the array, only saving the items\n // that pass the validator function\n\n for (; i < length; i++) {\n callbackInverse = !callback(elems[i], i);\n\n if (callbackInverse !== callbackExpect) {\n matches.push(elems[i]);\n }\n }\n\n return matches;\n },\n // arg is for internal usage only\n map: function map(elems, callback, arg) {\n var length,\n value,\n i = 0,\n ret = []; // Go through the array, translating each of the items to their new values\n\n if (isArrayLike(elems)) {\n length = elems.length;\n\n for (; i < length; i++) {\n value = callback(elems[i], i, arg);\n\n if (value != null) {\n ret.push(value);\n }\n } // Go through every key on the object,\n\n } else {\n for (i in elems) {\n value = callback(elems[i], i, arg);\n\n if (value != null) {\n ret.push(value);\n }\n }\n } // Flatten any nested arrays\n\n\n return concat.apply([], ret);\n },\n // A global GUID counter for objects\n guid: 1,\n // Bind a function to a context, optionally partially applying any\n // arguments.\n proxy: function proxy(fn, context) {\n var args, proxy, tmp;\n\n if (typeof context === \"string\") {\n tmp = fn[context];\n context = fn;\n fn = tmp;\n } // Quick check to determine if target is callable, in the spec\n // this throws a TypeError, but we will just return undefined.\n\n\n if (!jQuery.isFunction(fn)) {\n return undefined;\n } // Simulated bind\n\n\n args = _slice.call(arguments, 2);\n\n proxy = function proxy() {\n return fn.apply(context || this, args.concat(_slice.call(arguments)));\n }; // Set the guid of unique handler to the same of original handler, so it can be removed\n\n\n proxy.guid = fn.guid = fn.guid || jQuery.guid++;\n return proxy;\n },\n now: function now() {\n return +new Date();\n },\n // jQuery.support is not used in Core but other projects attach their\n // properties to it so it needs to exist.\n support: support\n }); // JSHint would error on this code due to the Symbol not being defined in ES5.\n // Defining this global in .jshintrc would create a danger of using the global\n // unguarded in another place, it seems safer to just disable JSHint for these\n // three lines.\n\n /* jshint ignore: start */\n\n if (typeof Symbol === \"function\") {\n jQuery.fn[Symbol.iterator] = deletedIds[Symbol.iterator];\n }\n /* jshint ignore: end */\n // Populate the class2type map\n\n\n jQuery.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"), function (i, name) {\n class2type[\"[object \" + name + \"]\"] = name.toLowerCase();\n });\n\n function isArrayLike(obj) {\n // Support: iOS 8.2 (not reproducible in simulator)\n // `in` check used to prevent JIT error (gh-2145)\n // hasOwn isn't used here due to false negatives\n // regarding Nodelist length in IE\n var length = !!obj && \"length\" in obj && obj.length,\n type = jQuery.type(obj);\n\n if (type === \"function\" || jQuery.isWindow(obj)) {\n return false;\n }\n\n return type === \"array\" || length === 0 || typeof length === \"number\" && length > 0 && length - 1 in obj;\n }\n\n var Sizzle =\n /*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n function (window) {\n var i,\n support,\n Expr,\n getText,\n isXML,\n tokenize,\n compile,\n select,\n outermostContext,\n sortInput,\n hasDuplicate,\n // Local document vars\n setDocument,\n document,\n docElem,\n documentIsHTML,\n rbuggyQSA,\n rbuggyMatches,\n matches,\n contains,\n // Instance-specific data\n expando = \"sizzle\" + 1 * new Date(),\n preferredDoc = window.document,\n dirruns = 0,\n done = 0,\n classCache = createCache(),\n tokenCache = createCache(),\n compilerCache = createCache(),\n sortOrder = function sortOrder(a, b) {\n if (a === b) {\n hasDuplicate = true;\n }\n\n return 0;\n },\n // General-purpose constants\n MAX_NEGATIVE = 1 << 31,\n // Instance methods\n hasOwn = {}.hasOwnProperty,\n arr = [],\n pop = arr.pop,\n push_native = arr.push,\n push = arr.push,\n slice = arr.slice,\n // Use a stripped-down indexOf as it's faster than native\n // http://jsperf.com/thor-indexof-vs-for/5\n indexOf = function indexOf(list, elem) {\n var i = 0,\n len = list.length;\n\n for (; i < len; i++) {\n if (list[i] === elem) {\n return i;\n }\n }\n\n return -1;\n },\n booleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n // Regular expressions\n // http://www.w3.org/TR/css3-selectors/#whitespace\n whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n identifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n attributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace + // Operator (capture 2)\n \"*([*^$|!~]?=)\" + whitespace + // \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n \"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace + \"*\\\\]\",\n pseudos = \":(\" + identifier + \")(?:\\\\((\" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n // 1. quoted (capture 3; capture 4 or capture 5)\n \"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" + // 2. simple (capture 6)\n \"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" + // 3. anything else (capture 2)\n \".*\" + \")\\\\)|)\",\n // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n rwhitespace = new RegExp(whitespace + \"+\", \"g\"),\n rtrim = new RegExp(\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\"),\n rcomma = new RegExp(\"^\" + whitespace + \"*,\" + whitespace + \"*\"),\n rcombinators = new RegExp(\"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\"),\n rattributeQuotes = new RegExp(\"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\"),\n rpseudo = new RegExp(pseudos),\n ridentifier = new RegExp(\"^\" + identifier + \"$\"),\n matchExpr = {\n \"ID\": new RegExp(\"^#(\" + identifier + \")\"),\n \"CLASS\": new RegExp(\"^\\\\.(\" + identifier + \")\"),\n \"TAG\": new RegExp(\"^(\" + identifier + \"|[*])\"),\n \"ATTR\": new RegExp(\"^\" + attributes),\n \"PSEUDO\": new RegExp(\"^\" + pseudos),\n \"CHILD\": new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\"),\n \"bool\": new RegExp(\"^(?:\" + booleans + \")$\", \"i\"),\n // For use in libraries implementing .is()\n // We use this for POS matching in `select`\n \"needsContext\": new RegExp(\"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\")\n },\n rinputs = /^(?:input|select|textarea|button)$/i,\n rheader = /^h\\d$/i,\n rnative = /^[^{]+\\{\\s*\\[native \\w/,\n // Easily-parseable/retrievable ID or TAG or CLASS selectors\n rquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n rsibling = /[+~]/,\n rescape = /'|\\\\/g,\n // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n runescape = new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\"),\n funescape = function funescape(_, escaped, escapedWhitespace) {\n var high = \"0x\" + escaped - 0x10000; // NaN means non-codepoint\n // Support: Firefox<24\n // Workaround erroneous numeric interpretation of +\"0x\"\n\n return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint\n String.fromCharCode(high + 0x10000) : // Supplemental Plane codepoint (surrogate pair)\n String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);\n },\n // Used for iframes\n // See setDocument()\n // Removing the function wrapper causes a \"Permission Denied\"\n // error in IE\n unloadHandler = function unloadHandler() {\n setDocument();\n }; // Optimize for push.apply( _, NodeList )\n\n\n try {\n push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes); // Support: Android<4.0\n // Detect silently failing push.apply\n\n arr[preferredDoc.childNodes.length].nodeType;\n } catch (e) {\n push = {\n apply: arr.length ? // Leverage slice if possible\n function (target, els) {\n push_native.apply(target, slice.call(els));\n } : // Support: IE<9\n // Otherwise append directly\n function (target, els) {\n var j = target.length,\n i = 0; // Can't trust NodeList.length\n\n while (target[j++] = els[i++]) {}\n\n target.length = j - 1;\n }\n };\n }\n\n function Sizzle(selector, context, results, seed) {\n var m,\n i,\n elem,\n nid,\n nidselect,\n match,\n groups,\n newSelector,\n newContext = context && context.ownerDocument,\n // nodeType defaults to 9, since context defaults to document\n nodeType = context ? context.nodeType : 9;\n results = results || []; // Return early from calls with invalid selector or context\n\n if (typeof selector !== \"string\" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {\n return results;\n } // Try to shortcut find operations (as opposed to filters) in HTML documents\n\n\n if (!seed) {\n if ((context ? context.ownerDocument || context : preferredDoc) !== document) {\n setDocument(context);\n }\n\n context = context || document;\n\n if (documentIsHTML) {\n // If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n // (excepting DocumentFragment context, where the methods don't exist)\n if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {\n // ID selector\n if (m = match[1]) {\n // Document context\n if (nodeType === 9) {\n if (elem = context.getElementById(m)) {\n // Support: IE, Opera, Webkit\n // TODO: identify versions\n // getElementById can match elements by name instead of ID\n if (elem.id === m) {\n results.push(elem);\n return results;\n }\n } else {\n return results;\n } // Element context\n\n } else {\n // Support: IE, Opera, Webkit\n // TODO: identify versions\n // getElementById can match elements by name instead of ID\n if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) {\n results.push(elem);\n return results;\n }\n } // Type selector\n\n } else if (match[2]) {\n push.apply(results, context.getElementsByTagName(selector));\n return results; // Class selector\n } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {\n push.apply(results, context.getElementsByClassName(m));\n return results;\n }\n } // Take advantage of querySelectorAll\n\n\n if (support.qsa && !compilerCache[selector + \" \"] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {\n if (nodeType !== 1) {\n newContext = context;\n newSelector = selector; // qSA looks outside Element context, which is not what we want\n // Thanks to Andrew Dupont for this workaround technique\n // Support: IE <=8\n // Exclude object elements\n } else if (context.nodeName.toLowerCase() !== \"object\") {\n // Capture the context ID, setting it first if necessary\n if (nid = context.getAttribute(\"id\")) {\n nid = nid.replace(rescape, \"\\\\$&\");\n } else {\n context.setAttribute(\"id\", nid = expando);\n } // Prefix every selector in the list\n\n\n groups = tokenize(selector);\n i = groups.length;\n nidselect = ridentifier.test(nid) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\n while (i--) {\n groups[i] = nidselect + \" \" + toSelector(groups[i]);\n }\n\n newSelector = groups.join(\",\"); // Expand context for sibling selectors\n\n newContext = rsibling.test(selector) && testContext(context.parentNode) || context;\n }\n\n if (newSelector) {\n try {\n push.apply(results, newContext.querySelectorAll(newSelector));\n return results;\n } catch (qsaError) {} finally {\n if (nid === expando) {\n context.removeAttribute(\"id\");\n }\n }\n }\n }\n }\n } // All others\n\n\n return select(selector.replace(rtrim, \"$1\"), context, results, seed);\n }\n /**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\n\n\n function createCache() {\n var keys = [];\n\n function cache(key, value) {\n // Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n if (keys.push(key + \" \") > Expr.cacheLength) {\n // Only keep the most recent entries\n delete cache[keys.shift()];\n }\n\n return cache[key + \" \"] = value;\n }\n\n return cache;\n }\n /**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\n\n\n function markFunction(fn) {\n fn[expando] = true;\n return fn;\n }\n /**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\n\n\n function assert(fn) {\n var div = document.createElement(\"div\");\n\n try {\n return !!fn(div);\n } catch (e) {\n return false;\n } finally {\n // Remove from its parent by default\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n } // release memory in IE\n\n\n div = null;\n }\n }\n /**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\n\n\n function addHandle(attrs, handler) {\n var arr = attrs.split(\"|\"),\n i = arr.length;\n\n while (i--) {\n Expr.attrHandle[arr[i]] = handler;\n }\n }\n /**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\n\n\n function siblingCheck(a, b) {\n var cur = b && a,\n diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE); // Use IE sourceIndex if available on both nodes\n\n if (diff) {\n return diff;\n } // Check if b follows a\n\n\n if (cur) {\n while (cur = cur.nextSibling) {\n if (cur === b) {\n return -1;\n }\n }\n }\n\n return a ? 1 : -1;\n }\n /**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\n\n\n function createInputPseudo(type) {\n return function (elem) {\n var name = elem.nodeName.toLowerCase();\n return name === \"input\" && elem.type === type;\n };\n }\n /**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\n\n\n function createButtonPseudo(type) {\n return function (elem) {\n var name = elem.nodeName.toLowerCase();\n return (name === \"input\" || name === \"button\") && elem.type === type;\n };\n }\n /**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\n\n\n function createPositionalPseudo(fn) {\n return markFunction(function (argument) {\n argument = +argument;\n return markFunction(function (seed, matches) {\n var j,\n matchIndexes = fn([], seed.length, argument),\n i = matchIndexes.length; // Match elements found at the specified indexes\n\n while (i--) {\n if (seed[j = matchIndexes[i]]) {\n seed[j] = !(matches[j] = seed[j]);\n }\n }\n });\n });\n }\n /**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\n\n\n function testContext(context) {\n return context && typeof context.getElementsByTagName !== \"undefined\" && context;\n } // Expose support vars for convenience\n\n\n support = Sizzle.support = {};\n /**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\n\n isXML = Sizzle.isXML = function (elem) {\n // documentElement is verified for cases where it doesn't yet exist\n // (such as loading iframes in IE - #4833)\n var documentElement = elem && (elem.ownerDocument || elem).documentElement;\n return documentElement ? documentElement.nodeName !== \"HTML\" : false;\n };\n /**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\n\n\n setDocument = Sizzle.setDocument = function (node) {\n var hasCompare,\n parent,\n doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected\n\n if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {\n return document;\n } // Update global variables\n\n\n document = doc;\n docElem = document.documentElement;\n documentIsHTML = !isXML(document); // Support: IE 9-11, Edge\n // Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\n if ((parent = document.defaultView) && parent.top !== parent) {\n // Support: IE 11\n if (parent.addEventListener) {\n parent.addEventListener(\"unload\", unloadHandler, false); // Support: IE 9 - 10 only\n } else if (parent.attachEvent) {\n parent.attachEvent(\"onunload\", unloadHandler);\n }\n }\n /* Attributes\n ---------------------------------------------------------------------- */\n // Support: IE<8\n // Verify that getAttribute really returns attributes and not properties\n // (excepting IE8 booleans)\n\n\n support.attributes = assert(function (div) {\n div.className = \"i\";\n return !div.getAttribute(\"className\");\n });\n /* getElement(s)By*\n ---------------------------------------------------------------------- */\n // Check if getElementsByTagName(\"*\") returns only elements\n\n support.getElementsByTagName = assert(function (div) {\n div.appendChild(document.createComment(\"\"));\n return !div.getElementsByTagName(\"*\").length;\n }); // Support: IE<9\n\n support.getElementsByClassName = rnative.test(document.getElementsByClassName); // Support: IE<10\n // Check if getElementById returns elements by name\n // The broken getElementById methods don't pick up programatically-set names,\n // so use a roundabout getElementsByName test\n\n support.getById = assert(function (div) {\n docElem.appendChild(div).id = expando;\n return !document.getElementsByName || !document.getElementsByName(expando).length;\n }); // ID find and filter\n\n if (support.getById) {\n Expr.find[\"ID\"] = function (id, context) {\n if (typeof context.getElementById !== \"undefined\" && documentIsHTML) {\n var m = context.getElementById(id);\n return m ? [m] : [];\n }\n };\n\n Expr.filter[\"ID\"] = function (id) {\n var attrId = id.replace(runescape, funescape);\n return function (elem) {\n return elem.getAttribute(\"id\") === attrId;\n };\n };\n } else {\n // Support: IE6/7\n // getElementById is not reliable as a find shortcut\n delete Expr.find[\"ID\"];\n\n Expr.filter[\"ID\"] = function (id) {\n var attrId = id.replace(runescape, funescape);\n return function (elem) {\n var node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n return node && node.value === attrId;\n };\n };\n } // Tag\n\n\n Expr.find[\"TAG\"] = support.getElementsByTagName ? function (tag, context) {\n if (typeof context.getElementsByTagName !== \"undefined\") {\n return context.getElementsByTagName(tag); // DocumentFragment nodes don't have gEBTN\n } else if (support.qsa) {\n return context.querySelectorAll(tag);\n }\n } : function (tag, context) {\n var elem,\n tmp = [],\n i = 0,\n // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n results = context.getElementsByTagName(tag); // Filter out possible comments\n\n if (tag === \"*\") {\n while (elem = results[i++]) {\n if (elem.nodeType === 1) {\n tmp.push(elem);\n }\n }\n\n return tmp;\n }\n\n return results;\n }; // Class\n\n Expr.find[\"CLASS\"] = support.getElementsByClassName && function (className, context) {\n if (typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML) {\n return context.getElementsByClassName(className);\n }\n };\n /* QSA/matchesSelector\n ---------------------------------------------------------------------- */\n // QSA and matchesSelector support\n // matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\n\n rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21)\n // We allow this because of a bug in IE8/9 that throws an error\n // whenever `document.activeElement` is accessed on an iframe\n // So, we allow :focus to pass through QSA all the time to avoid the IE error\n // See http://bugs.jquery.com/ticket/13378\n\n rbuggyQSA = [];\n\n if (support.qsa = rnative.test(document.querySelectorAll)) {\n // Build QSA regex\n // Regex strategy adopted from Diego Perini\n assert(function (div) {\n // Select is set to empty string on purpose\n // This is to test IE's treatment of not explicitly\n // setting a boolean content attribute,\n // since its presence should be enough\n // http://bugs.jquery.com/ticket/12359\n docElem.appendChild(div).innerHTML = \"
\" + \"
\" + \" \"; // Support: IE8, Opera 11-12.16\n // Nothing should be selected when empty strings follow ^= or $= or *=\n // The test attribute must be unknown in Opera but \"safe\" for WinRT\n // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\n if (div.querySelectorAll(\"[msallowcapture^='']\").length) {\n rbuggyQSA.push(\"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\");\n } // Support: IE8\n // Boolean attributes and \"value\" are not treated correctly\n\n\n if (!div.querySelectorAll(\"[selected]\").length) {\n rbuggyQSA.push(\"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\");\n } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\n\n if (!div.querySelectorAll(\"[id~=\" + expando + \"-]\").length) {\n rbuggyQSA.push(\"~=\");\n } // Webkit/Opera - :checked should return selected option elements\n // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n // IE8 throws error here and will not see later tests\n\n\n if (!div.querySelectorAll(\":checked\").length) {\n rbuggyQSA.push(\":checked\");\n } // Support: Safari 8+, iOS 8+\n // https://bugs.webkit.org/show_bug.cgi?id=136851\n // In-page `selector#id sibing-combinator selector` fails\n\n\n if (!div.querySelectorAll(\"a#\" + expando + \"+*\").length) {\n rbuggyQSA.push(\".#.+[+~]\");\n }\n });\n assert(function (div) {\n // Support: Windows 8 Native Apps\n // The type and name attributes are restricted during .innerHTML assignment\n var input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"hidden\");\n div.appendChild(input).setAttribute(\"name\", \"D\"); // Support: IE8\n // Enforce case-sensitivity of name attribute\n\n if (div.querySelectorAll(\"[name=d]\").length) {\n rbuggyQSA.push(\"name\" + whitespace + \"*[*^$|!~]?=\");\n } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n // IE8 throws error here and will not see later tests\n\n\n if (!div.querySelectorAll(\":enabled\").length) {\n rbuggyQSA.push(\":enabled\", \":disabled\");\n } // Opera 10-11 does not throw on post-comma invalid pseudos\n\n\n div.querySelectorAll(\"*,:x\");\n rbuggyQSA.push(\",.*:\");\n });\n }\n\n if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) {\n assert(function (div) {\n // Check to see if it's possible to do matchesSelector\n // on a disconnected node (IE 9)\n support.disconnectedMatch = matches.call(div, \"div\"); // This should fail with an exception\n // Gecko does not error, returns false instead\n\n matches.call(div, \"[s!='']:x\");\n rbuggyMatches.push(\"!=\", pseudos);\n });\n }\n\n rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join(\"|\"));\n rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join(\"|\"));\n /* Contains\n ---------------------------------------------------------------------- */\n\n hasCompare = rnative.test(docElem.compareDocumentPosition); // Element contains another\n // Purposefully self-exclusive\n // As in, an element does not contain itself\n\n contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {\n var adown = a.nodeType === 9 ? a.documentElement : a,\n bup = b && b.parentNode;\n return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));\n } : function (a, b) {\n if (b) {\n while (b = b.parentNode) {\n if (b === a) {\n return true;\n }\n }\n }\n\n return false;\n };\n /* Sorting\n ---------------------------------------------------------------------- */\n // Document order sorting\n\n sortOrder = hasCompare ? function (a, b) {\n // Flag for duplicate removal\n if (a === b) {\n hasDuplicate = true;\n return 0;\n } // Sort on method existence if only one input has compareDocumentPosition\n\n\n var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\n if (compare) {\n return compare;\n } // Calculate position if both inputs belong to the same document\n\n\n compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : // Otherwise we know they are disconnected\n 1; // Disconnected nodes\n\n if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {\n // Choose the first element that is related to our preferred document\n if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {\n return -1;\n }\n\n if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {\n return 1;\n } // Maintain original order\n\n\n return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;\n }\n\n return compare & 4 ? -1 : 1;\n } : function (a, b) {\n // Exit early if the nodes are identical\n if (a === b) {\n hasDuplicate = true;\n return 0;\n }\n\n var cur,\n i = 0,\n aup = a.parentNode,\n bup = b.parentNode,\n ap = [a],\n bp = [b]; // Parentless nodes are either documents or disconnected\n\n if (!aup || !bup) {\n 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\n } else if (aup === bup) {\n return siblingCheck(a, b);\n } // Otherwise we need full lists of their ancestors for comparison\n\n\n cur = a;\n\n while (cur = cur.parentNode) {\n ap.unshift(cur);\n }\n\n cur = b;\n\n while (cur = cur.parentNode) {\n bp.unshift(cur);\n } // Walk down the tree looking for a discrepancy\n\n\n while (ap[i] === bp[i]) {\n i++;\n }\n\n return i ? // Do a sibling check if the nodes have a common ancestor\n siblingCheck(ap[i], bp[i]) : // Otherwise nodes in our document sort first\n ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;\n };\n return document;\n };\n\n Sizzle.matches = function (expr, elements) {\n return Sizzle(expr, null, null, elements);\n };\n\n Sizzle.matchesSelector = function (elem, expr) {\n // Set document vars if needed\n if ((elem.ownerDocument || elem) !== document) {\n setDocument(elem);\n } // Make sure that attribute selectors are quoted\n\n\n expr = expr.replace(rattributeQuotes, \"='$1']\");\n\n if (support.matchesSelector && documentIsHTML && !compilerCache[expr + \" \"] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {\n try {\n var ret = matches.call(elem, expr); // IE 9's matchesSelector returns false on disconnected nodes\n\n if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document\n // fragment in IE 9\n elem.document && elem.document.nodeType !== 11) {\n return ret;\n }\n } catch (e) {}\n }\n\n return Sizzle(expr, document, null, [elem]).length > 0;\n };\n\n Sizzle.contains = function (context, elem) {\n // Set document vars if needed\n if ((context.ownerDocument || context) !== document) {\n setDocument(context);\n }\n\n return contains(context, elem);\n };\n\n Sizzle.attr = function (elem, name) {\n // Set document vars if needed\n if ((elem.ownerDocument || elem) !== document) {\n setDocument(elem);\n }\n\n var fn = Expr.attrHandle[name.toLowerCase()],\n // Don't get fooled by Object.prototype properties (jQuery #13807)\n val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;\n return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;\n };\n\n Sizzle.error = function (msg) {\n throw new Error(\"Syntax error, unrecognized expression: \" + msg);\n };\n /**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\n\n\n Sizzle.uniqueSort = function (results) {\n var elem,\n duplicates = [],\n j = 0,\n i = 0; // Unless we *know* we can detect duplicates, assume their presence\n\n hasDuplicate = !support.detectDuplicates;\n sortInput = !support.sortStable && results.slice(0);\n results.sort(sortOrder);\n\n if (hasDuplicate) {\n while (elem = results[i++]) {\n if (elem === results[i]) {\n j = duplicates.push(i);\n }\n }\n\n while (j--) {\n results.splice(duplicates[j], 1);\n }\n } // Clear input after sorting to release objects\n // See https://github.com/jquery/sizzle/pull/225\n\n\n sortInput = null;\n return results;\n };\n /**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\n\n\n getText = Sizzle.getText = function (elem) {\n var node,\n ret = \"\",\n i = 0,\n nodeType = elem.nodeType;\n\n if (!nodeType) {\n // If no nodeType, this is expected to be an array\n while (node = elem[i++]) {\n // Do not traverse comment nodes\n ret += getText(node);\n }\n } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {\n // Use textContent for elements\n // innerText usage removed for consistency of new lines (jQuery #11153)\n if (typeof elem.textContent === \"string\") {\n return elem.textContent;\n } else {\n // Traverse its children\n for (elem = elem.firstChild; elem; elem = elem.nextSibling) {\n ret += getText(elem);\n }\n }\n } else if (nodeType === 3 || nodeType === 4) {\n return elem.nodeValue;\n } // Do not include comment or processing instruction nodes\n\n\n return ret;\n };\n\n Expr = Sizzle.selectors = {\n // Can be adjusted by the user\n cacheLength: 50,\n createPseudo: markFunction,\n match: matchExpr,\n attrHandle: {},\n find: {},\n relative: {\n \">\": {\n dir: \"parentNode\",\n first: true\n },\n \" \": {\n dir: \"parentNode\"\n },\n \"+\": {\n dir: \"previousSibling\",\n first: true\n },\n \"~\": {\n dir: \"previousSibling\"\n }\n },\n preFilter: {\n \"ATTR\": function ATTR(match) {\n match[1] = match[1].replace(runescape, funescape); // Move the given value to match[3] whether quoted or unquoted\n\n match[3] = (match[3] || match[4] || match[5] || \"\").replace(runescape, funescape);\n\n if (match[2] === \"~=\") {\n match[3] = \" \" + match[3] + \" \";\n }\n\n return match.slice(0, 4);\n },\n \"CHILD\": function CHILD(match) {\n /* matches from matchExpr[\"CHILD\"]\n \t1 type (only|nth|...)\n \t2 what (child|of-type)\n \t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n \t4 xn-component of xn+y argument ([+-]?\\d*n|)\n \t5 sign of xn-component\n \t6 x of xn-component\n \t7 sign of y-component\n \t8 y of y-component\n */\n match[1] = match[1].toLowerCase();\n\n if (match[1].slice(0, 3) === \"nth\") {\n // nth-* requires argument\n if (!match[3]) {\n Sizzle.error(match[0]);\n } // numeric x and y parameters for Expr.filter.CHILD\n // remember that false/true cast respectively to 0/1\n\n\n match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === \"even\" || match[3] === \"odd\"));\n match[5] = +(match[7] + match[8] || match[3] === \"odd\"); // other types prohibit arguments\n } else if (match[3]) {\n Sizzle.error(match[0]);\n }\n\n return match;\n },\n \"PSEUDO\": function PSEUDO(match) {\n var excess,\n unquoted = !match[6] && match[2];\n\n if (matchExpr[\"CHILD\"].test(match[0])) {\n return null;\n } // Accept quoted arguments as-is\n\n\n if (match[3]) {\n match[2] = match[4] || match[5] || \"\"; // Strip excess characters from unquoted arguments\n } else if (unquoted && rpseudo.test(unquoted) && ( // Get excess from tokenize (recursively)\n excess = tokenize(unquoted, true)) && ( // advance to the next closing parenthesis\n excess = unquoted.indexOf(\")\", unquoted.length - excess) - unquoted.length)) {\n // excess is a negative index\n match[0] = match[0].slice(0, excess);\n match[2] = unquoted.slice(0, excess);\n } // Return only captures needed by the pseudo filter method (type and argument)\n\n\n return match.slice(0, 3);\n }\n },\n filter: {\n \"TAG\": function TAG(nodeNameSelector) {\n var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();\n return nodeNameSelector === \"*\" ? function () {\n return true;\n } : function (elem) {\n return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n };\n },\n \"CLASS\": function CLASS(className) {\n var pattern = classCache[className + \" \"];\n return pattern || (pattern = new RegExp(\"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\")) && classCache(className, function (elem) {\n return pattern.test(typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\");\n });\n },\n \"ATTR\": function ATTR(name, operator, check) {\n return function (elem) {\n var result = Sizzle.attr(elem, name);\n\n if (result == null) {\n return operator === \"!=\";\n }\n\n if (!operator) {\n return true;\n }\n\n result += \"\";\n 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;\n };\n },\n \"CHILD\": function CHILD(type, what, argument, first, last) {\n var simple = type.slice(0, 3) !== \"nth\",\n forward = type.slice(-4) !== \"last\",\n ofType = what === \"of-type\";\n return first === 1 && last === 0 ? // Shortcut for :nth-*(n)\n function (elem) {\n return !!elem.parentNode;\n } : function (elem, context, xml) {\n var cache,\n uniqueCache,\n outerCache,\n node,\n nodeIndex,\n start,\n dir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n parent = elem.parentNode,\n name = ofType && elem.nodeName.toLowerCase(),\n useCache = !xml && !ofType,\n diff = false;\n\n if (parent) {\n // :(first|last|only)-(child|of-type)\n if (simple) {\n while (dir) {\n node = elem;\n\n while (node = node[dir]) {\n if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {\n return false;\n }\n } // Reverse direction for :only-* (if we haven't yet done so)\n\n\n start = dir = type === \"only\" && !start && \"nextSibling\";\n }\n\n return true;\n }\n\n start = [forward ? parent.firstChild : parent.lastChild]; // non-xml :nth-child(...) stores cache data on `parent`\n\n if (forward && useCache) {\n // Seek `elem` from a previously-cached index\n // ...in a gzip-friendly way\n node = parent;\n outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n\n uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});\n cache = uniqueCache[type] || [];\n nodeIndex = cache[0] === dirruns && cache[1];\n diff = nodeIndex && cache[2];\n node = nodeIndex && parent.childNodes[nodeIndex];\n\n while (node = ++nodeIndex && node && node[dir] || ( // Fallback to seeking `elem` from the start\n diff = nodeIndex = 0) || start.pop()) {\n // When found, cache indexes on `parent` and break\n if (node.nodeType === 1 && ++diff && node === elem) {\n uniqueCache[type] = [dirruns, nodeIndex, diff];\n break;\n }\n }\n } else {\n // Use previously-cached element index if available\n if (useCache) {\n // ...in a gzip-friendly way\n node = elem;\n outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n\n uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});\n cache = uniqueCache[type] || [];\n nodeIndex = cache[0] === dirruns && cache[1];\n diff = nodeIndex;\n } // xml :nth-child(...)\n // or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\n\n if (diff === false) {\n // Use the same loop as above to seek `elem` from the start\n while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {\n if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {\n // Cache the index of each encountered element\n if (useCache) {\n outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n\n uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});\n uniqueCache[type] = [dirruns, diff];\n }\n\n if (node === elem) {\n break;\n }\n }\n }\n }\n } // Incorporate the offset, then check against cycle size\n\n\n diff -= last;\n return diff === first || diff % first === 0 && diff / first >= 0;\n }\n };\n },\n \"PSEUDO\": function PSEUDO(pseudo, argument) {\n // pseudo-class names are case-insensitive\n // http://www.w3.org/TR/selectors/#pseudo-classes\n // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n // Remember that setFilters inherits from pseudos\n var args,\n fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error(\"unsupported pseudo: \" + pseudo); // The user may use createPseudo to indicate that\n // arguments are needed to create the filter function\n // just as Sizzle does\n\n if (fn[expando]) {\n return fn(argument);\n } // But maintain support for old signatures\n\n\n if (fn.length > 1) {\n args = [pseudo, pseudo, \"\", argument];\n return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {\n var idx,\n matched = fn(seed, argument),\n i = matched.length;\n\n while (i--) {\n idx = indexOf(seed, matched[i]);\n seed[idx] = !(matches[idx] = matched[i]);\n }\n }) : function (elem) {\n return fn(elem, 0, args);\n };\n }\n\n return fn;\n }\n },\n pseudos: {\n // Potentially complex pseudos\n \"not\": markFunction(function (selector) {\n // Trim the selector passed to compile\n // to avoid treating leading and trailing\n // spaces as combinators\n var input = [],\n results = [],\n matcher = compile(selector.replace(rtrim, \"$1\"));\n return matcher[expando] ? markFunction(function (seed, matches, context, xml) {\n var elem,\n unmatched = matcher(seed, null, xml, []),\n i = seed.length; // Match elements unmatched by `matcher`\n\n while (i--) {\n if (elem = unmatched[i]) {\n seed[i] = !(matches[i] = elem);\n }\n }\n }) : function (elem, context, xml) {\n input[0] = elem;\n matcher(input, null, xml, results); // Don't keep the element (issue #299)\n\n input[0] = null;\n return !results.pop();\n };\n }),\n \"has\": markFunction(function (selector) {\n return function (elem) {\n return Sizzle(selector, elem).length > 0;\n };\n }),\n \"contains\": markFunction(function (text) {\n text = text.replace(runescape, funescape);\n return function (elem) {\n return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;\n };\n }),\n // \"Whether an element is represented by a :lang() selector\n // is based solely on the element's language value\n // being equal to the identifier C,\n // or beginning with the identifier C immediately followed by \"-\".\n // The matching of C against the element's language value is performed case-insensitively.\n // The identifier C does not have to be a valid language name.\"\n // http://www.w3.org/TR/selectors/#lang-pseudo\n \"lang\": markFunction(function (lang) {\n // lang value must be a valid identifier\n if (!ridentifier.test(lang || \"\")) {\n Sizzle.error(\"unsupported lang: \" + lang);\n }\n\n lang = lang.replace(runescape, funescape).toLowerCase();\n return function (elem) {\n var elemLang;\n\n do {\n if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) {\n elemLang = elemLang.toLowerCase();\n return elemLang === lang || elemLang.indexOf(lang + \"-\") === 0;\n }\n } while ((elem = elem.parentNode) && elem.nodeType === 1);\n\n return false;\n };\n }),\n // Miscellaneous\n \"target\": function target(elem) {\n var hash = window.location && window.location.hash;\n return hash && hash.slice(1) === elem.id;\n },\n \"root\": function root(elem) {\n return elem === docElem;\n },\n \"focus\": function focus(elem) {\n return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n },\n // Boolean properties\n \"enabled\": function enabled(elem) {\n return elem.disabled === false;\n },\n \"disabled\": function disabled(elem) {\n return elem.disabled === true;\n },\n \"checked\": function checked(elem) {\n // In CSS3, :checked should return both checked and selected elements\n // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n var nodeName = elem.nodeName.toLowerCase();\n return nodeName === \"input\" && !!elem.checked || nodeName === \"option\" && !!elem.selected;\n },\n \"selected\": function selected(elem) {\n // Accessing this property makes selected-by-default\n // options in Safari work properly\n if (elem.parentNode) {\n elem.parentNode.selectedIndex;\n }\n\n return elem.selected === true;\n },\n // Contents\n \"empty\": function empty(elem) {\n // http://www.w3.org/TR/selectors/#empty-pseudo\n // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n // but not by others (comment: 8; processing instruction: 7; etc.)\n // nodeType < 6 works because attributes (2) do not appear as children\n for (elem = elem.firstChild; elem; elem = elem.nextSibling) {\n if (elem.nodeType < 6) {\n return false;\n }\n }\n\n return true;\n },\n \"parent\": function parent(elem) {\n return !Expr.pseudos[\"empty\"](elem);\n },\n // Element/input types\n \"header\": function header(elem) {\n return rheader.test(elem.nodeName);\n },\n \"input\": function input(elem) {\n return rinputs.test(elem.nodeName);\n },\n \"button\": function button(elem) {\n var name = elem.nodeName.toLowerCase();\n return name === \"input\" && elem.type === \"button\" || name === \"button\";\n },\n \"text\": function text(elem) {\n var attr;\n return elem.nodeName.toLowerCase() === \"input\" && elem.type === \"text\" && ( // Support: IE<8\n // New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\");\n },\n // Position-in-collection\n \"first\": createPositionalPseudo(function () {\n return [0];\n }),\n \"last\": createPositionalPseudo(function (matchIndexes, length) {\n return [length - 1];\n }),\n \"eq\": createPositionalPseudo(function (matchIndexes, length, argument) {\n return [argument < 0 ? argument + length : argument];\n }),\n \"even\": createPositionalPseudo(function (matchIndexes, length) {\n var i = 0;\n\n for (; i < length; i += 2) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n }),\n \"odd\": createPositionalPseudo(function (matchIndexes, length) {\n var i = 1;\n\n for (; i < length; i += 2) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n }),\n \"lt\": createPositionalPseudo(function (matchIndexes, length, argument) {\n var i = argument < 0 ? argument + length : argument;\n\n for (; --i >= 0;) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n }),\n \"gt\": createPositionalPseudo(function (matchIndexes, length, argument) {\n var i = argument < 0 ? argument + length : argument;\n\n for (; ++i < length;) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n })\n }\n };\n Expr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"]; // Add button/input type pseudos\n\n for (i in {\n radio: true,\n checkbox: true,\n file: true,\n password: true,\n image: true\n }) {\n Expr.pseudos[i] = createInputPseudo(i);\n }\n\n for (i in {\n submit: true,\n reset: true\n }) {\n Expr.pseudos[i] = createButtonPseudo(i);\n } // Easy API for creating new setFilters\n\n\n function setFilters() {}\n\n setFilters.prototype = Expr.filters = Expr.pseudos;\n Expr.setFilters = new setFilters();\n\n tokenize = Sizzle.tokenize = function (selector, parseOnly) {\n var matched,\n match,\n tokens,\n type,\n soFar,\n groups,\n preFilters,\n cached = tokenCache[selector + \" \"];\n\n if (cached) {\n return parseOnly ? 0 : cached.slice(0);\n }\n\n soFar = selector;\n groups = [];\n preFilters = Expr.preFilter;\n\n while (soFar) {\n // Comma and first run\n if (!matched || (match = rcomma.exec(soFar))) {\n if (match) {\n // Don't consume trailing commas as valid\n soFar = soFar.slice(match[0].length) || soFar;\n }\n\n groups.push(tokens = []);\n }\n\n matched = false; // Combinators\n\n if (match = rcombinators.exec(soFar)) {\n matched = match.shift();\n tokens.push({\n value: matched,\n // Cast descendant combinators to space\n type: match[0].replace(rtrim, \" \")\n });\n soFar = soFar.slice(matched.length);\n } // Filters\n\n\n for (type in Expr.filter) {\n if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {\n matched = match.shift();\n tokens.push({\n value: matched,\n type: type,\n matches: match\n });\n soFar = soFar.slice(matched.length);\n }\n }\n\n if (!matched) {\n break;\n }\n } // Return the length of the invalid excess\n // if we're just parsing\n // Otherwise, throw an error or return tokens\n\n\n return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : // Cache the tokens\n tokenCache(selector, groups).slice(0);\n };\n\n function toSelector(tokens) {\n var i = 0,\n len = tokens.length,\n selector = \"\";\n\n for (; i < len; i++) {\n selector += tokens[i].value;\n }\n\n return selector;\n }\n\n function addCombinator(matcher, combinator, base) {\n var dir = combinator.dir,\n checkNonElements = base && dir === \"parentNode\",\n doneName = done++;\n return combinator.first ? // Check against closest ancestor/preceding element\n function (elem, context, xml) {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n return matcher(elem, context, xml);\n }\n }\n } : // Check against all ancestor/preceding elements\n function (elem, context, xml) {\n var oldCache,\n uniqueCache,\n outerCache,\n newCache = [dirruns, doneName]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\n if (xml) {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n if (matcher(elem, context, xml)) {\n return true;\n }\n }\n }\n } else {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n outerCache = elem[expando] || (elem[expando] = {}); // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n\n uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});\n\n if ((oldCache = uniqueCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) {\n // Assign to newCache so results back-propagate to previous elements\n return newCache[2] = oldCache[2];\n } else {\n // Reuse newcache so results back-propagate to previous elements\n uniqueCache[dir] = newCache; // A match means we're done; a fail means we have to keep checking\n\n if (newCache[2] = matcher(elem, context, xml)) {\n return true;\n }\n }\n }\n }\n }\n };\n }\n\n function elementMatcher(matchers) {\n return matchers.length > 1 ? function (elem, context, xml) {\n var i = matchers.length;\n\n while (i--) {\n if (!matchers[i](elem, context, xml)) {\n return false;\n }\n }\n\n return true;\n } : matchers[0];\n }\n\n function multipleContexts(selector, contexts, results) {\n var i = 0,\n len = contexts.length;\n\n for (; i < len; i++) {\n Sizzle(selector, contexts[i], results);\n }\n\n return results;\n }\n\n function condense(unmatched, map, filter, context, xml) {\n var elem,\n newUnmatched = [],\n i = 0,\n len = unmatched.length,\n mapped = map != null;\n\n for (; i < len; i++) {\n if (elem = unmatched[i]) {\n if (!filter || filter(elem, context, xml)) {\n newUnmatched.push(elem);\n\n if (mapped) {\n map.push(i);\n }\n }\n }\n }\n\n return newUnmatched;\n }\n\n function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {\n if (postFilter && !postFilter[expando]) {\n postFilter = setMatcher(postFilter);\n }\n\n if (postFinder && !postFinder[expando]) {\n postFinder = setMatcher(postFinder, postSelector);\n }\n\n return markFunction(function (seed, results, context, xml) {\n var temp,\n i,\n elem,\n preMap = [],\n postMap = [],\n preexisting = results.length,\n // Get initial elements from seed or context\n elems = seed || multipleContexts(selector || \"*\", context.nodeType ? [context] : context, []),\n // Prefilter to get matcher input, preserving a map for seed-results synchronization\n matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,\n matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n postFinder || (seed ? preFilter : preexisting || postFilter) ? // ...intermediate processing is necessary\n [] : // ...otherwise use results directly\n results : matcherIn; // Find primary matches\n\n if (matcher) {\n matcher(matcherIn, matcherOut, context, xml);\n } // Apply postFilter\n\n\n if (postFilter) {\n temp = condense(matcherOut, postMap);\n postFilter(temp, [], context, xml); // Un-match failing elements by moving them back to matcherIn\n\n i = temp.length;\n\n while (i--) {\n if (elem = temp[i]) {\n matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);\n }\n }\n }\n\n if (seed) {\n if (postFinder || preFilter) {\n if (postFinder) {\n // Get the final matcherOut by condensing this intermediate into postFinder contexts\n temp = [];\n i = matcherOut.length;\n\n while (i--) {\n if (elem = matcherOut[i]) {\n // Restore matcherIn since elem is not yet a final match\n temp.push(matcherIn[i] = elem);\n }\n }\n\n postFinder(null, matcherOut = [], temp, xml);\n } // Move matched elements from seed to results to keep them synchronized\n\n\n i = matcherOut.length;\n\n while (i--) {\n if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {\n seed[temp] = !(results[temp] = elem);\n }\n }\n } // Add elements to results, through postFinder if defined\n\n } else {\n matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);\n\n if (postFinder) {\n postFinder(null, results, matcherOut, xml);\n } else {\n push.apply(results, matcherOut);\n }\n }\n });\n }\n\n function matcherFromTokens(tokens) {\n var checkContext,\n matcher,\n j,\n len = tokens.length,\n leadingRelative = Expr.relative[tokens[0].type],\n implicitRelative = leadingRelative || Expr.relative[\" \"],\n i = leadingRelative ? 1 : 0,\n // The foundational matcher ensures that elements are reachable from top-level context(s)\n matchContext = addCombinator(function (elem) {\n return elem === checkContext;\n }, implicitRelative, true),\n matchAnyContext = addCombinator(function (elem) {\n return indexOf(checkContext, elem) > -1;\n }, implicitRelative, true),\n matchers = [function (elem, context, xml) {\n var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); // Avoid hanging onto element (issue #299)\n\n checkContext = null;\n return ret;\n }];\n\n for (; i < len; i++) {\n if (matcher = Expr.relative[tokens[i].type]) {\n matchers = [addCombinator(elementMatcher(matchers), matcher)];\n } else {\n matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); // Return special upon seeing a positional matcher\n\n if (matcher[expando]) {\n // Find the next relative operator (if any) for proper handling\n j = ++i;\n\n for (; j < len; j++) {\n if (Expr.relative[tokens[j].type]) {\n break;\n }\n }\n\n return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*`\n tokens.slice(0, i - 1).concat({\n value: tokens[i - 2].type === \" \" ? \"*\" : \"\"\n })).replace(rtrim, \"$1\"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));\n }\n\n matchers.push(matcher);\n }\n }\n\n return elementMatcher(matchers);\n }\n\n function matcherFromGroupMatchers(elementMatchers, setMatchers) {\n var bySet = setMatchers.length > 0,\n byElement = elementMatchers.length > 0,\n superMatcher = function superMatcher(seed, context, xml, results, outermost) {\n var elem,\n j,\n matcher,\n matchedCount = 0,\n i = \"0\",\n unmatched = seed && [],\n setMatched = [],\n contextBackup = outermostContext,\n // We must always have either seed elements or outermost context\n elems = seed || byElement && Expr.find[\"TAG\"](\"*\", outermost),\n // Use integer dirruns iff this is the outermost matcher\n dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1,\n len = elems.length;\n\n if (outermost) {\n outermostContext = context === document || context || outermost;\n } // Add elements passing elementMatchers directly to results\n // Support: IE<9, Safari\n // Tolerate NodeList properties (IE: \"length\"; Safari:
) matching elements by id\n\n\n for (; i !== len && (elem = elems[i]) != null; i++) {\n if (byElement && elem) {\n j = 0;\n\n if (!context && elem.ownerDocument !== document) {\n setDocument(elem);\n xml = !documentIsHTML;\n }\n\n while (matcher = elementMatchers[j++]) {\n if (matcher(elem, context || document, xml)) {\n results.push(elem);\n break;\n }\n }\n\n if (outermost) {\n dirruns = dirrunsUnique;\n }\n } // Track unmatched elements for set filters\n\n\n if (bySet) {\n // They will have gone through all possible matchers\n if (elem = !matcher && elem) {\n matchedCount--;\n } // Lengthen the array for every element, matched or not\n\n\n if (seed) {\n unmatched.push(elem);\n }\n }\n } // `i` is now the count of elements visited above, and adding it to `matchedCount`\n // makes the latter nonnegative.\n\n\n matchedCount += i; // Apply set filters to unmatched elements\n // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n // equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n // no element matchers and no seed.\n // Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n // case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n // numerically zero.\n\n if (bySet && i !== matchedCount) {\n j = 0;\n\n while (matcher = setMatchers[j++]) {\n matcher(unmatched, setMatched, context, xml);\n }\n\n if (seed) {\n // Reintegrate element matches to eliminate the need for sorting\n if (matchedCount > 0) {\n while (i--) {\n if (!(unmatched[i] || setMatched[i])) {\n setMatched[i] = pop.call(results);\n }\n }\n } // Discard index placeholder values to get only actual matches\n\n\n setMatched = condense(setMatched);\n } // Add matches to results\n\n\n push.apply(results, setMatched); // Seedless set matches succeeding multiple successful matchers stipulate sorting\n\n if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {\n Sizzle.uniqueSort(results);\n }\n } // Override manipulation of globals by nested matchers\n\n\n if (outermost) {\n dirruns = dirrunsUnique;\n outermostContext = contextBackup;\n }\n\n return unmatched;\n };\n\n return bySet ? markFunction(superMatcher) : superMatcher;\n }\n\n compile = Sizzle.compile = function (selector, match\n /* Internal Use Only */\n ) {\n var i,\n setMatchers = [],\n elementMatchers = [],\n cached = compilerCache[selector + \" \"];\n\n if (!cached) {\n // Generate a function of recursive functions that can be used to check each element\n if (!match) {\n match = tokenize(selector);\n }\n\n i = match.length;\n\n while (i--) {\n cached = matcherFromTokens(match[i]);\n\n if (cached[expando]) {\n setMatchers.push(cached);\n } else {\n elementMatchers.push(cached);\n }\n } // Cache the compiled function\n\n\n cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); // Save selector and tokenization\n\n cached.selector = selector;\n }\n\n return cached;\n };\n /**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\n\n\n select = Sizzle.select = function (selector, context, results, seed) {\n var i,\n tokens,\n token,\n type,\n find,\n compiled = typeof selector === \"function\" && selector,\n match = !seed && tokenize(selector = compiled.selector || selector);\n results = results || []; // Try to minimize operations if there is only one selector in the list and no seed\n // (the latter of which guarantees us context)\n\n if (match.length === 1) {\n // Reduce context if the leading compound selector is an ID\n tokens = match[0] = match[0].slice(0);\n\n if (tokens.length > 2 && (token = tokens[0]).type === \"ID\" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {\n context = (Expr.find[\"ID\"](token.matches[0].replace(runescape, funescape), context) || [])[0];\n\n if (!context) {\n return results; // Precompiled matchers will still verify ancestry, so step up a level\n } else if (compiled) {\n context = context.parentNode;\n }\n\n selector = selector.slice(tokens.shift().value.length);\n } // Fetch a seed set for right-to-left matching\n\n\n i = matchExpr[\"needsContext\"].test(selector) ? 0 : tokens.length;\n\n while (i--) {\n token = tokens[i]; // Abort if we hit a combinator\n\n if (Expr.relative[type = token.type]) {\n break;\n }\n\n if (find = Expr.find[type]) {\n // Search, expanding context for leading sibling combinators\n if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {\n // If seed is empty or no tokens remain, we can return early\n tokens.splice(i, 1);\n selector = seed.length && toSelector(tokens);\n\n if (!selector) {\n push.apply(results, seed);\n return results;\n }\n\n break;\n }\n }\n }\n } // Compile and execute a filtering function if one is not provided\n // Provide `match` to avoid retokenization if we modified the selector above\n\n\n (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context);\n return results;\n }; // One-time assignments\n // Sort stability\n\n\n support.sortStable = expando.split(\"\").sort(sortOrder).join(\"\") === expando; // Support: Chrome 14-35+\n // Always assume duplicates if they aren't passed to the comparison function\n\n support.detectDuplicates = !!hasDuplicate; // Initialize against the default document\n\n setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n // Detached nodes confoundingly follow *each other*\n\n support.sortDetached = assert(function (div1) {\n // Should return 1, but returns 4 (following)\n return div1.compareDocumentPosition(document.createElement(\"div\")) & 1;\n }); // Support: IE<8\n // Prevent attribute/property \"interpolation\"\n // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\n\n if (!assert(function (div) {\n div.innerHTML = \" \";\n return div.firstChild.getAttribute(\"href\") === \"#\";\n })) {\n addHandle(\"type|href|height|width\", function (elem, name, isXML) {\n if (!isXML) {\n return elem.getAttribute(name, name.toLowerCase() === \"type\" ? 1 : 2);\n }\n });\n } // Support: IE<9\n // Use defaultValue in place of getAttribute(\"value\")\n\n\n if (!support.attributes || !assert(function (div) {\n div.innerHTML = \" \";\n div.firstChild.setAttribute(\"value\", \"\");\n return div.firstChild.getAttribute(\"value\") === \"\";\n })) {\n addHandle(\"value\", function (elem, name, isXML) {\n if (!isXML && elem.nodeName.toLowerCase() === \"input\") {\n return elem.defaultValue;\n }\n });\n } // Support: IE<9\n // Use getAttributeNode to fetch booleans when getAttribute lies\n\n\n if (!assert(function (div) {\n return div.getAttribute(\"disabled\") == null;\n })) {\n addHandle(booleans, function (elem, name, isXML) {\n var val;\n\n if (!isXML) {\n return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;\n }\n });\n }\n\n return Sizzle;\n }(window);\n\n jQuery.find = Sizzle;\n jQuery.expr = Sizzle.selectors;\n jQuery.expr[\":\"] = jQuery.expr.pseudos;\n jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\n jQuery.text = Sizzle.getText;\n jQuery.isXMLDoc = Sizzle.isXML;\n jQuery.contains = Sizzle.contains;\n\n var dir = function dir(elem, _dir, until) {\n var matched = [],\n truncate = until !== undefined;\n\n while ((elem = elem[_dir]) && elem.nodeType !== 9) {\n if (elem.nodeType === 1) {\n if (truncate && jQuery(elem).is(until)) {\n break;\n }\n\n matched.push(elem);\n }\n }\n\n return matched;\n };\n\n var _siblings = function siblings(n, elem) {\n var matched = [];\n\n for (; n; n = n.nextSibling) {\n if (n.nodeType === 1 && n !== elem) {\n matched.push(n);\n }\n }\n\n return matched;\n };\n\n var rneedsContext = jQuery.expr.match.needsContext;\n var rsingleTag = /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/;\n var risSimple = /^.[^:#\\[\\.,]*$/; // Implement the identical functionality for filter and not\n\n function winnow(elements, qualifier, not) {\n if (jQuery.isFunction(qualifier)) {\n return jQuery.grep(elements, function (elem, i) {\n /* jshint -W018 */\n return !!qualifier.call(elem, i, elem) !== not;\n });\n }\n\n if (qualifier.nodeType) {\n return jQuery.grep(elements, function (elem) {\n return elem === qualifier !== not;\n });\n }\n\n if (typeof qualifier === \"string\") {\n if (risSimple.test(qualifier)) {\n return jQuery.filter(qualifier, elements, not);\n }\n\n qualifier = jQuery.filter(qualifier, elements);\n }\n\n return jQuery.grep(elements, function (elem) {\n return jQuery.inArray(elem, qualifier) > -1 !== not;\n });\n }\n\n jQuery.filter = function (expr, elems, not) {\n var elem = elems[0];\n\n if (not) {\n expr = \":not(\" + expr + \")\";\n }\n\n return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {\n return elem.nodeType === 1;\n }));\n };\n\n jQuery.fn.extend({\n find: function find(selector) {\n var i,\n ret = [],\n self = this,\n len = self.length;\n\n if (typeof selector !== \"string\") {\n return this.pushStack(jQuery(selector).filter(function () {\n for (i = 0; i < len; i++) {\n if (jQuery.contains(self[i], this)) {\n return true;\n }\n }\n }));\n }\n\n for (i = 0; i < len; i++) {\n jQuery.find(selector, self[i], ret);\n } // Needed because $( selector, context ) becomes $( context ).find( selector )\n\n\n ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret);\n ret.selector = this.selector ? this.selector + \" \" + selector : selector;\n return ret;\n },\n filter: function filter(selector) {\n return this.pushStack(winnow(this, selector || [], false));\n },\n not: function not(selector) {\n return this.pushStack(winnow(this, selector || [], true));\n },\n is: function is(selector) {\n return !!winnow(this, // If this is a positional/relative selector, check membership in the returned set\n // so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n typeof selector === \"string\" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;\n }\n }); // Initialize a jQuery object\n // A central reference to the root jQuery(document)\n\n var rootjQuery,\n // A simple way to check for HTML strings\n // Prioritize #id over to avoid XSS via location.hash (#9521)\n // Strict HTML recognition (#11290: must start with <)\n rquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n init = jQuery.fn.init = function (selector, context, root) {\n var match, elem; // HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\n if (!selector) {\n return this;\n } // init accepts an alternate rootjQuery\n // so migrate can support jQuery.sub (gh-2101)\n\n\n root = root || rootjQuery; // Handle HTML strings\n\n if (typeof selector === \"string\") {\n if (selector.charAt(0) === \"<\" && selector.charAt(selector.length - 1) === \">\" && selector.length >= 3) {\n // Assume that strings that start and end with <> are HTML and skip the regex check\n match = [null, selector, null];\n } else {\n match = rquickExpr.exec(selector);\n } // Match html or make sure no context is specified for #id\n\n\n if (match && (match[1] || !context)) {\n // HANDLE: $(html) -> $(array)\n if (match[1]) {\n context = context instanceof jQuery ? context[0] : context; // scripts is true for back-compat\n // Intentionally let the error be thrown if parseHTML is not present\n\n jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)); // HANDLE: $(html, props)\n\n if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {\n for (match in context) {\n // Properties of context are called as methods if possible\n if (jQuery.isFunction(this[match])) {\n this[match](context[match]); // ...and otherwise set as attributes\n } else {\n this.attr(match, context[match]);\n }\n }\n }\n\n return this; // HANDLE: $(#id)\n } else {\n elem = document.getElementById(match[2]); // Check parentNode to catch when Blackberry 4.6 returns\n // nodes that are no longer in the document #6963\n\n if (elem && elem.parentNode) {\n // Handle the case where IE and Opera return items\n // by name instead of ID\n if (elem.id !== match[2]) {\n return rootjQuery.find(selector);\n } // Otherwise, we inject the element directly into the jQuery object\n\n\n this.length = 1;\n this[0] = elem;\n }\n\n this.context = document;\n this.selector = selector;\n return this;\n } // HANDLE: $(expr, $(...))\n\n } else if (!context || context.jquery) {\n return (context || root).find(selector); // HANDLE: $(expr, context)\n // (which is just equivalent to: $(context).find(expr)\n } else {\n return this.constructor(context).find(selector);\n } // HANDLE: $(DOMElement)\n\n } else if (selector.nodeType) {\n this.context = this[0] = selector;\n this.length = 1;\n return this; // HANDLE: $(function)\n // Shortcut for document ready\n } else if (jQuery.isFunction(selector)) {\n return typeof root.ready !== \"undefined\" ? root.ready(selector) : // Execute immediately if ready is not present\n selector(jQuery);\n }\n\n if (selector.selector !== undefined) {\n this.selector = selector.selector;\n this.context = selector.context;\n }\n\n return jQuery.makeArray(selector, this);\n }; // Give the init function the jQuery prototype for later instantiation\n\n\n init.prototype = jQuery.fn; // Initialize central reference\n\n rootjQuery = jQuery(document);\n var rparentsprev = /^(?:parents|prev(?:Until|All))/,\n // methods guaranteed to produce a unique set when starting from a unique set\n guaranteedUnique = {\n children: true,\n contents: true,\n next: true,\n prev: true\n };\n jQuery.fn.extend({\n has: function has(target) {\n var i,\n targets = jQuery(target, this),\n len = targets.length;\n return this.filter(function () {\n for (i = 0; i < len; i++) {\n if (jQuery.contains(this, targets[i])) {\n return true;\n }\n }\n });\n },\n closest: function closest(selectors, context) {\n var cur,\n i = 0,\n l = this.length,\n matched = [],\n pos = rneedsContext.test(selectors) || typeof selectors !== \"string\" ? jQuery(selectors, context || this.context) : 0;\n\n for (; i < l; i++) {\n for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {\n // Always skip document fragments\n if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : // Don't pass non-elements to Sizzle\n cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) {\n matched.push(cur);\n break;\n }\n }\n }\n\n return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);\n },\n // Determine the position of an element within\n // the matched set of elements\n index: function index(elem) {\n // No argument, return index in parent\n if (!elem) {\n return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;\n } // index in selector\n\n\n if (typeof elem === \"string\") {\n return jQuery.inArray(this[0], jQuery(elem));\n } // Locate the position of the desired element\n\n\n return jQuery.inArray( // If it receives a jQuery object, the first element is used\n elem.jquery ? elem[0] : elem, this);\n },\n add: function add(selector, context) {\n return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))));\n },\n addBack: function addBack(selector) {\n return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));\n }\n });\n\n function sibling(cur, dir) {\n do {\n cur = cur[dir];\n } while (cur && cur.nodeType !== 1);\n\n return cur;\n }\n\n jQuery.each({\n parent: function parent(elem) {\n var parent = elem.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n parents: function parents(elem) {\n return dir(elem, \"parentNode\");\n },\n parentsUntil: function parentsUntil(elem, i, until) {\n return dir(elem, \"parentNode\", until);\n },\n next: function next(elem) {\n return sibling(elem, \"nextSibling\");\n },\n prev: function prev(elem) {\n return sibling(elem, \"previousSibling\");\n },\n nextAll: function nextAll(elem) {\n return dir(elem, \"nextSibling\");\n },\n prevAll: function prevAll(elem) {\n return dir(elem, \"previousSibling\");\n },\n nextUntil: function nextUntil(elem, i, until) {\n return dir(elem, \"nextSibling\", until);\n },\n prevUntil: function prevUntil(elem, i, until) {\n return dir(elem, \"previousSibling\", until);\n },\n siblings: function siblings(elem) {\n return _siblings((elem.parentNode || {}).firstChild, elem);\n },\n children: function children(elem) {\n return _siblings(elem.firstChild);\n },\n contents: function contents(elem) {\n return jQuery.nodeName(elem, \"iframe\") ? elem.contentDocument || elem.contentWindow.document : jQuery.merge([], elem.childNodes);\n }\n }, function (name, fn) {\n jQuery.fn[name] = function (until, selector) {\n var ret = jQuery.map(this, fn, until);\n\n if (name.slice(-5) !== \"Until\") {\n selector = until;\n }\n\n if (selector && typeof selector === \"string\") {\n ret = jQuery.filter(selector, ret);\n }\n\n if (this.length > 1) {\n // Remove duplicates\n if (!guaranteedUnique[name]) {\n ret = jQuery.uniqueSort(ret);\n } // Reverse order for parents* and prev-derivatives\n\n\n if (rparentsprev.test(name)) {\n ret = ret.reverse();\n }\n }\n\n return this.pushStack(ret);\n };\n });\n var rnotwhite = /\\S+/g; // Convert String-formatted options into Object-formatted ones\n\n function createOptions(options) {\n var object = {};\n jQuery.each(options.match(rnotwhite) || [], function (_, flag) {\n object[flag] = true;\n });\n return object;\n }\n /*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\n\n\n jQuery.Callbacks = function (options) {\n // Convert options from String-formatted to Object-formatted if needed\n // (we check in cache first)\n options = typeof options === \"string\" ? createOptions(options) : jQuery.extend({}, options);\n\n var // Flag to know if list is currently firing\n firing,\n // Last fire value for non-forgettable lists\n memory,\n // Flag to know if list was already fired\n _fired,\n // Flag to prevent firing\n _locked,\n // Actual callback list\n list = [],\n // Queue of execution data for repeatable lists\n queue = [],\n // Index of currently firing callback (modified by add/remove as needed)\n firingIndex = -1,\n // Fire callbacks\n fire = function fire() {\n // Enforce single-firing\n _locked = options.once; // Execute callbacks for all pending executions,\n // respecting firingIndex overrides and runtime changes\n\n _fired = firing = true;\n\n for (; queue.length; firingIndex = -1) {\n memory = queue.shift();\n\n while (++firingIndex < list.length) {\n // Run callback and check for early termination\n if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {\n // Jump to end and forget the data so .add doesn't re-fire\n firingIndex = list.length;\n memory = false;\n }\n }\n } // Forget the data if we're done with it\n\n\n if (!options.memory) {\n memory = false;\n }\n\n firing = false; // Clean up if we're done firing for good\n\n if (_locked) {\n // Keep an empty list if we have data for future add calls\n if (memory) {\n list = []; // Otherwise, this object is spent\n } else {\n list = \"\";\n }\n }\n },\n // Actual Callbacks object\n self = {\n // Add a callback or a collection of callbacks to the list\n add: function add() {\n if (list) {\n // If we have memory from a past run, we should fire after adding\n if (memory && !firing) {\n firingIndex = list.length - 1;\n queue.push(memory);\n }\n\n (function add(args) {\n jQuery.each(args, function (_, arg) {\n if (jQuery.isFunction(arg)) {\n if (!options.unique || !self.has(arg)) {\n list.push(arg);\n }\n } else if (arg && arg.length && jQuery.type(arg) !== \"string\") {\n // Inspect recursively\n add(arg);\n }\n });\n })(arguments);\n\n if (memory && !firing) {\n fire();\n }\n }\n\n return this;\n },\n // Remove a callback from the list\n remove: function remove() {\n jQuery.each(arguments, function (_, arg) {\n var index;\n\n while ((index = jQuery.inArray(arg, list, index)) > -1) {\n list.splice(index, 1); // Handle firing indexes\n\n if (index <= firingIndex) {\n firingIndex--;\n }\n }\n });\n return this;\n },\n // Check if a given callback is in the list.\n // If no argument is given, return whether or not list has callbacks attached.\n has: function has(fn) {\n return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;\n },\n // Remove all callbacks from the list\n empty: function empty() {\n if (list) {\n list = [];\n }\n\n return this;\n },\n // Disable .fire and .add\n // Abort any current/pending executions\n // Clear all callbacks and values\n disable: function disable() {\n _locked = queue = [];\n list = memory = \"\";\n return this;\n },\n disabled: function disabled() {\n return !list;\n },\n // Disable .fire\n // Also disable .add unless we have memory (since it would have no effect)\n // Abort any pending executions\n lock: function lock() {\n _locked = true;\n\n if (!memory) {\n self.disable();\n }\n\n return this;\n },\n locked: function locked() {\n return !!_locked;\n },\n // Call all callbacks with the given context and arguments\n fireWith: function fireWith(context, args) {\n if (!_locked) {\n args = args || [];\n args = [context, args.slice ? args.slice() : args];\n queue.push(args);\n\n if (!firing) {\n fire();\n }\n }\n\n return this;\n },\n // Call all the callbacks with the given arguments\n fire: function fire() {\n self.fireWith(this, arguments);\n return this;\n },\n // To know if the callbacks have already been called at least once\n fired: function fired() {\n return !!_fired;\n }\n };\n\n return self;\n };\n\n jQuery.extend({\n Deferred: function Deferred(func) {\n var tuples = [// action, add listener, listener list, final state\n [\"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\"], [\"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\"], [\"notify\", \"progress\", jQuery.Callbacks(\"memory\")]],\n _state = \"pending\",\n _promise = {\n state: function state() {\n return _state;\n },\n always: function always() {\n deferred.done(arguments).fail(arguments);\n return this;\n },\n then: function then()\n /* fnDone, fnFail, fnProgress */\n {\n var fns = arguments;\n return jQuery.Deferred(function (newDefer) {\n jQuery.each(tuples, function (i, tuple) {\n var fn = jQuery.isFunction(fns[i]) && fns[i]; // deferred[ done | fail | progress ] for forwarding actions to newDefer\n\n deferred[tuple[1]](function () {\n var returned = fn && fn.apply(this, arguments);\n\n if (returned && jQuery.isFunction(returned.promise)) {\n returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);\n } else {\n newDefer[tuple[0] + \"With\"](this === _promise ? newDefer.promise() : this, fn ? [returned] : arguments);\n }\n });\n });\n fns = null;\n }).promise();\n },\n // Get a promise for this deferred\n // If obj is provided, the promise aspect is added to the object\n promise: function promise(obj) {\n return obj != null ? jQuery.extend(obj, _promise) : _promise;\n }\n },\n deferred = {}; // Keep pipe for back-compat\n\n _promise.pipe = _promise.then; // Add list-specific methods\n\n jQuery.each(tuples, function (i, tuple) {\n var list = tuple[2],\n stateString = tuple[3]; // promise[ done | fail | progress ] = list.add\n\n _promise[tuple[1]] = list.add; // Handle state\n\n if (stateString) {\n list.add(function () {\n // state = [ resolved | rejected ]\n _state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock\n }, tuples[i ^ 1][2].disable, tuples[2][2].lock);\n } // deferred[ resolve | reject | notify ]\n\n\n deferred[tuple[0]] = function () {\n deferred[tuple[0] + \"With\"](this === deferred ? _promise : this, arguments);\n return this;\n };\n\n deferred[tuple[0] + \"With\"] = list.fireWith;\n }); // Make the deferred a promise\n\n _promise.promise(deferred); // Call given func if any\n\n\n if (func) {\n func.call(deferred, deferred);\n } // All done!\n\n\n return deferred;\n },\n // Deferred helper\n when: function when(subordinate\n /* , ..., subordinateN */\n ) {\n var i = 0,\n resolveValues = _slice.call(arguments),\n length = resolveValues.length,\n // the count of uncompleted subordinates\n remaining = length !== 1 || subordinate && jQuery.isFunction(subordinate.promise) ? length : 0,\n // the master Deferred.\n // If resolveValues consist of only a single Deferred, just use that.\n deferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n // Update function for both resolve and progress values\n updateFunc = function updateFunc(i, contexts, values) {\n return function (value) {\n contexts[i] = this;\n values[i] = arguments.length > 1 ? _slice.call(arguments) : value;\n\n if (values === progressValues) {\n deferred.notifyWith(contexts, values);\n } else if (! --remaining) {\n deferred.resolveWith(contexts, values);\n }\n };\n },\n progressValues,\n progressContexts,\n resolveContexts; // add listeners to Deferred subordinates; treat others as resolved\n\n\n if (length > 1) {\n progressValues = new Array(length);\n progressContexts = new Array(length);\n resolveContexts = new Array(length);\n\n for (; i < length; i++) {\n if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {\n resolveValues[i].promise().progress(updateFunc(i, progressContexts, progressValues)).done(updateFunc(i, resolveContexts, resolveValues)).fail(deferred.reject);\n } else {\n --remaining;\n }\n }\n } // if we're not waiting on anything, resolve the master\n\n\n if (!remaining) {\n deferred.resolveWith(resolveContexts, resolveValues);\n }\n\n return deferred.promise();\n }\n }); // The deferred used on DOM ready\n\n var readyList;\n\n jQuery.fn.ready = function (fn) {\n // Add the callback\n jQuery.ready.promise().done(fn);\n return this;\n };\n\n jQuery.extend({\n // Is the DOM ready to be used? Set to true once it occurs.\n isReady: false,\n // A counter to track how many items to wait for before\n // the ready event fires. See #6781\n readyWait: 1,\n // Hold (or release) the ready event\n holdReady: function holdReady(hold) {\n if (hold) {\n jQuery.readyWait++;\n } else {\n jQuery.ready(true);\n }\n },\n // Handle when the DOM is ready\n ready: function ready(wait) {\n // Abort if there are pending holds or we're already ready\n if (wait === true ? --jQuery.readyWait : jQuery.isReady) {\n return;\n } // Remember that the DOM is ready\n\n\n jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be\n\n if (wait !== true && --jQuery.readyWait > 0) {\n return;\n } // If there are functions bound, to execute\n\n\n readyList.resolveWith(document, [jQuery]); // Trigger any bound ready events\n\n if (jQuery.fn.triggerHandler) {\n jQuery(document).triggerHandler(\"ready\");\n jQuery(document).off(\"ready\");\n }\n }\n });\n /**\n * Clean-up method for dom ready events\n */\n\n function detach() {\n if (document.addEventListener) {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n } else {\n document.detachEvent(\"onreadystatechange\", completed);\n window.detachEvent(\"onload\", completed);\n }\n }\n /**\n * The ready event handler and self cleanup method\n */\n\n\n function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || window.event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }\n\n jQuery.ready.promise = function (obj) {\n if (!readyList) {\n readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called\n // after the browser event has already occurred.\n // Support: IE6-10\n // Older IE sometimes signals \"interactive\" too soon\n\n if (document.readyState === \"complete\" || document.readyState !== \"loading\" && !document.documentElement.doScroll) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n window.setTimeout(jQuery.ready); // Standards-based browsers support DOMContentLoaded\n } else if (document.addEventListener) {\n // Use the handy event callback\n document.addEventListener(\"DOMContentLoaded\", completed); // A fallback to window.onload, that will always work\n\n window.addEventListener(\"load\", completed); // If IE event model is used\n } else {\n // Ensure firing before onload, maybe late but safe also for iframes\n document.attachEvent(\"onreadystatechange\", completed); // A fallback to window.onload, that will always work\n\n window.attachEvent(\"onload\", completed); // If IE and not a frame\n // continually check to see if the document is ready\n\n var top = false;\n\n try {\n top = window.frameElement == null && document.documentElement;\n } catch (e) {}\n\n if (top && top.doScroll) {\n (function doScrollCheck() {\n if (!jQuery.isReady) {\n try {\n // Use the trick by Diego Perini\n // http://javascript.nwbox.com/IEContentLoaded/\n top.doScroll(\"left\");\n } catch (e) {\n return window.setTimeout(doScrollCheck, 50);\n } // detach all dom ready events\n\n\n detach(); // and execute any waiting functions\n\n jQuery.ready();\n }\n })();\n }\n }\n }\n\n return readyList.promise(obj);\n }; // Kick off the DOM ready check even if the user does not\n\n\n jQuery.ready.promise(); // Support: IE<9\n // Iteration over object's inherited properties before its own\n\n var i;\n\n for (i in jQuery(support)) {\n break;\n }\n\n support.ownFirst = i === \"0\"; // Note: most support tests are defined in their respective modules.\n // false until the test is run\n\n support.inlineBlockNeedsLayout = false; // Execute ASAP in case we need to set body.style.zoom\n\n jQuery(function () {\n // Minified: var a,b,c,d\n var val, div, body, container;\n body = document.getElementsByTagName(\"body\")[0];\n\n if (!body || !body.style) {\n // Return for frameset docs that don't have a body\n return;\n } // Setup\n\n\n div = document.createElement(\"div\");\n container = document.createElement(\"div\");\n container.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n body.appendChild(container).appendChild(div);\n\n if (typeof div.style.zoom !== \"undefined\") {\n // Support: IE<8\n // Check if natively block-level elements act like inline-block\n // elements when setting their display to 'inline' and giving\n // them layout\n div.style.cssText = \"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\";\n support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;\n\n if (val) {\n // Prevent IE 6 from affecting layout for positioned elements #11048\n // Prevent IE from shrinking the body in IE 7 mode #12869\n // Support: IE<8\n body.style.zoom = 1;\n }\n }\n\n body.removeChild(container);\n });\n\n (function () {\n var div = document.createElement(\"div\"); // Support: IE<9\n\n support.deleteExpando = true;\n\n try {\n delete div.test;\n } catch (e) {\n support.deleteExpando = false;\n } // Null elements to avoid leaks in IE.\n\n\n div = null;\n })();\n\n var acceptData = function acceptData(elem) {\n var noData = jQuery.noData[(elem.nodeName + \" \").toLowerCase()],\n nodeType = +elem.nodeType || 1; // Do not set data on non-element DOM nodes because it will not be cleared (#8335).\n\n return nodeType !== 1 && nodeType !== 9 ? false : // Nodes accept data unless otherwise specified; rejection can be conditional\n !noData || noData !== true && elem.getAttribute(\"classid\") === noData;\n };\n\n var rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n rmultiDash = /([A-Z])/g;\n\n function dataAttr(elem, key, data) {\n // If nothing was found internally, try to fetch any\n // data from the HTML5 data-* attribute\n if (data === undefined && elem.nodeType === 1) {\n var name = \"data-\" + key.replace(rmultiDash, \"-$1\").toLowerCase();\n data = elem.getAttribute(name);\n\n if (typeof data === \"string\") {\n try {\n data = data === \"true\" ? true : data === \"false\" ? false : data === \"null\" ? null : // Only convert to a number if it doesn't change the string\n +data + \"\" === data ? +data : rbrace.test(data) ? jQuery.parseJSON(data) : data;\n } catch (e) {} // Make sure we set the data so it isn't changed later\n\n\n jQuery.data(elem, key, data);\n } else {\n data = undefined;\n }\n }\n\n return data;\n } // checks a cache object for emptiness\n\n\n function isEmptyDataObject(obj) {\n var name;\n\n for (name in obj) {\n // if the public data object is empty, the private is still empty\n if (name === \"data\" && jQuery.isEmptyObject(obj[name])) {\n continue;\n }\n\n if (name !== \"toJSON\") {\n return false;\n }\n }\n\n return true;\n }\n\n function internalData(elem, name, data, pvt\n /* Internal Use Only */\n ) {\n if (!acceptData(elem)) {\n return;\n }\n\n var ret,\n thisCache,\n internalKey = jQuery.expando,\n // We have to handle DOM nodes and JS objects differently because IE6-7\n // can't GC object references properly across the DOM-JS boundary\n isNode = elem.nodeType,\n // Only DOM nodes need the global jQuery cache; JS object data is\n // attached directly to the object so GC can occur automatically\n cache = isNode ? jQuery.cache : elem,\n // Only defining an ID for JS objects if its cache already exists allows\n // the code to shortcut on the same path as a DOM node with no cache\n id = isNode ? elem[internalKey] : elem[internalKey] && internalKey; // Avoid doing any more work than we need to when trying to get data on an\n // object that has no data at all\n\n if ((!id || !cache[id] || !pvt && !cache[id].data) && data === undefined && typeof name === \"string\") {\n return;\n }\n\n if (!id) {\n // Only DOM nodes need a new unique ID for each element since their data\n // ends up in the global cache\n if (isNode) {\n id = elem[internalKey] = deletedIds.pop() || jQuery.guid++;\n } else {\n id = internalKey;\n }\n }\n\n if (!cache[id]) {\n // Avoid exposing jQuery metadata on plain JS objects when the object\n // is serialized using JSON.stringify\n cache[id] = isNode ? {} : {\n toJSON: jQuery.noop\n };\n } // An object can be passed to jQuery.data instead of a key/value pair; this gets\n // shallow copied over onto the existing cache\n\n\n if (_typeof(name) === \"object\" || typeof name === \"function\") {\n if (pvt) {\n cache[id] = jQuery.extend(cache[id], name);\n } else {\n cache[id].data = jQuery.extend(cache[id].data, name);\n }\n }\n\n thisCache = cache[id]; // jQuery data() is stored in a separate object inside the object's internal data\n // cache in order to avoid key collisions between internal data and user-defined\n // data.\n\n if (!pvt) {\n if (!thisCache.data) {\n thisCache.data = {};\n }\n\n thisCache = thisCache.data;\n }\n\n if (data !== undefined) {\n thisCache[jQuery.camelCase(name)] = data;\n } // Check for both converted-to-camel and non-converted data property names\n // If a data property was specified\n\n\n if (typeof name === \"string\") {\n // First Try to find as-is property data\n ret = thisCache[name]; // Test for null|undefined property data\n\n if (ret == null) {\n // Try to find the camelCased property\n ret = thisCache[jQuery.camelCase(name)];\n }\n } else {\n ret = thisCache;\n }\n\n return ret;\n }\n\n function internalRemoveData(elem, name, pvt) {\n if (!acceptData(elem)) {\n return;\n }\n\n var thisCache,\n i,\n isNode = elem.nodeType,\n // See jQuery.data for more information\n cache = isNode ? jQuery.cache : elem,\n id = isNode ? elem[jQuery.expando] : jQuery.expando; // If there is already no cache entry for this object, there is no\n // purpose in continuing\n\n if (!cache[id]) {\n return;\n }\n\n if (name) {\n thisCache = pvt ? cache[id] : cache[id].data;\n\n if (thisCache) {\n // Support array or space separated string names for data keys\n if (!jQuery.isArray(name)) {\n // try the string as a key before any manipulation\n if (name in thisCache) {\n name = [name];\n } else {\n // split the camel cased version by spaces unless a key with the spaces exists\n name = jQuery.camelCase(name);\n\n if (name in thisCache) {\n name = [name];\n } else {\n name = name.split(\" \");\n }\n }\n } else {\n // If \"name\" is an array of keys...\n // When data is initially created, via (\"key\", \"val\") signature,\n // keys will be converted to camelCase.\n // Since there is no way to tell _how_ a key was added, remove\n // both plain key and camelCase key. #12786\n // This will only penalize the array argument path.\n name = name.concat(jQuery.map(name, jQuery.camelCase));\n }\n\n i = name.length;\n\n while (i--) {\n delete thisCache[name[i]];\n } // If there is no data left in the cache, we want to continue\n // and let the cache object itself get destroyed\n\n\n if (pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache)) {\n return;\n }\n }\n } // See jQuery.data for more information\n\n\n if (!pvt) {\n delete cache[id].data; // Don't destroy the parent cache unless the internal data object\n // had been the only thing left in it\n\n if (!isEmptyDataObject(cache[id])) {\n return;\n }\n } // Destroy the cache\n\n\n if (isNode) {\n jQuery.cleanData([elem], true); // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\n /* jshint eqeqeq: false */\n } else if (support.deleteExpando || cache != cache.window) {\n /* jshint eqeqeq: true */\n delete cache[id]; // When all else fails, undefined\n } else {\n cache[id] = undefined;\n }\n }\n\n jQuery.extend({\n cache: {},\n // The following elements (space-suffixed to avoid Object.prototype collisions)\n // throw uncatchable exceptions if you attempt to set expando properties\n noData: {\n \"applet \": true,\n \"embed \": true,\n // ...but Flash objects (which have this classid) *can* handle expandos\n \"object \": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n },\n hasData: function hasData(elem) {\n elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];\n return !!elem && !isEmptyDataObject(elem);\n },\n data: function data(elem, name, _data) {\n return internalData(elem, name, _data);\n },\n removeData: function removeData(elem, name) {\n return internalRemoveData(elem, name);\n },\n // For internal use only.\n _data: function _data(elem, name, data) {\n return internalData(elem, name, data, true);\n },\n _removeData: function _removeData(elem, name) {\n return internalRemoveData(elem, name, true);\n }\n });\n jQuery.fn.extend({\n data: function data(key, value) {\n var i,\n name,\n data,\n elem = this[0],\n attrs = elem && elem.attributes; // Special expections of .data basically thwart jQuery.access,\n // so implement the relevant behavior ourselves\n // Gets all values\n\n if (key === undefined) {\n if (this.length) {\n data = jQuery.data(elem);\n\n if (elem.nodeType === 1 && !jQuery._data(elem, \"parsedAttrs\")) {\n i = attrs.length;\n\n while (i--) {\n // Support: IE11+\n // The attrs elements can be null (#14894)\n if (attrs[i]) {\n name = attrs[i].name;\n\n if (name.indexOf(\"data-\") === 0) {\n name = jQuery.camelCase(name.slice(5));\n dataAttr(elem, name, data[name]);\n }\n }\n }\n\n jQuery._data(elem, \"parsedAttrs\", true);\n }\n }\n\n return data;\n } // Sets multiple values\n\n\n if (_typeof(key) === \"object\") {\n return this.each(function () {\n jQuery.data(this, key);\n });\n }\n\n return arguments.length > 1 ? // Sets one value\n this.each(function () {\n jQuery.data(this, key, value);\n }) : // Gets one value\n // Try to fetch any internally stored data first\n elem ? dataAttr(elem, key, jQuery.data(elem, key)) : undefined;\n },\n removeData: function removeData(key) {\n return this.each(function () {\n jQuery.removeData(this, key);\n });\n }\n });\n jQuery.extend({\n queue: function queue(elem, type, data) {\n var queue;\n\n if (elem) {\n type = (type || \"fx\") + \"queue\";\n queue = jQuery._data(elem, type); // Speed up dequeue by getting out quickly if this is just a lookup\n\n if (data) {\n if (!queue || jQuery.isArray(data)) {\n queue = jQuery._data(elem, type, jQuery.makeArray(data));\n } else {\n queue.push(data);\n }\n }\n\n return queue || [];\n }\n },\n dequeue: function dequeue(elem, type) {\n type = type || \"fx\";\n\n var queue = jQuery.queue(elem, type),\n startLength = queue.length,\n fn = queue.shift(),\n hooks = jQuery._queueHooks(elem, type),\n next = function next() {\n jQuery.dequeue(elem, type);\n }; // If the fx queue is dequeued, always remove the progress sentinel\n\n\n if (fn === \"inprogress\") {\n fn = queue.shift();\n startLength--;\n }\n\n if (fn) {\n // Add a progress sentinel to prevent the fx queue from being\n // automatically dequeued\n if (type === \"fx\") {\n queue.unshift(\"inprogress\");\n } // clear up the last queue stop function\n\n\n delete hooks.stop;\n fn.call(elem, next, hooks);\n }\n\n if (!startLength && hooks) {\n hooks.empty.fire();\n }\n },\n // not intended for public consumption - generates a queueHooks object,\n // or returns the current one\n _queueHooks: function _queueHooks(elem, type) {\n var key = type + \"queueHooks\";\n return jQuery._data(elem, key) || jQuery._data(elem, key, {\n empty: jQuery.Callbacks(\"once memory\").add(function () {\n jQuery._removeData(elem, type + \"queue\");\n\n jQuery._removeData(elem, key);\n })\n });\n }\n });\n jQuery.fn.extend({\n queue: function queue(type, data) {\n var setter = 2;\n\n if (typeof type !== \"string\") {\n data = type;\n type = \"fx\";\n setter--;\n }\n\n if (arguments.length < setter) {\n return jQuery.queue(this[0], type);\n }\n\n return data === undefined ? this : this.each(function () {\n var queue = jQuery.queue(this, type, data); // ensure a hooks for this queue\n\n jQuery._queueHooks(this, type);\n\n if (type === \"fx\" && queue[0] !== \"inprogress\") {\n jQuery.dequeue(this, type);\n }\n });\n },\n dequeue: function dequeue(type) {\n return this.each(function () {\n jQuery.dequeue(this, type);\n });\n },\n clearQueue: function clearQueue(type) {\n return this.queue(type || \"fx\", []);\n },\n // Get a promise resolved when queues of a certain type\n // are emptied (fx is the type by default)\n promise: function promise(type, obj) {\n var tmp,\n count = 1,\n defer = jQuery.Deferred(),\n elements = this,\n i = this.length,\n resolve = function resolve() {\n if (! --count) {\n defer.resolveWith(elements, [elements]);\n }\n };\n\n if (typeof type !== \"string\") {\n obj = type;\n type = undefined;\n }\n\n type = type || \"fx\";\n\n while (i--) {\n tmp = jQuery._data(elements[i], type + \"queueHooks\");\n\n if (tmp && tmp.empty) {\n count++;\n tmp.empty.add(resolve);\n }\n }\n\n resolve();\n return defer.promise(obj);\n }\n });\n\n (function () {\n var shrinkWrapBlocksVal;\n\n support.shrinkWrapBlocks = function () {\n if (shrinkWrapBlocksVal != null) {\n return shrinkWrapBlocksVal;\n } // Will be changed later if needed.\n\n\n shrinkWrapBlocksVal = false; // Minified: var b,c,d\n\n var div, body, container;\n body = document.getElementsByTagName(\"body\")[0];\n\n if (!body || !body.style) {\n // Test fired too early or in an unsupported environment, exit.\n return;\n } // Setup\n\n\n div = document.createElement(\"div\");\n container = document.createElement(\"div\");\n container.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n body.appendChild(container).appendChild(div); // Support: IE6\n // Check if elements with layout shrink-wrap their children\n\n if (typeof div.style.zoom !== \"undefined\") {\n // Reset CSS: box-sizing; display; margin; border\n div.style.cssText = // Support: Firefox<29, Android 2.3\n // Vendor-prefix box-sizing\n \"-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\";\n div.appendChild(document.createElement(\"div\")).style.width = \"5px\";\n shrinkWrapBlocksVal = div.offsetWidth !== 3;\n }\n\n body.removeChild(container);\n return shrinkWrapBlocksVal;\n };\n })();\n\n var pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source;\n var rcssNum = new RegExp(\"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\");\n var cssExpand = [\"Top\", \"Right\", \"Bottom\", \"Left\"];\n\n var isHidden = function isHidden(elem, el) {\n // isHidden might be called from jQuery#filter function;\n // in that case, element will be second argument\n elem = el || elem;\n return jQuery.css(elem, \"display\") === \"none\" || !jQuery.contains(elem.ownerDocument, elem);\n };\n\n function adjustCSS(elem, prop, valueParts, tween) {\n var adjusted,\n scale = 1,\n maxIterations = 20,\n currentValue = tween ? function () {\n return tween.cur();\n } : function () {\n return jQuery.css(elem, prop, \"\");\n },\n initial = currentValue(),\n unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? \"\" : \"px\"),\n // Starting value computation is required for potential unit mismatches\n initialInUnit = (jQuery.cssNumber[prop] || unit !== \"px\" && +initial) && rcssNum.exec(jQuery.css(elem, prop));\n\n if (initialInUnit && initialInUnit[3] !== unit) {\n // Trust units reported by jQuery.css\n unit = unit || initialInUnit[3]; // Make sure we update the tween properties later on\n\n valueParts = valueParts || []; // Iteratively approximate from a nonzero starting point\n\n initialInUnit = +initial || 1;\n\n do {\n // If previous iteration zeroed out, double until we get *something*.\n // Use string for doubling so we don't accidentally see scale as unchanged below\n scale = scale || \".5\"; // Adjust and apply\n\n initialInUnit = initialInUnit / scale;\n jQuery.style(elem, prop, initialInUnit + unit); // Update scale, tolerating zero or NaN from tween.cur()\n // Break the loop if scale is unchanged or perfect, or if we've just had enough.\n } while (scale !== (scale = currentValue() / initial) && scale !== 1 && --maxIterations);\n }\n\n if (valueParts) {\n initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified\n\n adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];\n\n if (tween) {\n tween.unit = unit;\n tween.start = initialInUnit;\n tween.end = adjusted;\n }\n }\n\n return adjusted;\n } // Multifunctional method to get and set values of a collection\n // The value/s can optionally be executed if it's a function\n\n\n var access = function access(elems, fn, key, value, chainable, emptyGet, raw) {\n var i = 0,\n length = elems.length,\n bulk = key == null; // Sets many values\n\n if (jQuery.type(key) === \"object\") {\n chainable = true;\n\n for (i in key) {\n access(elems, fn, i, key[i], true, emptyGet, raw);\n } // Sets one value\n\n } else if (value !== undefined) {\n chainable = true;\n\n if (!jQuery.isFunction(value)) {\n raw = true;\n }\n\n if (bulk) {\n // Bulk operations run against the entire set\n if (raw) {\n fn.call(elems, value);\n fn = null; // ...except when executing function values\n } else {\n bulk = fn;\n\n fn = function fn(elem, key, value) {\n return bulk.call(jQuery(elem), value);\n };\n }\n }\n\n if (fn) {\n for (; i < length; i++) {\n fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));\n }\n }\n }\n\n return chainable ? elems : // Gets\n bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet;\n };\n\n var rcheckableType = /^(?:checkbox|radio)$/i;\n var rtagName = /<([\\w:-]+)/;\n var rscriptType = /^$|\\/(?:java|ecma)script/i;\n var rleadingWhitespace = /^\\s+/;\n 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\";\n\n function createSafeFragment(document) {\n var list = nodeNames.split(\"|\"),\n safeFrag = document.createDocumentFragment();\n\n if (safeFrag.createElement) {\n while (list.length) {\n safeFrag.createElement(list.pop());\n }\n }\n\n return safeFrag;\n }\n\n (function () {\n var div = document.createElement(\"div\"),\n fragment = document.createDocumentFragment(),\n input = document.createElement(\"input\"); // Setup\n\n div.innerHTML = \" a \"; // IE strips leading whitespace when .innerHTML is used\n\n support.leadingWhitespace = div.firstChild.nodeType === 3; // Make sure that tbody elements aren't automatically inserted\n // IE will insert them into empty tables\n\n support.tbody = !div.getElementsByTagName(\"tbody\").length; // Make sure that link elements get serialized correctly by innerHTML\n // This requires a wrapper element in IE\n\n support.htmlSerialize = !!div.getElementsByTagName(\"link\").length; // Makes sure cloning an html5 element does not cause problems\n // Where outerHTML is undefined, this still works\n\n support.html5Clone = document.createElement(\"nav\").cloneNode(true).outerHTML !== \"<:nav>\"; // Check if a disconnected checkbox will retain its checked\n // value of true after appended to the DOM (IE6/7)\n\n input.type = \"checkbox\";\n input.checked = true;\n fragment.appendChild(input);\n support.appendChecked = input.checked; // Make sure textarea (and checkbox) defaultValue is properly cloned\n // Support: IE6-IE11+\n\n div.innerHTML = \"\";\n support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; // #11217 - WebKit loses check when the name is after the checked attribute\n\n fragment.appendChild(div); // Support: Windows Web Apps (WWA)\n // `name` and `type` must use .setAttribute for WWA (#14901)\n\n input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"radio\");\n input.setAttribute(\"checked\", \"checked\");\n input.setAttribute(\"name\", \"t\");\n div.appendChild(input); // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3\n // old WebKit doesn't clone checked state correctly in fragments\n\n support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; // Support: IE<9\n // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+\n\n support.noCloneEvent = !!div.addEventListener; // Support: IE<9\n // Since attributes and properties are the same in IE,\n // cleanData must set properties to undefined rather than use removeAttribute\n\n div[jQuery.expando] = 1;\n support.attributes = !div.getAttribute(jQuery.expando);\n })(); // We have to close these tags to support XHTML (#13200)\n\n\n var wrapMap = {\n option: [1, \"\", \" \"],\n legend: [1, \"\", \" \"],\n area: [1, \"\", \" \"],\n // Support: IE8\n param: [1, \"\", \" \"],\n thead: [1, \"\"],\n tr: [2, \"\"],\n col: [2, \"\"],\n td: [3, \"\"],\n // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n // unless wrapped in a div with non-breaking characters in front of it.\n _default: support.htmlSerialize ? [0, \"\", \"\"] : [1, \"X\", \"
\"]\n }; // Support: IE8-IE9\n\n wrapMap.optgroup = wrapMap.option;\n wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\n wrapMap.th = wrapMap.td;\n\n function getAll(context, tag) {\n var elems,\n elem,\n i = 0,\n found = typeof context.getElementsByTagName !== \"undefined\" ? context.getElementsByTagName(tag || \"*\") : typeof context.querySelectorAll !== \"undefined\" ? context.querySelectorAll(tag || \"*\") : undefined;\n\n if (!found) {\n for (found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++) {\n if (!tag || jQuery.nodeName(elem, tag)) {\n found.push(elem);\n } else {\n jQuery.merge(found, getAll(elem, tag));\n }\n }\n }\n\n return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], found) : found;\n } // Mark scripts as having already been evaluated\n\n\n function setGlobalEval(elems, refElements) {\n var elem,\n i = 0;\n\n for (; (elem = elems[i]) != null; i++) {\n jQuery._data(elem, \"globalEval\", !refElements || jQuery._data(refElements[i], \"globalEval\"));\n }\n }\n\n var rhtml = /<|?\\w+;/,\n rtbody = / from table fragments\n\n\n if (!support.tbody) {\n // String was a , *may* have spurious \n elem = tag === \"table\" && !rtbody.test(elem) ? tmp.firstChild : // String was a bare or \n wrap[1] === \"\" && !rtbody.test(elem) ? tmp : 0;\n j = elem && elem.childNodes.length;\n\n while (j--) {\n if (jQuery.nodeName(tbody = elem.childNodes[j], \"tbody\") && !tbody.childNodes.length) {\n elem.removeChild(tbody);\n }\n }\n }\n\n jQuery.merge(nodes, tmp.childNodes); // Fix #12392 for WebKit and IE > 9\n\n tmp.textContent = \"\"; // Fix #12392 for oldIE\n\n while (tmp.firstChild) {\n tmp.removeChild(tmp.firstChild);\n } // Remember the top-level container for proper cleanup\n\n\n tmp = safe.lastChild;\n }\n }\n } // Fix #11356: Clear elements from fragment\n\n\n if (tmp) {\n safe.removeChild(tmp);\n } // Reset defaultChecked for any radios and checkboxes\n // about to be appended to the DOM in IE 6/7 (#8060)\n\n\n if (!support.appendChecked) {\n jQuery.grep(getAll(nodes, \"input\"), fixDefaultChecked);\n }\n\n i = 0;\n\n while (elem = nodes[i++]) {\n // Skip elements already in the context collection (trac-4087)\n if (selection && jQuery.inArray(elem, selection) > -1) {\n if (ignored) {\n ignored.push(elem);\n }\n\n continue;\n }\n\n contains = jQuery.contains(elem.ownerDocument, elem); // Append to fragment\n\n tmp = getAll(safe.appendChild(elem), \"script\"); // Preserve script evaluation history\n\n if (contains) {\n setGlobalEval(tmp);\n } // Capture executables\n\n\n if (scripts) {\n j = 0;\n\n while (elem = tmp[j++]) {\n if (rscriptType.test(elem.type || \"\")) {\n scripts.push(elem);\n }\n }\n }\n }\n\n tmp = null;\n return safe;\n }\n\n (function () {\n var i,\n eventName,\n div = document.createElement(\"div\"); // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)\n\n for (i in {\n submit: true,\n change: true,\n focusin: true\n }) {\n eventName = \"on\" + i;\n\n if (!(support[i] = eventName in window)) {\n // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n div.setAttribute(eventName, \"t\");\n support[i] = div.attributes[eventName].expando === false;\n }\n } // Null elements to avoid leaks in IE.\n\n\n div = null;\n })();\n\n var rformElems = /^(?:input|select|textarea)$/i,\n rkeyEvent = /^key/,\n rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\n function returnTrue() {\n return true;\n }\n\n function returnFalse() {\n return false;\n } // Support: IE9\n // See #13393 for more info\n\n\n function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }\n\n function _on(elem, types, selector, data, fn, one) {\n var origFn, type; // Types can be a map of types/handlers\n\n if (_typeof(types) === \"object\") {\n // ( types-Object, selector, data )\n if (typeof selector !== \"string\") {\n // ( types-Object, data )\n data = data || selector;\n selector = undefined;\n }\n\n for (type in types) {\n _on(elem, type, selector, data, types[type], one);\n }\n\n return elem;\n }\n\n if (data == null && fn == null) {\n // ( types, fn )\n fn = selector;\n data = selector = undefined;\n } else if (fn == null) {\n if (typeof selector === \"string\") {\n // ( types, selector, fn )\n fn = data;\n data = undefined;\n } else {\n // ( types, data, fn )\n fn = data;\n data = selector;\n selector = undefined;\n }\n }\n\n if (fn === false) {\n fn = returnFalse;\n } else if (!fn) {\n return elem;\n }\n\n if (one === 1) {\n origFn = fn;\n\n fn = function fn(event) {\n // Can use an empty set, since event contains the info\n jQuery().off(event);\n return origFn.apply(this, arguments);\n }; // Use same guid so caller can remove using origFn\n\n\n fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);\n }\n\n return elem.each(function () {\n jQuery.event.add(this, types, fn, data, selector);\n });\n }\n /*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\n\n\n jQuery.event = {\n global: {},\n add: function add(elem, types, handler, data, selector) {\n var tmp,\n events,\n t,\n handleObjIn,\n special,\n eventHandle,\n handleObj,\n handlers,\n type,\n namespaces,\n origType,\n elemData = jQuery._data(elem); // Don't attach events to noData or text/comment nodes (but allow plain objects)\n\n\n if (!elemData) {\n return;\n } // Caller can pass in an object of custom data in lieu of the handler\n\n\n if (handler.handler) {\n handleObjIn = handler;\n handler = handleObjIn.handler;\n selector = handleObjIn.selector;\n } // Make sure that the handler has a unique ID, used to find/remove it later\n\n\n if (!handler.guid) {\n handler.guid = jQuery.guid++;\n } // Init the element's event structure and main handler, if this is the first\n\n\n if (!(events = elemData.events)) {\n events = elemData.events = {};\n }\n\n if (!(eventHandle = elemData.handle)) {\n eventHandle = elemData.handle = function (e) {\n // Discard the second event of a jQuery.event.trigger() and\n // when an event is called after a page has unloaded\n return typeof jQuery !== \"undefined\" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply(eventHandle.elem, arguments) : undefined;\n }; // Add elem as a property of the handle fn to prevent a memory leak\n // with IE non-native events\n\n\n eventHandle.elem = elem;\n } // Handle multiple events separated by a space\n\n\n types = (types || \"\").match(rnotwhite) || [\"\"];\n t = types.length;\n\n while (t--) {\n tmp = rtypenamespace.exec(types[t]) || [];\n type = origType = tmp[1];\n namespaces = (tmp[2] || \"\").split(\".\").sort(); // There *must* be a type, no attaching namespace-only handlers\n\n if (!type) {\n continue;\n } // If event changes its type, use the special event handlers for the changed type\n\n\n special = jQuery.event.special[type] || {}; // If selector defined, determine special event api type, otherwise given type\n\n type = (selector ? special.delegateType : special.bindType) || type; // Update special based on newly reset type\n\n special = jQuery.event.special[type] || {}; // handleObj is passed to all event handlers\n\n handleObj = jQuery.extend({\n type: type,\n origType: origType,\n data: data,\n handler: handler,\n guid: handler.guid,\n selector: selector,\n needsContext: selector && jQuery.expr.match.needsContext.test(selector),\n namespace: namespaces.join(\".\")\n }, handleObjIn); // Init the event handler queue if we're the first\n\n if (!(handlers = events[type])) {\n handlers = events[type] = [];\n handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false\n\n if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {\n // Bind the global event handler to the element\n if (elem.addEventListener) {\n elem.addEventListener(type, eventHandle, false);\n } else if (elem.attachEvent) {\n elem.attachEvent(\"on\" + type, eventHandle);\n }\n }\n }\n\n if (special.add) {\n special.add.call(elem, handleObj);\n\n if (!handleObj.handler.guid) {\n handleObj.handler.guid = handler.guid;\n }\n } // Add to the element's handler list, delegates in front\n\n\n if (selector) {\n handlers.splice(handlers.delegateCount++, 0, handleObj);\n } else {\n handlers.push(handleObj);\n } // Keep track of which events have ever been used, for event optimization\n\n\n jQuery.event.global[type] = true;\n } // Nullify elem to prevent memory leaks in IE\n\n\n elem = null;\n },\n // Detach an event or set of events from an element\n remove: function remove(elem, types, handler, selector, mappedTypes) {\n var j,\n handleObj,\n tmp,\n origCount,\n t,\n events,\n special,\n handlers,\n type,\n namespaces,\n origType,\n elemData = jQuery.hasData(elem) && jQuery._data(elem);\n\n if (!elemData || !(events = elemData.events)) {\n return;\n } // Once for each type.namespace in types; type may be omitted\n\n\n types = (types || \"\").match(rnotwhite) || [\"\"];\n t = types.length;\n\n while (t--) {\n tmp = rtypenamespace.exec(types[t]) || [];\n type = origType = tmp[1];\n namespaces = (tmp[2] || \"\").split(\".\").sort(); // Unbind all events (on this namespace, if provided) for the element\n\n if (!type) {\n for (type in events) {\n jQuery.event.remove(elem, type + types[t], handler, selector, true);\n }\n\n continue;\n }\n\n special = jQuery.event.special[type] || {};\n type = (selector ? special.delegateType : special.bindType) || type;\n handlers = events[type] || [];\n tmp = tmp[2] && new RegExp(\"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\"); // Remove matching events\n\n origCount = j = handlers.length;\n\n while (j--) {\n handleObj = handlers[j];\n\n if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector)) {\n handlers.splice(j, 1);\n\n if (handleObj.selector) {\n handlers.delegateCount--;\n }\n\n if (special.remove) {\n special.remove.call(elem, handleObj);\n }\n }\n } // Remove generic event handler if we removed something and no more handlers exist\n // (avoids potential for endless recursion during removal of special event handlers)\n\n\n if (origCount && !handlers.length) {\n if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {\n jQuery.removeEvent(elem, type, elemData.handle);\n }\n\n delete events[type];\n }\n } // Remove the expando if it's no longer used\n\n\n if (jQuery.isEmptyObject(events)) {\n delete elemData.handle; // removeData also checks for emptiness and clears the expando if empty\n // so use it instead of delete\n\n jQuery._removeData(elem, \"events\");\n }\n },\n trigger: function trigger(event, data, elem, onlyHandlers) {\n var handle,\n ontype,\n cur,\n bubbleType,\n special,\n tmp,\n i,\n eventPath = [elem || document],\n type = hasOwn.call(event, \"type\") ? event.type : event,\n namespaces = hasOwn.call(event, \"namespace\") ? event.namespace.split(\".\") : [];\n cur = tmp = elem = elem || document; // Don't do events on text and comment nodes\n\n if (elem.nodeType === 3 || elem.nodeType === 8) {\n return;\n } // focus/blur morphs to focusin/out; ensure we're not firing them right now\n\n\n if (rfocusMorph.test(type + jQuery.event.triggered)) {\n return;\n }\n\n if (type.indexOf(\".\") > -1) {\n // Namespaced trigger; create a regexp to match event type in handle()\n namespaces = type.split(\".\");\n type = namespaces.shift();\n namespaces.sort();\n }\n\n ontype = type.indexOf(\":\") < 0 && \"on\" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string\n\n event = event[jQuery.expando] ? event : new jQuery.Event(type, _typeof(event) === \"object\" && event); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\n event.isTrigger = onlyHandlers ? 2 : 3;\n event.namespace = namespaces.join(\".\");\n event.rnamespace = event.namespace ? new RegExp(\"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\") : null; // Clean up the event in case it is being reused\n\n event.result = undefined;\n\n if (!event.target) {\n event.target = elem;\n } // Clone any incoming data and prepend the event, creating the handler arg list\n\n\n data = data == null ? [event] : jQuery.makeArray(data, [event]); // Allow special events to draw outside the lines\n\n special = jQuery.event.special[type] || {};\n\n if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {\n return;\n } // Determine event propagation path in advance, per W3C events spec (#9951)\n // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\n\n if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) {\n bubbleType = special.delegateType || type;\n\n if (!rfocusMorph.test(bubbleType + type)) {\n cur = cur.parentNode;\n }\n\n for (; cur; cur = cur.parentNode) {\n eventPath.push(cur);\n tmp = cur;\n } // Only add window if we got to document (e.g., not plain obj or detached DOM)\n\n\n if (tmp === (elem.ownerDocument || document)) {\n eventPath.push(tmp.defaultView || tmp.parentWindow || window);\n }\n } // Fire handlers on the event path\n\n\n i = 0;\n\n while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {\n event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler\n\n handle = (jQuery._data(cur, \"events\") || {})[event.type] && jQuery._data(cur, \"handle\");\n\n if (handle) {\n handle.apply(cur, data);\n } // Native handler\n\n\n handle = ontype && cur[ontype];\n\n if (handle && handle.apply && acceptData(cur)) {\n event.result = handle.apply(cur, data);\n\n if (event.result === false) {\n event.preventDefault();\n }\n }\n }\n\n event.type = type; // If nobody prevented the default action, do it now\n\n if (!onlyHandlers && !event.isDefaultPrevented()) {\n if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {\n // Call a native DOM method on the target with the same name name as the event.\n // Can't use an .isFunction() check here because IE6/7 fails that test.\n // Don't do default actions on window, that's where global variables be (#6170)\n if (ontype && elem[type] && !jQuery.isWindow(elem)) {\n // Don't re-trigger an onFOO event when we call its FOO() method\n tmp = elem[ontype];\n\n if (tmp) {\n elem[ontype] = null;\n } // Prevent re-triggering of the same event, since we already bubbled it above\n\n\n jQuery.event.triggered = type;\n\n try {\n elem[type]();\n } catch (e) {// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n // only reproducible on winXP IE8 native, not IE9 in IE8 mode\n }\n\n jQuery.event.triggered = undefined;\n\n if (tmp) {\n elem[ontype] = tmp;\n }\n }\n }\n }\n\n return event.result;\n },\n dispatch: function dispatch(event) {\n // Make a writable jQuery.Event from the native event object\n event = jQuery.event.fix(event);\n\n var i,\n j,\n ret,\n matched,\n handleObj,\n handlerQueue = [],\n args = _slice.call(arguments),\n handlers = (jQuery._data(this, \"events\") || {})[event.type] || [],\n special = jQuery.event.special[event.type] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event\n\n\n args[0] = event;\n event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired\n\n if (special.preDispatch && special.preDispatch.call(this, event) === false) {\n return;\n } // Determine handlers\n\n\n handlerQueue = jQuery.event.handlers.call(this, event, handlers); // Run delegates first; they may want to stop propagation beneath us\n\n i = 0;\n\n while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {\n event.currentTarget = matched.elem;\n j = 0;\n\n while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {\n // Triggered event must either 1) have no namespace, or 2) have namespace(s)\n // a subset or equal to those in the bound event (both can have no namespace).\n if (!event.rnamespace || event.rnamespace.test(handleObj.namespace)) {\n event.handleObj = handleObj;\n event.data = handleObj.data;\n ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);\n\n if (ret !== undefined) {\n if ((event.result = ret) === false) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n }\n } // Call the postDispatch hook for the mapped type\n\n\n if (special.postDispatch) {\n special.postDispatch.call(this, event);\n }\n\n return event.result;\n },\n handlers: function handlers(event, _handlers) {\n var i,\n matches,\n sel,\n handleObj,\n handlerQueue = [],\n delegateCount = _handlers.delegateCount,\n cur = event.target; // Support (at least): Chrome, IE9\n // Find delegate handlers\n // Black-hole SVG instance trees (#13180)\n //\n // Support: Firefox<=42+\n // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\n if (delegateCount && cur.nodeType && (event.type !== \"click\" || isNaN(event.button) || event.button < 1)) {\n /* jshint eqeqeq: false */\n for (; cur != this; cur = cur.parentNode || this) {\n /* jshint eqeqeq: true */\n // Don't check non-elements (#13208)\n // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n if (cur.nodeType === 1 && (cur.disabled !== true || event.type !== \"click\")) {\n matches = [];\n\n for (i = 0; i < delegateCount; i++) {\n handleObj = _handlers[i]; // Don't conflict with Object.prototype properties (#13203)\n\n sel = handleObj.selector + \" \";\n\n if (matches[sel] === undefined) {\n matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;\n }\n\n if (matches[sel]) {\n matches.push(handleObj);\n }\n }\n\n if (matches.length) {\n handlerQueue.push({\n elem: cur,\n handlers: matches\n });\n }\n }\n }\n } // Add the remaining (directly-bound) handlers\n\n\n if (delegateCount < _handlers.length) {\n handlerQueue.push({\n elem: this,\n handlers: _handlers.slice(delegateCount)\n });\n }\n\n return handlerQueue;\n },\n fix: function fix(event) {\n if (event[jQuery.expando]) {\n return event;\n } // Create a writable copy of the event object and normalize some properties\n\n\n var i,\n prop,\n copy,\n type = event.type,\n originalEvent = event,\n fixHook = this.fixHooks[type];\n\n if (!fixHook) {\n this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(type) ? this.keyHooks : {};\n }\n\n copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;\n event = new jQuery.Event(originalEvent);\n i = copy.length;\n\n while (i--) {\n prop = copy[i];\n event[prop] = originalEvent[prop];\n } // Support: IE<9\n // Fix target property (#1925)\n\n\n if (!event.target) {\n event.target = originalEvent.srcElement || document;\n } // Support: Safari 6-8+\n // Target should not be a text node (#504, #13143)\n\n\n if (event.target.nodeType === 3) {\n event.target = event.target.parentNode;\n } // Support: IE<9\n // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\n\n event.metaKey = !!event.metaKey;\n return fixHook.filter ? fixHook.filter(event, originalEvent) : event;\n },\n // Includes some event props shared by KeyEvent and MouseEvent\n props: (\"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" + \"metaKey relatedTarget shiftKey target timeStamp view which\").split(\" \"),\n fixHooks: {},\n keyHooks: {\n props: \"char charCode key keyCode\".split(\" \"),\n filter: function filter(event, original) {\n // Add which for key events\n if (event.which == null) {\n event.which = original.charCode != null ? original.charCode : original.keyCode;\n }\n\n return event;\n }\n },\n mouseHooks: {\n props: (\"button buttons clientX clientY fromElement offsetX offsetY \" + \"pageX pageY screenX screenY toElement\").split(\" \"),\n filter: function filter(event, original) {\n var body,\n eventDoc,\n doc,\n button = original.button,\n fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available\n\n if (event.pageX == null && original.clientX != null) {\n eventDoc = event.target.ownerDocument || document;\n doc = eventDoc.documentElement;\n body = eventDoc.body;\n event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n } // Add relatedTarget, if necessary\n\n\n if (!event.relatedTarget && fromElement) {\n event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\n } // Add which for click: 1 === left; 2 === middle; 3 === right\n // Note: button is not normalized, so don't use it\n\n\n if (!event.which && button !== undefined) {\n event.which = button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0;\n }\n\n return event;\n }\n },\n special: {\n load: {\n // Prevent triggered image.load events from bubbling to window.load\n noBubble: true\n },\n focus: {\n // Fire native event if possible so blur/focus sequence is correct\n trigger: function trigger() {\n if (this !== safeActiveElement() && this.focus) {\n try {\n this.focus();\n return false;\n } catch (e) {// Support: IE<9\n // If we error on focus to hidden element (#1486, #12518),\n // let .trigger() run the handlers\n }\n }\n },\n delegateType: \"focusin\"\n },\n blur: {\n trigger: function trigger() {\n if (this === safeActiveElement() && this.blur) {\n this.blur();\n return false;\n }\n },\n delegateType: \"focusout\"\n },\n click: {\n // For checkbox, fire native event so checked state will be right\n trigger: function trigger() {\n if (jQuery.nodeName(this, \"input\") && this.type === \"checkbox\" && this.click) {\n this.click();\n return false;\n }\n },\n // For cross-browser consistency, don't fire native .click() on links\n _default: function _default(event) {\n return jQuery.nodeName(event.target, \"a\");\n }\n },\n beforeunload: {\n postDispatch: function postDispatch(event) {\n // Support: Firefox 20+\n // Firefox doesn't alert if the returnValue field is not set.\n if (event.result !== undefined && event.originalEvent) {\n event.originalEvent.returnValue = event.result;\n }\n }\n }\n },\n // Piggyback on a donor event to simulate a different one\n simulate: function simulate(type, elem, event) {\n var e = jQuery.extend(new jQuery.Event(), event, {\n type: type,\n isSimulated: true // Previously, `originalEvent: {}` was set here, so stopPropagation call\n // would not be triggered on donor event, since in our own\n // jQuery.event.stopPropagation function we had a check for existence of\n // originalEvent.stopPropagation method, so, consequently it would be a noop.\n //\n // Guard for simulated events was moved to jQuery.event.stopPropagation function\n // since `originalEvent` should point to the original event for the\n // constancy with other events and for more focused logic\n\n });\n jQuery.event.trigger(e, null, elem);\n\n if (e.isDefaultPrevented()) {\n event.preventDefault();\n }\n }\n };\n jQuery.removeEvent = document.removeEventListener ? function (elem, type, handle) {\n // This \"if\" is needed for plain objects\n if (elem.removeEventListener) {\n elem.removeEventListener(type, handle);\n }\n } : function (elem, type, handle) {\n var name = \"on\" + type;\n\n if (elem.detachEvent) {\n // #8545, #7054, preventing memory leaks for custom events in IE6-8\n // detachEvent needed property on element, by name of that event,\n // to properly expose it to GC\n if (typeof elem[name] === \"undefined\") {\n elem[name] = null;\n }\n\n elem.detachEvent(name, handle);\n }\n };\n\n jQuery.Event = function (src, props) {\n // Allow instantiation without the 'new' keyword\n if (!(this instanceof jQuery.Event)) {\n return new jQuery.Event(src, props);\n } // Event object\n\n\n if (src && src.type) {\n this.originalEvent = src;\n this.type = src.type; // Events bubbling up the document may have been marked as prevented\n // by a handler lower down the tree; reflect the correct value.\n\n this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: IE < 9, Android < 4.0\n src.returnValue === false ? returnTrue : returnFalse; // Event type\n } else {\n this.type = src;\n } // Put explicitly provided properties onto the event object\n\n\n if (props) {\n jQuery.extend(this, props);\n } // Create a timestamp if incoming event doesn't have one\n\n\n this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed\n\n this[jQuery.expando] = true;\n }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\n\n\n jQuery.Event.prototype = {\n constructor: jQuery.Event,\n isDefaultPrevented: returnFalse,\n isPropagationStopped: returnFalse,\n isImmediatePropagationStopped: returnFalse,\n preventDefault: function preventDefault() {\n var e = this.originalEvent;\n this.isDefaultPrevented = returnTrue;\n\n if (!e) {\n return;\n } // If preventDefault exists, run it on the original event\n\n\n if (e.preventDefault) {\n e.preventDefault(); // Support: IE\n // Otherwise set the returnValue property of the original event to false\n } else {\n e.returnValue = false;\n }\n },\n stopPropagation: function stopPropagation() {\n var e = this.originalEvent;\n this.isPropagationStopped = returnTrue;\n\n if (!e || this.isSimulated) {\n return;\n } // If stopPropagation exists, run it on the original event\n\n\n if (e.stopPropagation) {\n e.stopPropagation();\n } // Support: IE\n // Set the cancelBubble property of the original event to true\n\n\n e.cancelBubble = true;\n },\n stopImmediatePropagation: function stopImmediatePropagation() {\n var e = this.originalEvent;\n this.isImmediatePropagationStopped = returnTrue;\n\n if (e && e.stopImmediatePropagation) {\n e.stopImmediatePropagation();\n }\n\n this.stopPropagation();\n }\n }; // Create mouseenter/leave events using mouseover/out and event-time checks\n // so that event delegation works in jQuery.\n // Do the same for pointerenter/pointerleave and pointerover/pointerout\n //\n // Support: Safari 7 only\n // Safari sends mouseenter too often; see:\n // https://code.google.com/p/chromium/issues/detail?id=470258\n // for the description of the bug (it existed in older Chrome versions as well).\n\n jQuery.each({\n mouseenter: \"mouseover\",\n mouseleave: \"mouseout\",\n pointerenter: \"pointerover\",\n pointerleave: \"pointerout\"\n }, function (orig, fix) {\n jQuery.event.special[orig] = {\n delegateType: fix,\n bindType: fix,\n handle: function handle(event) {\n var ret,\n target = this,\n related = event.relatedTarget,\n handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n\n if (!related || related !== target && !jQuery.contains(target, related)) {\n event.type = handleObj.origType;\n ret = handleObj.handler.apply(this, arguments);\n event.type = fix;\n }\n\n return ret;\n }\n };\n }); // IE submit delegation\n\n if (!support.submit) {\n jQuery.event.special.submit = {\n setup: function setup() {\n // Only need this for delegated form submit events\n if (jQuery.nodeName(this, \"form\")) {\n return false;\n } // Lazy-add a submit handler when a descendant form may potentially be submitted\n\n\n jQuery.event.add(this, \"click._submit keypress._submit\", function (e) {\n // Node name check avoids a VML-related crash in IE (#9807)\n var elem = e.target,\n form = jQuery.nodeName(elem, \"input\") || jQuery.nodeName(elem, \"button\") ? // Support: IE <=8\n // We use jQuery.prop instead of elem.form\n // to allow fixing the IE8 delegated submit issue (gh-2332)\n // by 3rd party polyfills/workarounds.\n jQuery.prop(elem, \"form\") : undefined;\n\n if (form && !jQuery._data(form, \"submit\")) {\n jQuery.event.add(form, \"submit._submit\", function (event) {\n event._submitBubble = true;\n });\n\n jQuery._data(form, \"submit\", true);\n }\n }); // return undefined since we don't need an event listener\n },\n postDispatch: function postDispatch(event) {\n // If form was submitted by the user, bubble the event up the tree\n if (event._submitBubble) {\n delete event._submitBubble;\n\n if (this.parentNode && !event.isTrigger) {\n jQuery.event.simulate(\"submit\", this.parentNode, event);\n }\n }\n },\n teardown: function teardown() {\n // Only need this for delegated form submit events\n if (jQuery.nodeName(this, \"form\")) {\n return false;\n } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\n\n jQuery.event.remove(this, \"._submit\");\n }\n };\n } // IE change delegation and checkbox/radio fix\n\n\n if (!support.change) {\n jQuery.event.special.change = {\n setup: function setup() {\n if (rformElems.test(this.nodeName)) {\n // IE doesn't fire change on a check/radio until blur; trigger it on click\n // after a propertychange. Eat the blur-change in special.change.handle.\n // This still fires onchange a second time for check/radio after blur.\n if (this.type === \"checkbox\" || this.type === \"radio\") {\n jQuery.event.add(this, \"propertychange._change\", function (event) {\n if (event.originalEvent.propertyName === \"checked\") {\n this._justChanged = true;\n }\n });\n jQuery.event.add(this, \"click._change\", function (event) {\n if (this._justChanged && !event.isTrigger) {\n this._justChanged = false;\n } // Allow triggered, simulated change events (#11500)\n\n\n jQuery.event.simulate(\"change\", this, event);\n });\n }\n\n return false;\n } // Delegated event; lazy-add a change handler on descendant inputs\n\n\n jQuery.event.add(this, \"beforeactivate._change\", function (e) {\n var elem = e.target;\n\n if (rformElems.test(elem.nodeName) && !jQuery._data(elem, \"change\")) {\n jQuery.event.add(elem, \"change._change\", function (event) {\n if (this.parentNode && !event.isSimulated && !event.isTrigger) {\n jQuery.event.simulate(\"change\", this.parentNode, event);\n }\n });\n\n jQuery._data(elem, \"change\", true);\n }\n });\n },\n handle: function handle(event) {\n var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above\n\n if (this !== elem || event.isSimulated || event.isTrigger || elem.type !== \"radio\" && elem.type !== \"checkbox\") {\n return event.handleObj.handler.apply(this, arguments);\n }\n },\n teardown: function teardown() {\n jQuery.event.remove(this, \"._change\");\n return !rformElems.test(this.nodeName);\n }\n };\n } // Support: Firefox\n // Firefox doesn't have focus(in | out) events\n // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n //\n // Support: Chrome, Safari\n // focus(in | out) events fire after focus & blur events,\n // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n // Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\n\n\n if (!support.focusin) {\n jQuery.each({\n focus: \"focusin\",\n blur: \"focusout\"\n }, function (orig, fix) {\n // Attach a single capturing handler on the document while someone wants focusin/focusout\n var handler = function handler(event) {\n jQuery.event.simulate(fix, event.target, jQuery.event.fix(event));\n };\n\n jQuery.event.special[fix] = {\n setup: function setup() {\n var doc = this.ownerDocument || this,\n attaches = jQuery._data(doc, fix);\n\n if (!attaches) {\n doc.addEventListener(orig, handler, true);\n }\n\n jQuery._data(doc, fix, (attaches || 0) + 1);\n },\n teardown: function teardown() {\n var doc = this.ownerDocument || this,\n attaches = jQuery._data(doc, fix) - 1;\n\n if (!attaches) {\n doc.removeEventListener(orig, handler, true);\n\n jQuery._removeData(doc, fix);\n } else {\n jQuery._data(doc, fix, attaches);\n }\n }\n };\n });\n }\n\n jQuery.fn.extend({\n on: function on(types, selector, data, fn) {\n return _on(this, types, selector, data, fn);\n },\n one: function one(types, selector, data, fn) {\n return _on(this, types, selector, data, fn, 1);\n },\n off: function off(types, selector, fn) {\n var handleObj, type;\n\n if (types && types.preventDefault && types.handleObj) {\n // ( event ) dispatched jQuery.Event\n handleObj = types.handleObj;\n jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);\n return this;\n }\n\n if (_typeof(types) === \"object\") {\n // ( types-object [, selector] )\n for (type in types) {\n this.off(type, selector, types[type]);\n }\n\n return this;\n }\n\n if (selector === false || typeof selector === \"function\") {\n // ( types [, fn] )\n fn = selector;\n selector = undefined;\n }\n\n if (fn === false) {\n fn = returnFalse;\n }\n\n return this.each(function () {\n jQuery.event.remove(this, types, fn, selector);\n });\n },\n trigger: function trigger(type, data) {\n return this.each(function () {\n jQuery.event.trigger(type, data, this);\n });\n },\n triggerHandler: function triggerHandler(type, data) {\n var elem = this[0];\n\n if (elem) {\n return jQuery.event.trigger(type, data, elem, true);\n }\n }\n });\n var rinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n rnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\n rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n // Support: IE 10-11, Edge 10240+\n // In IE/Edge using regex groups here causes severe slowdowns.\n // See https://connect.microsoft.com/IE/feedback/details/1736512/\n rnoInnerhtml = /