8bitworkshop/gen/chunk-JNII2TLU.js.map

8 lines
900 KiB
Plaintext

{
"version": 3,
"sources": ["../node_modules/localforage/dist/localforage.js", "../node_modules/jquery/dist/jquery.js", "../src/ide/ui.ts", "../src/common/workertypes.ts", "../src/ide/project.ts", "../src/ide/windows.ts", "../src/ide/services.ts", "../src/ide/views/baseviews.ts", "../src/ide/views/editors.ts", "../src/ide/views/debugviews.ts", "../src/ide/pixeleditor.ts", "../src/ide/views/asseteditor.ts", "../src/ide/views/treeviews.ts", "../src/ide/dialogs.ts", "../src/ide/sync.ts", "../src/ide/analytics.ts", "../src/common/audio/CommodoreTape.ts", "../src/ide/shareexport.ts"],
"sourcesContent": ["/*!\n localForage -- Offline Storage, Improved\n Version 1.10.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n if (Mutation) {\n var called = 0;\n var observer = new Mutation(nextTick);\n var element = global.document.createTextNode('');\n observer.observe(element, {\n characterData: true\n });\n scheduleDrain = function () {\n element.data = (called = ++called % 2);\n };\n } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n var channel = new global.MessageChannel();\n channel.port1.onmessage = nextTick;\n scheduleDrain = function () {\n channel.port2.postMessage(0);\n };\n } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n scheduleDrain = function () {\n\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {\n return;\n }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb || !idb.open) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support\n // (see: https://github.com/pouchdb/pouchdb/issues/5572).\n // Safari 10.1 shipped with fetch, we can use that to detect it.\n // Note: this creates issues with `window.fetch` polyfills and\n // overrides; see:\n // https://github.com/localForage/localForage/issues/856\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n // See: https://github.com/mozilla/localForage/issues/128\n // See: https://github.com/mozilla/localForage/issues/272\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\nfunction normalizeKey(key) {\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n return key;\n}\n\nfunction getCallback() {\n if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n return arguments[arguments.length - 1];\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve, reject) {\n deferredOperation.resolve = resolve;\n deferredOperation.reject = reject;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n return deferredOperation.promise;\n }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Reject its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.reject(err);\n return deferredOperation.promise;\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n var db = openreq.result;\n db.onversionchange = function (e) {\n // Triggered when the database is modified (e.g. adding an objectStore) or\n // deleted (even when initiated by other sessions in different tabs).\n // Closing the connection here prevents those operations from being blocked.\n // If the database is accessed again later by this instance, the connection\n // will be reopened or the database recreated as needed.\n e.target.close();\n };\n resolve(db);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n _deferReadiness(dbInfo);\n\n var dbContext = dbContexts[dbInfo.name];\n var forages = dbContext.forages;\n\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n if (forage._dbInfo.db) {\n forage._dbInfo.db.close();\n forage._dbInfo.db = null;\n }\n }\n dbInfo.db = null;\n\n return _getOriginalConnection(dbInfo).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n // store the latest db reference\n // in case the db was upgraded\n dbInfo.db = dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n })[\"catch\"](function (err) {\n _rejectReadiness(dbInfo, err);\n throw err;\n });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n if (retries === undefined) {\n retries = 1;\n }\n\n try {\n var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n callback(null, tx);\n } catch (err) {\n if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n return Promise$1.resolve().then(function () {\n if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n // increase the db version, to create the new ObjectStore\n if (dbInfo.db) {\n dbInfo.version = dbInfo.db.version + 1;\n }\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n }).then(function () {\n return _tryReconnect(dbInfo).then(function () {\n createTransaction(dbInfo, mode, callback, retries - 1);\n });\n })[\"catch\"](callback);\n }\n\n callback(err);\n }\n}\n\nfunction createDbContext() {\n return {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = createDbContext();\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n // when the iterator callback returns any\n // (non-`undefined`) value, then we stop\n // the iteration immediately\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n var req = store.put(value, key);\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var advanced = false;\n var req = store.openKeyCursor();\n\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openKeyCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n return db;\n });\n\n if (!options.storeName) {\n promise = dbPromise.then(function (db) {\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n }\n\n var dropDBPromise = new Promise$1(function (resolve, reject) {\n var req = idb.deleteDatabase(options.name);\n\n req.onerror = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n reject(req.error);\n };\n\n req.onblocked = function () {\n // Closing all open connections in onversionchange handler should prevent this situation, but if\n // we do get here, it just means the request remains pending - eventually it will succeed or error\n console.warn('dropInstance blocked for database \"' + options.name + '\" until all open connections are closed');\n };\n\n req.onsuccess = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n resolve(db);\n };\n });\n\n return dropDBPromise.then(function (db) {\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n var _forage = forages[i];\n _advanceReadiness(_forage._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n } else {\n promise = dbPromise.then(function (db) {\n if (!db.objectStoreNames.contains(options.storeName)) {\n return;\n }\n\n var newVersion = db.version + 1;\n\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n forage._dbInfo.version = newVersion;\n }\n\n var dropObjectPromise = new Promise$1(function (resolve, reject) {\n var req = idb.open(options.name, newVersion);\n\n req.onerror = function (err) {\n var db = req.result;\n db.close();\n reject(err);\n };\n\n req.onupgradeneeded = function () {\n var db = req.result;\n db.deleteObjectStore(options.storeName);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n db.close();\n resolve(db);\n };\n });\n\n return dropObjectPromise.then(function (db) {\n dbContext.db = db;\n for (var j = 0; j < forages.length; j++) {\n var _forage2 = forages[j];\n _forage2._dbInfo.db = db;\n _advanceReadiness(_forage2._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n }\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n _support: isIndexedDBValid(),\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys,\n dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n createDbTable(t, dbInfo, function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n }, reject);\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n t.executeSql(sqlStatement, args, callback, function (t, error) {\n if (error.code === error.SYNTAX_ERR) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n if (!results.rows.length) {\n // if the table is missing (was deleted)\n // re-create it table and retry\n createDbTable(t, dbInfo, function () {\n t.executeSql(sqlStatement, args, callback, errorCallback);\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n return new Promise$1(function (resolve, reject) {\n db.transaction(function (t) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n var storeNames = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n storeNames.push(results.rows.item(i).name);\n }\n\n resolve({\n db: db,\n storeNames: storeNames\n });\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n}\n\nfunction dropInstance$1(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n var db;\n if (options.name === currentConfig.name) {\n // use the db reference of the current instance\n db = self._dbInfo.db;\n } else {\n db = openDatabase(options.name, '', '', 0);\n }\n\n if (!options.storeName) {\n // drop all database tables\n resolve(getAllStoreNames(db));\n } else {\n resolve({\n db: db,\n storeNames: [options.storeName]\n });\n }\n }).then(function (operationInfo) {\n return new Promise$1(function (resolve, reject) {\n operationInfo.db.transaction(function (t) {\n function dropTable(storeName) {\n return new Promise$1(function (resolve, reject) {\n t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n }\n\n var operations = [];\n for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n operations.push(dropTable(operationInfo.storeNames[i]));\n }\n\n Promise$1.all(operations).then(function () {\n resolve();\n })[\"catch\"](function (e) {\n reject(e);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n _support: isWebSQLValid(),\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1,\n dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n // in IE8 typeof localStorage.setItem === 'object'\n !!localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n var keyPrefix = options.name + '/';\n\n if (options.storeName !== defaultConfig.storeName) {\n keyPrefix += options.storeName + '/';\n }\n return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n var localStorageTestKey = '_localforage_support_test';\n\n try {\n localStorage.setItem(localStorageTestKey, true);\n localStorage.removeItem(localStorageTestKey);\n\n return false;\n } catch (e) {\n return true;\n }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n if (!_isLocalStorageUsable()) {\n return Promise$1.reject();\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n var itemKey = localStorage.key(i);\n if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n var currentConfig = this.config();\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n if (!options.storeName) {\n resolve(options.name + '/');\n } else {\n resolve(_getKeyPrefix(options, self._defaultConfig));\n }\n }).then(function (keyPrefix) {\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n _support: isLocalStorageValid(),\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2,\n dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n var len = array.length;\n var i = 0;\n while (i < len) {\n if (sameValue(array[i], searchElement)) {\n return true;\n }\n i++;\n }\n\n return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n INDEXEDDB: asyncStorage,\n WEBSQL: webSQLStorage,\n LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var _key in arg) {\n if (arg.hasOwnProperty(_key)) {\n if (isArray(arg[_key])) {\n arguments[0][_key] = arg[_key].slice();\n } else {\n arguments[0][_key] = arg[_key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n for (var driverTypeKey in DefaultDrivers) {\n if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n var driver = DefaultDrivers[driverTypeKey];\n var driverName = driver._driver;\n this[driverTypeKey] = driverName;\n\n if (!DefinedDrivers[driverName]) {\n // we don't need to wait for the promise,\n // since the default drivers can be defined\n // in a blocking manner\n this.defineDriver(driver);\n }\n }\n }\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n\n var driverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0, len = driverMethods.length; i < len; i++) {\n var driverMethodName = driverMethods[i];\n\n // when the property is there,\n // it should be a method even when optional\n var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var configureMissingMethods = function configureMissingMethods() {\n var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n return function () {\n var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n var promise = Promise$1.reject(error);\n executeCallback(promise, arguments[arguments.length - 1]);\n return promise;\n };\n };\n\n for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n var optionalDriverMethod = OptionalDriverMethods[_i];\n if (!driverObject[optionalDriverMethod]) {\n driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n }\n }\n };\n\n configureMissingMethods();\n\n var setDriverSupport = function setDriverSupport(support) {\n if (DefinedDrivers[driverName]) {\n console.info('Redefining LocalForage driver: ' + driverName);\n }\n DefinedDrivers[driverName] = driverObject;\n DriverSupport[driverName] = support;\n // don't use a then, so that we can define\n // drivers that have simple _support methods\n // in a blocking manner\n resolve();\n };\n\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n driverObject._support().then(setDriverSupport, reject);\n } else {\n setDriverSupport(!!driverObject._support);\n }\n } else {\n setDriverSupport(true);\n }\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!DriverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n", "/*!\n * jQuery JavaScript Library v3.6.3\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2022-12-20T21:28Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.3\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.9\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2022-12-19\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// `qSA` may not throw for unrecognized parts using forgiving parsing:\n\t\t\t\t\t// https://drafts.csswg.org/selectors/#forgiving-selector\n\t\t\t\t\t// like the `:has()` pseudo-class:\n\t\t\t\t\t// https://drafts.csswg.org/selectors/#relational\n\t\t\t\t\t// `CSS.supports` is still expected to return `false` then:\n\t\t\t\t\t// https://drafts.csswg.org/css-conditional-4/#typedef-supports-selector-fn\n\t\t\t\t\t// https://drafts.csswg.org/css-conditional-4/#dfn-support-selector\n\t\t\t\t\tif ( support.cssSupportsSelector &&\n\n\t\t\t\t\t\t// eslint-disable-next-line no-undef\n\t\t\t\t\t\t!CSS.supports( \"selector(:is(\" + newSelector + \"))\" ) ) {\n\n\t\t\t\t\t\t// Support: IE 11+\n\t\t\t\t\t\t// Throw to get to the same code path as an error directly in qSA.\n\t\t\t\t\t\t// Note: once we only support browser supporting\n\t\t\t\t\t\t// `CSS.supports('selector(...)')`, we can most likely drop\n\t\t\t\t\t\t// the `try-catch`. IE doesn't implement the API.\n\t\t\t\t\t\tthrow new Error();\n\t\t\t\t\t}\n\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\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 */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\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 */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\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 */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\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 */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\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 */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\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 */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t// Support: Chrome 105+, Firefox 104+, Safari 15.4+\n\t// Make sure forgiving mode is not used in `CSS.supports( \"selector(...)\" )`.\n\t//\n\t// `:is()` uses a forgiving selector list as an argument and is widely\n\t// implemented, so it's a good one to test against.\n\tsupport.cssSupportsSelector = assert( function() {\n\t\t/* eslint-disable no-undef */\n\n\t\treturn CSS.supports( \"selector(*)\" ) &&\n\n\t\t\t// Support: Firefox 78-81 only\n\t\t\t// In old Firefox, `:is()` didn't use forgiving parsing. In that case,\n\t\t\t// fail this test as there's no selector to test against that.\n\t\t\t// `CSS.supports` uses unforgiving parsing\n\t\t\tdocument.querySelectorAll( \":is(:jqfake)\" ) &&\n\n\t\t\t// `*` is needed as Safari & newer Chrome implemented something in between\n\t\t\t// for `:has()` - it throws in `qSA` if it only contains an unsupported\n\t\t\t// argument but multiple ones, one of which is supported, are fine.\n\t\t\t// We want to play safe in case `:is()` gets the same treatment.\n\t\t\t!CSS.supports( \"selector(:is(*,:jqfake))\" );\n\n\t\t/* eslint-enable */\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\tif ( !support.cssSupportsSelector ) {\n\n\t\t// Support: Chrome 105+, Safari 15.4+\n\t\t// `:has()` uses a forgiving selector list as an argument so our regular\n\t\t// `try-catch` mechanism fails to catch `:has()` with arguments not supported\n\t\t// natively like `:has(:contains(\"Foo\"))`. Where supported & spec-compliant,\n\t\t// we now use `CSS.supports(\"selector(:is(SELECTOR_TO_BE_TESTED))\")`, but\n\t\t// outside that we mark `:has` as buggy.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\n\t\t\t// Support: IE <9 only\n\t\t\t// IE doesn't have `contains` on `document` so we need to check for\n\t\t\t// `documentElement` presence.\n\t\t\t// We need to fall back to `a` when `documentElement` is missing\n\t\t\t// as `ownerDocument` of elements within `<template/>` may have\n\t\t\t// a null one - a default behavior of all modern browsers.\n\t\t\tvar adown = a.nodeType === 9 && a.documentElement || a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\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 */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\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 */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\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 */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: Chrome 86+\n\t\t\t\t\t\t// In Chrome, if an element having a focusout handler is blurred by\n\t\t\t\t\t\t// clicking outside of it, it invokes the handler synchronously. If\n\t\t\t\t\t\t// that handler calls `.remove()` on the element, the data is cleared,\n\t\t\t\t\t\t// leaving `result` undefined. We need to guard against this.\n\t\t\t\t\t\treturn result && result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\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://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t// .css('filter') (IE 9 only, trac-12537)\n\t// .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\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 <=48 - 49, Safari <=9.0 - 9.1\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://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t// documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n", "\n// 8bitworkshop IDE user interface\n\nimport * as localforage from \"localforage\";\nimport { CodeProject, createNewPersistentStore, LocalForageFilesystem, OverlayFilesystem, ProjectFilesystem, WebPresetsFileSystem } from \"./project\";\nimport { WorkerResult, WorkerError, FileData } from \"../common/workertypes\";\nimport { ProjectWindows } from \"./windows\";\nimport { Platform, Preset, DebugSymbols, DebugEvalCondition, isDebuggable, EmuState } from \"../common/baseplatform\";\nimport { PLATFORMS, EmuHalt } from \"../common/emu\";\nimport { Toolbar } from \"./toolbar\";\nimport { getFilenameForPath, getFilenamePrefix, highlightDifferences, byteArrayToString, compressLZG, stringToByteArray,\n byteArrayToUTF8, isProbablyBinary, getWithBinary, getBasePlatform, getRootBasePlatform, hex, loadScript, decodeQueryString, parseBool, getCookie } from \"../common/util\";\nimport { StateRecorderImpl } from \"../common/recorder\";\nimport { getRepos, parseGithubURL } from \"./services\";\nimport Split = require('split.js');\nimport { importPlatform } from \"../platform/_index\";\nimport { DisassemblerView, ListingView, PC_LINE_LOOKAHEAD , SourceEditor } from \"./views/editors\";\nimport { AddressHeatMapView, BinaryFileView, MemoryMapView, MemoryView, ProbeLogView, ProbeSymbolView, RasterStackMapView, ScanlineIOView, VRAMMemoryView } from \"./views/debugviews\";\nimport { AssetEditorView } from \"./views/asseteditor\";\nimport { isMobileDevice } from \"./views/baseviews\";\nimport { CallStackView, DebugBrowserView } from \"./views/treeviews\";\nimport DOMPurify = require(\"dompurify\");\nimport { alertError, alertInfo, fatalError, setWaitDialog, setWaitProgress } from \"./dialogs\";\nimport { _importProjectFromGithub, _loginToGithub, _logoutOfGithub, _publishProjectToGithub, _pullProjectFromGithub, _pushProjectToGithub, _removeRepository, importProjectFromGithub } from \"./sync\";\nimport { gaEvent, gaPageView } from \"./analytics\";\nimport { _downloadAllFilesZipFile, _downloadCassetteFile, _downloadProjectZipFile, _downloadROMImage, _downloadSourceFile, _downloadSymFile, _getCassetteFunction, _recordVideo, _shareEmbedLink } from \"./shareexport\";\n\n// external libs (TODO)\ndeclare var Tour;\ndeclare var $ : JQueryStatic; // use browser jquery\n\n// query string \n\ninterface UIQueryString {\n platform? : string;\n options?: string;\n repo? : string;\n file? : string;\n electron? : string;\n importURL? : string;\n githubURL? : string;\n localfs? : string;\n newfile? : string;\n embed? : string;\n ignore? : string;\n force? : string;\n highlight? : string;\n file0_name? : string;\n file0_data? : string;\n file0_type? : string;\n tool?: string;\n}\n\n/// EXPORTED GLOBALS (TODO: remove)\n\nexport var qs = decodeQueryString(window.location.search||'?') as UIQueryString;\n\nexport var platform_id : string;\t// platform ID string (platform)\nexport var store_id : string;\t\t// store ID string (repo || platform)\nexport var repo_id : string;\t\t// repository ID (repo)\nexport var platform : Platform;\t\t// emulator object\nexport var current_project : CodeProject;\t// current CodeProject object\nexport var projectWindows : ProjectWindows;\t// window manager\nexport var lastDebugState : EmuState;\t// last debug state (object)\n\n// private globals\n\nvar compparams;\t\t\t// received build params from worker\nvar platform_name : string;\t// platform name (after setPlatformUI)\nvar toolbar = $(\"#controls_top\");\nvar uitoolbar : Toolbar;\nvar stateRecorder : StateRecorderImpl;\nvar userPaused : boolean;\t\t// did user explicitly pause?\nvar current_output : any; // current ROM (or other object)\nvar current_preset : Preset;\t// current preset object (if selected)\nvar store : LocalForage;\t\t\t// persistent store\n\nconst isElectron = parseBool(qs.electron);\nconst isEmbed = parseBool(qs.embed);\n\n\ntype DebugCommandType = null \n | 'toline' | 'step' | 'stepout' | 'stepover' \n | 'tovsync' | 'stepback' | 'restart';\n\nvar lastDebugInfo;\t\t// last debug info (CPU text)\nvar debugCategory;\t\t// current debug category\nvar debugTickPaused = false;\nvar recorderActive = false;\nvar lastViewClicked : string = null;\nvar lastDebugCommand : DebugCommandType = null;\nvar errorWasRuntime = false;\nvar lastBreakExpr = \"c.PC == 0x6000\";\n\nexport function getPlatformStore() {\n return store;\n}\nexport function getCurrentProject() {\n return current_project;\n}\nexport function getCurrentOutput() {\n return current_output;\n}\nexport function getWorkerParams() {\n return compparams;\n}\n\n// TODO: codemirror multiplex support?\n// TODO: move to views.ts?\nconst TOOL_TO_SOURCE_STYLE = {\n 'dasm': '6502',\n 'acme': '6502',\n 'cc65': 'text/x-csrc',\n 'ca65': '6502',\n 'nesasm': '6502',\n 'z80asm': 'z80',\n 'sdasz80': 'z80',\n 'sdcc': 'text/x-csrc',\n 'verilator': 'verilog',\n 'jsasm': 'z80',\n 'zmac': 'z80',\n 'bataribasic': 'bataribasic',\n 'markdown': 'markdown',\n 'js': 'javascript',\n 'xasm6809': 'z80',\n 'cmoc': 'text/x-csrc',\n 'yasm': 'gas',\n 'smlrc': 'text/x-csrc',\n 'inform6': 'inform6',\n 'fastbasic': 'fastbasic',\n 'basic': 'basic',\n 'silice': 'verilog',\n 'wiz': 'text/x-wiz',\n 'vasmarm': 'vasm',\n 'armips': 'vasm',\n 'ecs': 'ecs',\n 'remote:llvm-mos': 'text/x-csrc',\n 'cc7800': 'text/x-csrc',\n 'armtcc': 'text/x-csrc',\n}\n\n// TODO: move into tool class\nconst TOOL_TO_HELPURL = {\n 'dasm': 'https://raw.githubusercontent.com/sehugg/dasm/master/doc/dasm.txt',\n 'cc65': 'https://cc65.github.io/doc/cc65.html',\n 'ca65': 'https://cc65.github.io/doc/ca65.html',\n 'sdcc': 'http://sdcc.sourceforge.net/doc/sdccman.pdf',\n 'verilator': 'https://www.veripool.org/ftp/verilator_doc.pdf',\n 'fastbasic': 'https://github.com/dmsc/fastbasic/blob/master/manual.md',\n 'bataribasic': \"help/bataribasic/manual.html\",\n 'wiz': \"https://github.com/wiz-lang/wiz/blob/master/readme.md#wiz\",\n 'silice': \"https://github.com/sylefeb/Silice\",\n 'zmac': \"https://raw.githubusercontent.com/sehugg/zmac/master/doc.txt\",\n 'cmoc': \"http://perso.b2b2c.ca/~sarrazip/dev/cmoc.html\",\n 'remote:llvm-mos': 'https://llvm-mos.org/wiki/Welcome',\n 'acme': 'https://raw.githubusercontent.com/sehugg/acme/main/docs/QuickRef.txt',\n}\n\nfunction newWorker() : Worker {\n // TODO: return new Worker(\"https://8bitworkshop.com.s3-website-us-east-1.amazonaws.com/dev/gen/worker/bundle.js\");\n return new Worker(\"./gen/worker/bundle.js\");\n}\n\nconst hasLocalStorage : boolean = function() {\n try {\n const key = \"__some_random_key_you_are_not_going_to_use__\";\n localStorage.setItem(key, key);\n var has = localStorage.getItem(key) == key;\n localStorage.removeItem(key);\n return has;\n } catch (e) {\n return false;\n }\n}();\n\n// wrapper for localstorage\nclass UserPrefs {\n setLastPreset(id:string) {\n if (hasLocalStorage && !isEmbed) {\n if (repo_id && platform_id && !isElectron)\n localStorage.setItem(\"__lastrepo_\" + platform_id, repo_id);\n else\n localStorage.removeItem(\"__lastrepo_\" + platform_id);\n localStorage.setItem(\"__lastplatform\", platform_id);\n localStorage.setItem(\"__lastid_\" + store_id, id);\n }\n }\n unsetLastPreset() {\n if (hasLocalStorage && !isEmbed) {\n delete qs.file;\n localStorage.removeItem(\"__lastid_\"+store_id);\n }\n }\n getLastPreset() {\n return hasLocalStorage && !isEmbed && localStorage.getItem(\"__lastid_\"+store_id);\n }\n getLastPlatformID() {\n return hasLocalStorage && !isEmbed && localStorage.getItem(\"__lastplatform\");\n }\n getLastRepoID(platform: string) {\n return hasLocalStorage && !isEmbed && platform && localStorage.getItem(\"__lastrepo_\" + platform);\n }\n shouldCompleteTour() {\n return hasLocalStorage && !isEmbed && !localStorage.getItem(\"8bitworkshop.hello\");\n }\n completedTour() {\n if (hasLocalStorage && !isEmbed) localStorage.setItem(\"8bitworkshop.hello\", \"true\");\n }\n}\n\nvar userPrefs = new UserPrefs();\n\n// https://developers.google.com/web/updates/2016/06/persistent-storage\nfunction requestPersistPermission(interactive: boolean, failureonly: boolean) {\n if (navigator.storage && navigator.storage.persist) {\n navigator.storage.persist().then(persistent=>{\n console.log(\"requestPersistPermission =\", persistent);\n if (persistent) {\n interactive && !failureonly && alertInfo(\"Your browser says it will persist your local file edits, but you may want to back up your work anyway.\");\n } else {\n interactive && alertError(\"Your browser refused to expand the peristent storage quota. Your edits may not be preserved after closing the page.\");\n }\n });\n } else {\n interactive && alertError(\"Your browser may not persist edits after closing the page. Try a different browser.\");\n }\n}\n\nfunction getCurrentPresetTitle() : string {\n if (!current_preset)\n return current_project.mainPath || \"ROM\";\n else\n return current_preset.title || current_preset.name || current_project.mainPath || \"ROM\";\n}\n\nasync function newFilesystem() {\n var basefs : ProjectFilesystem = new WebPresetsFileSystem(platform_id);\n if (isElectron) {\n console.log('using electron with local filesystem', alternateLocalFilesystem);\n return new OverlayFilesystem(basefs, alternateLocalFilesystem);\n } else if (qs.localfs != null) {\n return new OverlayFilesystem(basefs, await getLocalFilesystem(qs.localfs));\n } else {\n return new OverlayFilesystem(basefs, new LocalForageFilesystem(store));\n }\n}\n\nasync function initProject() {\n var filesystem = await newFilesystem();\n current_project = new CodeProject(newWorker(), platform_id, platform, filesystem);\n current_project.remoteTool = qs.tool || null;\n projectWindows = new ProjectWindows($(\"#workspace\")[0] as HTMLElement, current_project);\n current_project.callbackBuildResult = (result:WorkerResult) => {\n setCompileOutput(result);\n };\n current_project.callbackBuildStatus = (busy:boolean) => {\n setBusyStatus(busy);\n };\n}\n\nfunction setBusyStatus(busy: boolean) {\n if (busy) {\n toolbar.addClass(\"is-busy\");\n } else {\n toolbar.removeClass(\"is-busy\");\n }\n $('#compile_spinner').css('visibility', busy ? 'visible' : 'hidden');\n}\n\nfunction newDropdownListItem(id, text) {\n var li = document.createElement(\"li\");\n var a = document.createElement(\"a\");\n a.setAttribute(\"class\", \"dropdown-item\");\n a.setAttribute(\"href\", \"#\");\n a.setAttribute(\"data-wndid\", id);\n if (id == projectWindows.getActiveID())\n $(a).addClass(\"dropdown-item-checked\");\n a.appendChild(document.createTextNode(text));\n li.appendChild(a);\n return {li, a};\n}\n\nfunction refreshWindowList() {\n var ul = $(\"#windowMenuList\").empty();\n var separate = false;\n\n function addWindowItem(id, name, createfn) {\n if (separate) {\n ul.append(document.createElement(\"hr\"));\n separate = false;\n }\n let {li,a} = newDropdownListItem(id, name);\n ul.append(li);\n if (createfn) {\n var onopen = (id, wnd) => {\n ul.find('a').removeClass(\"dropdown-item-checked\");\n $(a).addClass(\"dropdown-item-checked\");\n };\n projectWindows.setCreateFunc(id, createfn);\n projectWindows.setShowFunc(id, onopen);\n $(a).click( (e) => {\n projectWindows.createOrShow(id);\n lastViewClicked = id;\n });\n }\n }\n\n function loadEditor(path:string) {\n var tool = platform.getToolForFilename(path);\n // hack because .h files can be DASM or CC65\n if (tool == 'dasm' && path.endsWith(\".h\") && getCurrentMainFilename().endsWith(\".c\")) {\n tool = 'cc65';\n }\n var mode = tool && TOOL_TO_SOURCE_STYLE[tool];\n return new SourceEditor(path, mode);\n }\n\n function addEditorItem(id:string) {\n addWindowItem(id, getFilenameForPath(id), () => {\n var data = current_project.getFile(id);\n if (typeof data === 'string')\n return loadEditor(id);\n else if (data instanceof Uint8Array)\n return new BinaryFileView(id, data as Uint8Array);\n });\n }\n\n // add main file editor\n addEditorItem(current_project.mainPath);\n\n // add other source files\n current_project.iterateFiles( (id, text) => {\n if (text && id != current_project.mainPath) {\n addEditorItem(id);\n }\n });\n\n // add listings\n separate = true;\n var listings = current_project.getListings();\n if (listings) {\n for (var lstfn in listings) {\n var lst = listings[lstfn];\n // add listing if source/assembly file exists and has text\n if ((lst.assemblyfile && lst.assemblyfile.text) || (lst.sourcefile && lst.sourcefile.text) || lst.text) {\n addWindowItem(lstfn, getFilenameForPath(lstfn), (path) => {\n return new ListingView(path);\n });\n }\n }\n }\n\n // add other tools\n separate = true;\n if (platform.disassemble && platform.saveState) {\n addWindowItem(\"#disasm\", \"Disassembly\", () => {\n return new DisassemblerView();\n });\n }\n if (platform.readAddress) {\n addWindowItem(\"#memory\", \"Memory Browser\", () => {\n return new MemoryView();\n });\n }\n if (current_project.segments && current_project.segments.length) {\n addWindowItem(\"#memmap\", \"Memory Map\", () => {\n return new MemoryMapView();\n });\n }\n if (platform.readVRAMAddress) {\n addWindowItem(\"#memvram\", \"VRAM Browser\", () => {\n return new VRAMMemoryView();\n });\n }\n if (platform.startProbing) {\n addWindowItem(\"#memheatmap\", \"Memory Probe\", () => {\n return new AddressHeatMapView();\n });\n // TODO: only if raster\n addWindowItem(\"#crtheatmap\", \"CRT Probe\", () => {\n //return new RasterPCHeatMapView();\n return new RasterStackMapView();\n });\n addWindowItem(\"#probelog\", \"Probe Log\", () => {\n return new ProbeLogView();\n });\n addWindowItem(\"#scanlineio\", \"Scanline I/O\", () => {\n return new ScanlineIOView();\n });\n addWindowItem(\"#symbolprobe\", \"Symbol Profiler\", () => {\n return new ProbeSymbolView();\n });\n addWindowItem(\"#callstack\", \"Call Stack\", () => {\n return new CallStackView();\n });\n /*\n addWindowItem(\"#framecalls\", \"Frame Profiler\", () => {\n return new FrameCallsView();\n });\n */\n }\n if (platform.getDebugTree) {\n addWindowItem(\"#debugview\", \"Debug Tree\", () => {\n return new DebugBrowserView();\n });\n }\n addWindowItem('#asseteditor', 'Asset Editor', () => {\n return new AssetEditorView();\n });\n}\n\nfunction highlightLines(path:string, hispec:string) {\n if (hispec) {\n var toks = qs.highlight.split(',');\n var start = parseInt(toks[0]) - 1;\n var end = parseInt(toks[1]) - 1;\n var editor = projectWindows.createOrShow(path) as SourceEditor;\n editor.highlightLines(start, end);\n }\n}\n\nfunction loadMainWindow(preset_id:string) {\n // we need this to build create functions for the editor\n refreshWindowList();\n // show main file\n projectWindows.createOrShow(preset_id);\n // build project\n current_project.setMainFile(preset_id);\n // highlighting?\n highlightLines(preset_id, qs.highlight);\n}\n\nasync function loadProject(preset_id:string) {\n // set current file ID\n // TODO: this is done twice (mainPath and mainpath!)\n current_project.mainPath = preset_id;\n userPrefs.setLastPreset(preset_id);\n // load files from storage or web URLs\n var result = await current_project.loadFiles([preset_id]);\n if (result && result.length) {\n // file found; continue\n loadMainWindow(preset_id);\n } else {\n var skel = await getSkeletonFile(preset_id);\n current_project.filedata[preset_id] = skel || \"\\n\";\n loadMainWindow(preset_id);\n // don't alert if we selected \"new file\"\n if (!qs.newfile) {\n alertInfo(\"Could not find file \\\"\" + preset_id + \"\\\". Loading default file.\");\n } else {\n requestPersistPermission(true, true);\n }\n delete qs.newfile;\n replaceURLState();\n }\n}\n\nfunction reloadProject(id:string) {\n // leave repository == '/'\n if (id == '/') {\n qs = {repo:'/'};\n } else if (id.indexOf('://') >= 0) {\n var urlparse = parseGithubURL(id);\n if (urlparse) {\n qs = {repo:urlparse.repopath};\n }\n } else {\n qs.platform = platform_id;\n qs.file = id;\n }\n gotoNewLocation();\n}\n\nasync function getSkeletonFile(fileid:string) : Promise<string> {\n var ext = platform.getToolForFilename(fileid);\n try {\n return await $.get( \"presets/\"+getBasePlatform(platform_id)+\"/skeleton.\"+ext, 'text');\n } catch(e) {\n alertError(\"Could not load skeleton for \" + platform_id + \"/\" + ext + \"; using blank file\");\n }\n}\n\nfunction checkEnteredFilename(fn : string) : boolean {\n if (fn.indexOf(\" \") >= 0) {\n alertError(\"No spaces in filenames, please.\");\n return false;\n }\n return true;\n}\n\nfunction _createNewFile(e) {\n // TODO: support spaces\n bootbox.prompt({\n title:\"Enter the name of your new main source file.\",\n placeholder:\"newfile\" + platform.getDefaultExtension(),\n callback:(filename) => {\n if (filename && filename.trim().length > 0) {\n if (!checkEnteredFilename(filename)) return;\n if (filename.indexOf(\".\") < 0) {\n filename += platform.getDefaultExtension();\n }\n var path = filename;\n gaEvent('workspace', 'file', 'new');\n qs.newfile = '1';\n reloadProject(path);\n }\n }\n } as any);\n return true;\n}\n\nfunction _uploadNewFile(e) {\n const uploadFileElem = $(`<input type=\"file\" multiple accept=\"*\" style=\"display:none\">`);\n const file = uploadFileElem[0] as HTMLInputElement;\n uploadFileElem.change((e) => { handleFileUpload(file.files) });\n uploadFileElem.click();\n}\n\n// called from index.html\nfunction handleFileUpload(files: FileList) {\n console.log(files);\n var index = 0;\n function uploadNextFile() {\n var f = files[index++];\n if (!f) {\n console.log(\"Done uploading\", index);\n if (index > 2) {\n alertInfo(\"Files uploaded.\");\n setTimeout(updateSelector, 1000); // TODO: wait for files to upload\n } else {\n qs.file = files[0].name;\n bootbox.confirm({\n message: \"Open '\" + DOMPurify.sanitize(qs.file) + \"' as main project file?\",\n buttons: {\n confirm: { label: \"Open As New Project\" },\n cancel: { label: \"Include/Link With Project Later\" },\n },\n callback: (result) => {\n if (result)\n gotoNewLocation();\n else\n setTimeout(updateSelector, 1000); // TODO: wait for files to upload\n }\n });\n }\n gaEvent('workspace', 'file', 'upload');\n } else {\n var path = f.name;\n var reader = new FileReader();\n reader.onload = function(e) {\n var arrbuf = (<any>e.target).result as ArrayBuffer;\n var data : FileData = new Uint8Array(arrbuf);\n // convert to UTF8, unless it's a binary file\n if (isProbablyBinary(path, data)) {\n //gotoMainFile = false;\n } else {\n data = byteArrayToUTF8(data).replace('\\r\\n','\\n'); // convert CRLF to LF\n }\n // store in local forage\n projectWindows.updateFile(path, data);\n console.log(\"Uploaded \" + path + \" \" + data.length + \" bytes\");\n uploadNextFile();\n }\n reader.readAsArrayBuffer(f); // read as binary\n }\n }\n if (files) uploadNextFile();\n}\n\nasync function _openLocalDirectory(e) {\n var pickerfn = window['showDirectoryPicker'];\n if (!pickerfn) {\n alertError(`This browser can't open local files on your computer, yet. Try Chrome.`);\n }\n var dirHandle = await pickerfn();\n var repoid = dirHandle.name;\n var storekey = '__localfs__' + repoid;\n var fsdata = {\n handle: dirHandle,\n }\n var lstore = localforage.createInstance({\n name: storekey,\n version: 2.0\n });\n await lstore.setItem(storekey, fsdata);\n qs = {localfs: repoid};\n gotoNewLocation(true);\n}\n\nasync function promptUser(message: string) : Promise<string> {\n return new Promise( (resolve, reject) => {\n bootbox.prompt(DOMPurify.sanitize(message), (result) => {\n resolve(result);\n });\n });\n}\n\nasync function getLocalFilesystem(repoid: string) : Promise<ProjectFilesystem> { \n const options = {mode:'readwrite'};\n var storekey = '__localfs__' + repoid;\n var lstore = localforage.createInstance({\n name: storekey,\n version: 2.0\n });\n var fsdata : any = await lstore.getItem(storekey);\n var dirHandle = fsdata.handle as any;\n console.log(fsdata, dirHandle);\n var granted = await dirHandle.queryPermission(options);\n console.log(granted);\n if (granted !== 'granted') {\n await promptUser(`Request permissions to access filesystem?`);\n granted = await dirHandle.requestPermission(options);\n }\n if (granted !== 'granted') {\n alertError(`Could not get permission to access filesystem.`);\n return;\n }\n return {\n getFileData: async (path) => {\n console.log('getFileData', path);\n let fileHandle = await dirHandle.getFileHandle(path, { create: false });\n console.log('getFileData', fileHandle);\n let file = await fileHandle.getFile();\n console.log('getFileData', file);\n let contents = await (isProbablyBinary(path) ? file.binary() : file.text());\n console.log(fileHandle, file, contents);\n return contents;\n },\n setFileData: async (path, data) => {\n //let vh = await dirHandle.getFileHandle(path, { create: true });\n }\n }\n}\n\nexport function getCurrentMainFilename() : string {\n return getFilenameForPath(current_project.mainPath);\n}\n\nexport function getCurrentEditorFilename() : string {\n return getFilenameForPath(projectWindows.getActiveID());\n}\n\n\nfunction _revertFile(e) {\n var wnd = projectWindows.getActive();\n if (wnd && wnd.setText) {\n var fn = projectWindows.getActiveID();\n $.get( \"presets/\"+getBasePlatform(platform_id)+\"/\"+fn, (text) => {\n bootbox.confirm(\"Reset '\" + DOMPurify.sanitize(fn) + \"' to default?\", (ok) => {\n if (ok) {\n wnd.setText(text);\n }\n });\n }, 'text')\n .fail(() => {\n if (repo_id) alertError(\"Can only revert built-in examples. If you want to revert all files, You can pull from the repository.\");\n else alertError(\"Can only revert built-in examples.\");\n });\n } else {\n alertError(\"Cannot revert the active window. Please choose a text file.\");\n }\n}\n\nfunction _deleteFile(e) {\n var wnd = projectWindows.getActive();\n if (wnd && wnd.getPath) {\n var fn = projectWindows.getActiveID();\n bootbox.confirm(\"Delete '\" + DOMPurify.sanitize(fn) + \"'?\", (ok) => {\n if (ok) {\n store.removeItem(fn).then( () => {\n // if we delete what is selected\n if (qs.file == fn) {\n userPrefs.unsetLastPreset();\n gotoNewLocation();\n } else {\n updateSelector();\n alertInfo(\"Deleted \" + fn);\n }\n });\n }\n });\n } else {\n alertError(\"Cannot delete the active window.\");\n }\n}\n\nfunction _renameFile(e) {\n var wnd = projectWindows.getActive();\n if (wnd && wnd.getPath && current_project.getFile(wnd.getPath())) {\n var fn = projectWindows.getActiveID();\n bootbox.prompt({\n title: \"Rename '\" + DOMPurify.sanitize(fn) + \"' to?\", \n value: fn,\n callback: (newfn) => {\n var data = current_project.getFile(wnd.getPath());\n if (newfn && newfn != fn && data) {\n if (!checkEnteredFilename(newfn)) return;\n store.removeItem(fn).then( () => {\n return store.setItem(newfn, data);\n }).then( () => {\n updateSelector();\n alert(\"Renamed \" + fn + \" to \" + newfn); // need alert() so it pauses\n if (fn == current_project.mainPath) {\n reloadProject(newfn);\n }\n });\n }\n }\n });\n } else {\n alertError(\"Cannot rename the active window.\");\n }\n}\n\n\n\nfunction populateExamples(sel) {\n let files = {};\n let optgroup;\n const PRESETS = platform.getPresets ? platform.getPresets() : [];\n for (var i=0; i<PRESETS.length; i++) {\n var preset = PRESETS[i];\n var name = preset.chapter ? (preset.chapter + \". \" + preset.name) : preset.name;\n var isCurrentPreset = preset.id==current_project.mainPath;\n if (preset.category) {\n optgroup = $(\"<optgroup />\").attr('label','Examples: ' + preset.category).appendTo(sel);\n } else if (!optgroup) {\n optgroup = $(\"<optgroup />\").attr('label','Examples').appendTo(sel);\n }\n optgroup.append($(\"<option />\").val(preset.id).text(name).attr('selected',isCurrentPreset?'selected':null));\n if (isCurrentPreset) current_preset = preset;\n files[preset.id] = name;\n }\n return files;\n}\n\nfunction populateRepos(sel) {\n if (hasLocalStorage && !isElectron) {\n var n = 0;\n var repos = getRepos();\n if (repos) {\n let optgroup = $(\"<optgroup />\").attr('label','Repositories').appendTo(sel);\n for (let repopath in repos) {\n var repo = repos[repopath];\n if (repo.platform_id && getBasePlatform(repo.platform_id) == getBasePlatform(platform_id)) {\n optgroup.append($(\"<option />\").val(repo.url).text(repo.url.substring(repo.url.indexOf('/'))));\n }\n }\n }\n }\n}\n\nasync function populateFiles(sel:JQuery, category:string, prefix:string, foundFiles:{}) {\n let keys = await store.keys();\n if (!keys) keys = [];\n let optgroup;\n for (var i = 0; i < keys.length; i++) {\n let key = keys[i];\n if (key.startsWith(prefix) && !foundFiles[key]) {\n if (!optgroup) optgroup = $(\"<optgroup />\").attr('label',category).appendTo(sel);\n let name = key.substring(prefix.length);\n optgroup.append($(\"<option />\").val(key).text(name).attr('selected',(key==current_project.mainPath)?'selected':null));\n }\n }\n}\n\nfunction finishSelector(sel) {\n sel.css('visibility','visible');\n // create option if not selected\n var main = current_project.mainPath;\n if (sel.val() != main) {\n sel.append($(\"<option />\").val(main).text(main).attr('selected','selected'));\n }\n}\n\nasync function updateSelector() {\n var sel = $(\"#preset_select\").empty();\n if (!repo_id) {\n // normal: populate repos, examples, and local files\n populateRepos(sel);\n var foundFiles = populateExamples(sel);\n await populateFiles(sel, \"Local Files\", \"\", foundFiles);\n finishSelector(sel);\n } else {\n sel.append($(\"<option />\").val('/').text('Leave Repository'));\n $(\"#repo_name\").text(getFilenameForPath(repo_id)+'/').show();\n // repo: populate all files\n await populateFiles(sel, repo_id, \"\", {});\n finishSelector(sel);\n }\n // set click handlers\n sel.off('change').change(function(e) {\n reloadProject($(this).val().toString());\n });\n}\n\nfunction getErrorElement(err : WorkerError) {\n var span = $('<p/>');\n if (err.path != null) {\n var s = err.line ? err.label ? `(${err.path} @ ${err.label})` : `(${err.path}:${err.line})` : `(${err.path})`\n var link = $('<a/>').text(s);\n var path = err.path;\n // TODO: hack because examples/foo.a only gets listed as foo.a\n if (path == getCurrentMainFilename()) path = current_project.mainPath;\n // click link to open file, if it's available...\n if (projectWindows.isWindow(path)) {\n link.click((ev) => {\n var wnd = projectWindows.createOrShow(path);\n if (wnd instanceof SourceEditor) {\n wnd.setCurrentLine(err, true);\n }\n });\n }\n span.append(link);\n span.append('&nbsp;');\n }\n span.append($('<span/>').text(err.msg));\n return span;\n}\n\nfunction hideErrorAlerts() {\n $(\"#error_alert\").hide();\n errorWasRuntime = false;\n}\n\nfunction showErrorAlert(errors : WorkerError[], runtime : boolean) {\n var div = $(\"#error_alert_msg\").empty();\n for (var err of errors.slice(0,10)) {\n div.append(getErrorElement(err));\n }\n $(\"#error_alert\").show();\n errorWasRuntime = runtime;\n}\n\nfunction showExceptionAsError(err, msg:string) {\n if (msg != null) {\n var werr : WorkerError = {msg:msg, line:0};\n if (err instanceof EmuHalt && err.$loc) {\n werr = Object.create(err.$loc);\n werr.msg = msg;\n console.log(werr);\n }\n showErrorAlert([werr], true);\n }\n}\n\nasync function setCompileOutput(data: WorkerResult) {\n // errors? mark them in editor\n if ('errors' in data && data.errors.length > 0) {\n toolbar.addClass(\"has-errors\");\n projectWindows.setErrors(data.errors);\n refreshWindowList(); // to make sure windows are created for showErrorAlert()\n showErrorAlert(data.errors, false);\n } else {\n toolbar.removeClass(\"has-errors\"); // may be added in next callback\n projectWindows.setErrors(null);\n hideErrorAlerts();\n // exit if compile output unchanged\n if (data == null || ('unchanged' in data && data.unchanged)) return;\n // make sure it's a WorkerOutputResult\n if (!('output' in data)) return;\n // process symbol map\n platform.debugSymbols = new DebugSymbols(data.symbolmap, data.debuginfo);\n compparams = data.params;\n // load ROM\n var rom = data.output;\n if (rom != null) {\n try {\n clearBreakpoint(); // so we can replace memory (TODO: change toolbar btn)\n _resetRecording();\n await platform.loadROM(getCurrentPresetTitle(), rom);\n current_output = rom;\n if (!userPaused) _resume();\n writeOutputROMFile();\n } catch (e) {\n console.log(e);\n toolbar.addClass(\"has-errors\");\n showExceptionAsError(e, e+\"\");\n current_output = null;\n refreshWindowList();\n return;\n }\n }\n // update all windows (listings)\n refreshWindowList();\n projectWindows.refresh(false);\n }\n}\n\nasync function loadBIOSFromProject() {\n if (platform.loadBIOS) {\n var biospath = platform_id + '.rom';\n var biosdata = await store.getItem(biospath);\n if (biosdata instanceof Uint8Array) {\n console.log('loading BIOS', biospath, biosdata.length + \" bytes\")\n platform.loadBIOS(biospath, biosdata);\n } else {\n console.log('BIOS file must be binary')\n }\n }\n}\n\nfunction hideDebugInfo() {\n var meminfo = $(\"#mem_info\");\n meminfo.hide();\n lastDebugInfo = null;\n}\n\nfunction showDebugInfo(state?) {\n if (!isDebuggable(platform)) return;\n var meminfo = $(\"#mem_info\");\n var meminfomsg = $(\"#mem_info_msg\");\n var allcats = platform.getDebugCategories();\n if (allcats && !debugCategory)\n debugCategory = allcats[0];\n var s = state && platform.getDebugInfo(debugCategory, state);\n if (typeof s === 'string') {\n var hs = lastDebugInfo ? highlightDifferences(lastDebugInfo, s) : s;\n meminfo.show();\n meminfomsg.html(hs);\n var catspan = $('<div class=\"mem_info_links\">');\n var addCategoryLink = (cat:string) => {\n var catlink = $('<a>'+cat+'</a>');\n if (cat == debugCategory)\n catlink.addClass('selected');\n catlink.click((e) => {\n debugCategory = cat;\n lastDebugInfo = null;\n showDebugInfo(lastDebugState);\n });\n catspan.append(catlink);\n catspan.append('<span> </span>');\n }\n for (var cat of allcats) {\n addCategoryLink(cat);\n }\n meminfomsg.append('<br>');\n meminfomsg.append(catspan);\n lastDebugInfo = s;\n } else {\n hideDebugInfo();\n }\n}\n\nfunction setDebugButtonState(btnid:string, btnstate:string) {\n $(\"#debug_bar, #run_bar\").find(\"button\").removeClass(\"btn_active\").removeClass(\"btn_stopped\");\n $(\"#dbg_\"+btnid).addClass(\"btn_\"+btnstate);\n}\n\nfunction isPlatformReady() {\n return platform && current_output != null;\n}\n\nfunction checkRunReady() {\n if (!isPlatformReady()) {\n alertError(\"Can't do this until build successfully completes.\");\n return false;\n } else\n return true;\n}\n\nfunction openRelevantListing(state: EmuState) {\n // if we clicked on a specific tool, don't switch windows\n if (lastViewClicked && lastViewClicked.startsWith('#')) return;\n // don't switch windows for specific debug commands\n if (['toline','restart','tovsync','stepover'].includes(lastDebugCommand)) return;\n // has to support disassembly, at least\n if (!platform.disassemble) return;\n // search through listings\n let listings = current_project.getListings();\n let bestid = \"#disasm\";\n let bestscore = 256;\n if (listings) {\n let pc = state.c ? (state.c.EPC || state.c.PC) : 0;\n for (let lstfn in listings) {\n let lst = listings[lstfn];\n let file = lst.assemblyfile || lst.sourcefile;\n // pick either listing or source file\n let wndid = current_project.filename2path[lstfn] || lstfn;\n if (file == lst.sourcefile) wndid = projectWindows.findWindowWithFilePrefix(lstfn);\n // does this window exist?\n if (projectWindows.isWindow(wndid)) {\n // find the source line at the PC or closely before it\n let srcline1 = file && file.findLineForOffset(pc, PC_LINE_LOOKAHEAD);\n if (srcline1) {\n // try to find the next line and bound the PC\n let srcline2 = file.lines[srcline1.line+1];\n if (!srcline2 || pc < srcline2.offset) {\n let score = pc - srcline1.offset;\n if (score < bestscore) {\n bestid = wndid;\n bestscore = score;\n }\n }\n //console.log(hex(pc,4), srcline1, srcline2, wndid, lstfn, bestid, bestscore);\n }\n }\n }\n }\n // if no appropriate listing found, use disassembly view\n projectWindows.createOrShow(bestid, true);\n}\n\nfunction uiDebugCallback(state: EmuState) {\n lastDebugState = state;\n showDebugInfo(state);\n openRelevantListing(state);\n projectWindows.refresh(true); // move cursor\n debugTickPaused = true;\n}\n\nfunction setupDebugCallback(btnid? : DebugCommandType) {\n if (platform.setupDebug) {\n platform.setupDebug((state:EmuState, msg:string) => {\n uiDebugCallback(state);\n setDebugButtonState(btnid||\"pause\", \"stopped\");\n msg && showErrorAlert([{msg:\"STOPPED: \" + msg, line:0}], true);\n });\n lastDebugCommand = btnid;\n }\n}\n\nexport function setupBreakpoint(btnid? : DebugCommandType) {\n if (!checkRunReady()) return;\n _disableRecording();\n setupDebugCallback(btnid);\n if (btnid) setDebugButtonState(btnid, \"active\");\n}\n\nfunction _pause() {\n if (platform && platform.isRunning()) {\n platform.pause();\n console.log(\"Paused\");\n }\n setDebugButtonState(\"pause\", \"stopped\");\n}\n\nfunction pause() {\n if (!checkRunReady()) return;\n clearBreakpoint();\n _pause();\n userPaused = true;\n}\n\nfunction _resume() {\n if (!platform.isRunning()) {\n platform.resume();\n console.log(\"Resumed\");\n }\n setDebugButtonState(\"go\", \"active\");\n if (errorWasRuntime) { hideErrorAlerts(); }\n}\n\nfunction resume() {\n if (!checkRunReady()) return;\n clearBreakpoint();\n if (! platform.isRunning() ) {\n projectWindows.refresh(false);\n }\n _resume();\n userPaused = false;\n lastViewClicked = null;\n}\n\nfunction singleStep() {\n if (!checkRunReady()) return;\n setupBreakpoint(\"step\");\n platform.step();\n}\n\nfunction stepOver() {\n if (!checkRunReady()) return;\n setupBreakpoint(\"stepover\");\n platform.stepOver();\n}\n\nfunction singleFrameStep() {\n if (!checkRunReady()) return;\n setupBreakpoint(\"tovsync\");\n platform.runToVsync();\n}\n\nfunction getEditorPC() : number {\n var wnd = projectWindows.getActive();\n return wnd && wnd.getCursorPC && wnd.getCursorPC();\n}\n\nexport function runToPC(pc: number) {\n if (!checkRunReady() || !(pc >= 0)) return;\n setupBreakpoint(\"toline\");\n console.log(\"Run to\", pc.toString(16));\n if (platform.runToPC) {\n platform.runToPC(pc);\n } else {\n platform.runEval((c) => {\n return c.PC == pc;\n });\n }\n}\n\nfunction restartAtCursor() {\n if (platform.restartAtPC(getEditorPC())) {\n resume();\n } else alertError(`Could not restart program at selected line.`);\n}\n\nfunction runToCursor() {\n runToPC(getEditorPC());\n}\n\nfunction runUntilReturn() {\n if (!checkRunReady()) return;\n setupBreakpoint(\"stepout\");\n platform.runUntilReturn();\n}\n\nfunction runStepBackwards() {\n if (!checkRunReady()) return;\n setupBreakpoint(\"stepback\");\n platform.stepBack();\n}\n\nexport function clearBreakpoint() {\n lastDebugState = null;\n if (platform.clearDebug) platform.clearDebug();\n setupDebugCallback(); // in case of BRK/trap\n showDebugInfo();\n}\n\nfunction resetPlatform() {\n platform.reset();\n _resetRecording();\n}\n\nfunction resetAndRun() {\n if (!checkRunReady()) return;\n clearBreakpoint();\n resetPlatform();\n _resume();\n}\n\nfunction resetAndDebug() {\n if (!checkRunReady()) return;\n var wasRecording = recorderActive;\n _disableRecording();\n if (platform.setupDebug && platform.runEval) { // TODO??\n clearBreakpoint();\n _resume();\n resetPlatform();\n setupBreakpoint(\"restart\");\n platform.runEval((c) => { return true; }); // break immediately\n } else {\n resetPlatform();\n _resume();\n }\n if (wasRecording) _enableRecording();\n}\n\nfunction _breakExpression() {\n var modal = $(\"#debugExprModal\");\n var btn = $(\"#debugExprSubmit\");\n $(\"#debugExprInput\").val(lastBreakExpr);\n $(\"#debugExprExamples\").text(getDebugExprExamples());\n modal.modal('show');\n btn.off('click').on('click', () => {\n var exprs = $(\"#debugExprInput\").val()+\"\";\n modal.modal('hide');\n breakExpression(exprs);\n });\n}\n\nfunction getDebugExprExamples() : string {\n var state = platform.saveState && platform.saveState();\n var cpu = state.c;\n console.log(cpu, state);\n var s = '';\n if (cpu.PC) s += \"c.PC == 0x\" + hex(cpu.PC) + \"\\n\";\n if (cpu.SP) s += \"c.SP < 0x\" + hex(cpu.SP) + \"\\n\";\n if (cpu['HL']) s += \"c.HL == 0x4000\\n\";\n if (platform.readAddress) s += \"this.readAddress(0x1234) == 0x0\\n\";\n if (platform.readVRAMAddress) s += \"this.readVRAMAddress(0x1234) != 0x80\\n\";\n if (platform['getRasterScanline']) s += \"this.getRasterScanline() > 222\\n\";\n return s;\n}\n\nfunction breakExpression(exprs : string) {\n var fn = new Function('c', 'return (' + exprs + ');').bind(platform);\n setupBreakpoint();\n platform.runEval(fn as DebugEvalCondition);\n lastBreakExpr = exprs;\n}\n\nfunction updateDebugWindows() {\n if (platform.isRunning()) {\n projectWindows.tick();\n debugTickPaused = false;\n } else if (!debugTickPaused) { // final tick after pausing\n projectWindows.tick();\n debugTickPaused = true;\n }\n setTimeout(updateDebugWindows, 100);\n}\n\nexport function setFrameRateUI(fps:number) {\n platform.setFrameRate(fps);\n if (fps > 0.01)\n $(\"#fps_label\").text(fps.toFixed(2));\n else\n $(\"#fps_label\").text(\"1/\"+Math.round(1/fps));\n}\n\nfunction _slowerFrameRate() {\n var fps = platform.getFrameRate();\n fps = fps/2;\n if (fps > 0.00001) setFrameRateUI(fps);\n}\n\nfunction _fasterFrameRate() {\n var fps = platform.getFrameRate();\n fps = Math.min(60, fps*2);\n setFrameRateUI(fps);\n}\n\nfunction _slowestFrameRate() {\n setFrameRateUI(60/65536);\n}\n\nfunction _fastestFrameRate() {\n _resume();\n setFrameRateUI(60);\n}\n\nfunction traceTiming() {\n projectWindows.refresh(false);\n var wnd = projectWindows.getActive();\n if (wnd.getSourceFile && wnd.setTimingResult) { // is editor active?\n var analyzer = platform.newCodeAnalyzer();\n analyzer.showLoopTimingForPC(0);\n wnd.setTimingResult(analyzer);\n }\n}\n\nfunction _disableRecording() {\n if (recorderActive) {\n platform.setRecorder(null);\n $(\"#dbg_record\").removeClass(\"btn_recording\");\n $(\"#replaydiv\").hide();\n hideDebugInfo();\n recorderActive = false;\n }\n}\n\nfunction _resetRecording() {\n if (recorderActive) {\n stateRecorder.reset();\n }\n}\n\nfunction _enableRecording() {\n stateRecorder.reset();\n platform.setRecorder(stateRecorder);\n $(\"#dbg_record\").addClass(\"btn_recording\");\n $(\"#replaydiv\").show();\n recorderActive = true;\n}\n\nfunction _toggleRecording() {\n if (recorderActive) {\n _disableRecording();\n } else {\n _enableRecording();\n }\n}\n\nfunction addFileToProject(type, ext, linefn) {\n var wnd = projectWindows.getActive();\n if (wnd && wnd.insertText) {\n bootbox.prompt({\n title:\"Add \"+DOMPurify.sanitize(type)+\" File to Project\",\n value:\"filename\"+DOMPurify.sanitize(ext),\n callback:(filename:string) => {\n if (filename && filename.trim().length > 0) {\n if (!checkEnteredFilename(filename)) return;\n var path = filename;\n var newline = \"\\n\" + linefn(filename) + \"\\n\";\n current_project.loadFiles([path]).then((result) => {\n if (result && result.length) {\n alertError(filename + \" already exists; including anyway\");\n } else {\n current_project.updateFile(path, \"\\n\");\n }\n wnd.insertText(newline);\n refreshWindowList();\n });\n }\n }\n });\n } else {\n alertError(\"Can't insert text in this window -- switch back to main file\");\n }\n}\n// TODO: lwtools and smaller c\nfunction _addIncludeFile() {\n var fn = getCurrentMainFilename();\n var tool = platform.getToolForFilename(fn);\n // TODO: more tools? make this a function of the platform / tool provider\n if (fn.endsWith(\".c\") || tool == 'sdcc' || tool == 'cc65' || tool == 'cmoc' || tool == 'smlrc')\n addFileToProject(\"Header\", \".h\", (s) => { return '#include \"'+s+'\"' });\n else if (tool == 'dasm' || tool == 'zmac')\n addFileToProject(\"Include\", \".inc\", (s) => { return '\\tinclude \"'+s+'\"' });\n else if (tool == 'ca65' || tool == 'sdasz80' || tool == 'vasm' || tool == 'armips')\n addFileToProject(\"Include\", \".inc\", (s) => { return '\\t.include \"'+s+'\"' });\n else if (tool == 'verilator')\n addFileToProject(\"Verilog\", \".v\", (s) => { return '`include \"'+s+'\"' });\n else if (tool == 'wiz')\n addFileToProject(\"Include\", \".wiz\", (s) => { return 'import \"'+s+'\";' });\n else if (tool == 'ecs')\n addFileToProject(\"Include\", \".ecs\", (s) => { return 'import \"'+s+'\"' });\n else if (tool == 'acme')\n addFileToProject(\"Include\", \".acme\", (s) => { return '!src \"'+s+'\"' });\n else\n alertError(\"Can't add include file to this project type (\" + tool + \")\");\n}\n\nfunction _addLinkFile() {\n var fn = getCurrentMainFilename();\n var tool = platform.getToolForFilename(fn);\n if (fn.endsWith(\".c\") || tool == 'sdcc' || tool == 'cc65' || tool == 'cmoc' || tool == 'smlrc')\n addFileToProject(\"Linked C (or .s)\", \".c\", (s) => { return '//#link \"'+s+'\"' });\n else if (fn.endsWith(\"asm\") || fn.endsWith(\".s\") || tool == 'ca65' || tool == 'lwasm')\n addFileToProject(\"Linked ASM\", \".inc\", (s) => { return ';#link \"'+s+'\"' });\n else\n alertError(\"Can't add linked file to this project type (\" + tool + \")\");\n}\n\nfunction setupDebugControls() {\n // create toolbar buttons\n uitoolbar = new Toolbar($(\"#toolbar\")[0], null);\n uitoolbar.grp.prop('id','run_bar');\n uitoolbar.add('ctrl+alt+r', 'Reset', 'glyphicon-refresh', resetAndRun).prop('id','dbg_reset');\n uitoolbar.add('ctrl+alt+,', 'Pause', 'glyphicon-pause', pause).prop('id','dbg_pause');\n uitoolbar.add('ctrl+alt+.', 'Resume', 'glyphicon-play', resume).prop('id','dbg_go');\n if (platform.restartAtPC) {\n uitoolbar.add('ctrl+alt+/', 'Restart at Cursor', 'glyphicon-play-circle', restartAtCursor).prop('id','dbg_restartatline');\n }\n uitoolbar.newGroup();\n uitoolbar.grp.prop('id','debug_bar');\n if (platform.runEval) {\n uitoolbar.add('ctrl+alt+e', 'Reset and Debug', 'glyphicon-fast-backward', resetAndDebug).prop('id','dbg_restart');\n }\n if (platform.stepBack) {\n uitoolbar.add('ctrl+alt+b', 'Step Backwards', 'glyphicon-step-backward', runStepBackwards).prop('id','dbg_stepback');\n }\n if (platform.step) {\n uitoolbar.add('ctrl+alt+s', 'Single Step', 'glyphicon-step-forward', singleStep).prop('id','dbg_step');\n }\n if (platform.stepOver) {\n uitoolbar.add('ctrl+alt+t', 'Step Over', 'glyphicon-hand-right', stepOver).prop('id','dbg_stepover');\n }\n if (platform.runUntilReturn) {\n uitoolbar.add('ctrl+alt+o', 'Step Out of Subroutine', 'glyphicon-hand-up', runUntilReturn).prop('id','dbg_stepout');\n }\n if (platform.runToVsync) {\n uitoolbar.add('ctrl+alt+n', 'Next Frame/Interrupt', 'glyphicon-forward', singleFrameStep).prop('id','dbg_tovsync');\n }\n if ((platform.runEval || platform.runToPC) && !platform_id.startsWith('verilog')) {\n uitoolbar.add('ctrl+alt+l', 'Run To Line', 'glyphicon-save', runToCursor).prop('id','dbg_toline');\n }\n uitoolbar.newGroup();\n uitoolbar.grp.prop('id','xtra_bar');\n // add menu clicks\n $(\".dropdown-menu\").collapse({toggle: false});\n $(\"#item_new_file\").click(_createNewFile);\n $(\"#item_upload_file\").click(_uploadNewFile);\n $(\"#item_open_directory\").click(_openLocalDirectory);\n $(\"#item_github_login\").click(_loginToGithub);\n $(\"#item_github_logout\").click(_logoutOfGithub);\n $(\"#item_github_import\").click(_importProjectFromGithub);\n $(\"#item_github_publish\").click(_publishProjectToGithub);\n $(\"#item_github_push\").click(_pushProjectToGithub);\n $(\"#item_github_pull\").click(_pullProjectFromGithub);\n $(\"#item_repo_delete\").click(_removeRepository);\n $(\"#item_share_file\").click(_shareEmbedLink);\n $(\"#item_reset_file\").click(_revertFile);\n $(\"#item_rename_file\").click(_renameFile);\n $(\"#item_delete_file\").click(_deleteFile);\n if (platform.runEval)\n $(\"#item_debug_expr\").click(_breakExpression).show();\n else\n $(\"#item_debug_expr\").hide();\n $(\"#item_download_rom\").click(_downloadROMImage);\n $(\"#item_download_file\").click(_downloadSourceFile);\n $(\"#item_download_zip\").click(_downloadProjectZipFile);\n if (platform.getDebugSymbolFile) {\n $(\"#item_download_sym\").click(_downloadSymFile);\n } else {\n $(\"#item_download_sym\").hide();\n }\n $(\"#item_download_allzip\").click(_downloadAllFilesZipFile);\n $(\"#item_record_video\").click(_recordVideo);\n if (_getCassetteFunction())\n $(\"#item_export_cassette\").click(_downloadCassetteFile);\n else\n $(\"#item_export_cassette\").hide();\n if (platform.setFrameRate && platform.getFrameRate) {\n $(\"#dbg_slower\").click(_slowerFrameRate);\n $(\"#dbg_faster\").click(_fasterFrameRate);\n $(\"#dbg_slowest\").click(_slowestFrameRate);\n $(\"#dbg_fastest\").click(_fastestFrameRate);\n }\n $(\"#item_addfile_include\").click(_addIncludeFile);\n $(\"#item_addfile_link\").click(_addLinkFile);\n $(\"#item_request_persist\").click(() => requestPersistPermission(true, false));\n updateDebugWindows();\n // code analyzer?\n if (platform.newCodeAnalyzer) {\n uitoolbar.add(null, 'Analyze CPU Timing', 'glyphicon-time', traceTiming);\n }\n // setup replay slider\n if (platform.setRecorder && platform.advance) {\n setupReplaySlider();\n }\n // help menu items\n if (platform.showHelp) {\n let {li,a} = newDropdownListItem('help__'+platform_id, platform_name+' Help');\n $(\"#help_menu\").append(li);\n $(a).click(() => window.open(platform.showHelp(), '_8bws_help'));\n }\n // tool help\n let tool = platform.getToolForFilename(getCurrentMainFilename());\n let toolhelpurl = TOOL_TO_HELPURL[tool];\n if (toolhelpurl) {\n let {li,a} = newDropdownListItem('help__'+tool, tool+' Help');\n $(\"#help_menu\").append(li);\n $(a).click(() => window.open(toolhelpurl, '_8bws_help'));\n }\n}\n\nfunction setupReplaySlider() {\n var replayslider = $(\"#replayslider\");\n var clockslider = $(\"#clockslider\");\n var replayframeno = $(\"#replay_frame\");\n var clockno = $(\"#replay_clock\");\n if (!platform.advanceFrameClock) $(\"#clockdiv\").hide(); // TODO: put this test in recorder?\n var updateFrameNo = () => {\n replayframeno.text(stateRecorder.lastSeekFrame+\"\");\n clockno.text(stateRecorder.lastSeekStep+\"\");\n };\n var sliderChanged = (e) => {\n _pause();\n var frame : number = parseInt(replayslider.val().toString());\n var step : number = parseInt(clockslider.val().toString());\n if (stateRecorder.loadFrame(frame, step) >= 0) {\n clockslider.attr('min', 0);\n clockslider.attr('max', stateRecorder.lastStepCount);\n updateFrameNo();\n uiDebugCallback(platform.saveState());\n }\n };\n var setFrameTo = (frame:number) => {\n _pause();\n if (stateRecorder.loadFrame(frame) >= 0) {\n replayslider.val(frame);\n updateFrameNo();\n uiDebugCallback(platform.saveState());\n }\n };\n var setClockTo = (clock:number) => {\n _pause();\n var frame : number = parseInt(replayslider.val().toString());\n if (stateRecorder.loadFrame(frame, clock) >= 0) {\n clockslider.val(clock);\n updateFrameNo();\n uiDebugCallback(platform.saveState());\n }\n };\n stateRecorder.callbackStateChanged = () => {\n replayslider.attr('min', 0);\n replayslider.attr('max', stateRecorder.numFrames());\n replayslider.val(stateRecorder.currentFrame());\n clockslider.val(stateRecorder.currentStep());\n updateFrameNo();\n showDebugInfo(platform.saveState());\n };\n replayslider.on('input', sliderChanged);\n clockslider.on('input', sliderChanged);\n //replayslider.on('change', sliderChanged);\n $(\"#replay_min\").click(() => { setFrameTo(1) });\n $(\"#replay_max\").click(() => { setFrameTo(stateRecorder.numFrames()); });\n $(\"#replay_back\").click(() => { setFrameTo(parseInt(replayslider.val().toString()) - 1); });\n $(\"#replay_fwd\").click(() => { setFrameTo(parseInt(replayslider.val().toString()) + 1); });\n $(\"#clock_back\").click(() => { setClockTo(parseInt(clockslider.val().toString()) - 1); });\n $(\"#clock_fwd\").click(() => { setClockTo(parseInt(clockslider.val().toString()) + 1); });\n $(\"#replay_bar\").show();\n uitoolbar.add('ctrl+alt+0', 'Start/Stop Replay Recording', 'glyphicon-record', _toggleRecording).prop('id','dbg_record');\n}\n\n\nfunction isLandscape() {\n try {\n var object = window.screen['orientation'] || window.screen['msOrientation'] || window.screen['mozOrientation'] || null;\n if (object) {\n if (object.type.indexOf('landscape') !== -1) { return true; }\n if (object.type.indexOf('portrait') !== -1) { return false; }\n }\n if ('orientation' in window) {\n var value = window.orientation;\n if (value === 0 || value === 180) {\n return false;\n } else if (value === 90 || value === 270) {\n return true;\n }\n }\n } catch (e) { }\n // fallback to comparing width to height\n return window.innerWidth > window.innerHeight;\n}\n\nasync function showWelcomeMessage() {\n if (userPrefs.shouldCompleteTour()) {\n await loadScript('lib/bootstrap-tourist.js');\n var is_vcs = platform_id.startsWith('vcs');\n var steps = [\n {\n element: \"#platformsMenuButton\",\n placement: 'right',\n title: \"Platform Selector\",\n content: \"You're currently on the \\\"<b>\" + platform_id + \"</b>\\\" platform. You can choose a different one from the menu.\"\n },\n {\n element: \"#preset_select\",\n title: \"Project Selector\",\n content: \"You can choose different code examples, create your own files, or import projects from GitHub.\"\n },\n {\n element: \"#workspace\",\n title: \"Code Editor\",\n content: is_vcs ? \"Type your 6502 assembly code into the editor, and it'll be assembled in real-time.\"\n : \"Type your source code into the editor, and it'll be compiled in real-time.\"\n },\n {\n element: \"#emulator\",\n placement: 'left',\n title: \"Emulator\",\n content: \"We'll load your compiled code into the emulator whenever you make changes.\"\n },\n {\n element: \"#debug_bar\",\n placement: 'bottom',\n title: \"Debug Tools\",\n content: \"Use these buttons to set breakpoints, single step through code, pause/resume, and use debugging tools.\"\n },\n {\n element: \"#dropdownMenuButton\",\n title: \"Main Menu\",\n content: \"Click the menu to create new files, download your code, or share your work with others.\"\n },\n {\n element: \"#sidebar\",\n title: \"Sidebar\",\n content: \"Pull right to expose the sidebar. It lets you switch between source files, view assembly listings, and use other tools like Disassembler, Memory Browser, and Asset Editor.\"\n }\n ];\n if (!isLandscape()) {\n steps.unshift({\n element: \"#controls_top\",\n placement: 'bottom',\n title: \"Portrait mode detected\",\n content: \"This site works best on desktop browsers. For best results, rotate your device to landscape orientation.\"\n });\n }\n if (window.location.host.endsWith('8bitworkshop.com')) {\n steps.unshift({\n element: \"#dropdownMenuButton\",\n placement: 'right',\n title: \"Cookie Consent\",\n content: 'Before we start, we should tell you that this website stores cookies and other data in your browser. You can review our <a href=\"/privacy.html\" target=\"_new\">privacy policy</a>.'\n });\n steps.push({\n element: \"#booksMenuButton\",\n placement: 'left',\n title: \"Books\",\n content: \"Get some books that explain how to program all of this stuff, and write some games!\"\n });\n }\n if (isElectron) {\n steps.unshift({\n element: \"#dropdownMenuButton\",\n placement: 'right',\n title: \"Developer Analytics\",\n content: 'BTW, we send stack traces to sentry.io when exceptions are thrown. Hope that\\'s ok.'\n });\n steps.unshift({\n element: \"#dropdownMenuButton\",\n placement: 'right',\n title: \"Welcome to 8bitworkshop Desktop!\",\n content: 'The directory \"~/8bitworkshop\" contains all of your file edits and built ROM images. You can create new projects under the platform directories (e.g. \"c64/myproject\")'\n });\n }\n var tour = new Tour({\n autoscroll:false,\n //storage:false,\n steps:steps,\n onEnd: () => {\n userPrefs.completedTour();\n //requestPersistPermission(false, true);\n }\n });\n setTimeout(() => { tour.start(); }, 2500);\n }\n}\n\n///////////////////////////////////////////////////\n\nfunction globalErrorHandler(msgevent) {\n var msg = (msgevent.message || msgevent.error || msgevent)+\"\";\n // storage quota full? (Chrome) try to expand it\n if (msg.indexOf(\"QuotaExceededError\") >= 0) {\n requestPersistPermission(false, false);\n } else {\n var err = msgevent.error || msgevent.reason;\n if (err != null && err instanceof EmuHalt) {\n haltEmulation(err);\n }\n }\n}\n\nexport function haltEmulation(err?: EmuHalt) {\n console.log(\"haltEmulation\");\n _pause();\n emulationHalted(err);\n // TODO: reset platform?\n}\n\n// catch errors\nfunction installErrorHandler() {\n window.addEventListener('error', globalErrorHandler);\n window.addEventListener('unhandledrejection', globalErrorHandler);\n}\n \nfunction uninstallErrorHandler() {\n window.removeEventListener('error', globalErrorHandler);\n window.removeEventListener('unhandledrejection', globalErrorHandler);\n}\n\nexport function gotoNewLocation(replaceHistory? : boolean, newQueryString?: {}) {\n if (newQueryString) {\n qs = newQueryString;\n }\n uninstallErrorHandler();\n if (replaceHistory)\n window.location.replace(\"?\" + $.param(qs));\n else\n window.location.href = \"?\" + $.param(qs);\n}\n\nfunction replaceURLState() {\n if (platform_id) qs.platform = platform_id;\n delete qs['']; // remove null parameter\n history.replaceState({}, \"\", \"?\" + $.param(qs));\n}\n\nfunction addPageFocusHandlers() {\n var hidden = false;\n document.addEventListener(\"visibilitychange\", () => {\n if (document.visibilityState == 'hidden' && platform && platform.isRunning()) {\n _pause();\n hidden = true;\n } else if (document.visibilityState == 'visible' && hidden) {\n _resume();\n hidden = false;\n }\n });\n $(window).on(\"focus\", () => {\n if (hidden) {\n _resume();\n hidden = false;\n }\n });\n $(window).on(\"blur\", () => {\n if (platform && platform.isRunning()) {\n _pause();\n hidden = true;\n }\n });\n $(window).on(\"orientationchange\", () => {\n if (platform && platform.resize) setTimeout(platform.resize.bind(platform), 200);\n });\n}\n\n// TODO: merge w/ player.html somehow?\nfunction showInstructions() {\n var div = $(document).find(\".emucontrols-\" + getRootBasePlatform(platform_id));\n if (platform_id.endsWith(\".mame\")) div.show(); // TODO: MAME seems to eat the focus() event\n var vcanvas = $(\"#emulator\").find(\"canvas\");\n if (vcanvas) {\n vcanvas.on('focus', () => {\n if (platform.isRunning()) {\n div.fadeIn(200);\n // toggle sound for browser autoplay\n platform.pause();\n platform.resume();\n }\n });\n vcanvas.on('blur', () => {\n div.fadeOut(200);\n });\n }\n}\n\nfunction installGAHooks() {\n if (window['ga']) {\n $(\".dropdown-item\").click((e) => {\n if (e.target && e.target.id) {\n gaEvent('menu', e.target.id);\n }\n });\n gaPageView(location.pathname+'?platform='+platform_id+(repo_id?('&repo='+repo_id):('&file='+qs.file)));\n }\n}\n\nasync function startPlatform() {\n if (!PLATFORMS[platform_id]) throw Error(\"Invalid platform '\" + platform_id + \"'.\");\n let emudiv = $(\"#emuscreen\")[0];\n let options = decodeQueryString(qs.options || '');\n platform = new PLATFORMS[platform_id](emudiv, options);\n setPlatformUI();\n stateRecorder = new StateRecorderImpl(platform);\n const PRESETS = platform.getPresets ? platform.getPresets() : [];\n if (!qs.file) {\n // try to load last file (redirect)\n var lastid = userPrefs.getLastPreset();\n // load first preset file, unless we're in a repo\n var defaultfile = lastid || (repo_id ? null : PRESETS[0].id);\n qs.file = defaultfile || 'DEFAULT';\n if (!defaultfile) {\n alertError(\"There is no default main file for this project. Try selecting one from the pulldown.\");\n }\n }\n // legacy vcs stuff\n if (platform_id == 'vcs' && qs.file.startsWith('examples/') && !qs.file.endsWith('.a')) {\n qs.file += '.a';\n }\n // start platform and load file\n replaceURLState();\n installErrorHandler();\n installGAHooks();\n await platform.start();\n await loadBIOSFromProject();\n await initProject();\n await loadProject(qs.file);\n platform.sourceFileFetch = (path) => current_project.filedata[path];\n setupDebugControls();\n addPageFocusHandlers();\n showInstructions();\n if (isEmbed) {\n hideControlsForEmbed();\n } else {\n updateSelector();\n updateBooksMenu();\n showWelcomeMessage();\n }\n revealTopBar();\n}\n\nfunction hideControlsForEmbed() {\n $('#dropdownMenuButton').hide();\n $('#platformsMenuButton').hide();\n $('#booksMenuButton').hide();\n}\n\nfunction updateBooksMenu() {\n if (getRootBasePlatform(platform_id) == 'nes') $(\".book-nes\").addClass(\"book-active\");\n else if (getRootBasePlatform(platform_id) == 'vcs') $(\".book-vcs\").addClass(\"book-active\");\n else if (getRootBasePlatform(platform_id) == 'verilog') $(\".book-verilog\").addClass(\"book-active\");\n else if (platform.getToolForFilename(getCurrentMainFilename()) == 'sdcc') $(\".book-arcade\").addClass(\"book-active\");\n}\n\nfunction revealTopBar() {\n setTimeout(() => { $(\"#controls_dynamic\").css('visibility','inherit'); }, 250);\n}\n\nexport function setupSplits() {\n var splitName = 'workspace-split3-' + platform_id;\n if (isEmbed) splitName = 'embed-' + splitName;\n var sizes;\n if (platform_id.startsWith('vcs'))\n sizes = [0, 50, 50];\n else if (isEmbed || isMobileDevice)\n sizes = [0, 55, 45];\n else\n sizes = [12, 44, 44];\n var sizesStr = hasLocalStorage && localStorage.getItem(splitName);\n if (sizesStr) {\n try {\n sizes = JSON.parse(sizesStr);\n } catch (e) { console.log(e); }\n }\n var split = Split(['#sidebar', '#workspace', '#emulator'], {\n sizes: sizes,\n minSize: [0, 250, 250],\n onDrag: () => {\n if (platform && platform.resize) platform.resize();\n },\n onDragEnd: () => {\n if (hasLocalStorage) localStorage.setItem(splitName, JSON.stringify(split.getSizes()))\n if (projectWindows) projectWindows.resize();\n },\n });\n}\n\nfunction loadImportedURL(url : string) {\n // TODO: zip file?\n const ignore = parseBool(qs.ignore) || isEmbed;\n setWaitDialog(true);\n getWithBinary(url, async (data) => {\n if (data) {\n var path = getFilenameForPath(url);\n console.log(\"Importing \" + data.length + \" bytes as \" + path);\n try {\n var olddata = await store.getItem(path);\n setWaitDialog(false);\n if (olddata != null && ignore) {\n // ignore=1, do nothing\n } else if (olddata == null || confirm(\"Replace existing file '\" + path + \"'?\")) {\n await store.setItem(path, data);\n }\n delete qs.importURL;\n qs.file = path;\n replaceURLState();\n loadAndStartPlatform();\n } finally {\n setWaitDialog(false);\n }\n } else {\n alertError(\"Could not load source code from URL: \" + url);\n setWaitDialog(false);\n }\n }, 'text');\n}\n\nasync function loadFormDataUpload() {\n var ignore = parseBool(qs.ignore);\n var force = parseBool(qs.force);\n if (isEmbed) {\n ignore = !force; // ignore is default when embed=1 unless force=1\n } else {\n force = false; // can't use force w/o embed=1\n }\n for (var i=0; i<20; i++) {\n let path = qs['file'+i+'_name'];\n let dataenc = qs['file'+i+'_data'];\n if (path == null || dataenc == null) break;\n var olddata = await store.getItem(path);\n if (!(ignore && olddata)) {\n let value = dataenc;\n if (qs['file'+i+'_type'] == 'binary') {\n value = stringToByteArray(atob(value));\n }\n if (!olddata || force || confirm(\"Replace existing file '\" + path + \"'?\")) {\n await store.setItem(path, value);\n }\n }\n if (i == 0) { qs.file = path; } // set main filename\n delete qs['file'+i+'_name'];\n delete qs['file'+i+'_data'];\n delete qs['file'+i+'_type'];\n }\n delete qs.ignore;\n delete qs.force;\n replaceURLState();\n}\n\nfunction setPlatformUI() {\n var name = platform.getPlatformName && platform.getPlatformName();\n var menuitem = $('a[href=\"?platform='+platform_id+'\"]');\n if (menuitem.length) {\n menuitem.addClass(\"dropdown-item-checked\");\n name = name || menuitem.text() || name;\n }\n platform_name = name || platform_id;\n $(\".platform_name\").text(platform_name);\n}\n\nexport function getPlatformAndRepo() {\n // lookup repository for this platform (TODO: enable cross-platform repos)\n platform_id = qs.platform || userPrefs.getLastPlatformID();\n repo_id = qs.repo;\n // only look at cached repo_id if file= is not present, so back button works\n if (!qs.repo && !qs.file)\n repo_id = userPrefs.getLastRepoID(platform_id);\n // are we in a repo?\n if (hasLocalStorage && repo_id && repo_id !== '/') {\n var repo = getRepos()[repo_id];\n // override query string params w/ repo settings\n if (repo) {\n console.log(platform_id, qs, repo);\n qs.repo = repo_id;\n if (repo.platform_id && !qs.platform)\n qs.platform = platform_id = repo.platform_id;\n if (repo.mainPath && !qs.file)\n qs.file = repo.mainPath;\n // TODO: update repo definition if new main file compiles successfully\n //requestPersistPermission(true, true);\n }\n } else {\n repo_id = '';\n delete qs.repo;\n }\n // add default platform\n if (!platform_id) {\n if (isEmbed) fatalError(`The 'platform' must be specified when embed=1`);\n platform_id = qs.platform = \"vcs\";\n }\n}\n\n// start\nexport async function startUI() {\n // import from github?\n if (qs.githubURL) {\n importProjectFromGithub(qs.githubURL, true);\n return;\n }\n getPlatformAndRepo();\n setupSplits();\n // get store ID, repo id or platform id\n store_id = repo_id || getBasePlatform(platform_id);\n // are we embedded?\n if (isEmbed) {\n store_id = (document.referrer || document.location.href) + store_id;\n }\n // create store\n store = createNewPersistentStore(store_id);\n // is this an importURL?\n if (qs.importURL) {\n loadImportedURL(qs.importURL);\n return; // TODO: make async\n }\n // is this a file POST?\n if (qs.file0_name) {\n await loadFormDataUpload();\n }\n // load and start platform object\n loadAndStartPlatform();\n}\n\nasync function loadAndStartPlatform() {\n try {\n var module = await importPlatform(getRootBasePlatform(platform_id));\n console.log(\"starting platform\", platform_id); // loaded required <platform_id>.js file\n await startPlatform();\n document.title = document.title + \" [\" + platform_id + \"] - \" + (repo_id?('['+repo_id+'] - '):'') + current_project.mainPath;\n } catch (e) {\n console.log(e);\n alertError('Platform \"' + platform_id + '\" failed to load.');\n } finally {\n revealTopBar();\n }\n}\n\n// HTTPS REDIRECT\n\nconst useHTTPSCookieName = \"__use_https\";\n\nfunction setHTTPSCookie(val : number) {\n document.cookie = useHTTPSCookieName + \"=\" + val + \";domain=8bitworkshop.com;path=/;max-age=315360000\";\n}\n\nfunction shouldRedirectHTTPS() : boolean {\n // cookie set? either true or false\n var shouldRedir = getCookie(useHTTPSCookieName);\n if (typeof shouldRedir === 'string') {\n return !!shouldRedir; // convert to bool\n }\n // set a 10yr cookie, value depends on if it's our first time here\n var val = hasLocalStorage && !localStorage.getItem(\"__lastplatform\") ? 1 : 0;\n setHTTPSCookie(val);\n return !!val;\n}\n\nfunction _switchToHTTPS() {\n bootbox.confirm('<p>Do you want to force the browser to use HTTPS from now on?</p>'+\n '<p>WARNING: This will make all of your local files unavailable, so you should \"Download All Changes\" first for each platform where you have done work.</p>'+\n '<p>You can go back to HTTP by setting the \"'+useHTTPSCookieName+'\" cookie to 0.</p>', (ok) => {\n if (ok) {\n setHTTPSCookie(1);\n redirectToHTTPS();\n }\n });\n}\n\nfunction redirectToHTTPS() {\n if (window.location.protocol == 'http:' && window.location.host == '8bitworkshop.com') {\n if (shouldRedirectHTTPS()) {\n uninstallErrorHandler();\n window.location.replace(window.location.href.replace(/^http:/, 'https:'));\n } else {\n $(\"#item_switch_https\").click(_switchToHTTPS).show();\n }\n }\n}\n\n// redirect to HTTPS after script loads?\nredirectToHTTPS();\n\n//// ELECTRON (and other external) STUFF\n\nexport function setTestInput(path: string, data: FileData) {\n platform.writeFile(path, data);\n}\n\nexport function getTestOutput(path: string) : FileData {\n return platform.readFile(path);\n}\n\nexport function getSaveState() {\n return platform.saveState();\n}\n\nexport function emulationHalted(err: EmuHalt) {\n var msg = (err && err.message) || msg;\n showExceptionAsError(err, msg);\n projectWindows.refresh(false); // don't mess with cursor\n if (platform.saveState) showDebugInfo(platform.saveState());\n}\n\n// get remote file from local fs\ndeclare var alternateLocalFilesystem : ProjectFilesystem;\n\nexport async function reloadWorkspaceFile(path: string) {\n var oldval = current_project.filedata[path];\n if (oldval != null) {\n projectWindows.updateFile(path, await alternateLocalFilesystem.getFileData(path));\n console.log('updating file', path);\n }\n}\nfunction writeOutputROMFile() {\n if (isElectron && current_output instanceof Uint8Array) {\n var prefix = getFilenamePrefix(getCurrentMainFilename());\n var suffix = (platform.getROMExtension && platform.getROMExtension(current_output)) \n || \"-\" + getBasePlatform(platform_id) + \".bin\";\n alternateLocalFilesystem.setFileData(`bin/${prefix}${suffix}`, current_output);\n }\n}\nexport function highlightSearch(query: string) { // TODO: filename?\n var wnd = projectWindows.getActive();\n if (wnd instanceof SourceEditor) {\n var sc = wnd.editor.getSearchCursor(query);\n if (sc.findNext()) {\n wnd.editor.setSelection(sc.pos.to, sc.pos.from);\n }\n }\n}\n\nfunction startUIWhenVisible() {\n let started = false;\n let observer = new IntersectionObserver((entries, observer) => {\n for (var entry of entries) {\n if (entry.isIntersecting && !started) {\n startUI();\n started = true;\n }\n if (entry.intersectionRatio == 0 && isPlatformReady() && platform.isRunning()) {\n _pause();\n }\n if (entry.intersectionRatio > 0 && isPlatformReady() && !platform.isRunning()) {\n _resume();\n }\n }\n }, { });\n observer.observe($(\"#emulator\")[0]); //window.document.body);\n}\n\n/// start UI if in browser (not node)\nif (typeof process === 'undefined') {\n // if embedded, do not start UI until we scroll past it\n if (isEmbed && typeof IntersectionObserver === 'function') {\n startUIWhenVisible();\n } else {\n startUI();\n }\n}\n", "\nexport type FileData = string | Uint8Array;\n\nexport interface SourceLocation {\n line: number;\n label?: string;\n path?: string; // TODO: make mandatory?\n start?: number;\n end?: number;\n segment?:string;\n func?:string;\n}\n\n// actually it's a kind of SourceSnippet .. can have multiple per line\nexport interface SourceLine extends SourceLocation {\n offset:number;\n insns?:string;\n iscode?:boolean;\n cycles?:number;\n}\n\n// objects that have source code position info\nexport interface SourceLocated {\n $loc?: SourceLocation;\n}\n// statements also have the 'offset' (pc) field from SourceLine\nexport interface SourceLineLocated {\n $loc?: SourceLine;\n}\n\nexport class SourceFile {\n lines: SourceLine[];\n text: string;\n offset2loc: Map<number,SourceLine>; //{[offset:number]:number};\n line2offset: Map<number,number>; //{[line:number]:number};\n \n constructor(lines:SourceLine[], text:string) {\n lines = lines || [];\n this.lines = lines;\n this.text = text;\n this.offset2loc = new Map();\n this.line2offset = new Map();\n for (var info of lines) {\n if (info.offset >= 0) {\n // first line wins (is assigned to offset)\n // TODO: handle macros/includes w/ multiple offsets per line\n if (!this.offset2loc[info.offset])\n this.offset2loc[info.offset] = info;\n if (!this.line2offset[info.line])\n this.line2offset[info.line] = info.offset;\n }\n }\n }\n // TODO: smarter about looking for source lines between two addresses\n findLineForOffset(PC:number, lookbehind:number) : SourceLine {\n if (this.offset2loc) {\n for (var i=0; i<=lookbehind; i++) {\n var loc = this.offset2loc[PC];\n if (loc) {\n return loc;\n }\n PC--;\n }\n }\n return null;\n }\n lineCount():number { return this.lines.length; }\n}\n\nexport interface Dependency {\n path:string\n filename:string\n link:boolean\n data:FileData // TODO: or binary?\n}\n\nexport interface WorkerFileUpdate {\n path:string\n data:FileData\n};\nexport interface WorkerBuildStep {\n path?:string\n files?:string[]\n platform:string\n tool:string\n mainfile?:boolean\n};\nexport interface WorkerItemUpdate {\n key:string\n value:object\n};\n\n// TODO: split into different msg types\nexport interface WorkerMessage {\n preload?:string\n platform?:string\n tool?:string\n updates:WorkerFileUpdate[]\n buildsteps:WorkerBuildStep[]\n reset?:boolean\n code?:string\n setitems?:WorkerItemUpdate[]\n}\n\nexport interface WorkerError extends SourceLocation {\n msg:string,\n}\n\nexport interface CodeListing {\n lines:SourceLine[]\n asmlines?:SourceLine[]\n text?:string\n sourcefile?:SourceFile // not returned by worker\n assemblyfile?:SourceFile // not returned by worker\n}\n\nexport type CodeListingMap = {[path:string]:CodeListing};\n\n// TODO\nexport type VerilogOutput =\n {program_rom_variable:string, program_rom:Uint8Array, code:string, name:string, ports:any[], signals:any[]};\n\nexport type Segment = {\n name:string,\n start:number,\n size:number,\n last?:number,\n type?:string,\n source?:'native'|'linker'\n};\n\nexport type WorkerResult = WorkerErrorResult | WorkerOutputResult<any> | WorkerUnchangedResult;\n\nexport interface WorkerUnchangedResult {\n unchanged: true;\n}\n\nexport interface WorkerErrorResult {\n errors: WorkerError[]\n listings?: CodeListingMap\n}\n\nexport interface WorkerOutputResult<T> {\n output: T\n listings?: CodeListingMap\n symbolmap?: {[sym:string]:number}\n params?: {}\n segments?: Segment[]\n debuginfo?: {} // optional info\n}\n\nexport function isUnchanged(result: WorkerResult) : result is WorkerUnchangedResult {\n return ('unchanged' in result);\n}\n\nexport function isErrorResult(result: WorkerResult) : result is WorkerErrorResult {\n return ('errors' in result);\n}\n\nexport function isOutputResult(result: WorkerResult) : result is WorkerOutputResult<any> {\n return ('output' in result);\n}\n\nexport interface WorkingStore {\n getFileData(path:string) : FileData;\n}\n", "\nimport { FileData, Dependency, SourceLine, SourceFile, CodeListing, CodeListingMap, WorkerError, Segment, WorkerResult, WorkerOutputResult, isUnchanged, isOutputResult, WorkerMessage, WorkerItemUpdate, WorkerErrorResult, isErrorResult } from \"../common/workertypes\";\nimport { getFilenamePrefix, getFolderForPath, isProbablyBinary, getBasePlatform, getWithBinary } from \"../common/util\";\nimport { Platform } from \"../common/baseplatform\";\nimport localforage from \"localforage\";\n\nexport interface ProjectFilesystem {\n getFileData(path: string) : Promise<FileData>;\n setFileData(path: string, data: FileData) : Promise<void>;\n}\n\nexport class WebPresetsFileSystem implements ProjectFilesystem {\n preset_id : string;\n constructor(platform_id: string) {\n this.preset_id = getBasePlatform(platform_id); // remove .suffix from preset name\n }\n async getRemoteFile(path: string): Promise<FileData> {\n return new Promise( (yes,no)=> {\n return getWithBinary(path, yes, isProbablyBinary(path) ? 'arraybuffer' : 'text');\n });\n }\n async getFileData(path: string) : Promise<FileData> {\n // found on remote fetch?\n var webpath = \"presets/\" + this.preset_id + \"/\" + path;\n var data = await this.getRemoteFile(webpath);\n if (data) console.log(\"read\",webpath,data.length,'bytes');\n return data;\n }\n async setFileData(path: string, data: FileData) : Promise<void> {\n // not implemented\n }\n}\n\nexport class NullFilesystem implements ProjectFilesystem {\n gets = [];\n sets = [];\n getFileData(path: string): Promise<FileData> {\n this.gets.push(path);\n return null;\n }\n setFileData(path: string, data: FileData): Promise<void> {\n this.sets.push(path);\n return;\n }\n \n}\n\nexport class OverlayFilesystem implements ProjectFilesystem {\n basefs: ProjectFilesystem;\n overlayfs: ProjectFilesystem;\n constructor(basefs: ProjectFilesystem, overlayfs: ProjectFilesystem) {\n this.basefs = basefs;\n this.overlayfs = overlayfs;\n }\n async getFileData(path: string): Promise<FileData> {\n var data = await this.overlayfs.getFileData(path);\n if (data == null) {\n return this.basefs.getFileData(path);\n } else {\n return data;\n }\n }\n async setFileData(path: string, data: FileData): Promise<void> {\n await this.overlayfs.setFileData(path, data);\n return this.basefs.setFileData(path, data);\n }\n}\n\nexport class LocalForageFilesystem {\n store: any;\n constructor(store: any) {\n this.store = store;\n }\n async getFileData(path: string): Promise<FileData> {\n return this.store.getItem(path);\n }\n async setFileData(path: string, data: FileData): Promise<void> {\n return this.store.setItem(path, data);\n }\n}\n\ntype BuildResultCallback = (result:WorkerResult) => void;\ntype BuildStatusCallback = (busy:boolean) => void;\ntype IterateFilesCallback = (path:string, data:FileData) => void;\n\nfunction isEmptyString(text : FileData) {\n return typeof text == 'string' && text.trim && text.trim().length == 0;\n}\n\nexport class CodeProject {\n filedata : {[path:string]:FileData} = {};\n listings : CodeListingMap;\n segments : Segment[];\n mainPath : string;\n pendingWorkerMessages = 0;\n tools_preloaded = {};\n worker : Worker;\n platform_id : string;\n platform : Platform;\n isCompiling : boolean = false;\n filename2path = {}; // map stripped paths to full paths\n filesystem : ProjectFilesystem;\n dataItems : WorkerItemUpdate[];\n remoteTool? : string;\n\n callbackBuildResult : BuildResultCallback;\n callbackBuildStatus : BuildStatusCallback;\n\n constructor(worker, platform_id:string, platform, filesystem: ProjectFilesystem) {\n this.worker = worker;\n this.platform_id = platform_id;\n this.platform = platform;\n this.filesystem = filesystem;\n\n worker.onmessage = (e) => {\n this.receiveWorkerMessage(e.data);\n };\n }\n\n receiveWorkerMessage(data : WorkerResult) {\n var notfinal = this.pendingWorkerMessages > 1;\n if (notfinal) {\n this.sendBuild();\n this.pendingWorkerMessages = 1;\n } else {\n if (this.callbackBuildStatus) this.callbackBuildStatus(false);\n if (!this.isCompiling) { console.log(this.pendingWorkerMessages); console.trace(); } // debug compile problems\n this.isCompiling = false;\n this.pendingWorkerMessages = 0;\n }\n if (data && isOutputResult(data)) {\n this.processBuildResult(data);\n } else if (isErrorResult(data)) {\n this.processBuildListings(data);\n }\n this.callbackBuildResult(data);\n }\n\n getToolForFilename(path) {\n if (this.remoteTool) {\n return \"remote:\" + this.remoteTool;\n } else {\n return this.platform.getToolForFilename(path);\n }\n }\n\n preloadWorker(path:string) {\n var tool = this.getToolForFilename(path);\n if (tool && !this.tools_preloaded[tool]) {\n this.worker.postMessage({preload:tool, platform:this.platform_id});\n this.tools_preloaded[tool] = true;\n }\n }\n\n pushAllFiles(files:string[], fn:string) {\n // look for local and preset files\n files.push(fn);\n // look for files in current (main file) folder\n var dir = getFolderForPath(this.mainPath);\n if (dir.length > 0 && dir != 'local') // TODO\n files.push(dir + '/' + fn);\n }\n\n // TODO: use tool id to parse files, not platform\n parseIncludeDependencies(text:string):string[] {\n let files = [];\n let m;\n if (this.platform_id.startsWith('verilog')) {\n // include verilog includes\n let re1 = /^\\s*(`include|[.]include)\\s+\"(.+?)\"/gmi;\n while (m = re1.exec(text)) {\n this.pushAllFiles(files, m[2]);\n }\n // for Silice\n let re1a = /^\\s*\\$(include|\\$dofile|\\$write_image_in_table)\\('(.+?)'/gmi;\n while (m = re1a.exec(text)) {\n this.pushAllFiles(files, m[2]);\n }\n // include .arch (json) statements\n let re2 = /^\\s*([.]arch)\\s+(\\w+)/gmi;\n while (m = re2.exec(text)) {\n this.pushAllFiles(files, m[2]+\".json\");\n }\n // include $readmem[bh] (TODO)\n let re3 = /\\$readmem[bh]\\(\"(.+?)\"/gmi;\n while (m = re3.exec(text)) {\n this.pushAllFiles(files, m[1]);\n }\n } else {\n // for .asm -- [.%]include \"file\"\n // for .c -- #include \"file\"\n let re2 = /^\\s*[.#%]?(include|incbin|embed)\\s+\"(.+?)\"/gmi;\n while (m = re2.exec(text)) {\n this.pushAllFiles(files, m[2]);\n }\n // for .c -- //#resource \"file\" (or ;resource or #resource)\n let re3 = /^\\s*([;']|[/][/])#(resource)\\s+\"(.+?)\"/gm;\n while (m = re3.exec(text)) {\n this.pushAllFiles(files, m[3]);\n }\n // for XASM only (USE include.ext)\n // for merlin32 (ASM include.ext)\n let re4 = /^\\s+(USE|ASM)\\s+(\\S+[.]\\S+)/gm;\n while (m = re4.exec(text)) {\n this.pushAllFiles(files, m[2]);\n }\n // for wiz\n let re5 = /^\\s*(import|embed)\\s*\"(.+?)\";/gmi;\n while (m = re5.exec(text)) {\n if (m[1] == 'import')\n this.pushAllFiles(files, m[2] + \".wiz\");\n else\n this.pushAllFiles(files, m[2]);\n }\n // for ecs\n let re6 = /^\\s*(import)\\s*\"(.+?)\"/gmi;\n while (m = re6.exec(text)) {\n this.pushAllFiles(files, m[2]);\n }\n // for acme\n let re7 = /^[!]src\\s+\"(.+?)\"/gmi;\n while (m = re7.exec(text)) {\n this.pushAllFiles(files, m[1]);\n }\n }\n return files;\n }\n\n parseLinkDependencies(text:string):string[] {\n let files = [];\n let m;\n if (this.platform_id.startsWith('verilog')) {\n //\n } else {\n // for .c -- //#link \"file\" (or ;link or #link)\n let re = /^\\s*([;]|[/][/])#link\\s+\"(.+?)\"/gm;\n while (m = re.exec(text)) {\n this.pushAllFiles(files, m[2]);\n }\n }\n return files;\n }\n \n loadFileDependencies(text:string) : Promise<Dependency[]> {\n let includes = this.parseIncludeDependencies(text);\n let linkfiles = this.parseLinkDependencies(text);\n let allfiles = includes.concat(linkfiles);\n return this.loadFiles(allfiles).then((result) => {\n // set 'link' property on files that are link dependencies (must match filename)\n if (result) {\n for (let dep of result) {\n dep.link = linkfiles.indexOf(dep.path) >= 0;\n }\n }\n return result;\n });\n }\n\n okToSend():boolean {\n return this.pendingWorkerMessages++ == 0 && this.mainPath != null;\n }\n\n updateFileInStore(path:string, text:FileData) {\n this.filesystem.setFileData(path, text);\n }\n\n // TODO: test duplicate files, local paths mixed with presets\n buildWorkerMessage(depends:Dependency[]) : WorkerMessage {\n this.preloadWorker(this.mainPath);\n var msg : WorkerMessage = {updates:[], buildsteps:[]};\n // TODO: add preproc directive for __MAINFILE__\n var mainfilename = this.stripLocalPath(this.mainPath);\n var maintext = this.getFile(this.mainPath);\n var depfiles = [];\n msg.updates.push({path:mainfilename, data:maintext});\n this.filename2path[mainfilename] = this.mainPath;\n const tool = this.getToolForFilename(this.mainPath);\n let usesRemoteTool = tool.startsWith('remote:');\n for (var dep of depends) {\n // remote tools send both includes and linked files in one build step\n if (!dep.link || usesRemoteTool) {\n msg.updates.push({path:dep.filename, data:dep.data});\n depfiles.push(dep.filename);\n }\n this.filename2path[dep.filename] = dep.path;\n }\n msg.buildsteps.push({\n path:mainfilename,\n files:[mainfilename].concat(depfiles),\n platform:this.platform_id,\n tool:this.getToolForFilename(this.mainPath),\n mainfile:true});\n for (var dep of depends) {\n if (dep.data && dep.link) {\n this.preloadWorker(dep.filename);\n msg.updates.push({path:dep.filename, data:dep.data});\n msg.buildsteps.push({\n path:dep.filename,\n files:[dep.filename].concat(depfiles),\n platform:this.platform_id,\n tool:this.getToolForFilename(dep.path)});\n }\n }\n if (this.dataItems) msg.setitems = this.dataItems;\n return msg;\n }\n\n // TODO: get local file as well as presets?\n async loadFiles(paths:string[]) : Promise<Dependency[]> {\n var result : Dependency[] = [];\n var addResult = (path:string, data:FileData) => {\n result.push({\n path:path,\n filename:this.stripLocalPath(path),\n link:true,\n data:data\n });\n }\n for (var path of paths) {\n // look in cache\n if (path in this.filedata) { // found in cache?\n var data = this.filedata[path];\n if (data) {\n addResult(path, data);\n }\n } else {\n var data = await this.filesystem.getFileData(path);\n if (data) {\n this.filedata[path] = data; // do not update store, just cache\n addResult(path, data);\n } else {\n this.filedata[path] = null; // mark entry as invalid\n }\n }\n }\n return result;\n }\n\n getFile(path:string):FileData {\n return this.filedata[path];\n }\n\n // TODO: purge files not included in latest build?\n iterateFiles(callback:IterateFilesCallback) {\n for (var path in this.filedata) {\n callback(path, this.getFile(path));\n }\n }\n\n sendBuild() {\n if (!this.mainPath) throw Error(\"need to call setMainFile first\");\n var maindata = this.getFile(this.mainPath);\n // if binary blob, just return it as ROM\n if (maindata instanceof Uint8Array) {\n this.isCompiling = true;\n this.receiveWorkerMessage({\n output:maindata,\n errors:[],\n listings:null,\n symbolmap:null,\n params:{}\n });\n return;\n }\n // otherwise, make it a string\n var text = typeof maindata === \"string\" ? maindata : '';\n // TODO: load dependencies of non-main files\n return this.loadFileDependencies(text).then( (depends) => {\n if (!depends) depends = [];\n var workermsg = this.buildWorkerMessage(depends);\n this.worker.postMessage(workermsg);\n this.isCompiling = true;\n });\n }\n\n updateFile(path:string, text:FileData) {\n if (this.filedata[path] == text) return; // unchanged, don't update\n this.updateFileInStore(path, text); // TODO: isBinary\n this.filedata[path] = text;\n if (this.okToSend()) {\n if (this.callbackBuildStatus) this.callbackBuildStatus(true);\n this.sendBuild();\n }\n };\n\n setMainFile(path:string) {\n this.mainPath = path;\n if (this.callbackBuildStatus) this.callbackBuildStatus(true);\n this.sendBuild();\n }\n\n processBuildListings(data: WorkerOutputResult<any> | WorkerErrorResult) {\n // TODO: link listings with source files\n if (data.listings) {\n this.listings = data.listings;\n for (var lstname in this.listings) {\n var lst = this.listings[lstname];\n if (lst.lines)\n lst.sourcefile = new SourceFile(lst.lines, lst.text);\n if (lst.asmlines)\n lst.assemblyfile = new SourceFile(lst.asmlines, lst.text);\n }\n }\n }\n\n processBuildResult(data: WorkerOutputResult<any>) {\n this.processBuildListings(data);\n this.processBuildSegments(data);\n }\n\n processBuildSegments(data: WorkerOutputResult<any>) {\n // save and sort segment list\n var segs : Segment[] = (this.platform.getMemoryMap && this.platform.getMemoryMap()[\"main\"]) || [];\n if (segs?.length) { segs.forEach(seg => seg.source = 'native'); }\n if (data.segments) {\n data.segments.forEach(seg => seg.source = 'linker');\n segs = segs.concat(data.segments || []);\n }\n segs.sort((a,b) => {return a.start-b.start});\n this.segments = segs;\n }\n\n getListings() : CodeListingMap {\n return this.listings;\n }\n\n // returns first listing in format [prefix].lst (TODO: could be better)\n getListingForFile(path: string) : CodeListing {\n // ignore include files (TODO)\n //if (path.toLowerCase().endsWith('.h') || path.toLowerCase().endsWith('.inc'))\n //return;\n var fnprefix = getFilenamePrefix(this.stripLocalPath(path));\n // find listing with matching prefix\n var listings = this.getListings();\n for (var lstfn in listings) {\n if (lstfn == path)\n return listings[lstfn];\n }\n for (var lstfn in listings) {\n if (getFilenamePrefix(lstfn) == fnprefix) {\n return listings[lstfn];\n }\n }\n }\n \n stripLocalPath(path : string) : string {\n if (this.mainPath) {\n var folder = getFolderForPath(this.mainPath);\n // TODO: kinda weird if folder is same name as file prefix\n if (folder != '' && path.startsWith(folder+'/')) {\n path = path.substring(folder.length+1);\n }\n }\n return path;\n }\n\n updateDataItems(items: WorkerItemUpdate[]) {\n this.dataItems = items;\n if (this.okToSend()) { // TODO? mainpath == null?\n this.sendBuild(); // TODO: don't need entire build?\n }\n }\n\n}\n\nexport function createNewPersistentStore(storeid:string) : LocalForage {\n var store = localforage.createInstance({\n name: \"__\" + storeid,\n version: 2.0\n });\n return store;\n}\n\n", "\nimport $ = require(\"jquery\");\nimport { CodeProject } from \"./project\";\nimport { WorkerError, FileData } from \"../common/workertypes\";\nimport { getFilenamePrefix, getFilenameForPath } from \"../common/util\";\nimport { ProjectView } from \"./views/baseviews\";\n\ntype WindowCreateFunction = (id:string) => ProjectView;\ntype WindowShowFunction = (id:string, view:ProjectView) => void;\n\nexport class ProjectWindows {\n containerdiv : HTMLElement;\n project : CodeProject;\n id2window : {[id:string]:ProjectView} = {};\n id2createfn : {[id:string]:WindowCreateFunction} = {};\n id2showfn : {[id:string]:WindowShowFunction} = {};\n id2div : {[id:string]:HTMLElement} = {};\n activeid : string;\n activewnd : ProjectView;\n activediv : HTMLElement;\n lasterrors : WorkerError[];\n undofiles : string[];\n\n constructor(containerdiv:HTMLElement, project:CodeProject) {\n this.containerdiv = containerdiv;\n this.project = project;\n this.undofiles = [];\n }\n // TODO: delete windows ever?\n\n isWindow(id:string) : boolean {\n return this.id2createfn[id] != null;\n }\n\n setCreateFunc(id:string, createfn:WindowCreateFunction) : void {\n this.id2createfn[id] = createfn;\n }\n \n setShowFunc(id:string, showfn:WindowShowFunction) : void {\n this.id2showfn[id] = showfn;\n }\n\n create(id:string) : ProjectView {\n var wnd = this.id2window[id];\n if (!wnd) {\n console.log(\"creating window\",id);\n wnd = this.id2window[id] = this.id2createfn[id](id);\n }\n var div = this.id2div[id];\n if (!div) {\n div = this.id2div[id] = wnd.createDiv(this.containerdiv);\n $(div).hide();\n }\n return wnd;\n }\n\n createOrShow(id: string, moveCursor?: boolean) : ProjectView {\n var wnd = this.create(id);\n var div = this.id2div[id];\n if (this.activewnd != wnd) {\n this.activediv && $(this.activediv).hide();\n this.activewnd && this.activewnd.setVisible && this.activewnd.setVisible(false);\n this.activediv = div;\n this.activewnd = wnd;\n $(div).show();\n this.refresh(true); // needed to tell asset editor 1st time running, but that's bad\n this.refreshErrors();\n wnd.setVisible && wnd.setVisible(true);\n this.id2showfn[id] && this.id2showfn[id](id, wnd);\n } else {\n this.refresh(moveCursor);\n }\n this.activeid = id;\n return wnd;\n }\n\n put(id:string, window:ProjectView) : void {\n this.id2window[id] = window;\n }\n\n refresh(moveCursor:boolean) : void {\n // refresh current window\n if (this.activewnd && this.activewnd.refresh)\n this.activewnd.refresh(moveCursor);\n }\n\n tick() : void {\n if (this.activewnd && this.activewnd.tick)\n this.activewnd.tick();\n }\n\n setErrors(errors:WorkerError[]) : void {\n this.lasterrors = errors;\n this.refreshErrors();\n }\n\n refreshErrors() : void {\n if (this.activewnd && this.activewnd.markErrors) {\n if (this.lasterrors && this.lasterrors.length)\n this.activewnd.markErrors(this.lasterrors);\n else\n this.activewnd.clearErrors();\n }\n }\n\n getActive() : ProjectView { return this.activewnd; }\n\n getActiveID() : string { return this.activeid; }\n\n getCurrentText() : string {\n if (this.activewnd && this.activewnd.getValue)\n return this.activewnd.getValue();\n else\n bootbox.alert(\"Please switch to an editor window.\");\n }\n\n resize() : void {\n if (this.activeid && this.activewnd && this.activewnd.recreateOnResize) {\n this.activewnd = null;\n this.id2window[this.activeid] = null;\n this.id2div[this.activeid] = null;\n this.createOrShow(this.activeid);\n }\n }\n\n updateFile(fileid:string, data:FileData) {\n // is there an editor? if so, use it\n var wnd = this.id2window[fileid];\n if (wnd && wnd.setText && typeof data === 'string') {\n wnd.setText(data);\n this.undofiles.push(fileid);\n } else {\n this.project.updateFile(fileid, data);\n }\n }\n \n undoStep() {\n var fileid = this.undofiles.pop();\n var wnd = this.id2window[fileid];\n if (wnd && wnd.undoStep) {\n wnd.undoStep();\n } else {\n bootbox.alert(\"No more steps to undo.\");\n }\n }\n\n updateAllOpenWindows(store) {\n for (var fileid in this.id2window) {\n var wnd = this.id2window[fileid];\n if (wnd && wnd.setText) {\n store.getItem(fileid).then((data) => {\n this.updateFile(fileid, data);\n });\n }\n }\n }\n\n findWindowWithFilePrefix(filename : string) : string {\n filename = getFilenameForPath(getFilenamePrefix(filename));\n for (var fileid in this.id2createfn) {\n // ignore include files (TODO)\n if (fileid.toLowerCase().endsWith('.h') || fileid.toLowerCase().endsWith('.inc') || fileid.toLowerCase().endsWith('.bas'))\n continue;\n if (getFilenameForPath(getFilenamePrefix(fileid)) == filename) return fileid;\n }\n return null;\n }\n};\n", "\nimport { getFolderForPath, isProbablyBinary, stringToByteArray, byteArrayToString, byteArrayToUTF8 } from \"../common/util\";\nimport { FileData } from \"../common/workertypes\";\nimport { CodeProject, ProjectFilesystem } from \"./project\";\n\n// in index.html\ndeclare var exports;\ndeclare var firebase;\n\n// https://github.com/philschatz/octokat.js/tree/master/examples\n\nexport interface GHRepoMetadata {\n url : string;\t\t// github url\n platform_id : string; // e.g. \"vcs\"\n sha? : string;\t// head commit sha\n mainPath?: string;\t// main file path\n branch? : string;\t// \"master\" was default, now fetched from GH\n}\n\nexport interface GHSession extends GHRepoMetadata {\n user : string;\t// user name\n reponame : string;\t// repo name\n repopath : string;\t// \"user/repo\"\n subtreepath : string;\t// tree/[branch]/[...]\n prefix : string;\t// file prefix, \"local/\" or \"\"\n repo : any;\t\t// [repo object]\n tree? : any;\t\t// [tree object]\n head? : any;\t\t// [head ref]\n commit?: any;\t\t// after commit()\n paths? : string[];\n}\n\nconst README_md_template = \"$NAME\\n=====\\n\\n[Open this project in 8bitworkshop](http://8bitworkshop.com/redir.html?platform=$PLATFORM&githubURL=$GITHUBURL&file=$MAINFILE).\\n\";\n\nexport function getRepos() : {[key:string]:GHRepoMetadata} {\n var repos = {};\n for (var i=0; i<localStorage.length; i++) {\n var key = localStorage.key(i);\n if (key.startsWith('__repo__')) {\n var repodata : GHRepoMetadata = JSON.parse(localStorage.getItem(key));\n var path = key.substring('__repo__'.length);\n repos[path] = repodata;\n }\n }\n return repos;\n}\n\nexport function parseGithubURL(ghurl:string) {\n var toks = ghurl.split('/', 8);\n if (toks.length < 5) return null;\n if (toks[0] != 'https:') return null;\n if (toks[2] != 'github.com') return null;\n if (toks[5] && toks[5] != 'tree') return null;\n return {user:toks[3], repo:toks[4], repopath:toks[3]+'/'+toks[4], branch:toks[6], subtreepath:toks[7]};\n}\n \nexport class GithubService {\n\n githubCons;\n githubToken;\n github;\n store;\n project : CodeProject;\n\n constructor(githubCons:() => any, githubToken:string, store, project : CodeProject) {\n this.githubCons = githubCons;\n this.githubToken = githubToken;\n this.store = store;\n this.project = project;\n this.recreateGithub();\n }\n \n recreateGithub() {\n this.github = new this.githubCons({token:this.githubToken});\n }\n \n login() : Promise<void> {\n // already logged in? return immediately\n if (this.githubToken && this.githubToken.length) {\n return new Promise<void>( (yes,no) => {\n yes();\n });\n }\n // login via popup\n var provider = new firebase.auth.GithubAuthProvider();\n provider.addScope('repo');\n return firebase.auth().signInWithPopup(provider).then( (result) => {\n this.githubToken = result.credential.accessToken;\n var user = result.user;\n this.recreateGithub();\n document.cookie = \"__github_key=\" + this.githubToken + \";path=/;max-age=31536000\";\n console.log(\"Stored GitHub OAUTH key\");\n });\n }\n \n logout() : Promise<void> {\n // already logged out? return immediately\n if (!(this.githubToken && this.githubToken.length)) {\n return new Promise<void>( (yes,no) => {\n yes();\n });\n }\n // logout\n return firebase.auth().signOut().then(() => {\n document.cookie = \"__github_key=;path=/;max-age=0\";\n this.githubToken = null;\n this.recreateGithub();\n });\n }\n \n isFileIgnored(s : string) : boolean {\n s = s.toUpperCase();\n if (s.startsWith(\"LICENSE\")) return true;\n if (s.startsWith(\"README\")) return true;\n if (s.startsWith(\".\")) return true;\n return false;\n }\n\n async getGithubSession(ghurl:string) : Promise<GHSession> {\n var urlparse = parseGithubURL(ghurl);\n if (!urlparse) {\n throw new Error(\"Please enter a valid GitHub URL.\");\n }\n // use saved branch, or load default from rpo\n var saved = getRepos()[urlparse.repopath];\n var branch = urlparse.branch || (saved && saved.branch);\n var repo = this.github.repos(urlparse.user, urlparse.repo);\n if (1 || branch == null) {\n try {\n branch = (await repo.fetch()).defaultBranch || \"master\";\n } catch (e) {\n console.log(\"could not fetch default branch: \" + e);\n branch = \"main\";\n }\n console.log(\"branch =\", branch);\n }\n var sess = {\n url: ghurl,\n user: urlparse.user,\n reponame: urlparse.repo,\n repopath: urlparse.repopath,\n branch: branch,\n subtreepath: urlparse.subtreepath,\n prefix: '', //this.getPrefix(urlparse.user, urlparse.repo),\n repo: repo,\n platform_id: this.project ? this.project.platform_id : (saved ? saved.platform_id : null)\n };\n //console.log(sess);\n return sess;\n }\n\n getGithubHEADTree(ghurl:string) : Promise<GHSession> {\n var sess;\n return this.getGithubSession(ghurl).then( (session) => {\n sess = session;\n return sess.repo.git.refs.heads(sess.branch).fetch();\n })\n .then( (head) => {\n sess.head = head;\n sess.sha = head.object.sha;\n return sess.repo.git.trees(sess.sha).fetch();\n })\n .then( (tree) => {\n if (sess.subtreepath) {\n for (let subtree of tree.tree) {\n if (subtree.type == 'tree' && subtree.path == sess.subtreepath && subtree.sha) {\n return sess.repo.git.trees(subtree.sha).fetch();\n }\n }\n throw Error(\"Cannot find subtree '\" + sess.subtreepath + \"' in tree \" + tree.sha);\n }\n return tree;\n })\n .then( (tree) => {\n sess.tree = tree;\n return sess;\n });\n }\n \n bind(sess:GHSession, dobind:boolean) {\n var key = '__repo__' + sess.repopath;\n if (dobind) {\n var repodata : GHRepoMetadata = {\n url:sess.url,\n branch:sess.branch,\n platform_id:sess.platform_id,\n mainPath:sess.mainPath,\n sha:sess.sha};\n console.log('storing', repodata);\n localStorage.setItem(key, JSON.stringify(repodata));\n } else {\n localStorage.removeItem(key);\n }\n }\n \n import(ghurl:string) : Promise<GHSession> {\n var sess : GHSession;\n return this.getGithubSession(ghurl).then( (session) => {\n sess = session;\n // load README\n return sess.repo.contents('README.md').read();\n })\n .catch( (e) => {\n console.log(e);\n console.log('no README.md found')\n // make user repo exists\n return sess.repo.fetch().then( (_repo) => {\n return ''; // empty README\n })\n })\n .then( (readme) => {\n var m;\n // check README for main file\n const re8main = /8bitworkshop.com[^)]+file=([^)&]+)/;\n m = re8main.exec(readme);\n if (m && m[1]) {\n console.log(\"main path: '\" + m[1] + \"'\");\n sess.mainPath = m[1];\n }\n // check README for proper platform\n // unless we use githubURL=\n // TODO: cannot handle multiple URLs in README\n const re8plat = /8bitworkshop.com[^)]+platform=([A-Za-z0-9._\\-]+)/;\n m = re8plat.exec(readme);\n if (m) {\n console.log(\"platform id: '\" + m[1] + \"'\");\n if (sess.platform_id && !sess.platform_id.startsWith(m[1]))\n throw Error(\"Platform mismatch: Repository is \" + m[1] + \", you have \" + sess.platform_id + \" selected.\");\n sess.platform_id = m[1];\n }\n // bind to repository\n this.bind(sess, true);\n // get head commit\n return sess;\n });\n }\n \n pull(ghurl:string, deststore?) : Promise<GHSession> {\n var sess : GHSession;\n return this.getGithubHEADTree(ghurl).then( (session) => {\n sess = session;\n let blobreads = [];\n sess.paths = [];\n sess.tree.tree.forEach( (item) => {\n console.log(item.path, item.type, item.size);\n sess.paths.push(item.path);\n if (item.type == 'blob' && !this.isFileIgnored(item.path)) {\n var read = sess.repo.git.blobs(item.sha).fetch().then( (blob) => {\n var path = sess.prefix + item.path;\n var size = item.size;\n var encoding = blob.encoding;\n var data = blob.content;\n if (blob.encoding == 'base64') {\n var bindata = stringToByteArray(atob(data));\n var isBinary = isProbablyBinary(item.path, bindata);\n data = isBinary ? bindata : byteArrayToUTF8(bindata);\n }\n if (blob.size != data.length) {\n data = data.slice(0, blob.size);\n }\n return (deststore || this.store).setItem(path, data);\n });\n blobreads.push(read);\n } else {\n console.log(\"ignoring \" + item.path);\n }\n });\n return Promise.all(blobreads);\n })\n .then( (blobs) => {\n return sess;\n });\n }\n \n importAndPull(ghurl:string) {\n return this.import(ghurl).then((sess) => {\n return this.pull(ghurl);\n });\n }\n\n publish(reponame:string, desc:string, license:string, isprivate:boolean) : Promise<GHSession> {\n var repo;\n var platform_id = this.project.platform_id;\n var mainPath = this.project.stripLocalPath(this.project.mainPath);\n return this.github.user.repos.create({\n name: reponame,\n description: desc,\n private: isprivate,\n auto_init: false,\n license_template: license\n })\n .then( (_repo) => {\n repo = _repo;\n // create README.md\n var s = README_md_template;\n s = s.replace(/\\$NAME/g, encodeURIComponent(reponame));\n s = s.replace(/\\$PLATFORM/g, encodeURIComponent(platform_id));\n s = s.replace(/\\$GITHUBURL/g, encodeURIComponent(repo.htmlUrl));\n s = s.replace(/\\$MAINFILE/g, encodeURIComponent(mainPath));\n var config = {\n message: '8bitworkshop: updated metadata in README.md',\n content: btoa(s)\n }\n return repo.contents('README.md').add(config);\n }).then( () => {\n return this.getGithubSession(repo.htmlUrl);\n });\n }\n \n commit( ghurl:string, message:string, files:{path:string,data:FileData}[] ) : Promise<GHSession> {\n var sess : GHSession;\n if (!message) { message = \"updated from 8bitworkshop.com\"; }\n return this.getGithubHEADTree(ghurl).then( (session) => {\n sess = session;\n if (sess.subtreepath) {\n throw Error(\"Sorry, right now you can only commit files to the root directory of a repository.\");\n }\n return Promise.all(files.map( (file) => {\n if (typeof file.data === 'string') {\n return sess.repo.git.blobs.create({\n content: file.data,\n encoding: 'utf-8'\n });\n } else {\n return sess.repo.git.blobs.create({\n content: btoa(byteArrayToString(file.data)),\n encoding: 'base64'\n });\n }\n }));\n }).then( (blobs) => {\n return sess.repo.git.trees.create({\n tree: files.map( (file, index) => {\n return {\n path: file.path,\n mode: '100644',\n type: 'blob',\n sha: blobs[index]['sha']\n };\n }),\n base_tree: sess.tree.sha\n });\n }).then( (newtree) => {\n return sess.repo.git.commits.create({\n message: message,\n tree: newtree.sha,\n parents: [\n sess.head.object.sha\n ]\n });\n }).then( (commit1) => {\n return sess.repo.commits(commit1.sha).fetch();\n }).then( (commit) => {\n sess.commit = commit;\n return sess;\n });\n }\n\n push(sess:GHSession) : Promise<GHSession> {\n return sess.head.update({\n sha: sess.commit.sha\n }).then( (update) => {\n return sess;\n });\n }\n \n deleteRepository(ghurl:string) {\n return this.getGithubSession(ghurl).then( (session) => {\n return session.repo.remove();\n });\n }\n\n}\n\n//\n\nexport class FirebaseProjectFilesystem implements ProjectFilesystem {\n ref;\n constructor(user_id: string, store_id: string) {\n var database = firebase.database();\n this.ref = database.ref('users/' + user_id + \"/\" + store_id);\n }\n getChildForPath(path:string) {\n var encodedPath = encodeURIComponent(path).replace('-','%2D').replace('.','%2E');\n return this.ref.child(encodedPath);\n }\n async getFileData(path: string): Promise<FileData> {\n console.log(this.getChildForPath(\"test\"));\n var snapshot = await this.getChildForPath(path).get();\n return snapshot.exists() ? snapshot.val().filedata : null;\n }\n async setFileData(path: string, data: FileData): Promise<void> {\n return this.getChildForPath(path).set({\n filedata: data\n });\n }\n}\n", "\nimport { CodeAnalyzer } from \"../../common/analysis\";\nimport { SourceFile, WorkerError } from \"../../common/workertypes\";\n\nexport interface ProjectView {\n createDiv(parent: HTMLElement): HTMLElement;\n setVisible?(showing: boolean): void;\n refresh(moveCursor: boolean): void;\n tick?(): void;\n getPath?(): string;\n getValue?(): string;\n setText?(text: string): void;\n insertText?(text: string): void;\n getCursorPC?(): number;\n getSourceFile?(): SourceFile;\n setGutterBytes?(line: number, s: string): void;\n markErrors?(errors: WorkerError[]): void;\n clearErrors?(): void;\n setTimingResult?(result: CodeAnalyzer): void;\n recreateOnResize?: boolean;\n undoStep?(): void;\n};\n\n// detect mobile (https://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device)\nexport var isMobileDevice = window.matchMedia && window.matchMedia(\"only screen and (max-width: 760px)\").matches;\n\nexport function newDiv(parent?, cls?: string) {\n var div = $(document.createElement(\"div\"));\n if (parent) div.appendTo(parent)\n if (cls) div.addClass(cls);\n return div;\n}\n\n", "\nimport { isMobileDevice, ProjectView } from \"./baseviews\";\nimport { SourceFile, WorkerError, SourceLocation } from \"../../common/workertypes\";\nimport { CodeAnalyzer } from \"../../common/analysis\";\nimport { platform, current_project, lastDebugState, runToPC, qs } from \"../ui\";\nimport { hex, rpad } from \"../../common/util\";\n\ndeclare var CodeMirror;\n\n// helper function for editor\nfunction jumpToLine(ed, i:number) {\n var t = ed.charCoords({line: i, ch: 0}, \"local\").top;\n var middleHeight = ed.getScrollerElement().offsetHeight / 2;\n ed.scrollTo(null, t - middleHeight - 5);\n}\n\nfunction createTextSpan(text:string, className:string) : HTMLElement {\n var span = document.createElement(\"span\");\n span.setAttribute(\"class\", className);\n span.appendChild(document.createTextNode(text));\n return span;\n}\n\n/////\n\n// look ahead this many bytes when finding source lines for a PC\nexport const PC_LINE_LOOKAHEAD = 64;\n\nconst MAX_ERRORS = 200;\n\nconst MODEDEFS = {\n default: { theme: 'mbo' }, // NOTE: Not merged w/ other modes\n '6502': { isAsm: true },\n z80: { isAsm: true },\n jsasm: { isAsm: true },\n gas: { isAsm: true },\n vasm: { isAsm: true },\n inform6: { theme: 'cobalt' },\n markdown: { lineWrap: true },\n fastbasic: { noGutters: true },\n basic: { noLineNumbers: true, noGutters: true }, // TODO: not used?\n ecs: { theme: 'mbo', isAsm: true },\n}\n\nexport var textMapFunctions = {\n input: null\n};\n\nexport class SourceEditor implements ProjectView {\n constructor(path:string, mode:string) {\n this.path = path;\n this.mode = mode;\n }\n path : string;\n mode : string;\n editor;\n updateTimer = null;\n dirtylisting = true;\n sourcefile : SourceFile;\n currentDebugLine : SourceLocation;\n markCurrentPC; // TextMarker\n markHighlight; // TextMarker\n errormsgs = [];\n errorwidgets = [];\n errormarks = [];\n inspectWidget;\n refreshDelayMsec = 300;\n\n createDiv(parent:HTMLElement) {\n var div = document.createElement('div');\n div.setAttribute(\"class\", \"editor\");\n parent.appendChild(div);\n var text = current_project.getFile(this.path) as string;\n var asmOverride = text && this.mode=='verilog' && /__asm\\b([\\s\\S]+?)\\b__endasm\\b/.test(text);\n this.newEditor(div, asmOverride);\n if (text) {\n this.setText(text); // TODO: this calls setCode() and builds... it shouldn't\n this.editor.setSelection({line:0,ch:0}, {line:0,ch:0}, {scroll:true}); // move cursor to start\n }\n this.setupEditor();\n if (current_project.getToolForFilename(this.path).startsWith(\"remote:\")) {\n this.refreshDelayMsec = 1000; // remote URLs get slower refresh\n }\n return div;\n }\n\n setVisible(showing: boolean): void {\n if (showing) {\n this.editor.focus(); // so that keyboard works when moving between files\n }\n }\n\n newEditor(parent:HTMLElement, isAsmOverride?:boolean) {\n var modedef = MODEDEFS[this.mode] || MODEDEFS.default;\n var isAsm = isAsmOverride || modedef.isAsm;\n var lineWrap = !!modedef.lineWrap;\n var theme = modedef.theme || MODEDEFS.default.theme;\n var lineNums = !modedef.noLineNumbers && !isMobileDevice;\n if (qs['embed']) {\n lineNums = false; // no line numbers while embedded\n isAsm = false; // no opcode bytes either\n }\n var gutters = [\"CodeMirror-linenumbers\", \"gutter-offset\", \"gutter-info\"];\n if (isAsm) gutters = [\"CodeMirror-linenumbers\", \"gutter-offset\", \"gutter-bytes\", \"gutter-clock\", \"gutter-info\"];\n if (modedef.noGutters || isMobileDevice) gutters = [\"gutter-info\"];\n this.editor = CodeMirror(parent, {\n theme: theme,\n lineNumbers: lineNums,\n matchBrackets: true,\n tabSize: 8,\n indentAuto: true,\n lineWrapping: lineWrap,\n gutters: gutters\n });\n }\n\n editorChanged() {\n clearTimeout(this.updateTimer);\n this.updateTimer = setTimeout( () => {\n current_project.updateFile(this.path, this.editor.getValue());\n }, this.refreshDelayMsec);\n if (this.markHighlight) {\n this.markHighlight.clear();\n this.markHighlight = null;\n }\n }\n\n setupEditor() {\n // update file in project (and recompile) when edits made\n this.editor.on('changes', (ed, changeobj) => {\n this.editorChanged();\n });\n // inspect symbol when it's highlighted (double-click)\n this.editor.on('cursorActivity', (ed) => {\n this.inspectUnderCursor();\n });\n // gutter clicked\n this.editor.on(\"gutterClick\", (cm, n) => {\n this.toggleBreakpoint(n);\n });\n // set editor mode for highlighting, etc\n this.editor.setOption(\"mode\", this.mode);\n // change text?\n this.editor.on('beforeChange', (cm, chgobj) => {\n if (textMapFunctions.input && chgobj.text) chgobj.text = chgobj.text.map(textMapFunctions.input);\n });\n }\n\n inspectUnderCursor() {\n var start = this.editor.getCursor(true);\n var end = this.editor.getCursor(false);\n if (start.line == end.line && start.ch < end.ch && end.ch-start.ch < 80) {\n var name = this.editor.getSelection();\n this.inspect(name);\n } else {\n this.inspect(null);\n }\n }\n\n inspect(ident : string) : void {\n var result;\n if (platform.inspect) {\n result = platform.inspect(ident);\n }\n if (this.inspectWidget) {\n this.inspectWidget.clear();\n this.inspectWidget = null;\n }\n if (result) {\n var infospan = createTextSpan(result, \"tooltipinfoline\");\n var line = this.editor.getCursor().line;\n this.inspectWidget = this.editor.addLineWidget(line, infospan, {above:false});\n }\n }\n\n setText(text:string) {\n var i,j;\n var oldtext = this.editor.getValue();\n if (oldtext != text) {\n this.editor.setValue(text);\n /*\n // find minimum range to undo\n for (i=0; i<oldtext.length && i<text.length && text[i] == oldtext[i]; i++) { }\n for (j=0; j<oldtext.length && j<text.length && text[text.length-1-j] == oldtext[oldtext.length-1-j]; j++) { }\n //console.log(i,j,oldtext.substring(i,oldtext.length-j));\n this.replaceSelection(i, oldtext.length-j, text.substring(i, text.length-j)); // calls setCode()\n */\n // clear history if setting empty editor\n if (oldtext == '') {\n this.editor.clearHistory();\n }\n }\n }\n\n insertText(text:string) {\n var cur = this.editor.getCursor();\n this.editor.replaceRange(text, cur, cur);\n }\n\n highlightLines(start:number, end:number) {\n //this.editor.setSelection({line:start, ch:0}, {line:end, ch:0});\n var cls = 'hilite-span'\n var markOpts = {className:cls, inclusiveLeft:true};\n this.markHighlight = this.editor.markText({line:start,ch:0}, {line:end,ch:0}, markOpts);\n this.editor.scrollIntoView({from:{line:start,ch:0}, to:{line:end,ch:0}});\n }\n\n replaceSelection(start:number, end:number, text:string) {\n this.editor.setSelection(this.editor.posFromIndex(start), this.editor.posFromIndex(end));\n this.editor.replaceSelection(text);\n }\n\n getValue() : string {\n return this.editor.getValue();\n }\n\n getPath() : string { return this.path; }\n\n addError(info: WorkerError) {\n // only mark errors with this filename, or without any filename\n if (!info.path || this.path.endsWith(info.path)) {\n var numLines = this.editor.lineCount();\n var line = info.line-1;\n if (isNaN(line) || line < 0 || line >= numLines) line = 0;\n this.addErrorMarker(line, info.msg);\n if (info.start != null) {\n var markOpts = {className:\"mark-error\", inclusiveLeft:true};\n var start = {line:line, ch:info.end?info.start:info.start-1};\n var end = {line:line, ch:info.end?info.end:info.start};\n var mark = this.editor.markText(start, end, markOpts);\n this.errormarks.push(mark);\n }\n }\n }\n\n addErrorMarker(line:number, msg:string) {\n var div = document.createElement(\"div\");\n div.setAttribute(\"class\", \"tooltipbox tooltiperror\");\n div.appendChild(document.createTextNode(\"\\u24cd\"));\n this.editor.setGutterMarker(line, \"gutter-info\", div);\n this.errormsgs.push({line:line, msg:msg});\n // expand line widgets when mousing over errors\n $(div).mouseover((e) => {\n this.expandErrors();\n });\n }\n\n addErrorLine(line:number, msg:string) {\n var errspan = createTextSpan(msg, \"tooltiperrorline\");\n this.errorwidgets.push(this.editor.addLineWidget(line, errspan));\n }\n\n expandErrors() {\n var e;\n while (e = this.errormsgs.shift()) {\n this.addErrorLine(e.line, e.msg);\n }\n }\n\n markErrors(errors:WorkerError[]) {\n // TODO: move cursor to error line if offscreen?\n this.clearErrors();\n errors = errors.slice(0, MAX_ERRORS);\n for (var info of errors) {\n this.addError(info);\n }\n }\n\n clearErrors() {\n this.dirtylisting = true;\n // clear line widgets\n this.editor.clearGutter(\"gutter-info\");\n this.errormsgs = [];\n while (this.errorwidgets.length) this.errorwidgets.shift().clear();\n while (this.errormarks.length) this.errormarks.shift().clear();\n }\n\n getSourceFile() : SourceFile { return this.sourcefile; }\n\n updateListing() {\n // update editor annotations\n // TODO: recreate editor if gutter-bytes is used (verilog)\n this.clearErrors();\n this.editor.clearGutter(\"gutter-bytes\");\n this.editor.clearGutter(\"gutter-offset\");\n this.editor.clearGutter(\"gutter-clock\");\n var lstlines = this.sourcefile.lines || [];\n for (var info of lstlines) {\n //if (info.path && info.path != this.path) continue;\n if (info.offset >= 0) {\n this.setGutter(\"gutter-offset\", info.line-1, hex(info.offset&0xffff,4));\n }\n if (info.insns) {\n var insnstr = info.insns.length > 9 ? (\"...\") : info.insns;\n this.setGutter(\"gutter-bytes\", info.line-1, insnstr);\n if (info.iscode) {\n // TODO: labels trick this part?\n if (info.cycles) {\n this.setGutter(\"gutter-clock\", info.line-1, info.cycles+\"\");\n } else if (platform.getOpcodeMetadata) {\n var opcode = parseInt(info.insns.split(\" \")[0], 16);\n var meta = platform.getOpcodeMetadata(opcode, info.offset);\n if (meta && meta.minCycles) {\n var clockstr = meta.minCycles+\"\";\n this.setGutter(\"gutter-clock\", info.line-1, clockstr);\n }\n }\n }\n }\n }\n }\n\n setGutter(type:string, line:number, text:string) {\n var lineinfo = this.editor.lineInfo(line);\n if (lineinfo && lineinfo.gutterMarkers && lineinfo.gutterMarkers[type]) {\n // do not replace existing marker\n } else {\n var textel = document.createTextNode(text);\n this.editor.setGutterMarker(line, type, textel);\n }\n }\n\n setGutterBytes(line:number, s:string) {\n this.setGutter(\"gutter-bytes\", line-1, s);\n }\n\n setTimingResult(result:CodeAnalyzer) : void {\n this.editor.clearGutter(\"gutter-bytes\");\n if (this.sourcefile == null) return;\n // show the lines\n for (const line of Object.keys(this.sourcefile.line2offset)) {\n let pc = this.sourcefile.line2offset[line];\n let clocks = result.pc2clockrange[pc];\n var minclocks = clocks && clocks.minclocks;\n var maxclocks = clocks && clocks.maxclocks;\n if (minclocks>=0 && maxclocks>=0) {\n var s;\n if (maxclocks == minclocks)\n s = minclocks + \"\";\n else\n s = minclocks + \"-\" + maxclocks;\n if (maxclocks == result.MAX_CLOCKS)\n s += \"+\";\n this.setGutterBytes(parseInt(line), s);\n }\n }\n }\n\n setCurrentLine(line:SourceLocation, moveCursor:boolean) {\n var blocked = platform.isBlocked && platform.isBlocked();\n\n var addCurrentMarker = (line:SourceLocation) => {\n var div = document.createElement(\"div\");\n var cls = blocked ? 'currentpc-marker-blocked' : 'currentpc-marker';\n div.classList.add(cls);\n div.appendChild(document.createTextNode(\"\\u25b6\"));\n this.editor.setGutterMarker(line.line-1, \"gutter-info\", div);\n }\n\n this.clearCurrentLine(moveCursor);\n if (line) {\n addCurrentMarker(line);\n if (moveCursor) {\n this.editor.setCursor({line:line.line-1,ch:line.start||0}, {scroll:true});\n }\n var cls = blocked ? 'currentpc-span-blocked' : 'currentpc-span';\n var markOpts = {className:cls, inclusiveLeft:true};\n if (line.start || line.end)\n this.markCurrentPC = this.editor.markText({line:line.line-1,ch:line.start}, {line:line.line-1,ch:line.end||line.start+1}, markOpts);\n else\n this.markCurrentPC = this.editor.markText({line:line.line-1,ch:0}, {line:line.line,ch:0}, markOpts);\n this.currentDebugLine = line;\n }\n }\n\n clearCurrentLine(moveCursor:boolean) {\n if (this.currentDebugLine) {\n this.editor.clearGutter(\"gutter-info\");\n if (moveCursor) this.editor.setSelection(this.editor.getCursor());\n this.currentDebugLine = null;\n }\n if (this.markCurrentPC) {\n this.markCurrentPC.clear();\n this.markCurrentPC = null;\n }\n }\n\n getActiveLine() : SourceLocation {\n if (this.sourcefile) {\n var cpustate = lastDebugState && lastDebugState.c;\n if (!cpustate && platform.getCPUState && !platform.isRunning())\n cpustate = platform.getCPUState();\n if (cpustate) {\n var EPC = (cpustate && (cpustate.EPC || cpustate.PC));\n var res = this.sourcefile.findLineForOffset(EPC, PC_LINE_LOOKAHEAD);\n return res;\n }\n }\n }\n\n refreshDebugState(moveCursor:boolean) {\n // TODO: only if line changed\n // TODO: remove after compilation\n this.clearCurrentLine(moveCursor);\n var line = this.getActiveLine();\n if (line) {\n this.setCurrentLine(line, moveCursor);\n }\n }\n\n refreshListing() {\n // lookup corresponding sourcefile for this file, using listing\n var lst = current_project.getListingForFile(this.path);\n if (lst && lst.sourcefile && lst.sourcefile !== this.sourcefile) {\n this.sourcefile = lst.sourcefile;\n this.dirtylisting = true;\n }\n if (!this.sourcefile || !this.dirtylisting) return;\n this.updateListing();\n this.dirtylisting = false;\n }\n\n refresh(moveCursor: boolean) {\n this.refreshListing();\n this.refreshDebugState(moveCursor);\n }\n \n tick() {\n this.refreshDebugState(false);\n }\n\n getLine(line : number) {\n return this.editor.getLine(line-1);\n }\n\n getCurrentLine() : number {\n return this.editor.getCursor().line+1;\n }\n\n getCursorPC() : number {\n var line = this.getCurrentLine();\n while (this.sourcefile && line >= 0) {\n var pc = this.sourcefile.line2offset[line];\n if (pc >= 0) return pc;\n line--;\n }\n return -1;\n }\n\n undoStep() {\n this.editor.execCommand('undo');\n }\n\n toggleBreakpoint(lineno: number) {\n // TODO: we have to always start at beginning of frame\n if (this.sourcefile != null) {\n var targetPC = this.sourcefile.line2offset[lineno+1];\n /*\n var bpid = \"pc\" + targetPC;\n if (platform.hasBreakpoint(bpid)) {\n platform.clearBreakpoint(bpid);\n } else {\n platform.setBreakpoint(bpid, () => {\n return platform.getPC() == targetPC;\n });\n }\n */\n runToPC(targetPC);\n }\n }\n}\n\n///\n\nconst disasmWindow = 1024; // disassemble this many bytes around cursor\n\nexport class DisassemblerView implements ProjectView {\n disasmview;\n\n getDisasmView() { return this.disasmview; }\n\n createDiv(parent : HTMLElement) {\n var div = document.createElement('div');\n div.setAttribute(\"class\", \"editor\");\n parent.appendChild(div);\n this.newEditor(div);\n return div;\n }\n\n newEditor(parent : HTMLElement) {\n this.disasmview = CodeMirror(parent, {\n mode: 'z80', // TODO: pick correct one\n theme: 'cobalt',\n tabSize: 8,\n readOnly: true,\n styleActiveLine: true\n });\n }\n\n // TODO: too many globals\n refresh(moveCursor: boolean) {\n let state = lastDebugState || platform.saveState(); // TODO?\n let pc = state.c ? state.c.PC : 0;\n let curline = 0;\n let selline = 0;\n let addr2symbol = (platform.debugSymbols && platform.debugSymbols.addr2symbol) || {};\n // TODO: not perfect disassembler\n let disassemble = (start, len) => {\n // TODO: use pc2visits\n let s = \"\";\n let ofs = 0;\n while (ofs < len) {\n let a = (start + ofs) | 0;\n let disasm = platform.disassemble(a, platform.readAddress.bind(platform));\n /* TODO: look thru all source files\n let srclinenum = sourcefile && this.sourcefile.offset2line[a];\n if (srclinenum) {\n let srcline = getActiveEditor().getLine(srclinenum);\n if (srcline && srcline.trim().length) {\n s += \"; \" + srclinenum + \":\\t\" + srcline + \"\\n\";\n curline++;\n }\n }\n */\n let bytes = \"\";\n let comment = \"\";\n for (let i=0; i<disasm.nbytes; i++)\n bytes += hex(platform.readAddress(a+i));\n while (bytes.length < 14)\n bytes += ' ';\n let dstr = disasm.line;\n if (addr2symbol && disasm.isaddr) { // TODO: move out\n dstr = dstr.replace(/([^#])[$]([0-9A-F]+)/, (substr:string, ...args:any[]):string => {\n let addr = parseInt(args[1], 16);\n let sym = addr2symbol[addr];\n if (sym) return (args[0] + sym);\n sym = addr2symbol[addr-1];\n if (sym) return (args[0] + sym + \"+1\");\n return substr;\n });\n }\n if (addr2symbol) {\n let sym = addr2symbol[a];\n if (sym) {\n comment = \"; \" + sym;\n }\n }\n let dline = hex(a, 4) + \"\\t\" + rpad(bytes,14) + \"\\t\" + rpad(dstr,30) + comment + \"\\n\";\n s += dline;\n if (a == pc) selline = curline;\n curline++;\n ofs += disasm.nbytes || 1;\n }\n return s;\n }\n var startpc = pc < 0 ? pc-disasmWindow : Math.max(0, pc-disasmWindow); // for 32-bit PCs w/ hi bit set\n let text = disassemble(startpc, pc-startpc) + disassemble(pc, disasmWindow);\n this.disasmview.setValue(text);\n if (moveCursor) { \n this.disasmview.setCursor(selline, 0);\n }\n jumpToLine(this.disasmview, selline);\n }\n\n getCursorPC() : number {\n var line = this.disasmview.getCursor().line;\n if (line >= 0) {\n var toks = this.disasmview.getLine(line).trim().split(/\\s+/);\n if (toks && toks.length >= 1) {\n var pc = parseInt(toks[0], 16);\n if (pc >= 0) return pc;\n }\n }\n return -1;\n }\n}\n\n///\n\nexport class ListingView extends DisassemblerView implements ProjectView {\n assemblyfile : SourceFile;\n path : string;\n\n constructor(lstfn : string) {\n super();\n this.path = lstfn;\n }\n\n refreshListing() {\n // lookup corresponding assemblyfile for this file, using listing\n var lst = current_project.getListingForFile(this.path);\n // TODO? \n this.assemblyfile = lst && (lst.assemblyfile || lst.sourcefile);\n }\n\n refresh(moveCursor: boolean) {\n this.refreshListing();\n // load listing text into editor\n if (!this.assemblyfile) return;\n var asmtext = this.assemblyfile.text;\n var disasmview = this.getDisasmView();\n // TODO: sometimes it picks one without a text file\n disasmview.setValue(asmtext);\n // go to PC\n if (!platform.saveState) return;\n var state = lastDebugState || platform.saveState();\n var pc = state.c ? (state.c.EPC || state.c.PC) : 0;\n if (pc >= 0 && this.assemblyfile) {\n var res = this.assemblyfile.findLineForOffset(pc, PC_LINE_LOOKAHEAD);\n if (res) {\n // set cursor while debugging\n if (moveCursor) {\n disasmview.setCursor(res.line-1, 0);\n }\n jumpToLine(disasmview, res.line-1);\n }\n }\n }\n\n}\n", "\nimport { newDiv, ProjectView } from \"./baseviews\";\nimport { Segment } from \"../../common/workertypes\";\nimport { platform, current_project, projectWindows, runToPC, setupBreakpoint, getWorkerParams } from \"../ui\";\nimport { hex, lpad, rpad } from \"../../common/util\";\nimport { VirtualList } from \"../../common/vlist\";\nimport { getMousePos, getVisibleEditorLineHeight, VirtualTextLine, VirtualTextScroller } from \"../../common/emu\";\nimport { ProbeFlags, ProbeRecorder } from \"../../common/probe\";\nimport { BaseZ80MachinePlatform, BaseZ80Platform } from \"../../common/baseplatform\";\n\n///\n\nfunction ignoreSymbol(sym:string) {\n return sym.endsWith('_SIZE__') || sym.endsWith('_LAST__') || sym.endsWith('STACKSIZE__') || sym.endsWith('FILEOFFS__') \n || sym.startsWith('l__') || sym.startsWith('s__') || sym.startsWith('.__.');\n}\n\n// TODO: make it use debug state\n// TODO: make it safe (load/restore state?)\n// TODO: refactor w/ VirtualTextLine\nexport class MemoryView implements ProjectView {\n memorylist;\n dumplines;\n maindiv : HTMLElement;\n recreateOnResize = true;\n hibits = 0; // a hack to make it work with 32-bit addresses\n totalRows = 0x1400; // a little more room in case we split lots of lines\n\n createDiv(parent : HTMLElement) {\n var div = document.createElement('div');\n div.setAttribute(\"class\", \"memdump\");\n parent.appendChild(div);\n this.showMemoryWindow(parent, div);\n return this.maindiv = div;\n }\n\n showMemoryWindow(workspace:HTMLElement, parent:HTMLElement) {\n this.memorylist = new VirtualList({\n w: $(workspace).width(),\n h: $(workspace).height(),\n itemHeight: getVisibleEditorLineHeight(),\n totalRows: this.totalRows,\n generatorFn: (row : number) => {\n var s = this.getMemoryLineAt(row);\n var linediv = document.createElement(\"div\");\n if (this.dumplines) {\n var dlr = this.dumplines[row];\n if (dlr) linediv.classList.add('seg_' + this.getMemorySegment(this.dumplines[row].a | this.hibits));\n }\n linediv.appendChild(document.createTextNode(s));\n return linediv;\n }\n });\n $(parent).append(this.memorylist.container);\n this.tick();\n const compparams = getWorkerParams();\n if (compparams && this.dumplines)\n this.scrollToAddress(compparams.data_start);\n }\n\n scrollToAddress(addr : number) {\n if (this.dumplines) {\n this.hibits = addr & 0xffff0000;\n this.memorylist.scrollToItem(this.findMemoryWindowLine(addr & 0xffff));\n }\n }\n\n refresh() {\n this.dumplines = null;\n this.tick();\n }\n\n tick() {\n if (this.memorylist) {\n $(this.maindiv).find('[data-index]').each( (i,e) => {\n var div = $(e);\n var row = parseInt(div.attr('data-index'));\n var oldtext = div.text();\n var newtext = this.getMemoryLineAt(row);\n if (oldtext != newtext)\n div.text(newtext);\n });\n }\n }\n\n getMemoryLineAt(row : number) : string {\n var offset = row * 16;\n var n1 = 0;\n var n2 = 16;\n var sym;\n if (this.getDumpLines()) {\n var dl = this.dumplines[row];\n if (dl) {\n offset = dl.a & 0xfff0;\n n1 = dl.a - offset;\n n2 = n1 + dl.l;\n sym = dl.s;\n } else {\n return '.';\n }\n }\n var s = hex(offset+n1,4) + ' ';\n for (var i=0; i<n1; i++) s += ' ';\n if (n1 > 8) s += ' ';\n for (var i=n1; i<n2; i++) {\n var read = this.readAddress((offset+i) | this.hibits);\n if (i==8) s += ' ';\n s += ' ' + (typeof read == 'number' ? hex(read,2) : '??');\n }\n for (var i=n2; i<16; i++) s += ' ';\n if (sym) s += ' ' + sym;\n return s;\n }\n\n readAddress(n : number) {\n return platform.readAddress(n);\n }\n\n getDumpLineAt(line : number) {\n var d = this.dumplines[line];\n if (d) {\n return d.a + \" \" + d.s;\n }\n }\n\n // TODO: addr2symbol for ca65; and make it work without symbols\n getDumpLines() {\n var addr2sym = (platform.debugSymbols && platform.debugSymbols.addr2symbol) || {};\n if (this.dumplines == null) {\n this.dumplines = [];\n var ofs = 0;\n var sym;\n for (const _nextofs of Object.keys(addr2sym)) {\n var nextofs = parseInt(_nextofs); // convert from string (stupid JS)\n var nextsym = addr2sym[nextofs | this.hibits];\n if (sym) {\n // ignore certain symbols\n if (ignoreSymbol(sym)) {\n sym = '';\n }\n while (ofs < nextofs && this.dumplines.length < 0x10000) {\n var ofs2 = (ofs + 16) & 0xffff0;\n if (ofs2 > nextofs) ofs2 = nextofs;\n //if (ofs < 1000) console.log(ofs, ofs2, nextofs, sym);\n this.dumplines.push({a:ofs, l:ofs2-ofs, s:sym});\n ofs = ofs2;\n }\n }\n sym = nextsym;\n }\n }\n return this.dumplines;\n }\n\n // TODO: use segments list?\n getMemorySegment(a:number) : string {\n const compparams = getWorkerParams();\n if (compparams) {\n if (a >= compparams.data_start && a < compparams.data_start+compparams.data_size) {\n if (platform.getSP && a >= platform.getSP() - 15)\n return 'stack';\n else\n return 'data';\n }\n else if (a >= compparams.code_start && a < compparams.code_start+(compparams.code_size||compparams.rom_size))\n return 'code';\n }\n var segments = current_project.segments;\n if (segments) {\n for (var seg of segments) {\n if (a >= seg.start && a < seg.start+seg.size) {\n if (seg.type == 'rom') return 'code';\n if (seg.type == 'ram') return 'data';\n if (seg.type == 'io') return 'io';\n }\n }\n }\n return 'unknown';\n }\n\n findMemoryWindowLine(a:number) : number {\n for (var i=0; i<this.dumplines.length; i++)\n if (this.dumplines[i].a >= a)\n return i;\n }\n}\n\nexport class VRAMMemoryView extends MemoryView {\n totalRows = 0x800;\n readAddress(n : number) {\n return platform.readVRAMAddress(n);\n }\n getMemorySegment(a:number) : string {\n return 'video';\n }\n getDumpLines() {\n return null;\n }\n}\n\n///\n\nexport class BinaryFileView implements ProjectView {\n vlist : VirtualTextScroller;\n maindiv : HTMLElement;\n path:string;\n data:Uint8Array;\n recreateOnResize = true;\n\n constructor(path:string, data:Uint8Array) {\n this.path = path;\n this.data = data;\n }\n\n createDiv(parent : HTMLElement) {\n this.vlist = new VirtualTextScroller(parent);\n this.vlist.create(parent, ((this.data.length+15) >> 4), this.getMemoryLineAt.bind(this));\n return this.vlist.maindiv;\n }\n\n getMemoryLineAt(row : number) : VirtualTextLine {\n var offset = row * 16;\n var n1 = 0;\n var n2 = 16;\n var s = hex(offset+n1,4) + ' ';\n for (var i=0; i<n1; i++) s += ' ';\n if (n1 > 8) s += ' ';\n for (var i=n1; i<n2; i++) {\n var read = this.data[offset+i];\n if (i==8) s += ' ';\n s += ' ' + (read>=0?hex(read,2):' ');\n }\n return {text:s};\n }\n\n refresh() {\n this.vlist.refresh();\n }\n \n getPath() { return this.path; }\n}\n\n///\n\nexport class MemoryMapView implements ProjectView {\n maindiv : JQuery;\n\n createDiv(parent : HTMLElement) {\n this.maindiv = newDiv(parent, 'vertical-scroll');\n this.maindiv.css('display', 'grid');\n this.maindiv.css('grid-template-columns', '5em 40% 40%');\n //this.maindiv.css('grid-template-rows', '2em auto auto');\n this.maindiv.css('align-content', 'start');\n return this.maindiv[0];\n }\n\n // TODO: overlapping segments (e.g. ROM + LC)\n addSegment(seg : Segment, newrow : boolean) {\n if (newrow) {\n var offset = $('<div class=\"segment-offset\" style=\"grid-column-start:1\"/>');\n offset.text('$'+hex(seg.start,4));\n this.maindiv.append(offset);\n }\n var segdiv = $('<div class=\"segment\"/>');\n segdiv.text(seg.name);\n let alttext = `$${hex(seg.start)} - $${hex(seg.last || seg.start+seg.size-1)}`\n alttext += ` (${seg.size} bytes)`;\n // set alttext of div\n segdiv.attr('title', alttext);\n if (!newrow || seg.source == 'linker')\n segdiv.css('grid-column-start', 3); // make sure it's on right side\n var pad = Math.max(3.0, Math.log(seg.size+1)) * 0.5;\n segdiv.css('height', pad+'em');\n if (seg.type) {\n segdiv.addClass('segment-'+seg.type);\n }\n this.maindiv.append(segdiv);\n //var row = $('<div class=\"row\"/>').append(offset, segdiv);\n //var container = $('<div class=\"container\"/>').append(row);\n //this.maindiv.append(container);\n segdiv.click(() => {\n // TODO: what if memory browser does not exist?\n var memview = projectWindows.createOrShow('#memory') as MemoryView;\n memview.scrollToAddress(seg.start);\n });\n }\n\n refresh() {\n this.maindiv.empty();\n var segments = current_project.segments;\n if (segments) {\n var curofs = 0;\n var laststart = -1;\n for (var seg of segments) {\n // add free space\n if (seg.start > curofs) {\n this.addSegment({ name: '', start: curofs, size: seg.start - curofs }, true);\n }\n this.addSegment(seg, laststart != seg.start);\n laststart = seg.start;\n curofs = seg.start + seg.size;\n }\n }\n }\n\n}\n\n///\n\n// TODO: clear buffer when scrubbing\n\nconst OPAQUE_BLACK = 0xff000000;\n\nexport abstract class ProbeViewBaseBase {\n probe : ProbeRecorder;\n tooldiv : HTMLElement;\n cumulativeData : boolean = false;\n cyclesPerLine : number;\n totalScanlines : number;\n sp : number; // stack pointer\n\n abstract tick() : void;\n\n constructor() {\n var width = 160;\n var height = 262; // TODO: PAL?\n try {\n width = Math.ceil(platform['machine']['cpuCyclesPerLine']) || width; // TODO\n height = Math.ceil(platform['machine']['numTotalScanlines']) || height; // TODO\n } catch (e) {\n }\n this.cyclesPerLine = width;\n this.totalScanlines = height;\n }\n\n addr2symbol(addr : number) : string {\n var _addr2sym = (platform.debugSymbols && platform.debugSymbols.addr2symbol) || {};\n return _addr2sym[addr];\n }\n\n addr2str(addr : number) : string {\n var sym = this.addr2symbol(addr);\n if (typeof sym === 'string')\n return '$' + hex(addr) + ' (' + sym + ')';\n else\n return '$' + hex(addr);\n }\n\n showTooltip(s:string) {\n if (s) {\n if (!this.tooldiv) {\n this.tooldiv = document.createElement(\"div\");\n this.tooldiv.setAttribute(\"class\", \"tooltiptrack\");\n document.body.appendChild(this.tooldiv);\n }\n $(this.tooldiv).text(s).show();\n } else {\n $(this.tooldiv).hide();\n }\n }\n\n setVisible(showing : boolean) : void {\n if (showing) {\n this.probe = platform.startProbing();\n this.probe.singleFrame = !this.cumulativeData;\n this.tick();\n } else {\n if (this.probe) this.probe.singleFrame = true;\n platform.stopProbing();\n this.probe = null;\n }\n }\n\n redraw( eventfn:(op,addr,col,row,clk,value) => void ) {\n var p = this.probe;\n if (!p || !p.idx) return; // if no probe, or if empty\n var row=0;\n var col=0;\n var clk=0;\n this.sp = 0;\n for (var i=0; i<p.idx; i++) {\n var word = p.buf[i];\n var addr = word & 0xffff;\n var value = (word >> 16) & 0xff;\n var op = word & OPAQUE_BLACK;\n switch (op) {\n case ProbeFlags.SCANLINE:\trow++; col=0; break;\n case ProbeFlags.FRAME:\t\trow=0; col=0; break;\n case ProbeFlags.CLOCKS:\t\tcol += addr; clk += addr; break;\n case ProbeFlags.SP_PUSH:\n case ProbeFlags.SP_POP:\n this.sp = addr;\n default:\n eventfn(op, addr, col, row, clk, value);\n break;\n }\n }\n }\n\n opToString(op:number, addr?:number, value?:number) {\n var s = \"\";\n switch (op) {\n case ProbeFlags.EXECUTE:\t\ts = \"Exec\"; break;\n case ProbeFlags.MEM_READ:\t\ts = \"Read\"; break;\n case ProbeFlags.MEM_WRITE:\ts = \"Write\"; break;\n case ProbeFlags.IO_READ:\t\ts = \"IO Read\"; break;\n case ProbeFlags.IO_WRITE:\t\ts = \"IO Write\"; break;\n case ProbeFlags.VRAM_READ:\ts = \"VRAM Read\"; break;\n case ProbeFlags.VRAM_WRITE:\ts = \"VRAM Write\"; break;\n case ProbeFlags.DMA_READ: \ts = \"DMA Read\"; break;\n case ProbeFlags.DMA_WRITE:\ts = \"DMA Write\"; break;\n case ProbeFlags.INTERRUPT:\ts = \"Interrupt\"; break;\n case ProbeFlags.ILLEGAL:\t\ts = \"Error\"; break;\n case ProbeFlags.WAIT:\t\t s = \"Wait\"; break;\n case ProbeFlags.SP_PUSH:\t\ts = \"Stack Push\"; break;\n case ProbeFlags.SP_POP: s = \"Stack Pop\"; break;\n default:\t\t\t\t return \"\";\n }\n if (typeof addr == 'number') s += \" \" + this.addr2str(addr);\n if ((op & ProbeFlags.HAS_VALUE) && typeof value == 'number') s += \" = $\" + hex(value,2);\n return s;\n }\n \n getOpRGB(op:number, addr:number) : number {\n switch (op) {\n case ProbeFlags.EXECUTE:\t\treturn 0x018001;\n case ProbeFlags.MEM_READ:\t\treturn 0x800101;\n case ProbeFlags.MEM_WRITE:\treturn 0x010180;\n case ProbeFlags.IO_READ:\t\treturn 0x018080;\n case ProbeFlags.IO_WRITE:\t\treturn 0xc00180;\n case ProbeFlags.DMA_READ:\n case ProbeFlags.VRAM_READ:\treturn 0x808001;\n case ProbeFlags.DMA_WRITE:\n case ProbeFlags.VRAM_WRITE:\treturn 0x4080c0;\n case ProbeFlags.INTERRUPT:\treturn 0x3fbf3f;\n case ProbeFlags.ILLEGAL:\t\treturn 0x3f3fff;\n case ProbeFlags.WAIT:\t \treturn 0xff3f3f;\n default:\t\t\t\t return 0;\n }\n }\n}\n\nabstract class ProbeViewBase extends ProbeViewBaseBase {\n\n maindiv : HTMLElement;\n canvas : HTMLCanvasElement;\n ctx : CanvasRenderingContext2D;\n recreateOnResize = true;\n \n abstract drawEvent(op, addr, col, row);\n\n createCanvas(parent:HTMLElement, width:number, height:number) {\n var div = document.createElement('div');\n var canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n canvas.classList.add('pixelated');\n canvas.style.width = '100%';\n canvas.style.height = '90vh'; // i hate css\n canvas.style.backgroundColor = 'black';\n canvas.style.cursor = 'crosshair';\n canvas.onmousemove = (e) => {\n var pos = getMousePos(canvas, e);\n this.showTooltip(this.getTooltipText(pos.x, pos.y));\n $(this.tooldiv).css('left',e.pageX+10).css('top',e.pageY-30);\n }\n canvas.onmouseout = (e) => {\n $(this.tooldiv).hide();\n }\n parent.appendChild(div);\n div.appendChild(canvas);\n this.canvas = canvas;\n this.ctx = canvas.getContext('2d');\n this.initCanvas();\n return this.maindiv = div;\n }\n\n initCanvas() {\n }\n \n getTooltipText(x:number, y:number) : string {\n return null;\n }\n\n getOpAtPos(x:number, y:number, mask:number) : number {\n x = x|0;\n y = y|0;\n let result = 0;\n this.redraw( (op,addr,col,row,clk,value) => {\n if (!result && row == y && col >= x && (op & mask) != 0) {\n result = op | addr;\n }\n });\n return result;\n }\n\n clear() {\n }\n \n tick() {\n this.clear();\n this.redraw(this.drawEvent.bind(this));\n }\n}\n\nabstract class ProbeBitmapViewBase extends ProbeViewBase {\n\n imageData : ImageData;\n datau32 : Uint32Array;\n recreateOnResize = false;\n \n createDiv(parent : HTMLElement) {\n return this.createCanvas(parent, this.cyclesPerLine, this.totalScanlines);\n }\n initCanvas() {\n this.imageData = this.ctx.createImageData(this.canvas.width, this.canvas.height);\n this.datau32 = new Uint32Array(this.imageData.data.buffer);\n }\n getTooltipText(x:number, y:number) : string {\n x = x|0;\n y = y|0;\n var s = \"\";\n var lastroutine = null;\n var symstack = [];\n var lastcol = -1;\n this.redraw( (op,addr,col,row,clk,value) => {\n switch (op) {\n case ProbeFlags.EXECUTE:\n lastroutine = this.addr2symbol(addr) || lastroutine;\n break;\n case ProbeFlags.SP_PUSH:\n symstack.push(lastroutine);\n break;\n case ProbeFlags.SP_POP:\n lastroutine = symstack.pop();\n break;\n }\n if (row == y && col <= x) {\n if (col != lastcol) {\n s = \"\";\n lastcol = col;\n }\n if (s == \"\" && lastroutine) { s += \"\\n\" + lastroutine; }\n s += \"\\n\" + this.opToString(op, addr, value);\n }\n } );\n return 'X: ' + x + ' Y: ' + y + ' ' + s;\n }\n\n refresh() {\n this.tick();\n this.datau32.fill(OPAQUE_BLACK);\n }\n tick() {\n super.tick();\n this.drawImage();\n }\n drawImage() {\n this.ctx.putImageData(this.imageData, 0, 0);\n }\n clear() {\n this.datau32.fill(OPAQUE_BLACK);\n }\n}\n\nexport class AddressHeatMapView extends ProbeBitmapViewBase implements ProjectView {\n\n createDiv(parent : HTMLElement) {\n return this.createCanvas(parent, 256, 256);\n }\n \n initCanvas() {\n super.initCanvas();\n this.canvas.onclick = (e) => {\n var pos = getMousePos(this.canvas, e);\n var opaddr = Math.floor(pos.x) + Math.floor(pos.y) * 256;\n var lastpc = -1;\n var runpc = -1;\n this.redraw( (op,addr) => {\n if (runpc < 0 && lastpc >= 0 && addr == opaddr) {\n runpc = lastpc;\n }\n if (op == ProbeFlags.EXECUTE) lastpc = addr;\n });\n if (runpc >= 0) runToPC(runpc);\n }\n }\n\n clear() {\n for (var i=0; i<=0xffff; i++) {\n var v = platform.readAddress(i);\n var rgb = (v >> 2) | (v & 0x1f);\n rgb |= (rgb<<8) | (rgb<<16);\n this.datau32[i] = rgb | OPAQUE_BLACK;\n }\n }\n\n // TODO: show current PC\n drawEvent(op, addr, col, row) {\n var rgb = this.getOpRGB(op, addr);\n if (!rgb) return;\n var x = addr & 0xff;\n var y = (addr >> 8) & 0xff;\n var data = this.datau32[addr & 0xffff];\n data = data | rgb | OPAQUE_BLACK;\n this.datau32[addr & 0xffff] = data;\n }\n \n getTooltipText(x:number, y:number) : string {\n var a = (x & 0xff) + (y << 8);\n var s = \"\";\n var pc = -1;\n var already = {};\n var lastroutine = null;\n var symstack = [];\n this.redraw( (op,addr,col,row,clk,value) => {\n switch (op) {\n case ProbeFlags.EXECUTE:\n pc = addr;\n lastroutine = this.addr2symbol(addr) || lastroutine;\n break;\n case ProbeFlags.SP_PUSH:\n symstack.push(lastroutine);\n break;\n case ProbeFlags.SP_POP:\n lastroutine = symstack.pop();\n break;\n }\n var key = op|pc;\n if (addr == a && !already[key]) {\n if (s == \"\" && lastroutine) { s += \"\\n\" + lastroutine; }\n s += \"\\nPC \" + this.addr2str(pc) + \" \" + this.opToString(op, null, value);\n already[key] = 1;\n }\n } );\n return this.addr2str(a) + s;\n }\n}\n\nexport class RasterPCHeatMapView extends ProbeBitmapViewBase implements ProjectView {\n\n initCanvas() {\n super.initCanvas();\n // TODO: run to exact x/y position\n this.canvas.onclick = (e) => {\n var pos = getMousePos(this.canvas, e);\n var x = Math.floor(pos.x);\n var y = Math.floor(pos.y);\n var opaddr = this.getOpAtPos(pos.x, pos.y, ProbeFlags.EXECUTE);\n if (opaddr) {\n //runToPC(opaddr & 0xffff);\n setupBreakpoint(\"toline\");\n platform.runEval(() => {\n let onrow = platform.getRasterScanline && platform.getRasterScanline() >= y;\n if (onrow && platform.getRasterLineClock) {\n return onrow && platform.getRasterLineClock() > x;\n } else return onrow;\n });\n }\n }\n }\n\n drawEvent(op, addr, col, row) {\n var rgb = this.getOpRGB(op, addr);\n if (!rgb) return;\n var iofs = col + row * this.canvas.width;\n var data = rgb | OPAQUE_BLACK;\n this.datau32[iofs] |= data;\n }\n\n drawImage() {\n // fill in the gaps\n let last = OPAQUE_BLACK;\n for (let i=0; i<this.datau32.length; i++) {\n if (this.datau32[i] == OPAQUE_BLACK) {\n this.datau32[i] = last;\n } else {\n last = this.datau32[i];\n }\n }\n super.drawImage();\n }\n}\n\nexport class RasterStackMapView extends RasterPCHeatMapView implements ProjectView {\n\n interrupt: number = 0;\n rgb: number = 0;\n lastpc: number = 0;\n\n drawEvent(op, addr, col, row) {\n var iofs = col + row * this.canvas.width;\n // track interrupts\n if (op == ProbeFlags.INTERRUPT) this.interrupt = 1;\n if (this.interrupt == 1 && op == ProbeFlags.SP_PUSH) this.interrupt = addr;\n if (this.interrupt > 1 && this.sp > this.interrupt) this.interrupt = 0;\n // track writes\n if (op == ProbeFlags.MEM_WRITE) { this.rgb |= 0x00002f; }\n if (op == ProbeFlags.VRAM_WRITE) { this.rgb |= 0x003f80; }\n if (op == ProbeFlags.IO_WRITE) { this.rgb |= 0x1f3f80; }\n if (op == ProbeFlags.IO_READ) { this.rgb |= 0x001f00; }\n if (op == ProbeFlags.WAIT) { this.rgb = 0x008000; }\n // draw pixels?\n if (op == ProbeFlags.ILLEGAL || op == ProbeFlags.DMA_READ) {\n this.datau32[iofs] = 0xff0f0f0f;\n } else {\n let data = this.rgb;\n if (op == ProbeFlags.EXECUTE) {\n let sp = this.sp & 15;\n if (sp >= 8) sp = 16-sp;\n if (Math.abs(this.lastpc) - addr > 16) { sp += 1; }\n if (Math.abs(this.lastpc) - addr > 256) { sp += 1; }\n data = this.rgb = (0x080808 * sp) + 0x202020;\n this.lastpc = addr;\n }\n if (this.interrupt) { data |= 0x800040; }\n if (this.datau32[iofs] == OPAQUE_BLACK) {\n this.datau32[iofs] = data | OPAQUE_BLACK;\n }\n }\n }\n}\n\nexport class ProbeLogView extends ProbeViewBaseBase {\n vlist : VirtualTextScroller;\n maindiv : HTMLElement;\n recreateOnResize = true;\n dumplines;\n\n createDiv(parent : HTMLElement) {\n this.vlist = new VirtualTextScroller(parent);\n this.vlist.create(parent, this.cyclesPerLine*this.totalScanlines, this.getMemoryLineAt.bind(this));\n return this.vlist.maindiv;\n }\n getMemoryLineAt(row : number) : VirtualTextLine {\n var s : string = \"\";\n var c : string = \"seg_data\";\n var line = this.dumplines && this.dumplines[row];\n if (line != null) {\n var xtra : string = line.info.join(\", \");\n s = \"(\" + lpad(line.row,4) + \", \" + lpad(line.col,4) + \") \" + rpad(line.asm||\"\",20) + xtra;\n if (xtra.indexOf(\"Write \") >= 0) c = \"seg_io\";\n // if (xtra.indexOf(\"Stack \") >= 0) c = \"seg_code\";\n }\n return {text:s, clas:c};\n }\n refresh() {\n this.tick();\n }\n tick() {\n const isz80 = platform instanceof BaseZ80MachinePlatform || platform instanceof BaseZ80Platform; // TODO?\n // cache each line in frame\n this.dumplines = {};\n this.redraw((op,addr,col,row,clk,value) => {\n if (isz80) clk >>= 2;\n var line = this.dumplines[clk];\n if (line == null) {\n line = {op:op, addr:addr, row:row, col:col, asm:null, info:[]};\n this.dumplines[clk] = line;\n }\n switch (op) {\n case ProbeFlags.EXECUTE:\n if (platform.disassemble) {\n var disasm = platform.disassemble(addr, platform.readAddress.bind(platform));\n line.asm = disasm && disasm.line;\n }\n break;\n default:\n var xtra = this.opToString(op, addr, value);\n if (xtra != \"\") line.info.push(xtra);\n break;\n }\n });\n this.vlist.refresh();\n }\n}\n\nexport class ScanlineIOView extends ProbeViewBaseBase {\n vlist : VirtualTextScroller;\n maindiv : HTMLElement;\n recreateOnResize = true;\n dumplines;\n\n createDiv(parent : HTMLElement) {\n this.vlist = new VirtualTextScroller(parent);\n this.vlist.create(parent, this.totalScanlines, this.getMemoryLineAt.bind(this));\n return this.vlist.maindiv;\n }\n getMemoryLineAt(row : number) : VirtualTextLine {\n var s = lpad(row+\"\",3) + ' ';\n var c = 'seg_code';\n var line = (this.dumplines && this.dumplines[row]) || [];\n var hblankCycle = Math.round(this.cyclesPerLine/3.3);\n for (var i=0; i<this.cyclesPerLine; i++) {\n var opaddr = line[i];\n if (opaddr !== undefined) {\n var addr = opaddr & 0xffff;\n var op = op & OPAQUE_BLACK;\n if (op == ProbeFlags.EXECUTE) {\n s += ',';\n } else {\n var v = hex(addr);\n s += v;\n i += v.length - 1;\n }\n } else {\n s += (i==hblankCycle) ? '|' : '.';\n }\n }\n if (line[-1]) s += ' ' + line[-1]; // executing symbol\n return {text:s, clas:c};\n }\n refresh() {\n this.tick();\n }\n tick() {\n const isz80 = platform instanceof BaseZ80MachinePlatform || platform instanceof BaseZ80Platform; // TODO?\n // cache each line in frame\n this.dumplines = {};\n this.redraw((op,addr,col,row,clk,value) => {\n var line = this.dumplines[row];\n if (line == null) {\n this.dumplines[row] = line = [];\n }\n switch (op) {\n case ProbeFlags.EXECUTE:\n var sym = platform.debugSymbols.addr2symbol[addr];\n if (sym) line[-1] = sym;\n break;\n //case ProbeFlags.MEM_WRITE:\n case ProbeFlags.IO_READ:\n case ProbeFlags.IO_WRITE:\n case ProbeFlags.VRAM_READ:\n case ProbeFlags.VRAM_WRITE:\n line[col] = op | addr;\n break;\n }\n });\n this.vlist.refresh();\n }\n}\n\n///\n\nexport class ProbeSymbolView extends ProbeViewBaseBase {\n vlist : VirtualTextScroller;\n keys : string[];\n recreateOnResize = true;\n dumplines;\n cumulativeData = true;\n\n // TODO: auto resize\n createDiv(parent : HTMLElement) {\n // TODO: what if symbol list changes?\n if (platform.debugSymbols && platform.debugSymbols.symbolmap) {\n this.keys = Array.from(Object.keys(platform.debugSymbols.symbolmap).filter(sym => !ignoreSymbol(sym)));\n } else {\n this.keys = ['no symbols defined'];\n }\n this.vlist = new VirtualTextScroller(parent);\n this.vlist.create(parent, this.keys.length + 1, this.getMemoryLineAt.bind(this));\n return this.vlist.maindiv;\n }\n\n getMemoryLineAt(row : number) : VirtualTextLine {\n // header line\n if (row == 0) {\n return {text: lpad(\"Symbol\",35)+lpad(\"Reads\",8)+lpad(\"Writes\",8)};\n }\n var sym = this.keys[row-1];\n var line = this.dumplines && this.dumplines[sym];\n function getop(op) {\n var n = line[op] | 0;\n return lpad(n ? n.toString() : \"\", 8);\n }\n var s : string;\n var c : string;\n if (line != null) {\n s = lpad(sym, 35) \n + getop(ProbeFlags.MEM_READ)\n + getop(ProbeFlags.MEM_WRITE);\n if (line[ProbeFlags.EXECUTE])\n c = 'seg_code';\n else if (line[ProbeFlags.IO_READ] || line[ProbeFlags.IO_WRITE])\n c = 'seg_io';\n else\n c = 'seg_data';\n } else {\n s = lpad(sym, 35);\n c = 'seg_unknown';\n }\n return {text:s, clas:c};\n }\n\n refresh() {\n this.tick();\n }\n\n tick() {\n // cache each line in frame\n this.dumplines = {};\n this.redraw((op,addr,col,row,clk,value) => {\n var sym = platform.debugSymbols.addr2symbol[addr];\n if (sym != null) {\n var line = this.dumplines[sym];\n if (line == null) {\n line = {};\n this.dumplines[sym] = line;\n }\n line[op] = (line[op] | 0) + 1;\n }\n });\n this.vlist.refresh();\n if (this.probe) this.probe.clear(); // clear cumulative data (TODO: doesnt work with seeking or debugging)\n }\n}\n\n///\n\n", "\nimport { hex, rgb2bgr, rle_unpack } from \"../common/util\";\nimport { ProjectWindows } from \"./windows\";\nimport { Toolbar } from \"./toolbar\";\nimport Mousetrap = require('mousetrap');\n\nexport type UintArray = number[] | Uint8Array | Uint16Array | Uint32Array; //{[i:number]:number};\n\n// TODO: separate view/controller\nexport interface EditorContext {\n setCurrentEditor(div:JQuery, editing:JQuery, node:PixNode) : void;\n getPalettes(matchlen : number) : SelectablePalette[];\n getTilemaps(matchlen : number) : SelectableTilemap[];\n}\n\nexport type SelectablePalette = {\n node:PixNode\n name:string\n palette:Uint32Array\n}\n\nexport type SelectableTilemap = {\n node:PixNode\n name:string\n images:Uint8Array[]\n rgbimgs:Uint32Array[] // TODO: different palettes?\n}\n\nexport type PixelEditorImageFormat = {\n w:number\t\t// width\n h:number\t\t// height\n count?:number\t\t// # of images\n bpp?:number\t\t// bits per pixel\n np?:number\t\t// number of planes\n bpw?:number\t\t// bits per word\n sl?:number\t\t// words per line\n pofs?:number\t\t// plane offset\n remap?:number[]\t// remap array\n reindex?:number[]\t// reindex array\n brev?:boolean\t\t// bit reverse (msb is leftmost)\n flip?:boolean\t\t// flip vertically\n skip?:number\t\t// skip bytes\n wpimg?:number\t\t// words per image\n aspect?:number\t// aspect ratio\n xform?:string\t\t// CSS transform\n destfmt?:PixelEditorImageFormat\n};\n\nexport type PixelEditorPaletteFormat = {\n pal?:number|string\n n?:number\n layout?:string\n};\n\nexport type PixelEditorPaletteLayout = [string, number, number][];\n\ntype PixelEditorMessage = {\n fmt : PixelEditorImageFormat\n palfmt : PixelEditorPaletteFormat\n bytestr : string\n palstr : string\n};\n\n/////////////////\n\n\n// 0xabcd, #$abcd, 5'010101, 0b010101, etc\nvar pixel_re = /([0#]?)([x$%]|\\d'h)([0-9a-f]+)(?:[;].*)?|(\\d'b|0b)([01]+)/gim;\n\nfunction convertToHexStatements(s:string) : string {\n // convert 'hex ....' asm format\n return s.replace(/(\\shex\\s+)([0-9a-f]+)/ig, function(m,hexprefix,hexstr) {\n var rtn = hexprefix;\n for (var i=0; i<hexstr.length; i+=2) {\n rtn += '0x'+hexstr.substr(i,2)+',';\n }\n return rtn;\n });\n}\n\nexport function parseHexWords(s:string) : number[] {\n var arr = [];\n var m;\n while (m = pixel_re.exec(s)) {\n var n;\n if (typeof m[4] !== 'undefined')\n n = parseInt(m[5],2);\n else if (m[2].startsWith('%') || m[2].endsWith(\"b\"))\n n = parseInt(m[3],2);\n else if (m[2].startsWith('x') || m[2].startsWith('$') || m[2].endsWith('h'))\n n = parseInt(m[3],16);\n else\n n = parseInt(m[3]);\n arr.push(n);\n }\n return arr;\n}\n\nexport function replaceHexWords(s:string, words:UintArray) : string {\n var result = \"\";\n var m;\n var li = 0;\n var i = 0;\n while (m = pixel_re.exec(s)) {\n result += s.slice(li, pixel_re.lastIndex - m[0].length);\n li = pixel_re.lastIndex;\n if (typeof m[4] !== 'undefined')\n result += m[4] + words[i++].toString(2);\n else if (m[2].startsWith('%'))\n result += m[1] + \"%\" + words[i++].toString(2);\n else if (m[2].endsWith('b'))\n result += m[1] + m[2] + words[i++].toString(2); // TODO\n else if (m[2].endsWith('h'))\n result += m[1] + m[2] + words[i++].toString(16); // TODO\n else if (m[2].startsWith('x'))\n result += m[1] + \"x\" + hex(words[i++]);\n else if (m[2].startsWith('$'))\n result += m[1] + \"$\" + hex(words[i++]);\n else\n result += m[1] + words[i++].toString();\n }\n result += s.slice(li);\n // convert 'hex ....' asm format\n result = result.replace(/(\\shex\\s+)([,x0-9a-f]+)/ig, (m,hexprefix,hexstr) => {\n var rtn = hexprefix + hexstr;\n rtn = rtn.replace(/0x/ig,'').replace(/,/ig,'')\n return rtn;\n });\n return result;\n}\n\nfunction remapBits(x:number, arr:number[]) : number {\n if (!arr) return x;\n var y = 0;\n for (var i=0; i<arr.length; i++) {\n var s = arr[i];\n if (s < 0) {\n s = -s-1;\n y ^= 1 << s;\n }\n if (x & (1 << i)) {\n y ^= 1 << s;\n }\n }\n return y;\n}\n\n// for VCS playfields\n// ;;{w:20,h:10,flip:1,reindex:[4,5,6,7,15,14,13,12,11,10,9,8,16,17,18,19]};;\nfunction reindexMask(x:number, inds:number[]) : [number, number] {\n var i = inds[x % inds.length];\n return [i >> 3, i & 7];\n}\n\nexport function convertWordsToImages(words:UintArray, fmt:PixelEditorImageFormat) : Uint8Array[] {\n var width = fmt.w;\n var height = fmt.h;\n var count = fmt.count || 1;\n var bpp = fmt.bpp || 1;\n var nplanes = fmt.np || 1;\n var bitsperword = fmt.bpw || 8;\n var wordsperline = fmt.sl || Math.ceil(width * bpp / bitsperword);\n var mask = (1 << bpp)-1;\n var pofs = fmt.pofs || wordsperline*height*count;\n var skip = fmt.skip || 0;\n var wpimg = fmt.wpimg || wordsperline*height;\n var images = [];\n for (var n=0; n<count; n++) {\n var imgdata = [];\n for (var y=0; y<height; y++) {\n var yp = fmt.flip ? height-1-y : y;\n var ofs0 = wpimg*n + yp*wordsperline;\n var shift = 0;\n for (var x=0; x<width; x++) {\n var color = 0;\n var ofs = remapBits(ofs0, fmt.remap);\n if (fmt.reindex) { [ofs, shift] = reindexMask(x, fmt.reindex); ofs += ofs0; }\n for (var p=0; p<nplanes; p++) {\n var byte = words[ofs + p*pofs + skip];\n color |= ((fmt.brev ? byte>>(bitsperword-shift-bpp) : byte>>shift) & mask) << (p*bpp);\n }\n imgdata.push(color);\n shift += bpp;\n if (shift >= bitsperword && !fmt.reindex) {\n ofs0 += 1;\n shift = 0;\n }\n }\n }\n images.push(new Uint8Array(imgdata));\n }\n return images;\n}\n\nexport function convertImagesToWords(images:Uint8Array[], fmt:PixelEditorImageFormat) : number[] {\n if (fmt.destfmt) fmt = fmt.destfmt;\n var width = fmt.w;\n var height = fmt.h;\n var count = fmt.count || 1;\n var bpp = fmt.bpp || 1;\n var nplanes = fmt.np || 1;\n var bitsperword = fmt.bpw || 8;\n var wordsperline = fmt.sl || Math.ceil(fmt.w * bpp / bitsperword);\n var mask = (1 << bpp)-1;\n var pofs = fmt.pofs || wordsperline*height*count;\n var skip = fmt.skip || 0;\n var wpimg = fmt.wpimg || wordsperline*height;\n \n var words;\n if (nplanes > 0 && fmt.sl) // TODO?\n words = new Uint8Array(wpimg*count);\n else if (bitsperword <= 8)\n words = new Uint8Array(wpimg*count*nplanes);\n else\n words = new Uint32Array(wpimg*count*nplanes);\n\n for (var n=0; n<count; n++) {\n var imgdata = images[n];\n var i = 0;\n for (var y=0; y<height; y++) {\n var yp = fmt.flip ? height-1-y : y;\n var ofs0 = n*wpimg + yp*wordsperline;\n var shift = 0;\n for (var x=0; x<width; x++) {\n var color = imgdata[i++];\n var ofs = remapBits(ofs0, fmt.remap);\n if (fmt.reindex) { [ofs, shift] = reindexMask(x, fmt.reindex); ofs += ofs0; }\n for (var p=0; p<nplanes; p++) {\n var c = (color >> (p*bpp)) & mask;\n words[ofs + p*pofs + skip] |= (fmt.brev ? (c << (bitsperword-shift-bpp)) : (c << shift));\n }\n shift += bpp;\n if (shift >= bitsperword && !fmt.reindex) {\n ofs0 += 1;\n shift = 0;\n }\n }\n }\n }\n return words;\n}\n\n// TODO\nexport function convertPaletteBytes(arr:UintArray,r0,r1,g0,g1,b0,b1) : number[] {\n var result = [];\n for (var i=0; i<arr.length; i++) {\n var d = arr[i];\n var rgb = 0xff000000;\n rgb |= ((d >> r0) & ((1<<r1)-1)) << (0+8-r1);\n rgb |= ((d >> g0) & ((1<<g1)-1)) << (8+8-g1);\n rgb |= ((d >> b0) & ((1<<b1)-1)) << (16+8-b1);\n result.push(rgb);\n }\n return result;\n}\n\nexport function getPaletteLength(palfmt: PixelEditorPaletteFormat) : number {\n var pal = palfmt.pal;\n if (typeof pal === 'number') {\n var rr = Math.floor(Math.abs(pal/100) % 10);\n var gg = Math.floor(Math.abs(pal/10) % 10);\n var bb = Math.floor(Math.abs(pal) % 10);\n return 1<<(rr+gg+bb);\n } else {\n var paltable = PREDEF_PALETTES[pal];\n if (paltable) {\n return paltable.length;\n } else {\n throw new Error(\"No palette named \" + pal);\n }\n }\n}\n\nexport function convertPaletteFormat(palbytes:UintArray, palfmt: PixelEditorPaletteFormat) : number[] {\n var pal = palfmt.pal;\n var newpalette;\n if (typeof pal === 'number') {\n var rr = Math.floor(Math.abs(pal/100) % 10);\n var gg = Math.floor(Math.abs(pal/10) % 10);\n var bb = Math.floor(Math.abs(pal) % 10);\n // TODO: n\n if (pal >= 0)\n newpalette = convertPaletteBytes(palbytes, 0, rr, rr, gg, rr+gg, bb);\n else\n newpalette = convertPaletteBytes(palbytes, rr+gg, bb, rr, gg, 0, rr);\n } else {\n var paltable = PREDEF_PALETTES[pal];\n if (paltable) {\n newpalette = new Uint32Array(palbytes).map((i) => { return paltable[i & (paltable.length-1)] | 0xff000000; });\n } else {\n throw new Error(\"No palette named \" + pal);\n }\n }\n return newpalette;\n}\n\n// TODO: illegal colors?\nconst PREDEF_PALETTES = {\n 'nes':[\n 0x525252, 0xB40000, 0xA00000, 0xB1003D, 0x740069, 0x00005B, 0x00005F, 0x001840, 0x002F10, 0x084A08, 0x006700, 0x124200, 0x6D2800, 0x000000, 0x000000, 0x000000,\n 0xC4D5E7, 0xFF4000, 0xDC0E22, 0xFF476B, 0xD7009F, 0x680AD7, 0x0019BC, 0x0054B1, 0x006A5B, 0x008C03, 0x00AB00, 0x2C8800, 0xA47200, 0x000000, 0x000000, 0x000000,\n 0xF8F8F8, 0xFFAB3C, 0xFF7981, 0xFF5BC5, 0xFF48F2, 0xDF49FF, 0x476DFF, 0x00B4F7, 0x00E0FF, 0x00E375, 0x03F42B, 0x78B82E, 0xE5E218, 0x787878, 0x000000, 0x000000,\n 0xFFFFFF, 0xFFF2BE, 0xF8B8B8, 0xF8B8D8, 0xFFB6FF, 0xFFC3FF, 0xC7D1FF, 0x9ADAFF, 0x88EDF8, 0x83FFDD, 0xB8F8B8, 0xF5F8AC, 0xFFFFB0, 0xF8D8F8, 0x000000, 0x000000\n ],\n 'ap2lores':[\n (0x000000), (0xff00ff), (0x00007f), (0x7f007f), (0x007f00), (0x7f7f7f), (0x0000bf), (0x0000ff),\n (0xbf7f00), (0xffbf00), (0xbfbfbf), (0xff7f7f), (0x00ff00), (0xffff00), (0x00bf7f), (0xffffff),\n ],\n 'vcs':[\n 0x000000,0x000000, 0x404040,0x404040, 0x6c6c6c,0x6c6c6c, 0x909090,0x909090, 0xb0b0b0,0xb0b0b0, 0xc8c8c8,0xc8c8c8, 0xdcdcdc,0xdcdcdc, 0xf4f4f4,0xf4f4f4,\n 0x004444,0x004444, 0x106464,0x106464, 0x248484,0x248484, 0x34a0a0,0x34a0a0, 0x40b8b8,0x40b8b8, 0x50d0d0,0x50d0d0, 0x5ce8e8,0x5ce8e8, 0x68fcfc,0x68fcfc,\n 0x002870,0x002870, 0x144484,0x144484, 0x285c98,0x285c98, 0x3c78ac,0x3c78ac, 0x4c8cbc,0x4c8cbc, 0x5ca0cc,0x5ca0cc, 0x68b4dc,0x68b4dc, 0x78c8ec,0x78c8ec,\n 0x001884,0x001884, 0x183498,0x183498, 0x3050ac,0x3050ac, 0x4868c0,0x4868c0, 0x5c80d0,0x5c80d0, 0x7094e0,0x7094e0, 0x80a8ec,0x80a8ec, 0x94bcfc,0x94bcfc,\n 0x000088,0x000088, 0x20209c,0x20209c, 0x3c3cb0,0x3c3cb0, 0x5858c0,0x5858c0, 0x7070d0,0x7070d0, 0x8888e0,0x8888e0, 0xa0a0ec,0xa0a0ec, 0xb4b4fc,0xb4b4fc,\n 0x5c0078,0x5c0078, 0x74208c,0x74208c, 0x883ca0,0x883ca0, 0x9c58b0,0x9c58b0, 0xb070c0,0xb070c0, 0xc084d0,0xc084d0, 0xd09cdc,0xd09cdc, 0xe0b0ec,0xe0b0ec,\n 0x780048,0x780048, 0x902060,0x902060, 0xa43c78,0xa43c78, 0xb8588c,0xb8588c, 0xcc70a0,0xcc70a0, 0xdc84b4,0xdc84b4, 0xec9cc4,0xec9cc4, 0xfcb0d4,0xfcb0d4,\n 0x840014,0x840014, 0x982030,0x982030, 0xac3c4c,0xac3c4c, 0xc05868,0xc05868, 0xd0707c,0xd0707c, 0xe08894,0xe08894, 0xeca0a8,0xeca0a8, 0xfcb4bc,0xfcb4bc,\n 0x880000,0x880000, 0x9c201c,0x9c201c, 0xb04038,0xb04038, 0xc05c50,0xc05c50, 0xd07468,0xd07468, 0xe08c7c,0xe08c7c, 0xeca490,0xeca490, 0xfcb8a4,0xfcb8a4,\n 0x7c1800,0x7c1800, 0x90381c,0x90381c, 0xa85438,0xa85438, 0xbc7050,0xbc7050, 0xcc8868,0xcc8868, 0xdc9c7c,0xdc9c7c, 0xecb490,0xecb490, 0xfcc8a4,0xfcc8a4,\n 0x5c2c00,0x5c2c00, 0x784c1c,0x784c1c, 0x906838,0x906838, 0xac8450,0xac8450, 0xc09c68,0xc09c68, 0xd4b47c,0xd4b47c, 0xe8cc90,0xe8cc90, 0xfce0a4,0xfce0a4,\n 0x2c3c00,0x2c3c00, 0x485c1c,0x485c1c, 0x647c38,0x647c38, 0x809c50,0x809c50, 0x94b468,0x94b468, 0xacd07c,0xacd07c, 0xc0e490,0xc0e490, 0xd4fca4,0xd4fca4,\n 0x003c00,0x003c00, 0x205c20,0x205c20, 0x407c40,0x407c40, 0x5c9c5c,0x5c9c5c, 0x74b474,0x74b474, 0x8cd08c,0x8cd08c, 0xa4e4a4,0xa4e4a4, 0xb8fcb8,0xb8fcb8,\n 0x003814,0x003814, 0x1c5c34,0x1c5c34, 0x387c50,0x387c50, 0x50986c,0x50986c, 0x68b484,0x68b484, 0x7ccc9c,0x7ccc9c, 0x90e4b4,0x90e4b4, 0xa4fcc8,0xa4fcc8,\n 0x00302c,0x00302c, 0x1c504c,0x1c504c, 0x347068,0x347068, 0x4c8c84,0x4c8c84, 0x64a89c,0x64a89c, 0x78c0b4,0x78c0b4, 0x88d4cc,0x88d4cc, 0x9cece0,0x9cece0,\n 0x002844,0x002844, 0x184864,0x184864, 0x306884,0x306884, 0x4484a0,0x4484a0, 0x589cb8,0x589cb8, 0x6cb4d0,0x6cb4d0, 0x7ccce8,0x7ccce8, 0x8ce0fc,0x8ce0fc\n ],\n 'astrocade':[0,2368548,4737096,7171437,9539985,11974326,14342874,16777215,12255269,14680137,16716142,16725394,16734903,16744155,16753663,16762879,11534409,13959277,16318866,16721334,16730842,16740095,16749311,16758783,10420330,12779662,15138995,16718039,16727291,16736767,16745983,16755199,8847495,11206827,13631696,15994612,16724735,16733951,16743423,16752639,6946975,9306307,11731175,14092287,16461055,16732415,16741631,16751103,4784304,7143637,9568505,11929087,14297599,16731647,16741119,16750335,2425019,4784352,7209215,9570047,12004095,14372863,16741375,16750847,191,2359523,4718847,7146495,9515263,11949311,14318079,16752127,187,224,2294015,4658431,7092735,9461247,11895551,14264063,176,213,249,2367999,4736511,7105279,9539327,11908095,159,195,3303,209151,2577919,4946431,7380735,9749247,135,171,7888,17140,681983,3050495,5484543,7853311,106,3470,12723,22231,31483,1548031,3916799,6285311,73,8557,17810,27318,36570,373759,2742271,5176575,4389,13641,23150,32402,41911,51163,2026495,4456447,9472,18724,27976,37485,46737,56246,1834970,4194303,14080,23296,32803,42055,51564,60816,2031541,4456409,18176,27648,36864,46116,55624,392556,2752401,5177269,21760,30976,40192,49667,58919,1572683,3932016,6291348,24320,33536,43008,52224,716810,3079982,5504851,7864183,25856,35328,44544,250368,2619136,4980503,7405371,9764703,26624,35840,45312,2413824,4782336,7143173,9568041,11927374,26112,35584,2338560,4707328,7141376,9502464,11927326,14286659,24832,2393344,4762112,7196160,9564928,11992832,14352155,16711487,2447360,4815872,7250176,9618688,12052992,14417664,16776990,16777027,4803328,7172096,9606144,11974912,14343424,16776965,16777001,16777038,6962176,9330688,11764992,14133504,16502272,16773655,16777019,16777055,8858112,11226880,13660928,16029440,16759818,16769070,16777043,16777079,10426112,12794624,15163392,16745475,16754727,16764235,16773488,16777108,11534848,13969152,16337664,16740388,16749640,16759148,16768401,16777141,12255232,14684928,16725795,16735047,16744556,16753808,16763317,16772569],\n 'c64':[0x000000,0xffffff,0x2b3768,0xb2a470,0x863d6f,0x438d58,0x792835,0x6fc7b8,0x254f6f,0x003943,0x59679a,0x444444,0x6c6c6c,0x84d29a,0xb55e6c,0x959595],\n};\n\nvar PREDEF_LAYOUTS : {[id:string]:PixelEditorPaletteLayout} = {\n 'nes':[\n ['Screen Color', 0x00, 1],\n ['Background 0', 0x01, 3],\n ['Background 1', 0x05, 3],\n ['Background 2', 0x09, 3],\n ['Background 3', 0x0d, 3],\n ['Sprite 0', 0x11, 3],\n ['Sprite 1', 0x15, 3],\n ['Sprite 2', 0x19, 3],\n ['Sprite 3', 0x1d, 3]\n ],\n 'astrocade':[\n ['Left', 0x00, -4],\n ['Right', 0x04, -4]\n ],\n};\n\n/////\n\nfunction equalArrays(a:UintArray, b:UintArray) : boolean {\n if (a == null || b == null)\n return false;\n if (a.length !== b.length)\n return false;\n if (a === b)\n return true;\n for (var i=0; i<a.length; i++) {\n if (a[i] !== b[i])\n return false;\n }\n return true;\n}\nfunction equalNestedArrays(a:UintArray[], b:UintArray[]) : boolean {\n if (a == null || b == null)\n return false;\n if (a.length !== b.length)\n return false;\n if (a === b)\n return true;\n for (var i=0; i<a.length; i++) {\n if (!equalArrays(a[i], b[i]))\n return false;\n }\n return true;\n}\n\nexport abstract class PixNode {\n left : PixNode;\t\t// toward text editor\n right : PixNode;\t\t// toward pixel editor\n\n words? : UintArray;\t\t// file data\n images? : Uint8Array[];\t// array of indexed image data\n rgbimgs? : Uint32Array[];\t// array of rgba imgages\n palette? : Uint32Array; // array of rgba\n\n abstract updateLeft() : boolean;\t// update coming from right\n abstract updateRight() : boolean;\t// update coming from left\n\n refreshLeft() {\n var p : PixNode = this;\n while (p) {\n p.updateLeft();\n p = p.left;\n }\n }\n refreshRight() {\n var p : PixNode = this;\n while (p) {\n p.updateRight();\n p = p.right;\n }\n }\n addRight(node : PixNode) {\n this.right = node;\n node.left = this;\n return node;\n }\n addLeft(node : PixNode) {\n this.left = node;\n node.right = this;\n return node;\n }\n}\n\nabstract class CodeProjectDataNode extends PixNode {\n project : ProjectWindows;\n fileid : string;\n label : string;\n words : UintArray;\n}\n\nexport class FileDataNode extends CodeProjectDataNode {\n\n constructor(project:ProjectWindows, fileid:string) {\n super();\n this.project = project;\n this.fileid = fileid;\n this.label = fileid;\n }\n updateLeft() {\n //if (equalArrays(this.words, this.right.words)) return false;\n this.words = this.right.words;\n if (this.project) {\n this.project.updateFile(this.fileid, this.words as Uint8Array);\n }\n return true;\n }\n updateRight() {\n if (this.project) {\n this.words = this.project.project.getFile(this.fileid) as Uint8Array;\n }\n return true;\n }\n}\n\nexport class TextDataNode extends CodeProjectDataNode {\n text : string;\n start : number;\n end : number;\n\n // TODO: what if file size/layout changes?\n constructor(project:ProjectWindows, fileid:string, label:string, start:number, end:number) {\n super();\n this.project = project;\n this.fileid = fileid;\n this.label = label;\n this.start = start;\n this.end = end;\n }\n updateLeft() {\n if (this.right.words.length != this.words.length)\n throw Error(\"Cannot put \" + this.right.words.length + \" image bytes into array of \" + this.words.length + \" bytes\");\n this.words = this.right.words;\n // TODO: reload editors?\n var datastr = this.text.substring(this.start, this.end);\n datastr = replaceHexWords(datastr, this.words);\n this.text = this.text.substring(0, this.start) + datastr + this.text.substring(this.end);\n if (this.project) {\n this.project.updateFile(this.fileid, this.text);\n //this.project.replaceTextRange(this.fileid, this.start, this.end, datastr);\n }\n return true;\n }\n updateRight() {\n if (this.project) {\n this.text = this.project.project.getFile(this.fileid) as string;\n }\n var datastr = this.text.substring(this.start, this.end);\n datastr = convertToHexStatements(datastr); // TODO?\n var words = parseHexWords(datastr);\n this.words = words; //new Uint8Array(words); // TODO: 16/32?\n return true;\n }\n}\n\nexport class Compressor extends PixNode {\n\n words : UintArray;\n\n updateLeft() {\n // TODO: can't modify length of rle bytes\n return false;\n }\n updateRight() {\n this.words = rle_unpack(new Uint8Array(this.left.words));\n return true;\n }\n\n}\n\nexport class Mapper extends PixNode {\n\n fmt : PixelEditorImageFormat;\n words : UintArray;\n images : Uint8Array[];\n\n constructor(fmt) {\n super();\n this.fmt = fmt;\n }\n updateLeft() {\n //if (equalNestedArrays(this.images, this.right.images)) return false;\n this.images = this.right.images;\n this.words = convertImagesToWords(this.images, this.fmt);\n return true;\n }\n updateRight() {\n if (equalArrays(this.words, this.left.words)) return false;\n // convert each word array to images\n this.words = this.left.words;\n this.images = convertWordsToImages(this.words, this.fmt);\n return true;\n }\n}\n\nclass RGBAPalette {\n palcols;\n constructor(palcols : Uint32Array) {\n this.palcols = palcols;\n }\n indexOf(rgba : number) : number {\n return this.palcols.indexOf(rgba);\n }\n}\n\nexport class Palettizer extends PixNode {\n\n images : Uint8Array[];\n rgbimgs : Uint32Array[];\n palette : Uint32Array;\n\n ncolors : number;\n context : EditorContext;\n paloptions : SelectablePalette[];\n palindex : number = 0;\n\n// TODO: control to select palette for bitmaps\n\n constructor(context:EditorContext, fmt:PixelEditorImageFormat) {\n super();\n this.context = context;\n this.ncolors = 1 << ((fmt.bpp||1) * (fmt.np||1));\n }\n updateLeft() {\n if (this.right) { this.rgbimgs = this.right.rgbimgs; } // TODO: check is for unit test, remove?\n var pal = new RGBAPalette(this.palette);\n var newimages = this.rgbimgs.map( (im:Uint32Array) => {\n var out = new Uint8Array(im.length);\n for (var i=0; i<im.length; i++) {\n out[i] = pal.indexOf(im[i]);\n }\n return out;\n });\n // have to do it this way b/c pixel editor modifies arrays\n //if (equalNestedArrays(newimages, this.images)) return false;\n this.images = newimages;\n return true;\n }\n updateRight() {\n if (!this.updateRefs() && equalNestedArrays(this.images, this.left.images)) return false;\n this.images = this.left.images;\n var mask = this.palette.length - 1; // must be power of 2\n // for each image, map bytes to RGB colors\n this.rgbimgs = this.images.map( (im:Uint8Array) => {\n var out = new Uint32Array(im.length);\n for (var i=0; i<im.length; i++) {\n out[i] = this.palette[im[i] & mask];\n }\n return out;\n });\n return true;\n }\n updateRefs() {\n var newpalette;\n if (this.context != null) {\n this.paloptions = this.context.getPalettes(this.ncolors);\n if (this.paloptions && this.paloptions.length > 0) {\n newpalette = this.paloptions[this.palindex].palette;\n }\n }\n if (newpalette == null) {\n if (this.ncolors <= 2)\n newpalette = new Uint32Array([0xff000000, 0xffffffff]);\n else\n newpalette = new Uint32Array([0xff000000, 0xffff00ff, 0xffffff00, 0xffffffff]); // TODO: more palettes\n }\n if (equalArrays(this.palette, newpalette)) return false;\n this.palette = newpalette;\n return true;\n }\n}\n\nfunction dedupPalette(cols : UintArray) : Uint32Array {\n var dup = new Map();\n var res = new Uint32Array(cols.length);\n var ndups = 0;\n for (var i=0; i<cols.length; i++) {\n var n = cols[i];\n while (dup[n]) {\n n ^= ++ndups;\n }\n res[i] = n;\n dup[n] = 1;\n }\n return res;\n}\n\nexport class PaletteFormatToRGB extends PixNode {\n\n words : UintArray;\n rgbimgs : Uint32Array[];\n palette : Uint32Array;\n palfmt : PixelEditorPaletteFormat;\n layout : PixelEditorPaletteLayout;\n\n constructor(palfmt) {\n super();\n this.palfmt = palfmt;\n }\n updateLeft() {\n //TODO\n return true;\n }\n updateRight() {\n if (equalArrays(this.words, this.left.words)) return false;\n this.words = this.left.words;\n this.palette = dedupPalette(convertPaletteFormat(this.words, this.palfmt));\n this.layout = PREDEF_LAYOUTS[this.palfmt.layout];\n this.rgbimgs = [];\n this.palette.forEach( (rgba:number) => {\n this.rgbimgs.push(new Uint32Array([rgba]));\n });\n return true;\n }\n getAllColors() {\n var arr = [];\n for (var i=0; i<getPaletteLength(this.palfmt); i++)\n arr.push(i);\n return convertPaletteFormat(arr, this.palfmt);\n }\n}\n\nexport abstract class Compositor extends PixNode {\n\n tilemap : Uint8Array[];\t// tilemap images\n images : Uint8Array[];\t// output (1 image)\n width : number;\n height : number;\n\n context : EditorContext;\n tileoptions : SelectableTilemap[];\n tileindex : number = 0;\n\n constructor(context:EditorContext) {\n super();\n this.context = context;\n }\n updateRefs() : boolean {\n var oldtilemap = this.tilemap;\n if (this.context != null) {\n this.tileoptions = this.context.getTilemaps(256);\n if (this.tileoptions && this.tileoptions.length > 0) {\n this.tilemap = this.tileoptions[this.tileindex].images;\n }\n }\n return !equalNestedArrays(oldtilemap, this.tilemap);\n }\n}\n\nexport type MetaspriteEntry = {\n x:number, y:number, tile:number, attr:number\n};\n\nexport class MetaspriteCompositor extends Compositor {\n\n metadefs : MetaspriteEntry[];\n\n constructor(context:EditorContext, metadefs) {\n super(context);\n this.metadefs = metadefs;\n }\n updateLeft() {\n // TODO\n return false;\n }\n updateRight() {\n this.updateRefs();\n this.width = 16; // TODO\n this.height = 16; // TODO\n var idata = new Uint8Array(this.width * this.height);\n this.images = [idata];\n this.metadefs.forEach((meta) => {\n // TODO\n });\n return true;\n }\n}\n\nexport class NESNametableConverter extends Compositor {\n\n cols : number;\n rows : number;\n baseofs : number;\n constructor(context:EditorContext) {\n super(context);\n }\n updateLeft() {\n // TODO\n return false;\n }\n updateRight() {\n if (!this.updateRefs() && equalArrays(this.words, this.left.words)) return false;\n this.words = this.left.words;\n this.cols = 32;\n this.rows = 30;\n this.width = this.cols * 8;\n this.height = this.rows * 8;\n this.baseofs = 0;\n var idata = new Uint8Array(this.width * this.height);\n this.images = [idata];\n var a = 0;\n var attraddr;\n for (var row=0; row<this.rows; row++) {\n for (var col=0; col<this.cols; col++) {\n var name = this.words[this.baseofs + a];\n if (typeof name === 'undefined') throw Error(\"No name for address \" + this.baseofs + \" + \" + a);\n var t = this.tilemap[name];\n if (!t) throw Error(\"No tilemap found for tile index \" + name);\n attraddr = (a & 0x2c00) | 0x3c0 | (a & 0x0C00) | ((a >> 4) & 0x38) | ((a >> 2) & 0x07);\n var attr = this.words[attraddr];\n var tag = name ^ (attr<<9) ^ 0x80000000;\n var i = row*this.cols*8*8 + col*8;\n var j = 0;\n var attrshift = (col&2) + ((a&0x40)>>4);\n var coloradd = ((attr >> attrshift) & 3) << 2;\n for (var y=0; y<8; y++) {\n for (var x=0; x<8; x++) {\n var color = t[j++];\n if (color) color += coloradd;\n idata[i++] = color;\n }\n i += this.cols*8-8;\n }\n a++;\n }\n }\n // TODO\n return true;\n }\n}\n\n///// UI CONTROLS\n\nexport class ImageChooser {\n\n rgbimgs : Uint32Array[];\n width : number;\n height : number;\n\n recreate(parentdiv:JQuery, onclick) {\n var agrid = $('<div class=\"asset_grid\"/>'); // grid (or 1) of preview images\n parentdiv.empty().append(agrid);\n var cscale = Math.max(2, Math.ceil(16/this.width)); // TODO\n var imgsperline = this.width <= 8 ? 16 : 8; // TODO\n var span = null;\n this.rgbimgs.forEach((imdata, i) => {\n var viewer = new Viewer();\n viewer.width = this.width;\n viewer.height = this.height;\n viewer.recreate();\n viewer.canvas.style.width = (viewer.width*cscale)+'px'; // TODO\n viewer.canvas.title = '$'+hex(i);\n viewer.updateImage(imdata);\n $(viewer.canvas).addClass('asset_cell');\n $(viewer.canvas).click((e) => {\n onclick(i, viewer);\n });\n if (!span) {\n span = $('<span/>');\n agrid.append(span);\n }\n span.append(viewer.canvas);\n var brk = (i % imgsperline) == imgsperline-1;\n if (brk) {\n agrid.append($(\"<br/>\"));\n span = null;\n }\n });\n }\n}\n\nfunction newDiv(parent?, cls? : string) {\n var div = $(document.createElement(\"div\"));\n if (parent) div.appendTo(parent)\n if (cls) div.addClass(cls);\n return div;\n}\n\nexport class CharmapEditor extends PixNode {\n\n context;\n parentdiv;\n fmt;\n chooser;\n\n constructor(context:EditorContext, parentdiv:JQuery, fmt:PixelEditorImageFormat) {\n super();\n this.context = context;\n this.parentdiv = parentdiv;\n this.fmt = fmt;\n }\n\n updateLeft() {\n return true;\n }\n\n updateRight() {\n if (equalNestedArrays(this.rgbimgs, this.left.rgbimgs)) return false;\n this.rgbimgs = this.left.rgbimgs;\n var adual = newDiv(this.parentdiv.empty(), \"asset_dual\"); // contains grid and editor\n var agrid = newDiv(adual);\n var aeditor = newDiv(adual, \"asset_editor\").hide(); // contains editor, when selected\n // add image chooser grid\n var chooser = this.chooser = new ImageChooser();\n chooser.rgbimgs = this.rgbimgs;\n chooser.width = this.fmt.w || 1;\n chooser.height = this.fmt.h || 1;\n chooser.recreate(agrid, (index, viewer) => {\n var yscale = Math.ceil(256 / this.fmt.w); // TODO: variable scale?\n var xscale = yscale * (this.fmt.aspect || 1.0);\n var editview = this.createEditor(aeditor, viewer, xscale, yscale);\n this.context.setCurrentEditor(aeditor, $(viewer.canvas), this);\n this.rgbimgs[index] = viewer.rgbdata;\n });\n // add palette selector\n // TODO: only view when editing?\n var palizer = this.left;\n if (palizer instanceof Palettizer && palizer.paloptions.length > 1) {\n var palselect = $(document.createElement('select'));\n palizer.paloptions.forEach((palopt, i) => {\n // TODO: full identifier\n var sel = $(document.createElement('option')).text(palopt.name).val(i).appendTo(palselect);\n if (i == (palizer as Palettizer).palindex)\n sel.attr('selected','selected');\n });\n palselect.appendTo(agrid).change((e) => {\n var index = $(e.target).val() as number;\n (palizer as Palettizer).palindex = index;\n palizer.refreshRight();\n });\n }\n return true;\n }\n\n createEditor(aeditor: JQuery, viewer: Viewer, xscale: number, yscale: number) : PixEditor {\n var im = new PixEditor();\n im.createWith(viewer);\n im.updateImage();\n var w = viewer.width * xscale;\n var h = viewer.height * yscale;\n while (w > 500 || h > 500) {\n w /= 2; h /= 2;\n }\n im.canvas.style.width = w+'px'; // TODO\n im.canvas.style.height = h+'px'; // TODO\n im.makeEditable(this, aeditor, this.left.palette);\n return im;\n }\n}\n\nexport class MapEditor extends PixNode {\n\n context;\n parentdiv;\n fmt;\n\n constructor(context:EditorContext, parentdiv:JQuery, fmt:PixelEditorImageFormat) {\n super();\n this.context = context;\n this.parentdiv = parentdiv;\n this.fmt = fmt;\n }\n\n updateLeft() {\n return true;\n }\n\n updateRight() {\n if (equalNestedArrays(this.rgbimgs, this.left.rgbimgs)) return false;\n this.rgbimgs = this.left.rgbimgs;\n var adual = newDiv(this.parentdiv.empty(), \"asset_dual\"); // contains grid and editor\n var agrid = newDiv(adual);\n var aeditor = newDiv(adual, \"asset_editor\").hide(); // contains editor, when selected\n // add image chooser grid\n var viewer = new Viewer();\n viewer.width = this.fmt.w;\n viewer.height = this.fmt.h;\n viewer.recreate();\n viewer.updateImage(this.rgbimgs[0]);\n agrid.append(viewer.canvas);\n return true;\n }\n}\n\nexport class Viewer {\n\n width : number;\n height : number;\n canvas : HTMLCanvasElement;\n ctx : CanvasRenderingContext2D;\n imagedata : ImageData;\n rgbdata : Uint32Array;\n peerviewers : Viewer[];\n\n recreate() {\n this.canvas = this.newCanvas();\n this.imagedata = this.ctx.createImageData(this.width, this.height);\n this.rgbdata = new Uint32Array(this.imagedata.data.buffer);\n this.peerviewers = [this];\n }\n\n createWith(pv : Viewer) {\n this.width = pv.width;\n this.height = pv.height;\n this.imagedata = pv.imagedata;\n this.rgbdata = pv.rgbdata;\n this.canvas = this.newCanvas();\n this.peerviewers = [this, pv];\n }\n\n newCanvas() : HTMLCanvasElement {\n var c = document.createElement('canvas');\n c.width = this.width;\n c.height = this.height;\n //if (fmt.xform) c.style.transform = fmt.xform;\n c.classList.add(\"pixels\");\n c.classList.add(\"pixelated\");\n this.ctx = c.getContext('2d');\n return c;\n }\n\n updateImage(imdata? : Uint32Array) {\n if (imdata) {\n this.rgbdata.set(imdata);\n }\n for (let v of this.peerviewers) {\n v.ctx.putImageData(this.imagedata, 0, 0);\n }\n }\n}\n\nclass PixEditor extends Viewer {\n\n left : PixNode;\n palette : Uint32Array;\n curpalcol : number = -1;\n currgba : number;\n palbtns : JQuery[];\n offscreen : Map<string, number> = new Map();\n\n getPositionFromEvent(e) {\n var x = Math.floor(e.offsetX * this.width / $(this.canvas).width());\n var y = Math.floor(e.offsetY * this.height / $(this.canvas).height());\n return {x:x, y:y};\n }\n\n setPaletteColor(col: number) {\n col &= this.palette.length-1;\n if (this.curpalcol != col) {\n if (this.curpalcol >= 0)\n this.palbtns[this.curpalcol].removeClass('selected');\n this.curpalcol = col;\n this.currgba = this.palette[col & this.palette.length-1];\n this.palbtns[col].addClass('selected');\n }\n }\n\n makeEditable(leftnode:PixNode, aeditor:JQuery, palette:Uint32Array) {\n this.left = leftnode;\n this.palette = palette;\n\n var dragcol;\n var dragging = false;\n\n var pxls = $(this.canvas);\n pxls.mousedown( (e) => {\n var pos = this.getPositionFromEvent(e);\n dragcol = this.getPixel(pos.x, pos.y) == this.currgba ? this.palette[0] : this.currgba;\n this.setPixel(pos.x, pos.y, this.currgba);\n dragging = true;\n $(document).mouseup( (e) => {\n $(document).off('mouseup');\n var pos = this.getPositionFromEvent(e);\n this.setPixel(pos.x, pos.y, dragcol);\n dragging = false;\n this.commit();\n });\n })\n .mousemove( (e) => {\n var pos = this.getPositionFromEvent(e);\n if (dragging) {\n this.setPixel(pos.x, pos.y, dragcol);\n }\n });\n\n aeditor.empty();\n this.createToolbarButtons(aeditor[0]);\n aeditor.append(this.canvas);\n aeditor.append(this.createPaletteButtons());\n this.setPaletteColor(1);\n }\n\n getPixel(x:number, y:number) : number {\n x = Math.round(x);\n y = Math.round(y);\n if (x < 0 || x >= this.width || y < 0 || y >= this.height) {\n return this.offscreen[x+','+y] | this.palette[0];\n } else {\n var ofs = x+y*this.width;\n return this.rgbdata[ofs];\n }\n }\n\n setPixel(x:number, y:number, rgba:number) : void {\n x = Math.round(x);\n y = Math.round(y);\n if (x < 0 || x >= this.width || y < 0 || y >= this.height) {\n this.offscreen[x+','+y] = rgba;\n } else {\n var ofs = x+y*this.width;\n var oldrgba = this.rgbdata[ofs];\n if (oldrgba != rgba) {\n this.rgbdata[ofs] = rgba;\n this.updateImage();\n }\n }\n }\n\n createPaletteButtons() {\n this.palbtns = [];\n var span = newDiv(null, \"asset_toolbar\");\n for (var i=0; i<this.palette.length; i++) {\n var btn = $(document.createElement('button')).addClass('palbtn');\n var rgb = this.palette[i] & 0xffffff;\n var color = \"#\" + hex(rgb2bgr(rgb), 6);\n btn.click(this.setPaletteColor.bind(this, i));\n btn.css('backgroundColor', color).text(i.toString(16));\n btn.css('color', (rgb & 0x008000) ? 'black' : 'white');\n span.append(btn);\n this.palbtns.push(btn);\n }\n return span;\n }\n\n createToolbarButtons(parent: HTMLElement) {\n var toolbar = new Toolbar(parent, null);\n toolbar.add('ctrl+shift+h', 'Flip X', 'glyphicon-resize-horizontal', this.flipX.bind(this));\n toolbar.add('ctrl+shift+v', 'Flip Y', 'glyphicon-resize-vertical', this.flipY.bind(this));\n toolbar.add('ctrl+shift+9', 'Rotate', 'glyphicon-repeat', this.rotate90.bind(this));\n toolbar.add('ctrl+shift+left', 'Move Left', 'glyphicon-arrow-left', this.translate.bind(this, 1, 0));\n toolbar.add('ctrl+shift+right', 'Move Right', 'glyphicon-arrow-right', this.translate.bind(this, -1, 0));\n toolbar.add('ctrl+shift+up', 'Move Up', 'glyphicon-arrow-up', this.translate.bind(this, 0, 1));\n toolbar.add('ctrl+shift+down', 'Move Down', 'glyphicon-arrow-down', this.translate.bind(this, 0, -1));\n // TODO: destroy toolbar?\n }\n\n commit() {\n this.updateImage();\n try {\n this.left.refreshLeft();\n } catch (e) {\n console.log(e);\n alert(`Could not update source code. ${e}`);\n }\n }\n\n remapPixels(mapfn : (x:number,y:number) => number) {\n var i = 0;\n var pixels = new Uint32Array(this.rgbdata.length);\n for (var y=0; y<this.height; y++) {\n for (var x=0; x<this.width; x++) {\n pixels[i] = mapfn(x, y);\n i++;\n }\n }\n this.rgbdata.set(pixels);\n this.commit();\n }\n\n rotate(deg:number) {\n var s1 = Math.sin(deg * Math.PI / 180);\n var c1 = Math.cos(deg * Math.PI / 180);\n this.remapPixels((x,y) => {\n var xx = x + 0.5 - this.width/2.0;\n var yy = y + 0.5 - this.height/2.0;\n var xx2 = xx*c1 - yy*s1 + this.width/2.0 - 0.5;\n var yy2 = yy*c1 + xx*s1 + this.height/2.0 - 0.5;\n return this.getPixel(xx2, yy2);\n });\n }\n rotate90() {\n this.rotate(90);\n }\n flipX() {\n this.remapPixels((x,y) => {\n return this.getPixel(this.width-1-x, y);\n });\n }\n flipY() {\n this.remapPixels((x,y) => {\n return this.getPixel(x, this.height-1-y);\n });\n }\n translate(dx:number, dy:number) {\n this.remapPixels((x,y) => {\n return this.getPixel(x+dx, y+dy);\n });\n }\n\n}\n\n// TODO: not yet used\n\nabstract class TwoWayPixelConverter {\n\n w : number;\n h : number;\n words : Uint8Array;\n bitoffsets : Uint32Array;\n coloffsets : Uint32Array;\n\n constructor(width: number, height: number, bpp: number, colpp: number) {\n this.w = width;\n this.h = height;\n this.words = new Uint8Array(width * height);\n this.bitoffsets = new Uint32Array(width * height);\n this.coloffsets = new Uint32Array(width * height);\n }\n\n setPixel(x:number, y:number, col:number, bitofs:number, colofs:number) {\n var ofs = x + y * this.w;\n this.words[ofs] = col;\n this.bitoffsets[ofs] = bitofs;\n this.coloffsets[ofs] = colofs;\n }\n\n abstract wordsToImage(words: UintArray) : Uint8Array[];\n\n abstract imageToWords(image: Uint8Array) : UintArray;\n}\n\nexport class TwoWayMapper extends PixNode {\n\n pc: TwoWayPixelConverter;\n\n constructor(pc: TwoWayPixelConverter) {\n super();\n this.pc = pc;\n }\n updateLeft() {\n //if (equalNestedArrays(this.images, this.right.images)) return false;\n this.images = this.right.images;\n this.words = this.pc.imageToWords(this.images[0]);\n return true;\n }\n updateRight() {\n if (equalArrays(this.words, this.left.words)) return false;\n // convert each word array to images\n this.words = this.left.words;\n this.images = this.pc.wordsToImage(this.words);\n return true;\n }\n}\n\n", "\nimport { newDiv, ProjectView } from \"./baseviews\";\nimport { platform_id, current_project, projectWindows } from \"../ui\";\nimport { FileData } from \"../../common/workertypes\";\nimport { hex, safeident, rgb2bgr } from \"../../common/util\";\nimport * as pixed from \"../pixeleditor\";\nimport Mousetrap = require('mousetrap');\n\nexport class AssetEditorView implements ProjectView, pixed.EditorContext {\n maindiv : JQuery;\n cureditordiv : JQuery;\n cureditelem : JQuery;\n cureditnode : pixed.PixNode;\n rootnodes : pixed.PixNode[];\n deferrednodes : pixed.PixNode[];\n \n createDiv(parent : HTMLElement) {\n this.maindiv = newDiv(parent, \"vertical-scroll\");\n return this.maindiv[0];\n }\n \n clearAssets() {\n this.rootnodes = [];\n this.deferrednodes = [];\n }\n \n registerAsset(type:string, node:pixed.PixNode, deferred:number) {\n this.rootnodes.push(node);\n if (deferred) {\n if (deferred > 1)\n this.deferrednodes.push(node);\n else\n this.deferrednodes.unshift(node);\n } else {\n node.refreshRight();\n }\n }\n \n getPalettes(matchlen : number) : pixed.SelectablePalette[] {\n var result = [];\n this.rootnodes.forEach((node) => {\n while (node != null) {\n if (node instanceof pixed.PaletteFormatToRGB) {\n // TODO: move to node class?\n var palette = node.palette;\n // match full palette length?\n if (matchlen == palette.length) {\n result.push({node:node, name:\"Palette\", palette:palette});\n }\n // look at palette slices\n if (node.layout) {\n node.layout.forEach(([name, start, len]) => {\n if (start < palette.length) {\n if (len == matchlen) {\n var rgbs = palette.slice(start, start+len);\n result.push({node:node, name:name, palette:rgbs});\n } else if (-len == matchlen) { // reverse order\n var rgbs = palette.slice(start, start-len);\n rgbs.reverse();\n result.push({node:node, name:name, palette:rgbs});\n } else if (len+1 == matchlen) {\n var rgbs = new Uint32Array(matchlen);\n rgbs[0] = palette[0];\n rgbs.set(palette.slice(start, start+len), 1);\n result.push({node:node, name:name, palette:rgbs});\n }\n }\n });\n }\n break;\n }\n node = node.right;\n }\n });\n return result;\n }\n \n getTilemaps(matchlen : number) : pixed.SelectableTilemap[] {\n var result = [];\n this.rootnodes.forEach((node) => {\n while (node != null) {\n if (node instanceof pixed.Palettizer) {\n var rgbimgs = node.rgbimgs;\n if (rgbimgs && rgbimgs.length >= matchlen) {\n result.push({node:node, name:\"Tilemap\", images:node.images, rgbimgs:rgbimgs}); // TODO\n }\n }\n node = node.right;\n }\n });\n return result;\n }\n \n isEditing() {\n return this.cureditordiv != null;\n }\n \n getCurrentEditNode() {\n return this.cureditnode;\n }\n \n setCurrentEditor(div:JQuery, editing:JQuery, node:pixed.PixNode) {\n const timeout = 250;\n if (this.cureditordiv != div) {\n if (this.cureditordiv) {\n this.cureditordiv.hide(timeout);\n this.cureditordiv = null;\n }\n if (div) {\n this.cureditordiv = div;\n this.cureditordiv.show();\n this.cureditordiv[0].scrollIntoView({behavior: \"smooth\", block: \"center\"});\n //setTimeout(() => { this.cureditordiv[0].scrollIntoView({behavior: \"smooth\", block: \"center\"}) }, timeout);\n }\n }\n if (this.cureditelem) {\n this.cureditelem.removeClass('selected');\n this.cureditelem = null;\n }\n if (editing) {\n this.cureditelem = editing;\n this.cureditelem.addClass('selected');\n }\n while (node.left) {\n node = node.left;\n }\n this.cureditnode = node;\n }\n \n scanFileTextForAssets(id : string, data : string) {\n // scan file for assets\n // /*{json}*/ or ;;{json};;\n // TODO: put before ident, look for = {\n var result = [];\n var re1 = /[/;][*;]([{].+[}])[*;][/;]/g;\n var m;\n while (m = re1.exec(data)) {\n var start = m.index + m[0].length;\n var end;\n // TODO: verilog end\n if (platform_id.includes('verilog')) {\n end = data.indexOf(\"end\", start); // asm\n } else if (m[0].startsWith(';;')) {\n end = data.indexOf(';;', start); // asm\n } else {\n end = data.indexOf(';', start); // C\n }\n //console.log(id, start, end, m[1], data.substring(start,end));\n if (end > start) {\n try {\n var jsontxt = m[1].replace(/([A-Za-z]+):/g, '\"$1\":'); // fix lenient JSON\n var json = JSON.parse(jsontxt);\n // TODO: name?\n result.push({fileid:id,fmt:json,start:start,end:end});\n } catch (e) {\n console.log(e);\n }\n }\n }\n // look for DEF_METASPRITE_2x2(playerRStand, 0xd8, 0)\n // TODO: could also look in ROM\n var re2 = /DEF_METASPRITE_(\\d+)x(\\d+)[(](\\w+),\\s*(\\w+),\\s*(\\w+)/gi;\n while (m = re2.exec(data)) {\n var width = parseInt(m[1]);\n var height = parseInt(m[2]);\n var ident = m[3];\n var tile = parseInt(m[4]);\n var attr = parseInt(m[5]);\n var metadefs = [];\n for (var x=0; x<width; x++) {\n for (var y=0; y<height; y++) {\n metadefs.push({x:x*8, y:y*8, tile:tile, attr:attr});\n }\n }\n var meta = {defs:metadefs,width:width*8,height:height*8};\n result.push({fileid:id,label:ident,meta:meta});\n }\n // TODO: look for decode <ident> --- ... ---\n /*\n var re3 = /\\bdecode\\s+(\\w+)\\s*---(.+?)---/gims;\n while (m = re3.exec(data)) {\n }\n */\n return result;\n }\n \n // TODO: move to pixeleditor.ts?\n addPaletteEditorViews(parentdiv:JQuery, pal2rgb:pixed.PaletteFormatToRGB, callback) {\n var adual = $('<div class=\"asset_dual\"/>').appendTo(parentdiv);\n var aeditor = $('<div class=\"asset_editor\"/>').hide(); // contains editor, when selected\n // TODO: they need to update when refreshed from right\n var allrgbimgs = [];\n pal2rgb.getAllColors().forEach((rgba) => { allrgbimgs.push(new Uint32Array([rgba])); }); // array of array of 1 rgb color (for picker)\n var atable = $('<table/>').appendTo(adual);\n aeditor.appendTo(adual);\n // make default layout if not exists\n var layout = pal2rgb.layout;\n if (!layout) {\n var len = pal2rgb.palette.length;\n var imgsperline = len > 32 ? 8 : 4; // TODO: use 'n'?\n layout = [];\n for (var i=0; i<len; i+=imgsperline) {\n layout.push([\"\", i, Math.min(len-i,imgsperline)]);\n }\n }\n function updateCell(cell, j) {\n var val = pal2rgb.words[j];\n var rgb = pal2rgb.palette[j];\n var hexcol = '#'+hex(rgb2bgr(rgb),6);\n var textcol = (rgb & 0x008000) ? 'black' : 'white';\n cell.text(hex(val,2)).css('background-color',hexcol).css('color',textcol);\n }\n // iterate over each row of the layout\n layout.forEach( ([name, start, len]) => {\n if (start < pal2rgb.palette.length) { // skip row if out of range\n var arow = $('<tr/>').appendTo(atable);\n $('<td/>').text(name).appendTo(arow);\n var inds = [];\n for (var k=start; k<start+Math.abs(len); k++)\n inds.push(k);\n if (len < 0)\n inds.reverse();\n inds.forEach( (i) => {\n var cell = $('<td/>').addClass('asset_cell asset_editable').appendTo(arow);\n updateCell(cell, i);\n cell.click((e) => {\n var chooser = new pixed.ImageChooser();\n chooser.rgbimgs = allrgbimgs;\n chooser.width = 1;\n chooser.height = 1;\n chooser.recreate(aeditor, (index, newvalue) => {\n callback(i, index);\n updateCell(cell, i);\n });\n this.setCurrentEditor(aeditor, cell, pal2rgb);\n });\n });\n }\n });\n }\n \n addPixelEditor(parentdiv:JQuery, firstnode:pixed.PixNode, fmt:pixed.PixelEditorImageFormat) {\n // data -> pixels\n fmt.xform = 'scale(2)';\n var mapper = new pixed.Mapper(fmt);\n // TODO: rotate node?\n firstnode.addRight(mapper);\n // pixels -> RGBA\n var palizer = new pixed.Palettizer(this, fmt);\n mapper.addRight(palizer);\n // add view objects\n palizer.addRight(new pixed.CharmapEditor(this, newDiv(parentdiv), fmt));\n }\n \n addPaletteEditor(parentdiv:JQuery, firstnode:pixed.PixNode, palfmt?) {\n // palette -> RGBA\n var pal2rgb = new pixed.PaletteFormatToRGB(palfmt);\n firstnode.addRight(pal2rgb);\n // TODO: refresh twice?\n firstnode.refreshRight();\n // TODO: add view objects\n // TODO: show which one is selected?\n this.addPaletteEditorViews(parentdiv, pal2rgb,\n (index, newvalue) => {\n console.log('set entry', index, '=', newvalue);\n // TODO: this forces update of palette rgb colors and file data\n firstnode.words[index] = newvalue;\n pal2rgb.words = null;\n pal2rgb.updateRight();\n pal2rgb.refreshLeft();\n });\n }\n \n ensureFileDiv(fileid : string) : JQuery<HTMLElement> {\n var divid = this.getFileDivId(fileid);\n var body = $(document.getElementById(divid));\n if (body.length === 0) {\n var filediv = newDiv(this.maindiv, 'asset_file');\n var header = newDiv(filediv, 'asset_file_header').text(fileid);\n body = newDiv(filediv).attr('id',divid).addClass('disable-select');\n }\n return body;\n }\n \n refreshAssetsInFile(fileid : string, data : FileData) : number {\n let nassets = 0;\n // TODO: check fmt w/h/etc limits\n // TODO: defer editor creation\n // TODO: only refresh when needed\n if (platform_id.startsWith('nes') && fileid.endsWith('.chr') && data instanceof Uint8Array) {\n // is this a NES CHR?\n let node = new pixed.FileDataNode(projectWindows, fileid);\n const neschrfmt = {w:8,h:8,bpp:1,count:(data.length>>4),brev:true,np:2,pofs:8,remap:[0,1,2,4,5,6,7,8,9,10,11,12]}; // TODO\n this.addPixelEditor(this.ensureFileDiv(fileid), node, neschrfmt);\n this.registerAsset(\"charmap\", node, 1);\n nassets++;\n } else if (platform_id.startsWith('nes') && fileid.endsWith('.pal') && data instanceof Uint8Array) {\n // is this a NES PAL?\n let node = new pixed.FileDataNode(projectWindows, fileid);\n const nespalfmt = {pal:\"nes\",layout:\"nes\"};\n this.addPaletteEditor(this.ensureFileDiv(fileid), node, nespalfmt);\n this.registerAsset(\"palette\", node, 0);\n nassets++;\n } else if (typeof data === 'string') {\n let textfrags = this.scanFileTextForAssets(fileid, data);\n for (let frag of textfrags) {\n if (frag.fmt) {\n let label = fileid; // TODO: label\n let node : pixed.PixNode = new pixed.TextDataNode(projectWindows, fileid, label, frag.start, frag.end);\n let first = node;\n // rle-compressed? TODO: how to edit?\n if (frag.fmt.comp == 'rletag') {\n node = node.addRight(new pixed.Compressor());\n }\n // is this a nes nametable?\n if (frag.fmt.map == 'nesnt') {\n node = node.addRight(new pixed.NESNametableConverter(this));\n node = node.addRight(new pixed.Palettizer(this, {w:8,h:8,bpp:4}));\n const fmt = {w:8*(frag.fmt.w||32),h:8*(frag.fmt.h||30),count:1}; // TODO: can't do custom sizes\n node = node.addRight(new pixed.MapEditor(this, newDiv(this.ensureFileDiv(fileid)), fmt));\n this.registerAsset(\"nametable\", first, 2);\n nassets++;\n }\n // is this a bitmap?\n else if (frag.fmt.w > 0 && frag.fmt.h > 0) {\n this.addPixelEditor(this.ensureFileDiv(fileid), node, frag.fmt);\n this.registerAsset(\"charmap\", first, 1);\n nassets++;\n }\n // is this a palette?\n else if (frag.fmt.pal) {\n this.addPaletteEditor(this.ensureFileDiv(fileid), node, frag.fmt);\n this.registerAsset(\"palette\", first, 0);\n nassets++;\n }\n else {\n // TODO: other kinds of resources?\n }\n }\n }\n }\n return nassets;\n }\n \n getFileDivId(id : string) {\n return '__asset__' + safeident(id);\n }\n \n // TODO: recreate editors when refreshing\n // TODO: look for changes, not moveCursor\n refresh(moveCursor : boolean) {\n // clear and refresh all files/nodes?\n if (moveCursor) {\n this.maindiv.empty();\n this.clearAssets();\n current_project.iterateFiles((fileid, data) => {\n try {\n var nassets = this.refreshAssetsInFile(fileid, data);\n } catch (e) {\n console.log(e);\n this.ensureFileDiv(fileid).text(e+\"\"); // TODO: error msg?\n }\n });\n console.log(\"Found \" + this.rootnodes.length + \" assets\");\n this.deferrednodes.forEach((node) => {\n try {\n node.refreshRight();\n } catch (e) {\n console.log(e);\n alert(e+\"\");\n }\n });\n this.deferrednodes = [];\n } else {\n // only refresh nodes if not actively editing\n // since we could be in the middle of an operation that hasn't been committed\n for (var node of this.rootnodes) {\n if (node !== this.getCurrentEditNode()) {\n node.refreshRight();\n }\n }\n }\n }\n \n setVisible?(showing : boolean) : void {\n // TODO: make into toolbar?\n if (showing) {\n if (Mousetrap.bind) Mousetrap.bind('ctrl+z', projectWindows.undoStep.bind(projectWindows));\n } else {\n if (Mousetrap.unbind) Mousetrap.unbind('ctrl+z');\n }\n }\n \n }\n \n", "import { dumpRAM } from \"../../common/emu\";\nimport { ProbeFlags } from \"../../common/probe\";\nimport { hex } from \"../../common/util\";\nimport { platform } from \"../ui\";\nimport { ProjectView } from \"./baseviews\";\nimport { ProbeViewBaseBase } from \"./debugviews\";\n\nconst MAX_CHILDREN = 256;\nconst MAX_STRING_LEN = 100;\n\nvar TREE_SHOW_DOLLAR_IDENTS = false;\n\nclass TreeNode {\n parent : TreeNode;\n name : string;\n _div : HTMLElement;\n _header : HTMLElement;\n _inline : HTMLElement;\n _content : HTMLElement;\n children : Map<string,TreeNode>;\n expanded = false;\n level : number;\n view : ProjectView;\n\n constructor(parent : TreeNode, name : string) {\n this.parent = parent;\n this.name = name;\n this.children = new Map();\n this.level = parent ? (parent.level+1) : -1;\n this.view = parent ? parent.view : null;\n }\n getDiv() {\n if (this._div == null) {\n this._div = document.createElement(\"div\");\n this._div.classList.add(\"vertical-scroll\");\n this._div.classList.add(\"tree-content\");\n this._header = document.createElement(\"div\");\n this._header.classList.add(\"tree-header\");\n this._header.classList.add(\"tree-level-\" + this.level);\n this._header.append(this.name);\n this._inline = document.createElement(\"span\");\n this._inline.classList.add(\"tree-value\");\n this._header.append(this._inline);\n this._div.append(this._header);\n this.parent._content.append(this._div);\n this._header.onclick = (e) => {\n this.toggleExpanded();\n };\n }\n if (this.expanded && this._content == null) {\n this._content = document.createElement(\"div\");\n this._div.append(this._content);\n }\n else if (!this.expanded && this._content != null) {\n this._content.remove();\n this._content = null;\n this.children.clear();\n }\n return this._div;\n }\n toggleExpanded() {\n this.expanded = !this.expanded;\n this.view.tick();\n }\n remove() {\n this._div.remove();\n this._div = null;\n }\n update(obj : any) {\n this.getDiv();\n var text = \"\";\n // is it a function? call it first, if we are expanded\n // TODO: only call functions w/ signature\n if (obj && obj.$$ && typeof obj.$$ == 'function' && this._content != null) {\n obj = obj.$$();\n }\n // check null first\n if (obj == null) {\n text = obj+\"\";\n // primitive types\n } else if (typeof obj == 'number') {\n if (obj != (obj|0)) text = obj.toString(); // must be a float\n else text = obj + \"\\t($\" + hex(obj) + \")\";\n } else if (typeof obj == 'boolean') {\n text = obj.toString();\n } else if (typeof obj == 'string') {\n if (obj.length < MAX_STRING_LEN)\n text = obj;\n else\n text = obj.substring(0, MAX_STRING_LEN) + \"...\";\n // typed byte array (TODO: other kinds)\n } else if (obj.buffer && obj.length <= MAX_CHILDREN) {\n text = dumpRAM(obj, 0, obj.length);\n // recurse into object? (or function)\n } else if (typeof obj == 'object' || typeof obj == 'function') {\n // only if expanded\n if (this._content != null) {\n // split big arrays\n if (obj.slice && obj.length > MAX_CHILDREN) {\n let newobj = {};\n let oldobj = obj;\n var slicelen = MAX_CHILDREN;\n while (obj.length / slicelen > MAX_CHILDREN) slicelen *= 2;\n for (let ofs=0; ofs<oldobj.length; ofs+=slicelen) {\n newobj[\"$\"+hex(ofs)] = {$$: () => { return oldobj.slice(ofs, ofs+slicelen); }}\n }\n obj = newobj;\n }\n // is it a Map? if so, convert to dictionary\n if (obj instanceof Map) {\n let newobj = {};\n for (let [key, value] of obj.entries()) {\n newobj[key] = value;\n }\n obj = newobj;\n }\n // get object keys\n let names = obj instanceof Array ? Array.from(obj.keys()) : Object.getOwnPropertyNames(obj);\n if (names.length > MAX_CHILDREN) { // max # of child objects\n let newobj = {};\n let oldobj = obj;\n var slicelen = 100;\n while (names.length / slicelen > 100) slicelen *= 2;\n for (let ofs=0; ofs<names.length; ofs+=slicelen) {\n var newdict = {};\n for (var i=ofs; i<ofs+slicelen; i++)\n newdict[names[i]] = oldobj[names[i]];\n newobj[\"[\"+ofs+\"...]\"] = newdict;\n }\n obj = newobj;\n names = Object.getOwnPropertyNames(obj);\n }\n // track deletions\n let orphans = new Set(this.children.keys());\n // visit all children\n names.forEach((name) => {\n // hide $xxx idents?\n var hidden = !TREE_SHOW_DOLLAR_IDENTS && typeof name === 'string' && name.startsWith(\"$$\");\n if (!hidden) {\n let childnode = this.children.get(name);\n if (childnode == null) {\n childnode = new TreeNode(this, name);\n this.children.set(name, childnode);\n }\n childnode.update(obj[name]);\n }\n orphans.delete(name);\n });\n // remove orphans\n orphans.forEach((delname) => {\n let childnode = this.children.get(delname);\n childnode.remove();\n this.children.delete(delname);\n });\n this._header.classList.add(\"tree-expanded\");\n this._header.classList.remove(\"tree-collapsed\");\n } else {\n this._header.classList.add(\"tree-collapsed\");\n this._header.classList.remove(\"tree-expanded\");\n }\n } else {\n text = typeof obj; // fallthrough\n }\n // change DOM object if needed\n if (this._inline.innerText != text) {\n this._inline.innerText = text;\n }\n }\n}\n\nfunction createTreeRootNode(parent : HTMLElement, view : ProjectView) : TreeNode {\n var mainnode = new TreeNode(null, null);\n mainnode.view = view;\n mainnode._content = parent;\n var root = new TreeNode(mainnode, \"/\");\n root.expanded = true;\n root.getDiv(); // create it\n root._div.style.padding = '0px';\n return root; // should be cached\n}\n\nexport abstract class TreeViewBase implements ProjectView {\n root : TreeNode;\n\n createDiv(parent : HTMLElement) : HTMLElement {\n this.root = createTreeRootNode(parent, this);\n return this.root.getDiv();\n }\n\n refresh() {\n this.tick();\n }\n\n tick() {\n this.root.update(this.getRootObject());\n }\n\n abstract getRootObject() : Object;\n}\n\nexport class StateBrowserView extends TreeViewBase implements ProjectView {\n getRootObject() { return platform.saveState(); }\n}\n\nexport class DebugBrowserView extends TreeViewBase implements ProjectView {\n getRootObject() { return platform.getDebugTree(); }\n}\n\ninterface CallGraphNode {\n $$SP : number;\n $$PC : number;\n count : number;\n startLine : number;\n endLine : number;\n calls : {[id:string] : CallGraphNode};\n}\n\n// TODO: clear stack data when reset?\nexport class CallStackView extends ProbeViewBaseBase implements ProjectView {\n treeroot : TreeNode;\n graph : CallGraphNode;\n stack : CallGraphNode[];\n lastsp : number;\n lastpc : number;\n jsr : boolean;\n rts : boolean;\n cumulativeData = true;\n\n createDiv(parent : HTMLElement) : HTMLElement {\n this.clear();\n this.treeroot = createTreeRootNode(parent, this);\n return this.treeroot.getDiv();\n }\n\n refresh() {\n this.tick();\n }\n\n tick() {\n this.treeroot.update(this.getRootObject());\n if (this.probe) this.probe.clear(); // clear cumulative data (TODO: doesnt work with seeking or debugging)\n }\n\n clear() {\n this.graph = null;\n this.reset();\n }\n\n reset() {\n this.stack = [];\n this.lastsp = -1;\n this.lastpc = 0;\n this.jsr = false;\n this.rts = false;\n }\n\n newNode(pc : number, sp : number) {\n return {$$SP:sp, $$PC:pc, count:0, startLine:null, endLine:null, calls:{}};\n }\n\n newRoot(pc : number, sp : number) {\n if (this.stack.length == 0) {\n this.graph = this.newNode(null, sp);\n this.stack.unshift(this.graph);\n } else if (sp > this.stack[0].$$SP) {\n this.graph = this.newNode(null, sp);\n this.graph.calls[this.addr2str(pc)] = this.stack[0];\n this.stack.unshift(this.graph);\n }\n }\n\n getRootObject() : Object {\n // TODO: we don't capture every frame, so if we don't start @ the top frame we may have problems\n this.redraw((op,addr,col,row,clk,value) => {\n switch (op) {\n case ProbeFlags.SP_POP:\n this.newRoot(this.lastpc, this.lastsp);\n case ProbeFlags.SP_PUSH:\n if (this.stack.length) {\n let top = this.stack[this.stack.length-1];\n var delta = this.lastsp - addr;\n if ((delta == 2 || delta == 3) && addr < top.$$SP) { // TODO: look for opcode?\n this.jsr = true;\n }\n if ((delta == -2 || delta == -3) && this.stack.length > 1 && addr > top.$$SP) {\n this.rts = true;\n }\n }\n this.lastsp = addr;\n break;\n case ProbeFlags.EXECUTE:\n // TODO: better check for CALL/RET opcodes\n if (Math.abs(addr - this.lastpc) >= 4) { // make sure we're jumping a distance (TODO)\n if (this.jsr && this.stack.length) {\n let top = this.stack[this.stack.length-1];\n let sym = this.addr2str(addr);\n let child = top.calls[sym];\n if (child == null) { \n child = top.calls[sym] = this.newNode(addr, this.lastsp);\n }\n else if (child.$$PC == null) child.$$PC = addr;\n //this.stack.forEach((node) => node.count++);\n this.stack.push(child);\n child.count++;\n child.startLine = row;\n }\n this.jsr = false;\n if (this.rts && this.stack.length) {\n this.stack.pop().endLine = row;\n }\n this.rts = false;\n }\n this.lastpc = addr;\n break;\n }\n });\n if (this.graph) this.graph['$$Stack'] = this.stack;\n return TREE_SHOW_DOLLAR_IDENTS ? this.graph : this.graph && this.graph.calls;\n }\n}\n\nexport class FrameCallsView extends ProbeViewBaseBase implements ProjectView {\n treeroot : TreeNode;\n\n createDiv(parent : HTMLElement) : HTMLElement {\n this.treeroot = createTreeRootNode(parent, this);\n return this.treeroot.getDiv();\n }\n\n refresh() {\n this.tick();\n }\n\n tick() {\n this.treeroot.update(this.getRootObject());\n }\n\n getRootObject() : Object {\n var frame = {};\n this.redraw((op,addr,col,row,clk,value) => {\n switch (op) {\n case ProbeFlags.EXECUTE:\n let sym = this.addr2symbol(addr);\n if (sym) {\n if (!frame[sym]) {\n frame[sym] = row;\n }\n }\n break;\n }\n });\n return frame;\n }\n}\n\n\n///\n\n", "import DOMPurify from \"dompurify\";\n\nexport function setWaitDialog(b: boolean) {\n if (b) {\n setWaitProgress(0);\n $(\"#pleaseWaitModal\").modal('show');\n } else {\n setWaitProgress(1);\n $(\"#pleaseWaitModal\").modal('hide');\n }\n}\n\nexport function setWaitProgress(prog: number) {\n $(\"#pleaseWaitProgressBar\").css('width', (prog * 100) + '%').show();\n}\n\nexport function alertError(s: string) {\n setWaitDialog(false);\n bootbox.alert({\n title: '<span class=\"glyphicon glyphicon-alert\" aria-hidden=\"true\"></span> Alert',\n message: DOMPurify.sanitize(s)\n });\n}\n\nexport function alertInfo(s: string) {\n setWaitDialog(false);\n bootbox.alert(DOMPurify.sanitize(s));\n}\n\nexport function fatalError(s: string) {\n alertError(s);\n throw new Error(s);\n}\n\n", "import DOMPurify from \"dompurify\";\nimport { getCookie, getFilenameForPath, getFilenamePrefix, loadScript } from \"../common/util\";\nimport { gaEvent } from \"./analytics\";\nimport { alertError, alertInfo, setWaitDialog, setWaitProgress } from \"./dialogs\";\nimport { createNewPersistentStore } from \"./project\";\nimport { GHSession, GithubService, getRepos, parseGithubURL } from \"./services\";\nimport { getCurrentMainFilename, getCurrentOutput, getCurrentProject, getPlatformStore, gotoNewLocation, projectWindows, repo_id } from \"./ui\";\n\ndeclare var Octokat;\n\nvar githubService: GithubService;\n\nexport async function getGithubService() {\n if (!githubService) {\n // load github API client\n await loadScript('lib/octokat.js');\n // load firebase\n await loadScript('https://www.gstatic.com/firebasejs/8.8.1/firebase-app.js');\n await loadScript('https://www.gstatic.com/firebasejs/8.8.1/firebase-auth.js');\n await loadScript('https://8bitworkshop.com/config.js');\n // get github API key from cookie\n // TODO: move to service?\n var ghkey = getCookie('__github_key');\n githubService = new GithubService(Octokat, ghkey, getPlatformStore(), getCurrentProject());\n console.log(\"loaded github service\");\n }\n return githubService;\n}\n\nexport function getBoundGithubURL(): string {\n var toks = (repo_id || '').split('/');\n if (toks.length != 2) {\n alertError(\"You are not in a GitHub repository. Choose one from the pulldown, or Import or Publish one.\");\n return null;\n }\n return 'https://github.com/' + toks[0] + '/' + toks[1];\n}\n\n// GITHUB stuff (TODO: move)\n\n\nexport async function importProjectFromGithub(githuburl: string, replaceURL: boolean) {\n var sess: GHSession;\n var urlparse = parseGithubURL(githuburl);\n if (!urlparse) {\n alertError('Could not parse Github URL.');\n return;\n }\n // redirect to repo if exists\n var existing = getRepos()[urlparse.repopath];\n if (existing && !confirm(\"You've already imported \" + urlparse.repopath + \" -- do you want to replace all local files?\")) {\n return;\n }\n // create new store for imported repository\n setWaitDialog(true);\n var newstore = createNewPersistentStore(urlparse.repopath);\n // import into new store\n setWaitProgress(0.25);\n var gh = await getGithubService();\n return gh.import(githuburl).then((sess1: GHSession) => {\n sess = sess1;\n setWaitProgress(0.75);\n return gh.pull(githuburl, newstore);\n }).then((sess2: GHSession) => {\n // TODO: only first session has mainPath?\n // reload repo\n setWaitDialog(false);\n gaEvent('sync', 'import', githuburl);\n gotoNewLocation(replaceURL, { repo: urlparse.repopath }); // file:sess.mainPath, platform:sess.platform_id};\n }).catch((e) => {\n setWaitDialog(false);\n console.log(e);\n alertError(\"Could not import \" + githuburl + \".\" + e);\n });\n}\n\nexport async function _loginToGithub(e) {\n var gh = await getGithubService();\n gh.login().then(() => {\n alertInfo(\"You are signed in to Github.\");\n }).catch((e) => {\n alertError(\"Could not sign in.\" + e);\n });\n}\n\nexport async function _logoutOfGithub(e) {\n var gh = await getGithubService();\n gh.logout().then(() => {\n alertInfo(\"You are logged out of Github.\");\n });\n}\n\nexport function _importProjectFromGithub(e) {\n var modal = $(\"#importGithubModal\");\n var btn = $(\"#importGithubButton\");\n modal.modal('show');\n btn.off('click').on('click', () => {\n var githuburl = $(\"#importGithubURL\").val() + \"\";\n modal.modal('hide');\n importProjectFromGithub(githuburl, false);\n });\n}\n\nexport function _publishProjectToGithub(e) {\n if (repo_id) {\n if (!confirm(\"This project (\" + getCurrentProject().mainPath + \") is already bound to a Github repository. Do you want to re-publish to a new repository? (You can instead choose 'Push Changes' to update files in the existing repository.)\"))\n return;\n }\n var modal = $(\"#publishGithubModal\");\n var btn = $(\"#publishGithubButton\");\n $(\"#githubRepoName\").val(getFilenamePrefix(getFilenameForPath(getCurrentProject().mainPath)));\n modal.modal('show');\n btn.off('click').on('click', async () => {\n var name = $(\"#githubRepoName\").val() + \"\";\n var desc = $(\"#githubRepoDesc\").val() + \"\";\n var priv = $(\"#githubRepoPrivate\").val() == 'private';\n var license = $(\"#githubRepoLicense\").val() + \"\";\n var sess;\n if (!name) {\n alertError(\"You did not enter a project name.\");\n return;\n }\n modal.modal('hide');\n setWaitDialog(true);\n var gh = await getGithubService();\n gh.login().then(() => {\n setWaitProgress(0.25);\n return gh.publish(name, desc, license, priv);\n }).then((_sess) => {\n sess = _sess;\n setWaitProgress(0.5);\n //repo_id = qs.repo = sess.repopath;\n return pushChangesToGithub('initial import from 8bitworkshop.com');\n }).then(() => {\n gaEvent('sync', 'publish', priv ? \"\" : name);\n importProjectFromGithub(sess.url, false);\n }).catch((e) => {\n setWaitDialog(false);\n console.log(e);\n alertError(\"Could not publish GitHub repository: \" + e);\n });\n });\n}\n\nexport function _pushProjectToGithub(e) {\n var ghurl = getBoundGithubURL();\n if (!ghurl) return;\n var modal = $(\"#pushGithubModal\");\n var btn = $(\"#pushGithubButton\");\n modal.modal('show');\n btn.off('click').on('click', () => {\n var commitMsg = $(\"#githubCommitMsg\").val() + \"\";\n modal.modal('hide');\n pushChangesToGithub(commitMsg);\n });\n}\n\nexport function _pullProjectFromGithub(e) {\n var ghurl = getBoundGithubURL();\n if (!ghurl) return;\n bootbox.confirm(\"Pull from repository and replace all local files? Any changes you've made will be overwritten.\",\n async (ok) => {\n if (ok) {\n setWaitDialog(true);\n var gh = await getGithubService();\n gh.pull(ghurl).then((sess: GHSession) => {\n setWaitDialog(false);\n projectWindows.updateAllOpenWindows(getPlatformStore());\n });\n }\n });\n}\n\nfunction confirmCommit(sess): Promise<GHSession> {\n return new Promise((resolve, reject) => {\n var files = sess.commit.files;\n console.log(files);\n // anything changed?\n if (files.length == 0) {\n setWaitDialog(false);\n alertInfo(\"No files changed.\");\n return;\n }\n // build commit confirm message\n var msg = \"\";\n for (var f of files) {\n msg += DOMPurify.sanitize(f.filename) + \": \" + f.status;\n if (f.additions || f.deletions || f.changes) {\n msg += \" (\" + f.additions + \" additions, \" + f.deletions + \" deletions, \" + f.changes + \" changes)\";\n };\n msg += \"<br/>\";\n }\n // show dialog, continue when yes\n bootbox.confirm(msg, (ok) => {\n if (ok) {\n resolve(sess);\n } else {\n setWaitDialog(false);\n }\n });\n });\n}\n\nasync function pushChangesToGithub(message: string) {\n var ghurl = getBoundGithubURL();\n if (!ghurl) return;\n // build file list for push\n var files = [];\n for (var path in getCurrentProject().filedata) {\n var newpath = getCurrentProject().stripLocalPath(path);\n var data = getCurrentProject().filedata[path];\n if (newpath && data) {\n files.push({ path: newpath, data: data });\n }\n }\n // include built ROM file in bin/[mainfile].rom\n if (getCurrentOutput() instanceof Uint8Array) {\n let binpath = \"bin/\" + getCurrentMainFilename() + \".rom\";\n files.push({ path: binpath, data: getCurrentOutput() });\n }\n // push files\n setWaitDialog(true);\n var gh = await getGithubService();\n return gh.login().then(() => {\n setWaitProgress(0.5);\n return gh.commit(ghurl, message, files);\n }).then((sess) => {\n return confirmCommit(sess);\n }).then((sess) => {\n return gh.push(sess);\n }).then((sess) => {\n setWaitDialog(false);\n alertInfo(\"Pushed files to \" + ghurl);\n return sess;\n }).catch((e) => {\n setWaitDialog(false);\n console.log(e);\n alertError(\"Could not push GitHub repository: \" + e);\n });\n}\n\nexport function _removeRepository() {\n var ghurl = getBoundGithubURL();\n if (!ghurl) return;\n bootbox.prompt(\"<p>Are you sure you want to delete this repository (\" + DOMPurify.sanitize(ghurl) + \") from browser storage?</p><p>All changes since last commit will be lost.</p><p>Type DELETE to proceed.<p>\", (yes) => {\n if (yes.trim().toUpperCase() == \"DELETE\") {\n removeRepository();\n }\n });\n}\n\nasync function removeRepository() {\n var ghurl = getBoundGithubURL();\n setWaitDialog(true);\n let gh = await getGithubService();\n let sess = await gh.getGithubSession(ghurl);\n gh.bind(sess, false);\n // delete all keys in (repo) storage\n await getPlatformStore().keys().then((keys: string[]) => {\n return Promise.all(keys.map((key) => {\n return getPlatformStore().removeItem(key);\n }));\n });\n setWaitDialog(false);\n // leave repository\n gotoNewLocation(false, { repo: '/' });\n}\n\n", "\ndeclare var ga;\n\nexport function gaEvent(category: string, action: string, label?: string, value?: string) {\n if (window['ga']) {\n ga('send', 'event', category, action, label, value);\n }\n}\n\nexport function gaPageView(page: string) {\n if (window['ga']) {\n ga('send', 'pageview', page);\n }\n}\n", "/*\nhttps://github.com/eightbitjim/commodore-tape-maker/blob/master/maketape.py\n\n# MIT License\n#\n# Copyright (c) 2018 eightbitjim\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n# \n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n*/\n\nexport class OutputSoundFile {\n options: any;\n sampleRate: number;\n soundData: number[];\n tapData: number[];\n\n constructor(options: any) {\n this.options = options;\n this.sampleRate = 44100.0;\n this.soundData = [];\n //00000000 43 36 34 2d 54 41 50 45 2d 52 41 57 01 00 00 00 |C64-TAPE-RAW....|\n //00000010 1e 62 03 00 \n this.tapData = [0x43,0x36,0x34,0x2d,0x54,0x41,0x50,0x45,0x2d,0x52,0x41,0x57,0x01,0x00,0x00,0x00,0,0,0,0];\n }\n\n getWAVHeader() {\n const header = new Uint8Array(44);\n const view = new DataView(header.buffer);\n view.setUint32(0, 0x52494646, false); // \"RIFF\"\n view.setUint32(4, 44 + this.soundData.length, true); // ChunkSize\n view.setUint32(8, 0x57415645, false); // \"WAVE\"\n view.setUint32(12, 0x666d7420, false); // \"fmt \"\n view.setUint32(16, 16, true); // Subchunk1Size\n view.setUint16(20, 1, true); // AudioFormat (PCM)\n view.setUint16(22, 1, true); // NumChannels\n view.setUint32(24, this.sampleRate, true); // SampleRate\n view.setUint32(28, this.sampleRate * 2, true); // ByteRate\n view.setUint16(32, 1, true); // BlockAlign\n view.setUint16(34, 8, true); // BitsPerSample\n view.setUint32(36, 0x64617461, false); // \"data\"\n view.setUint32(40, this.soundData.length, true); // Subchunk2Size\n return header;\n }\n\n addSilence(lengthInSeconds: number): void {\n const numberOfSamples = Math.floor(this.sampleRate * lengthInSeconds);\n for (let i = 0; i < numberOfSamples; i++) {\n this.soundData.push(0);\n }\n //For v1 and v2 TAP files, a $00 value is followed by 3 bytes containing the actual duration measured in clock cycles (not divided by 8). These 3 bytes are in low-high format.\n const numCycles = TAPFile.CLOCK_RATE * lengthInSeconds;\n this.tapData.push(0);\n this.tapData.push(numCycles & 0xff);\n this.tapData.push((numCycles >> 8) & 0xff);\n this.tapData.push((numCycles >> 16) & 0xff);\n }\n\n addCycle(cycles: number): void {\n this.tapData.push(cycles);\n const numberOfSamples = Math.floor(this.sampleRate * TAPFile.TAP_LENGTH_IN_SECONDS * cycles);\n for (let i = 0; i < numberOfSamples; i++) {\n let value;\n if (this.options.sine_wave) {\n value = - Math.sin((i / numberOfSamples) * 2.0 * Math.PI);\n } else {\n if (i < numberOfSamples / 2) {\n value = -1;\n } else {\n value = 1;\n }\n }\n if (this.options.invert_waveform) {\n value = -value;\n }\n this.soundData.push(Math.round(128 + value * 127));\n }\n }\n\n updateTAPHeader() {\n let datalen = this.tapData.length - 0x14;\n // set bytes 0x10-0x13 to length\n this.tapData[0x10] = datalen & 0xff;\n this.tapData[0x11] = (datalen >> 8) & 0xff;\n this.tapData[0x12] = (datalen >> 16) & 0xff;\n this.tapData[0x13] = (datalen >> 24) & 0xff;\n }\n\n getTAPData(): Uint8Array {\n this.updateTAPHeader();\n return new Uint8Array(this.tapData);\n }\n\n getSoundData(): Uint8Array {\n let header = this.getWAVHeader();\n let data = new Uint8Array(header.length + this.soundData.length);\n data.set(header, 0);\n data.set(new Uint8Array(this.soundData), header.length);\n return data;\n }\n}\n\nexport class TAPFile {\n \n static CLOCK_RATE = 985248.0;\n static TAP_LENGTH_IN_SECONDS = 8.0 / this.CLOCK_RATE;\n static FILENAME_BUFFER_SIZE = 0x10;\n static FILE_TYPE_NONE = 0;\n static FILE_TYPE_RELOCATABLE = 1;\n static FILE_TYPE_SEQUENTIAL = 2;\n static FILE_TYPE_NON_RELOCATABLE = 3;\n static LEADER_TYPE_HEADER = 0;\n static LEADER_TYPE_CONTENT = 1;\n static LEADER_TYPE_REPEATED = 2;\n static NUMBER_OF_PADDING_BYTES = 171;\n static PADDING_CHARACTER = 0x20;\n static SHORT_PULSE = 0x30;\n static MEDIUM_PULSE = 0x42;\n static LONG_PULSE = 0x56;\n\n options: any;\n checksum: number;\n data: Uint8Array;\n filenameData: number[];\n startAddress: number;\n endAddress: number;\n fileType: number;\n waveFile: OutputSoundFile;\n\n constructor(filename: string, options?: any) {\n this.options = options;\n this.checksum = 0;\n this.data = new Uint8Array(0);\n this.filenameData = this.makeFilename(filename);\n this.startAddress = 0;\n this.endAddress = 0;\n this.fileType = TAPFile.FILE_TYPE_NONE;\n this.waveFile = null;\n }\n\n makeFilename(filename: string): number[] {\n const filenameBuffer = [];\n const space = 0x20;\n filename = filename.toUpperCase(); // for PETSCII\n for (let i = 0; i < TAPFile.FILENAME_BUFFER_SIZE; i++) {\n if (filename.length <= i) {\n filenameBuffer.push(space);\n } else {\n let ch = filename.charCodeAt(i);\n filenameBuffer.push(ch);\n }\n }\n return filenameBuffer;\n }\n\n setContent(inputFile: { data: Uint8Array, startAddress: number, type: number }): void {\n this.data = inputFile.data;\n this.startAddress = inputFile.startAddress;\n this.endAddress = inputFile.startAddress + inputFile.data.length;\n this.fileType = inputFile.type;\n }\n\n generateSound(outputWaveFile: OutputSoundFile): void {\n this.waveFile = outputWaveFile;\n this.addHeader(false);\n this.addHeader(true);\n outputWaveFile.addSilence(0.1);\n this.addFile();\n }\n\n addTapCycle(tapValue: number): void {\n this.waveFile.addCycle(tapValue);\n }\n\n addBit(value: number): void {\n if (value === 0) {\n this.addTapCycle(TAPFile.SHORT_PULSE);\n this.addTapCycle(TAPFile.MEDIUM_PULSE);\n } else {\n this.addTapCycle(TAPFile.MEDIUM_PULSE);\n this.addTapCycle(TAPFile.SHORT_PULSE);\n }\n }\n\n addDataMarker(moreToFollow: boolean): void {\n if (moreToFollow) {\n this.addTapCycle(TAPFile.LONG_PULSE);\n this.addTapCycle(TAPFile.MEDIUM_PULSE);\n } else {\n this.addTapCycle(TAPFile.LONG_PULSE);\n this.addTapCycle(TAPFile.SHORT_PULSE);\n }\n }\n\n resetChecksum(): void {\n this.checksum = 0;\n }\n\n addByteFrame(value: number, moreToFollow: boolean): void {\n let checkBit = 1;\n for (let i = 0; i < 8; i++) {\n const bit = (value & (1 << i)) !== 0 ? 1 : 0;\n this.addBit(bit);\n checkBit ^= bit;\n }\n this.addBit(checkBit);\n this.addDataMarker(moreToFollow);\n this.checksum ^= value;\n }\n\n addLeader(fileType: number): void {\n let numberofPulses;\n if (fileType === TAPFile.LEADER_TYPE_HEADER) {\n numberofPulses = 0x6a00;\n } else if (fileType === TAPFile.LEADER_TYPE_CONTENT) {\n numberofPulses = 0x1a00;\n } else {\n numberofPulses = 0x4f;\n }\n for (let i = 0; i < numberofPulses; i++) {\n this.addTapCycle(TAPFile.SHORT_PULSE);\n }\n }\n\n addSyncChain(repeated: boolean): void {\n let value;\n if (repeated) {\n value = 0x09;\n } else {\n value = 0x89;\n }\n let count = 9;\n while (count > 0) {\n this.addByteFrame(value, true);\n value -= 1;\n count -= 1;\n }\n }\n\n addData(): void {\n for (let i = 0; i < this.data.length; i++) {\n this.addByteFrame(this.data[i], true);\n }\n }\n\n addFilename(): void {\n for (let i = 0; i < this.filenameData.length; i++) {\n this.addByteFrame(this.filenameData[i], true);\n }\n }\n\n addHeader(repeated: boolean): void {\n if (repeated) {\n this.addLeader(TAPFile.LEADER_TYPE_REPEATED);\n } else {\n this.addLeader(TAPFile.LEADER_TYPE_HEADER);\n }\n this.addDataMarker(true);\n this.addSyncChain(repeated);\n this.resetChecksum();\n this.addByteFrame(this.fileType, true);\n this.addByteFrame(this.startAddress & 0x00ff, true);\n this.addByteFrame((this.startAddress & 0xff00) >> 8, true);\n this.addByteFrame(this.endAddress & 0x00ff, true);\n this.addByteFrame((this.endAddress & 0xff00) >> 8, true);\n this.addFilename();\n for (let i = 0; i < TAPFile.NUMBER_OF_PADDING_BYTES; i++) {\n this.addByteFrame(TAPFile.PADDING_CHARACTER, true);\n }\n this.addByteFrame(this.checksum, false);\n }\n\n addFile(): void {\n let repeated = false;\n for (let i = 0; i < 2; i++) {\n if (!repeated) {\n this.addLeader(TAPFile.LEADER_TYPE_CONTENT);\n } else {\n this.addLeader(TAPFile.LEADER_TYPE_REPEATED);\n }\n this.addDataMarker(true);\n this.addSyncChain(repeated);\n this.resetChecksum();\n this.addData();\n this.addByteFrame(this.checksum, false);\n repeated = true;\n }\n this.addLeader(1);\n }\n}\n", "import { OutputSoundFile, TAPFile } from '../common/audio/CommodoreTape';\nimport { byteArrayToString, compressLZG, getBasePlatform, getFilenameForPath, getFilenamePrefix, loadScript } from '../common/util';\nimport { alertError, alertInfo, setWaitDialog, setWaitProgress } from './dialogs';\nimport { getCurrentEditorFilename, getCurrentMainFilename, getCurrentOutput, getCurrentProject, getPlatformStore, getWorkerParams, platform, platform_id, projectWindows } from './ui';\nimport { saveAs } from \"file-saver\";\n\ndeclare var GIF;\n\nexport function _shareEmbedLink(e) {\n if (getCurrentOutput() == null) {\n alertError(\"Please fix errors before sharing.\");\n return true;\n }\n if (!(getCurrentOutput() instanceof Uint8Array)) {\n alertError(\"Can't share a Verilog executable yet. (It's not actually a ROM...)\");\n return true;\n }\n loadClipboardLibrary();\n loadScript('lib/liblzg.js').then(() => {\n // TODO: Module is bad var name (conflicts with MAME)\n var lzgrom = compressLZG(window['Module'], Array.from(<Uint8Array>getCurrentOutput()));\n window['Module'] = null; // so we load it again next time\n var lzgb64 = btoa(byteArrayToString(lzgrom));\n var embed = {\n p: platform_id,\n //n: current_project.mainPath,\n r: lzgb64\n };\n var linkqs = $.param(embed);\n var fulllink = get8bitworkshopLink(linkqs, 'player.html');\n var iframelink = '<iframe width=640 height=600 src=\"' + fulllink + '\">';\n $(\"#embedLinkTextarea\").text(fulllink);\n $(\"#embedIframeTextarea\").text(iframelink);\n $(\"#embedLinkModal\").modal('show');\n $(\"#embedAdviceWarnAll\").hide();\n $(\"#embedAdviceWarnIE\").hide();\n if (fulllink.length >= 65536) $(\"#embedAdviceWarnAll\").show();\n else if (fulllink.length >= 5120) $(\"#embedAdviceWarnIE\").show();\n });\n return true;\n}\n\nfunction loadClipboardLibrary() {\n // can happen in background because it won't be used until user clicks\n console.log('clipboard');\n import('clipboard').then((clipmod) => {\n let ClipboardJS = clipmod.default;\n new ClipboardJS(\".btn\");\n });\n}\n\nfunction get8bitworkshopLink(linkqs: string, fn: string) {\n console.log(linkqs);\n var loc = window.location;\n var prefix = loc.pathname.replace('index.html', '');\n var protocol = (loc.host == '8bitworkshop.com') ? 'https:' : loc.protocol;\n var fulllink = protocol + '//' + loc.host + prefix + fn + '?' + linkqs;\n return fulllink;\n}\n\nfunction _downloadCassetteFile_apple2(e) {\n var addr = getWorkerParams()?.code_start;\n loadScript('lib/c2t.js').then(() => {\n var stdout = '';\n var print_fn = function (s) { stdout += s + \"\\n\"; }\n var c2t = window['c2t']({\n noInitialRun: true,\n print: print_fn,\n printErr: print_fn\n });\n var FS = c2t['FS'];\n var rompath = getCurrentMainFilename() + \".bin\";\n var audpath = getCurrentMainFilename() + \".wav\";\n FS.writeFile(rompath, getCurrentOutput(), { encoding: 'binary' });\n var args = [\"-2bc\", rompath + ',' + addr.toString(16), audpath];\n c2t.callMain(args);\n var audout = FS.readFile(audpath, { 'encoding': 'binary' });\n if (audout) {\n var blob = new Blob([audout], { type: \"audio/wav\" });\n saveAs(blob, audpath);\n stdout += \"Then connect your audio output to the cassette input, turn up the volume, and play the audio file.\";\n alertInfo(stdout);\n }\n });\n}\n\nexport function _downloadCassetteFile_vcs(e) {\n loadScript('lib/makewav.js').then(() => {\n let stdout = '';\n let print_fn = function (s) { stdout += s + \"\\n\"; }\n var prefix = getFilenamePrefix(getCurrentMainFilename());\n let rompath = prefix + \".bin\";\n let audpath = prefix + \".wav\";\n let _makewav = window['makewav']({\n noInitialRun: false,\n print: print_fn,\n printErr: print_fn,\n arguments: ['-ts', '-f0', '-v10', rompath],\n preRun: (mod) => {\n let FS = mod['FS'];\n FS.writeFile(rompath, getCurrentOutput(), { encoding: 'binary' });\n }\n });\n _makewav.ready.then((makewav) => {\n let args = [rompath];\n makewav.run(args);\n console.log(stdout);\n let FS = makewav['FS'];\n let audout = FS.readFile(audpath, { 'encoding': 'binary' });\n if (audout) {\n let blob = new Blob([audout], { type: \"audio/wav\" });\n saveAs(blob, audpath);\n stdout += \"\\nConnect your audio output to the SuperCharger input, turn up the volume, and play the audio file.\";\n alertInfo(stdout);\n }\n });\n });\n}\n\nfunction _downloadCassetteFile_c64(e) {\n var prefix = getFilenamePrefix(getCurrentMainFilename());\n let audpath = prefix + \".tap\";\n let tapmaker = new TAPFile(prefix);\n let outfile = new OutputSoundFile({ sine_wave: true });\n let data = getCurrentOutput();\n let startAddress = data[0] + data[1] * 256;\n data = data.slice(2); // remove header\n tapmaker.setContent({ data, startAddress, type: TAPFile.FILE_TYPE_NON_RELOCATABLE });\n tapmaker.generateSound(outfile);\n let tapout = outfile.getTAPData();\n //let audout = outfile.getSoundData();\n if (tapout) {\n //let blob = new Blob([audout], { type: \"audio/wav\" });\n let blob = new Blob([tapout], { type: \"application/octet-stream\" });\n saveAs(blob, audpath);\n }\n}\n\nexport function _getCassetteFunction() {\n switch (getBasePlatform(platform_id)) {\n case 'vcs': return _downloadCassetteFile_vcs;\n case 'apple2': return _downloadCassetteFile_apple2;\n case 'c64': return _downloadCassetteFile_c64;\n }\n}\n\nexport function _downloadCassetteFile(e) {\n if (getCurrentOutput() == null) {\n alertError(\"Please fix errors before exporting.\");\n return true;\n }\n var fn = _getCassetteFunction();\n if (fn === undefined) {\n alertError(\"Cassette export is not supported on this platform.\");\n return true;\n }\n fn(e);\n}\n\nexport function _downloadROMImage(e) {\n if (getCurrentOutput() == null) {\n alertError(\"Please finish compiling with no errors before downloading ROM.\");\n return true;\n }\n var prefix = getFilenamePrefix(getCurrentMainFilename());\n if (platform.getDownloadFile) {\n var dl = platform.getDownloadFile();\n var prefix = getFilenamePrefix(getCurrentMainFilename());\n saveAs(dl.blob, prefix + dl.extension);\n } else if (getCurrentOutput() instanceof Uint8Array) {\n var blob = new Blob([getCurrentOutput()], { type: \"application/octet-stream\" });\n var suffix = (platform.getROMExtension && platform.getROMExtension(getCurrentOutput()))\n || \"-\" + getBasePlatform(platform_id) + \".bin\";\n saveAs(blob, prefix + suffix);\n } else {\n alertError(`The \"${platform_id}\" platform doesn't have downloadable ROMs.`);\n }\n}\n\nexport function _downloadSourceFile(e) {\n var text = projectWindows.getCurrentText();\n if (!text) return false;\n var blob = new Blob([text], { type: \"text/plain;charset=utf-8\" });\n saveAs(blob, getCurrentEditorFilename(), { autoBom: false });\n}\n\nasync function newJSZip() {\n let JSZip = (await import('jszip')).default;\n return new JSZip();\n}\n\nexport async function _downloadProjectZipFile(e) {\n var zip = await newJSZip();\n getCurrentProject().iterateFiles((id, data) => {\n if (data) {\n zip.file(getFilenameForPath(id), data);\n }\n });\n zip.generateAsync({ type: \"blob\" }).then((content) => {\n saveAs(content, getCurrentMainFilename() + \"-\" + getBasePlatform(platform_id) + \".zip\");\n });\n}\n\nexport function _downloadSymFile(e) {\n let symfile = platform.getDebugSymbolFile && platform.getDebugSymbolFile();\n if (!symfile) {\n alertError(\"This project does not have debug information.\");\n return;\n }\n var prefix = getFilenamePrefix(getCurrentMainFilename());\n saveAs(symfile.blob, prefix + symfile.extension, { autoBom: false });\n}\n\nexport async function _downloadAllFilesZipFile(e) {\n var zip = await newJSZip();\n var keys = await getPlatformStore().keys();\n setWaitDialog(true);\n try {\n var i = 0;\n await Promise.all(keys.map((path) => {\n return getPlatformStore().getItem(path).then((text) => {\n setWaitProgress(i++ / (keys.length + 1));\n if (text) {\n zip.file(path, text as any);\n }\n });\n }));\n var content = await zip.generateAsync({ type: \"blob\" });\n saveAs(content, getBasePlatform(platform_id) + \"-all.zip\");\n } finally {\n setWaitDialog(false);\n }\n}\n\nvar recordingVideo = false;\n\nexport function _recordVideo() {\n if (recordingVideo) return;\n loadScript(\"lib/gif.js\").then(() => {\n var canvas = $(\"#emulator\").find(\"canvas\")[0] as HTMLElement;\n if (!canvas) {\n alertError(\"Could not find canvas element to record video!\");\n return;\n }\n var rotate = 0;\n if (canvas.style && canvas.style.transform) {\n if (canvas.style.transform.indexOf(\"rotate(-90deg)\") >= 0)\n rotate = -1;\n else if (canvas.style.transform.indexOf(\"rotate(90deg)\") >= 0)\n rotate = 1;\n }\n var gif = new GIF({\n workerScript: 'lib/gif.worker.js',\n workers: 4,\n quality: 10,\n rotate: rotate\n });\n var img = $('#videoPreviewImage');\n gif.on('progress', (prog) => {\n setWaitProgress(prog);\n });\n gif.on('finished', (blob) => {\n img.attr('src', URL.createObjectURL(blob));\n setWaitDialog(false);\n platform.resume();\n $(\"#videoPreviewModal\").modal('show');\n });\n var intervalMsec = 20;\n var maxFrames = 300;\n var nframes = 0;\n console.log(\"Recording video\", canvas);\n $(\"#emulator\").css('backgroundColor', '#cc3333');\n var f = () => {\n if (nframes++ > maxFrames) {\n console.log(\"Rendering video\");\n $(\"#emulator\").css('backgroundColor', 'inherit');\n setWaitDialog(true);\n platform.pause();\n gif.render();\n recordingVideo = false;\n } else {\n gif.addFrame(canvas, { delay: intervalMsec, copy: true });\n setTimeout(f, intervalMsec);\n recordingVideo = true;\n }\n };\n f();\n });\n}\n\n"],
"mappings": "yiBAAA,oBAMA,AAAC,UAAS,EAAE,CAAC,GAAG,MAAO,KAAU,UAAU,MAAO,KAAS,YAAa,GAAO,QAAQ,YAAY,MAAO,SAAS,YAAY,OAAO,IAAK,OAAO,GAAG,OAAO,CAAC,GAAI,GAAE,AAAG,MAAO,SAAS,YAAa,EAAE,OAAY,AAAG,MAAO,SAAS,YAAa,EAAE,OAAY,AAAG,MAAO,OAAO,YAAa,EAAE,KAAU,EAAE,KAAK,EAAE,YAAc,OAAO,UAAU,CAAC,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