From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../examples/ember/quickstart/.editorconfig | 20 + .../mochitest/examples/ember/quickstart/.ember-cli | 9 + .../examples/ember/quickstart/.eslintrc.js | 38 + .../mochitest/examples/ember/quickstart/.gitignore | 23 + .../examples/ember/quickstart/.travis.yml | 26 + .../examples/ember/quickstart/.watchmanconfig | 3 + .../ember/quickstart/dist/assets/quickstart.css | 0 .../ember/quickstart/dist/assets/quickstart.js | 277 + .../ember/quickstart/dist/assets/quickstart.map | 1 + .../ember/quickstart/dist/assets/test-support.css | 471 + .../ember/quickstart/dist/assets/test-support.js | 12050 +++ .../ember/quickstart/dist/assets/test-support.map | 1 + .../examples/ember/quickstart/dist/assets/tests.js | 62 + .../ember/quickstart/dist/assets/tests.map | 1 + .../ember/quickstart/dist/assets/vendor.css | 97 + .../ember/quickstart/dist/assets/vendor.js | 86407 +++++++++++++++++++ .../ember/quickstart/dist/assets/vendor.map | 1 + .../examples/ember/quickstart/dist/index.html | 26 + .../examples/ember/quickstart/dist/robots.txt | 3 + .../examples/ember/quickstart/dist/testem.js | 19 + 20 files changed, 99535 insertions(+) create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/.editorconfig create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/.ember-cli create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/.eslintrc.js create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/.gitignore create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/.travis.yml create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/.watchmanconfig create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.css create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.map create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.css create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.js create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.map create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.js create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.map create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.map create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/index.html create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/robots.txt create mode 100644 devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/testem.js (limited to 'devtools/client/debugger/test/mochitest/examples/ember') diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.editorconfig b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.editorconfig new file mode 100644 index 0000000000..219985c228 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.editorconfig @@ -0,0 +1,20 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.hbs] +insert_final_newline = false + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.ember-cli b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.ember-cli new file mode 100644 index 0000000000..ee64cfed2a --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.ember-cli @@ -0,0 +1,9 @@ +{ + /** + Ember CLI sends analytics information by default. The data is completely + anonymous, but there are times when you might want to disable this behavior. + + Setting `disableAnalytics` to true will prevent any data from being sent. + */ + "disableAnalytics": false +} diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.eslintrc.js b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.eslintrc.js new file mode 100644 index 0000000000..99f9d257b8 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.eslintrc.js @@ -0,0 +1,38 @@ +module.exports = { + root: true, + parserOptions: { + ecmaVersion: 2017, + sourceType: 'module' + }, + plugins: [ + 'ember' + ], + extends: [ + 'eslint:recommended', + 'plugin:ember/recommended' + ], + env: { + browser: true + }, + rules: { + }, + overrides: [ + // node files + { + files: [ + 'testem.js', + 'ember-cli-build.js', + 'config/**/*.js', + 'lib/*/index.js' + ], + parserOptions: { + sourceType: 'script', + ecmaVersion: 2015 + }, + env: { + browser: false, + node: true + } + } + ] +}; diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.gitignore b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.gitignore new file mode 100644 index 0000000000..6274b8aa72 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +# /dist # not ignored because we want to load the static files +/tmp + +# dependencies +/node_modules +/bower_components + +# misc +/.sass-cache +/connect.lock +/coverage/* +/libpeerconnection.log +npm-debug.log* +yarn-error.log +testem.log + +# ember-try +.node_modules.ember-try/ +bower.json.ember-try +package.json.ember-try diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.travis.yml b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.travis.yml new file mode 100644 index 0000000000..54dcdb2ab1 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.travis.yml @@ -0,0 +1,26 @@ +--- +language: node_js +node_js: + - "6" + +sudo: false +dist: trusty + +addons: + chrome: stable + +cache: + directories: + - $HOME/.npm + +env: + global: + # See https://git.io/vdao3 for details. + - JOBS=1 + +before_install: + - npm config set spin false + +script: + - npm run lint:js + - npm test diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.watchmanconfig b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.watchmanconfig new file mode 100644 index 0000000000..e7834e3e4f --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +} diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.css b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js new file mode 100644 index 0000000000..1519b1d857 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js @@ -0,0 +1,277 @@ +"use strict"; + + + +define('quickstart/app', ['exports', 'quickstart/resolver', 'ember-load-initializers', 'quickstart/config/environment'], function (exports, _resolver, _emberLoadInitializers, _environment) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + + const App = Ember.Application.extend({ + modulePrefix: _environment.default.modulePrefix, + podModulePrefix: _environment.default.podModulePrefix, + Resolver: _resolver.default + }); + + (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix); + + exports.default = App; +}); + +define('quickstart/components/welcome-page', ['exports', 'ember-welcome-page/components/welcome-page'], function (exports, _welcomePage) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, 'default', { + enumerable: true, + get: function () { + return _welcomePage.default; + } + }); +}); + +define('quickstart/helpers/app-version', ['exports', 'quickstart/config/environment', 'ember-cli-app-version/utils/regexp'], function (exports, _environment, _regexp) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.appVersion = appVersion; + + + const { + APP: { + version + } + } = _environment.default; + + function appVersion(_, hash = {}) { + if (hash.hideSha) { + return version.match(_regexp.versionRegExp)[0]; + } + + if (hash.hideVersion) { + return version.match(_regexp.shaRegExp)[0]; + } + + return version; + } + + exports.default = Ember.Helper.helper(appVersion); +}); + +define('quickstart/helpers/pluralize', ['exports', 'ember-inflector/lib/helpers/pluralize'], function (exports, _pluralize) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = _pluralize.default; +}); + +define('quickstart/helpers/singularize', ['exports', 'ember-inflector/lib/helpers/singularize'], function (exports, _singularize) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = _singularize.default; +}); + +define('quickstart/initializers/app-version', ['exports', 'ember-cli-app-version/initializer-factory', 'quickstart/config/environment'], function (exports, _initializerFactory, _environment) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + + let name, version; + if (_environment.default.APP) { + name = _environment.default.APP.name; + version = _environment.default.APP.version; + } + + exports.default = { + name: 'App Version', + initialize: (0, _initializerFactory.default)(name, version) + }; +}); + +define('quickstart/initializers/container-debug-adapter', ['exports', 'ember-resolver/resolvers/classic/container-debug-adapter'], function (exports, _containerDebugAdapter) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + name: 'container-debug-adapter', + + initialize() { + let app = arguments[1] || arguments[0]; + + app.register('container-debug-adapter:main', _containerDebugAdapter.default); + app.inject('container-debug-adapter:main', 'namespace', 'application:main'); + } + }; +}); + +define('quickstart/initializers/ember-data', ['exports', 'ember-data/setup-container', 'ember-data'], function (exports, _setupContainer) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + name: 'ember-data', + initialize: _setupContainer.default + }; +}); + +define('quickstart/initializers/export-application-global', ['exports', 'quickstart/config/environment'], function (exports, _environment) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.initialize = initialize; + function initialize() { + var application = arguments[1] || arguments[0]; + if (_environment.default.exportApplicationGlobal !== false) { + var theGlobal; + if (typeof window !== 'undefined') { + theGlobal = window; + } else if (typeof global !== 'undefined') { + theGlobal = global; + } else if (typeof self !== 'undefined') { + theGlobal = self; + } else { + // no reasonable global, just bail + return; + } + + var value = _environment.default.exportApplicationGlobal; + var globalName; + + if (typeof value === 'string') { + globalName = value; + } else { + globalName = Ember.String.classify(_environment.default.modulePrefix); + } + + if (!theGlobal[globalName]) { + theGlobal[globalName] = application; + + application.reopen({ + willDestroy: function () { + this._super.apply(this, arguments); + delete theGlobal[globalName]; + } + }); + } + } + } + + exports.default = { + name: 'export-application-global', + + initialize: initialize + }; +}); + +define("quickstart/instance-initializers/ember-data", ["exports", "ember-data/initialize-store-service"], function (exports, _initializeStoreService) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + name: "ember-data", + initialize: _initializeStoreService.default + }; +}); + +define('quickstart/resolver', ['exports', 'ember-resolver'], function (exports, _emberResolver) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = _emberResolver.default; +}); + +define('quickstart/router', ['exports', 'quickstart/config/environment'], function (exports, _environment) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + + const Router = Ember.Router.extend({ + location: _environment.default.locationType, + rootURL: _environment.default.rootURL + }); + + Router.map(function () {}); + + window.mapTestFunction = () => { + window.console.log("pause here", _environment.default, Router); + }; + + exports.default = Router; +}); + +define('quickstart/services/ajax', ['exports', 'ember-ajax/services/ajax'], function (exports, _ajax) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, 'default', { + enumerable: true, + get: function () { + return _ajax.default; + } + }); +}); + +define("quickstart/templates/application", ["exports"], function (exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = Ember.HTMLBars.template({ "id": "d4rGKf2G", "block": "{\"symbols\":[],\"statements\":[[1,[18,\"welcome-page\"],false],[0,\"\\n\"],[0,\"\\n\"],[1,[18,\"outlet\"],false]],\"hasEval\":false}", "meta": { "moduleName": "quickstart/templates/application.hbs" } }); +}); + + + +define('quickstart/config/environment', [], function() { + var prefix = 'quickstart'; +try { + var metaName = prefix + '/config/environment'; + var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content'); + var config = JSON.parse(unescape(rawConfig)); + + var exports = { 'default': config }; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; +} +catch(err) { + throw new Error('Could not read config from meta tag with name "' + metaName + '".'); +} + +}); + +if (!runningTests) { + require("quickstart/app")["default"].create({"name":"quickstart","version":"0.0.0+1dde1d7f"}); +} +//# sourceMappingURL=quickstart.map diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.map b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.map new file mode 100644 index 0000000000..e017fd6f7c --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.map @@ -0,0 +1 @@ +{"version":3,"sources":["vendor/ember-cli/app-prefix.js","quickstart/app.js","quickstart/components/welcome-page.js","quickstart/helpers/app-version.js","quickstart/helpers/pluralize.js","quickstart/helpers/singularize.js","quickstart/initializers/app-version.js","quickstart/initializers/container-debug-adapter.js","quickstart/initializers/ember-data.js","quickstart/initializers/export-application-global.js","quickstart/instance-initializers/ember-data.js","quickstart/resolver.js","quickstart/router.js","quickstart/services/ajax.js","quickstart/templates/application.js","vendor/ember-cli/app-suffix.js","vendor/ember-cli/app-config.js","vendor/ember-cli/app-boot.js"],"sourcesContent":["\"use strict\";\n\n\n","import Application from '@ember/application';\nimport Resolver from './resolver';\nimport loadInitializers from 'ember-load-initializers';\nimport config from './config/environment';\n\nconst App = Application.extend({\n modulePrefix: config.modulePrefix,\n podModulePrefix: config.podModulePrefix,\n Resolver\n});\n\nloadInitializers(App, config.modulePrefix);\n\nexport default App;\n","export { default } from 'ember-welcome-page/components/welcome-page';","import Ember from 'ember';\nimport config from '../config/environment';\nimport { shaRegExp, versionRegExp } from 'ember-cli-app-version/utils/regexp';\n\nconst {\n APP: {\n version\n }\n} = config;\n\nexport function appVersion(_, hash = {}) {\n if (hash.hideSha) {\n return version.match(versionRegExp)[0];\n }\n\n if (hash.hideVersion) {\n return version.match(shaRegExp)[0];\n }\n\n return version;\n}\n\nexport default Ember.Helper.helper(appVersion);\n","define('quickstart/helpers/pluralize', ['exports', 'ember-inflector/lib/helpers/pluralize'], function (exports, _pluralize) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = _pluralize.default;\n});\n","define('quickstart/helpers/singularize', ['exports', 'ember-inflector/lib/helpers/singularize'], function (exports, _singularize) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = _singularize.default;\n});\n","import initializerFactory from 'ember-cli-app-version/initializer-factory';\nimport config from '../config/environment';\n\nlet name, version;\nif (config.APP) {\n name = config.APP.name;\n version = config.APP.version;\n}\n\nexport default {\n name: 'App Version',\n initialize: initializerFactory(name, version)\n};\n","import ContainerDebugAdapter from 'ember-resolver/resolvers/classic/container-debug-adapter';\n\nexport default {\n name: 'container-debug-adapter',\n\n initialize() {\n let app = arguments[1] || arguments[0];\n\n app.register('container-debug-adapter:main', ContainerDebugAdapter);\n app.inject('container-debug-adapter:main', 'namespace', 'application:main');\n }\n};\n","import setupContainer from 'ember-data/setup-container';\nimport 'ember-data';\n\n/*\n\n This code initializes Ember-Data onto an Ember application.\n\n If an Ember.js developer defines a subclass of DS.Store on their application,\n as `App.StoreService` (or via a module system that resolves to `service:store`)\n this code will automatically instantiate it and make it available on the\n router.\n\n Additionally, after an application's controllers have been injected, they will\n each have the store made available to them.\n\n For example, imagine an Ember.js application with the following classes:\n\n ```app/services/store.js\n import DS from 'ember-data';\n\n export default DS.Store.extend({\n adapter: 'custom'\n });\n ```\n\n ```app/controllers/posts.js\n import { Controller } from '@ember/controller';\n\n export default Controller.extend({\n // ...\n });\n\n When the application is initialized, `ApplicationStore` will automatically be\n instantiated, and the instance of `PostsController` will have its `store`\n property set to that instance.\n\n Note that this code will only be run if the `ember-application` package is\n loaded. If Ember Data is being used in an environment other than a\n typical application (e.g., node.js where only `ember-runtime` is available),\n this code will be ignored.\n*/\n\nexport default {\n name: 'ember-data',\n initialize: setupContainer\n};\n","import Ember from 'ember';\nimport config from '../config/environment';\n\nexport function initialize() {\n var application = arguments[1] || arguments[0];\n if (config.exportApplicationGlobal !== false) {\n var theGlobal;\n if (typeof window !== 'undefined') {\n theGlobal = window;\n } else if (typeof global !== 'undefined') {\n theGlobal = global\n } else if (typeof self !== 'undefined') {\n theGlobal = self;\n } else {\n // no reasonable global, just bail\n return;\n }\n\n var value = config.exportApplicationGlobal;\n var globalName;\n\n if (typeof value === 'string') {\n globalName = value;\n } else {\n globalName = Ember.String.classify(config.modulePrefix);\n }\n\n if (!theGlobal[globalName]) {\n theGlobal[globalName] = application;\n\n application.reopen({\n willDestroy: function() {\n this._super.apply(this, arguments);\n delete theGlobal[globalName];\n }\n });\n }\n }\n}\n\nexport default {\n name: 'export-application-global',\n\n initialize: initialize\n};\n","import initializeStoreService from 'ember-data/initialize-store-service';\n\nexport default {\n name: \"ember-data\",\n initialize: initializeStoreService\n};\n","define('quickstart/resolver', ['exports', 'ember-resolver'], function (exports, _emberResolver) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = _emberResolver.default;\n});\n","import EmberRouter from '@ember/routing/router';\nimport config from './config/environment';\n\nconst Router = EmberRouter.extend({\n location: config.locationType,\n rootURL: config.rootURL\n});\n\nRouter.map(function() {\n});\n\nwindow.mapTestFunction = () => {\n window.console.log(\"pause here\", config, Router);\n};\n\nexport default Router;\n","export { default } from 'ember-ajax/services/ajax';\n","export default Ember.HTMLBars.template({\"id\":\"d4rGKf2G\",\"block\":\"{\\\"symbols\\\":[],\\\"statements\\\":[[1,[18,\\\"welcome-page\\\"],false],[0,\\\"\\\\n\\\"],[0,\\\"\\\\n\\\"],[1,[18,\\\"outlet\\\"],false]],\\\"hasEval\\\":false}\",\"meta\":{\"moduleName\":\"quickstart/templates/application.hbs\"}});","\n","define('quickstart/config/environment', [], function() {\n var prefix = 'quickstart';\ntry {\n var metaName = prefix + '/config/environment';\n var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n var config = JSON.parse(unescape(rawConfig));\n\n var exports = { 'default': config };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n}\ncatch(err) {\n throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n});\n","if (!runningTests) {\n require(\"quickstart/app\")[\"default\"].create({\"name\":\"quickstart\",\"version\":\"0.0.0+1dde1d7f\"});\n}\n"],"names":["App","Application","extend","modulePrefix","podModulePrefix","Resolver","default","appVersion","APP","version","_","hash","hideSha","match","hideVersion","Ember","Helper","helper","name","version","APP","initialize","name","initialize","app","arguments","register","inject","name","initialize","initialize","application","arguments","exportApplicationGlobal","theGlobal","window","global","self","value","globalName","Ember","String","classify","modulePrefix","reopen","willDestroy","_super","apply","name","name","initialize","Router","EmberRouter","extend","location","locationType","rootURL","map","window","mapTestFunction","console","log","default","Ember","HTMLBars","template"],"mappings":"AAAA;AACA;AACA;;;;;;;;;;ACGA,QAAMA,MAAMC,kBAAYC,MAAZ,CAAmB;AAC7BC,kBAAc,qBAAOA,YADQ;AAE7BC,qBAAiB,qBAAOA,eAFK;AAG7BC;AAH6B,GAAnB,CAAZ;;AAMA,sCAAiBL,GAAjB,EAAsB,qBAAOG,YAA7B;;oBAEeH,G;;;;;;;;;;;;0BCbNM,O;;;;;;;;;;;UCUOC,U,GAAAA,U;;;AANhB,QAAM;AACJC,SAAK;AACHC;AADG;AADD,0BAAN;;AAMO,WAASF,UAAT,CAAoBG,CAApB,EAAuBC,OAAO,EAA9B,EAAkC;AACvC,QAAIA,KAAKC,OAAT,EAAkB;AAChB,aAAOH,QAAQI,KAAR,wBAA6B,CAA7B,CAAP;AACD;;AAED,QAAIF,KAAKG,WAAT,EAAsB;AACpB,aAAOL,QAAQI,KAAR,oBAAyB,CAAzB,CAAP;AACD;;AAED,WAAOJ,OAAP;AACD;;oBAEcM,MAAMC,MAAN,CAAaC,MAAb,CAAoBV,UAApB,C;;;ACtBf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACJA,MAAIW,IAAJ,EAAUC,OAAV;AACA,MAAI,qBAAOC,GAAX,EAAgB;AACdF,WAAO,qBAAOE,GAAP,CAAWF,IAAlB;AACAC,cAAU,qBAAOC,GAAP,CAAWD,OAArB;AACD;;oBAEc;AACbD,UAAM,aADO;AAEbG,gBAAY,iCAAmBH,IAAnB,EAAyBC,OAAzB;AAFC,G;;;;;;;;;oBCPA;AACbG,UAAM,yBADO;;AAGbC,iBAAa;AACX,UAAIC,MAAMC,UAAU,CAAV,KAAgBA,UAAU,CAAV,CAA1B;;AAEAD,UAAIE,QAAJ,CAAa,8BAAb;AACAF,UAAIG,MAAJ,CAAW,8BAAX,EAA2C,WAA3C,EAAwD,kBAAxD;AACD;AARY,G;;;;;;;;;oBCwCA;AACbC,UAAM,YADO;AAEbC;AAFa,G;;;;;;;;;UCvCCC,U,GAAAA,U;AAAT,WAASA,UAAT,GAAsB;AAC3B,QAAIC,cAAcC,UAAU,CAAV,KAAgBA,UAAU,CAAV,CAAlC;AACA,QAAI,qBAAOC,uBAAP,KAAmC,KAAvC,EAA8C;AAC5C,UAAIC,SAAJ;AACA,UAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AAC/BD,oBAAYC,MAAZ;AACH,OAFD,MAEO,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACtCF,oBAAYE,MAAZ;AACH,OAFM,MAEA,IAAI,OAAOC,IAAP,KAAgB,WAApB,EAAiC;AACpCH,oBAAYG,IAAZ;AACH,OAFM,MAEA;AACJ;AACA;AACF;;AAED,UAAIC,QAAQ,qBAAOL,uBAAnB;AACA,UAAIM,UAAJ;;AAEA,UAAI,OAAOD,KAAP,KAAiB,QAArB,EAA+B;AAC7BC,qBAAaD,KAAb;AACD,OAFD,MAEO;AACLC,qBAAaC,MAAMC,MAAN,CAAaC,QAAb,CAAsB,qBAAOC,YAA7B,CAAb;AACD;;AAED,UAAI,CAACT,UAAUK,UAAV,CAAL,EAA4B;AAC1BL,kBAAUK,UAAV,IAAwBR,WAAxB;;AAEAA,oBAAYa,MAAZ,CAAmB;AACjBC,uBAAa,YAAW;AACtB,iBAAKC,MAAL,CAAYC,KAAZ,CAAkB,IAAlB,EAAwBf,SAAxB;AACA,mBAAOE,UAAUK,UAAV,CAAP;AACD;AAJgB,SAAnB;AAMD;AACF;AACF;;oBAEc;AACbS,UAAM,2BADO;;AAGblB,gBAAYA;AAHC,G;;;;;;;;;oBCtCA;AACbmB,UAAM,YADO;AAEbC;AAFa,G;;;ACFf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACJA,QAAMC,SAASC,aAAYC,MAAZ,CAAmB;AAChCC,cAAU,qBAAOC,YADe;AAEhCC,aAAS,qBAAOA;AAFgB,GAAnB,CAAf;;AAKAL,SAAOM,GAAP,CAAW,YAAW,CACrB,CADD;;AAGAC,SAAOC,eAAP,GAAyB,MAAM;AAC7BD,WAAOE,OAAP,CAAeC,GAAf,CAAmB,YAAnB,wBAAyCV,MAAzC;AACD,GAFD;;oBAIeA,M;;;;;;;;;;;;mBCfNW,O;;;;;;;;;;;oBCAMC,MAAMC,QAAN,CAAeC,QAAf,CAAwB,EAAC,MAAK,UAAN,EAAiB,SAAQ,uIAAzB,EAAiK,QAAO,EAAC,cAAa,sCAAd,EAAxK,EAAxB,C;;;ACAf;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;","file":"quickstart.js"} \ No newline at end of file diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.css b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.css new file mode 100644 index 0000000000..65461785ae --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.css @@ -0,0 +1,471 @@ +/*! + * QUnit 2.5.1 + * https://qunitjs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2018-02-28T01:37Z + */ + +/** Font Family and Sizes */ + +#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult { + font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; +} + +#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } +#qunit-tests { font-size: smaller; } + + +/** Resets */ + +#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter { + margin: 0; + padding: 0; +} + + +/** Header (excluding toolbar) */ + +#qunit-header { + padding: 0.5em 0 0.5em 1em; + + color: #8699A4; + background-color: #0D3349; + + font-size: 1.5em; + line-height: 1em; + font-weight: 400; + + border-radius: 5px 5px 0 0; +} + +#qunit-header a { + text-decoration: none; + color: #C2CCD1; +} + +#qunit-header a:hover, +#qunit-header a:focus { + color: #FFF; +} + +#qunit-banner { + height: 5px; +} + +#qunit-filteredTest { + padding: 0.5em 1em 0.5em 1em; + color: #366097; + background-color: #F4FF77; +} + +#qunit-userAgent { + padding: 0.5em 1em 0.5em 1em; + color: #FFF; + background-color: #2B81AF; + text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; +} + + +/** Toolbar */ + +#qunit-testrunner-toolbar { + padding: 0.5em 1em 0.5em 1em; + color: #5E740B; + background-color: #EEE; +} + +#qunit-testrunner-toolbar .clearfix { + height: 0; + clear: both; +} + +#qunit-testrunner-toolbar label { + display: inline-block; +} + +#qunit-testrunner-toolbar input[type=checkbox], +#qunit-testrunner-toolbar input[type=radio] { + margin: 3px; + vertical-align: -2px; +} + +#qunit-testrunner-toolbar input[type=text] { + box-sizing: border-box; + height: 1.6em; +} + +.qunit-url-config, +.qunit-filter, +#qunit-modulefilter { + display: inline-block; + line-height: 2.1em; +} + +.qunit-filter, +#qunit-modulefilter { + float: right; + position: relative; + margin-left: 1em; +} + +.qunit-url-config label { + margin-right: 0.5em; +} + +#qunit-modulefilter-search { + box-sizing: border-box; + width: 400px; +} + +#qunit-modulefilter-search-container:after { + position: absolute; + right: 0.3em; + content: "\25bc"; + color: black; +} + +#qunit-modulefilter-dropdown { + /* align with #qunit-modulefilter-search */ + box-sizing: border-box; + width: 400px; + position: absolute; + right: 0; + top: 50%; + margin-top: 0.8em; + + border: 1px solid #D3D3D3; + border-top: none; + border-radius: 0 0 .25em .25em; + color: #000; + background-color: #F5F5F5; + z-index: 99; +} + +#qunit-modulefilter-dropdown a { + color: inherit; + text-decoration: none; +} + +#qunit-modulefilter-dropdown .clickable.checked { + font-weight: bold; + color: #000; + background-color: #D2E0E6; +} + +#qunit-modulefilter-dropdown .clickable:hover { + color: #FFF; + background-color: #0D3349; +} + +#qunit-modulefilter-actions { + display: block; + overflow: auto; + + /* align with #qunit-modulefilter-dropdown-list */ + font: smaller/1.5em sans-serif; +} + +#qunit-modulefilter-dropdown #qunit-modulefilter-actions > * { + box-sizing: border-box; + max-height: 2.8em; + display: block; + padding: 0.4em; +} + +#qunit-modulefilter-dropdown #qunit-modulefilter-actions > button { + float: right; + font: inherit; +} + +#qunit-modulefilter-dropdown #qunit-modulefilter-actions > :last-child { + /* insert padding to align with checkbox margins */ + padding-left: 3px; +} + +#qunit-modulefilter-dropdown-list { + max-height: 200px; + overflow-y: auto; + margin: 0; + border-top: 2px groove threedhighlight; + padding: 0.4em 0 0; + font: smaller/1.5em sans-serif; +} + +#qunit-modulefilter-dropdown-list li { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +#qunit-modulefilter-dropdown-list .clickable { + display: block; + padding-left: 0.15em; +} + + +/** Tests: Pass/Fail */ + +#qunit-tests { + list-style-position: inside; +} + +#qunit-tests li { + padding: 0.4em 1em 0.4em 1em; + border-bottom: 1px solid #FFF; + list-style-position: inside; +} + +#qunit-tests > li { + display: none; +} + +#qunit-tests li.running, +#qunit-tests li.pass, +#qunit-tests li.fail, +#qunit-tests li.skipped, +#qunit-tests li.aborted { + display: list-item; +} + +#qunit-tests.hidepass { + position: relative; +} + +#qunit-tests.hidepass li.running, +#qunit-tests.hidepass li.pass:not(.todo) { + visibility: hidden; + position: absolute; + width: 0; + height: 0; + padding: 0; + border: 0; + margin: 0; +} + +#qunit-tests li strong { + cursor: pointer; +} + +#qunit-tests li.skipped strong { + cursor: default; +} + +#qunit-tests li a { + padding: 0.5em; + color: #C2CCD1; + text-decoration: none; +} + +#qunit-tests li p a { + padding: 0.25em; + color: #6B6464; +} +#qunit-tests li a:hover, +#qunit-tests li a:focus { + color: #000; +} + +#qunit-tests li .runtime { + float: right; + font-size: smaller; +} + +.qunit-assert-list { + margin-top: 0.5em; + padding: 0.5em; + + background-color: #FFF; + + border-radius: 5px; +} + +.qunit-source { + margin: 0.6em 0 0.3em; +} + +.qunit-collapsed { + display: none; +} + +#qunit-tests table { + border-collapse: collapse; + margin-top: 0.2em; +} + +#qunit-tests th { + text-align: right; + vertical-align: top; + padding: 0 0.5em 0 0; +} + +#qunit-tests td { + vertical-align: top; +} + +#qunit-tests pre { + margin: 0; + white-space: pre-wrap; + word-wrap: break-word; +} + +#qunit-tests del { + color: #374E0C; + background-color: #E0F2BE; + text-decoration: none; +} + +#qunit-tests ins { + color: #500; + background-color: #FFCACA; + text-decoration: none; +} + +/*** Test Counts */ + +#qunit-tests b.counts { color: #000; } +#qunit-tests b.passed { color: #5E740B; } +#qunit-tests b.failed { color: #710909; } + +#qunit-tests li li { + padding: 5px; + background-color: #FFF; + border-bottom: none; + list-style-position: inside; +} + +/*** Passing Styles */ + +#qunit-tests li li.pass { + color: #3C510C; + background-color: #FFF; + border-left: 10px solid #C6E746; +} + +#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } +#qunit-tests .pass .test-name { color: #366097; } + +#qunit-tests .pass .test-actual, +#qunit-tests .pass .test-expected { color: #999; } + +#qunit-banner.qunit-pass { background-color: #C6E746; } + +/*** Failing Styles */ + +#qunit-tests li li.fail { + color: #710909; + background-color: #FFF; + border-left: 10px solid #EE5757; + white-space: pre; +} + +#qunit-tests > li:last-child { + border-radius: 0 0 5px 5px; +} + +#qunit-tests .fail { color: #000; background-color: #EE5757; } +#qunit-tests .fail .test-name, +#qunit-tests .fail .module-name { color: #000; } + +#qunit-tests .fail .test-actual { color: #EE5757; } +#qunit-tests .fail .test-expected { color: #008000; } + +#qunit-banner.qunit-fail { background-color: #EE5757; } + + +/*** Aborted tests */ +#qunit-tests .aborted { color: #000; background-color: orange; } +/*** Skipped tests */ + +#qunit-tests .skipped { + background-color: #EBECE9; +} + +#qunit-tests .qunit-todo-label, +#qunit-tests .qunit-skipped-label { + background-color: #F4FF77; + display: inline-block; + font-style: normal; + color: #366097; + line-height: 1.8em; + padding: 0 0.5em; + margin: -0.4em 0.4em -0.4em 0; +} + +#qunit-tests .qunit-todo-label { + background-color: #EEE; +} + +/** Result */ + +#qunit-testresult { + color: #2B81AF; + background-color: #D2E0E6; + + border-bottom: 1px solid #FFF; +} +#qunit-testresult .clearfix { + height: 0; + clear: both; +} +#qunit-testresult .module-name { + font-weight: 700; +} +#qunit-testresult-display { + padding: 0.5em 1em 0.5em 1em; + width: 85%; + float:left; +} +#qunit-testresult-controls { + padding: 0.5em 1em 0.5em 1em; + width: 10%; + float:left; +} + +/** Fixture */ + +#qunit-fixture { + position: absolute; + top: -10000px; + left: -10000px; + width: 1000px; + height: 1000px; +} + +#ember-testing-container { + position: relative; + background: white; + bottom: 0; + right: 0; + width: 640px; + height: 384px; + overflow: auto; + z-index: 98; + border: 1px solid #ccc; + margin: 0 auto; +} + +#ember-testing-container.full-screen { + width: 100%; + height: 100%; + overflow: auto; + z-index: 98; + border: none; +} + +#ember-testing { + width: 200%; + height: 200%; + transform: scale(0.5); + transform-origin: top left; +} + +.full-screen #ember-testing { + position: absolute; + width: 100%; + height: 100%; + transform: scale(1); +} diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.js b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.js new file mode 100644 index 0000000000..f1ba91781e --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.js @@ -0,0 +1,12050 @@ + + +(function() { +/*! + * @overview Ember - JavaScript Application Framework + * @copyright Copyright 2011-2018 Tilde Inc. and contributors + * Portions Copyright 2006-2011 Strobe Inc. + * Portions Copyright 2008-2011 Apple Inc. All rights reserved. + * @license Licensed under MIT license + * See https://raw.github.com/emberjs/ember.js/master/LICENSE + * @version 3.0.0 + */ + +/*globals process */ +var enifed, requireModule, Ember; + +// Used in ember-environment/lib/global.js +mainContext = this; // eslint-disable-line no-undef + +(function() { + function missingModule(name, referrerName) { + if (referrerName) { + throw new Error('Could not find module ' + name + ' required by: ' + referrerName); + } else { + throw new Error('Could not find module ' + name); + } + } + + function internalRequire(_name, referrerName) { + var name = _name; + var mod = registry[name]; + + if (!mod) { + name = name + '/index'; + mod = registry[name]; + } + + var exports = seen[name]; + + if (exports !== undefined) { + return exports; + } + + exports = seen[name] = {}; + + if (!mod) { + missingModule(_name, referrerName); + } + + var deps = mod.deps; + var callback = mod.callback; + var reified = new Array(deps.length); + + for (var i = 0; i < deps.length; i++) { + if (deps[i] === 'exports') { + reified[i] = exports; + } else if (deps[i] === 'require') { + reified[i] = requireModule; + } else { + reified[i] = internalRequire(deps[i], name); + } + } + + callback.apply(this, reified); + + return exports; + } + + var isNode = typeof window === 'undefined' && + typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + + if (!isNode) { + Ember = this.Ember = this.Ember || {}; + } + + if (typeof Ember === 'undefined') { Ember = {}; } + + if (typeof Ember.__loader === 'undefined') { + var registry = {}; + var seen = {}; + + enifed = function(name, deps, callback) { + var value = { }; + + if (!callback) { + value.deps = []; + value.callback = deps; + } else { + value.deps = deps; + value.callback = callback; + } + + registry[name] = value; + }; + + requireModule = function(name) { + return internalRequire(name, null); + }; + + // setup `require` module + requireModule['default'] = requireModule; + + requireModule.has = function registryHas(moduleName) { + return !!registry[moduleName] || !!registry[moduleName + '/index']; + }; + + requireModule._eak_seen = registry; + + Ember.__loader = { + define: enifed, + require: requireModule, + registry: registry + }; + } else { + enifed = Ember.__loader.define; + requireModule = Ember.__loader.require; + } +})(); + +enifed('ember-babel', ['exports'], function (exports) { + 'use strict'; + + exports.classCallCheck = classCallCheck; + exports.inherits = inherits; + exports.taggedTemplateLiteralLoose = taggedTemplateLiteralLoose; + exports.createClass = createClass; + exports.defaults = defaults; + function classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : defaults(subClass, superClass); + } + + function taggedTemplateLiteralLoose(strings, raw) { + strings.raw = raw; + return strings; + } + + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function createClass(Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + } + + function defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + if (value && value.configurable && obj[key] === undefined) { + Object.defineProperty(obj, key, value); + } + } + return obj; + } + + var possibleConstructorReturn = exports.possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError('this hasn\'t been initialized - super() hasn\'t been called'); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + }; + + var slice = exports.slice = Array.prototype.slice; +}); +enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console', 'ember-environment', 'ember-debug/index', 'ember-debug/handlers'], function (exports, _error, _emberConsole, _emberEnvironment, _index, _handlers) { + 'use strict'; + + exports.missingOptionsUntilDeprecation = exports.missingOptionsIdDeprecation = exports.missingOptionsDeprecation = exports.registerHandler = undefined; + + /** + @module @ember/debug + @public + */ + /** + Allows for runtime registration of handler functions that override the default deprecation behavior. + Deprecations are invoked by calls to [@ember/application/deprecations/deprecate](https://emberjs.com/api/ember/release/classes/@ember%2Fapplication%2Fdeprecations/methods/deprecate?anchor=deprecate). + The following example demonstrates its usage by registering a handler that throws an error if the + message contains the word "should", otherwise defers to the default handler. + + ```javascript + import { registerDeprecationHandler } from '@ember/debug'; + + registerDeprecationHandler((message, options, next) => { + if (message.indexOf('should') !== -1) { + throw new Error(`Deprecation message with should: ${message}`); + } else { + // defer to whatever handler was registered before this one + next(message, options); + } + }); + ``` + + The handler function takes the following arguments: + + + + @public + @static + @method registerDeprecationHandler + @for @ember/debug + @param handler {Function} A function to handle deprecation calls. + @since 2.1.0 + */ + /*global __fail__*/ + var registerHandler = function () {}; + var missingOptionsDeprecation = void 0, + missingOptionsIdDeprecation = void 0, + missingOptionsUntilDeprecation = void 0, + deprecate = void 0; + + if (true) { + exports.registerHandler = registerHandler = function registerHandler(handler) { + (0, _handlers.registerHandler)('deprecate', handler); + }; + + var formatMessage = function formatMessage(_message, options) { + var message = _message; + + if (options && options.id) { + message = message + (' [deprecation id: ' + options.id + ']'); + } + + if (options && options.url) { + message += ' See ' + options.url + ' for more details.'; + } + + return message; + }; + + registerHandler(function logDeprecationToConsole(message, options) { + var updatedMessage = formatMessage(message, options); + + _emberConsole.default.warn('DEPRECATION: ' + updatedMessage); + }); + + var captureErrorForStack = void 0; + + if (new Error().stack) { + captureErrorForStack = function () { + return new Error(); + }; + } else { + captureErrorForStack = function () { + try { + __fail__.fail(); + } catch (e) { + return e; + } + }; + } + + registerHandler(function logDeprecationStackTrace(message, options, next) { + if (_emberEnvironment.ENV.LOG_STACKTRACE_ON_DEPRECATION) { + var stackStr = ''; + var error = captureErrorForStack(); + var stack = void 0; + + if (error.stack) { + if (error['arguments']) { + // Chrome + stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n'); + stack.shift(); + } else { + // Firefox + stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n'); + } + + stackStr = '\n ' + stack.slice(2).join('\n '); + } + + var updatedMessage = formatMessage(message, options); + + _emberConsole.default.warn('DEPRECATION: ' + updatedMessage + stackStr); + } else { + next.apply(undefined, arguments); + } + }); + + registerHandler(function raiseOnDeprecation(message, options, next) { + if (_emberEnvironment.ENV.RAISE_ON_DEPRECATION) { + var updatedMessage = formatMessage(message); + + throw new _error.default(updatedMessage); + } else { + next.apply(undefined, arguments); + } + }); + + exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.'; + exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `deprecate` you must provide `id` in options.'; + exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation = 'When calling `deprecate` you must provide `until` in options.'; + /** + @module @ember/application + @public + */ + /** + Display a deprecation warning with the provided message and a stack trace + (Chrome and Firefox only). + * In a production build, this method is defined as an empty function (NOP). + Uses of this method in Ember itself are stripped from the ember.prod.js build. + @method deprecate + @for @ember/application/deprecations + @param {String} message A description of the deprecation. + @param {Boolean} test A boolean. If falsy, the deprecation will be displayed. + @param {Object} options + @param {String} options.id A unique id for this deprecation. The id can be + used by Ember debugging tools to change the behavior (raise, log or silence) + for that specific deprecation. The id should be namespaced by dots, e.g. + "view.helper.select". + @param {string} options.until The version of Ember when this deprecation + warning will be removed. + @param {String} [options.url] An optional url to the transition guide on the + emberjs.com website. + @static + @public + @since 1.0.0 + */ + deprecate = function deprecate(message, test, options) { + if (_emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT !== true) { + (0, _index.assert)(missingOptionsDeprecation, options && (options.id || options.until)); + (0, _index.assert)(missingOptionsIdDeprecation, options.id); + (0, _index.assert)(missingOptionsUntilDeprecation, options.until); + } + + if ((!options || !options.id && !options.until) && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) { + deprecate(missingOptionsDeprecation, false, { + id: 'ember-debug.deprecate-options-missing', + until: '3.0.0', + url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options' + }); + } + + if (options && !options.id && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) { + deprecate(missingOptionsIdDeprecation, false, { + id: 'ember-debug.deprecate-id-missing', + until: '3.0.0', + url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options' + }); + } + + if (options && !options.until && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) { + deprecate(missingOptionsUntilDeprecation, options && options.until, { + id: 'ember-debug.deprecate-until-missing', + until: '3.0.0', + url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options' + }); + } + + _handlers.invoke.apply(undefined, ['deprecate'].concat(Array.prototype.slice.call(arguments))); + }; + } + + exports.default = deprecate; + exports.registerHandler = registerHandler; + exports.missingOptionsDeprecation = missingOptionsDeprecation; + exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation; + exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation; +}); +enifed("ember-debug/error", ["exports", "ember-babel"], function (exports, _emberBabel) { + "use strict"; + + /** + @module @ember/error + */ + function ExtendBuiltin(klass) { + function ExtendableBuiltin() { + klass.apply(this, arguments); + } + + ExtendableBuiltin.prototype = Object.create(klass.prototype); + ExtendableBuiltin.prototype.constructor = ExtendableBuiltin; + return ExtendableBuiltin; + } + + /** + A subclass of the JavaScript Error object for use in Ember. + + @class EmberError + @extends Error + @constructor + @public + */ + + var EmberError = function (_ExtendBuiltin) { + (0, _emberBabel.inherits)(EmberError, _ExtendBuiltin); + + function EmberError(message) { + (0, _emberBabel.classCallCheck)(this, EmberError); + + var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ExtendBuiltin.call(this)); + + if (!(_this instanceof EmberError)) { + var _ret; + + return _ret = new EmberError(message), (0, _emberBabel.possibleConstructorReturn)(_this, _ret); + } + + var error = Error.call(_this, message); + _this.stack = error.stack; + _this.description = error.description; + _this.fileName = error.fileName; + _this.lineNumber = error.lineNumber; + _this.message = error.message; + _this.name = error.name; + _this.number = error.number; + _this.code = error.code; + return _this; + } + + return EmberError; + }(ExtendBuiltin(Error)); + + exports.default = EmberError; +}); +enifed('ember-debug/features', ['exports', 'ember-environment', 'ember/features'], function (exports, _emberEnvironment, _features) { + 'use strict'; + + exports.default = isEnabled; + var FEATURES = _features.FEATURES; + + + /** + @module ember + */ + + /** + The hash of enabled Canary features. Add to this, any canary features + before creating your application. + + Alternatively (and recommended), you can also define `EmberENV.FEATURES` + if you need to enable features flagged at runtime. + + @class FEATURES + @namespace Ember + @static + @since 1.1.0 + @public + */ + + // Auto-generated + + /** + Determine whether the specified `feature` is enabled. Used by Ember's + build tools to exclude experimental features from beta/stable builds. + + You can define the following configuration options: + + * `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly + enabled/disabled. + + @method isEnabled + @param {String} feature The feature to check + @return {Boolean} + @for Ember.FEATURES + @since 1.1.0 + @public + */ + function isEnabled(feature) { + var featureValue = FEATURES[feature]; + + if (featureValue === true || featureValue === false || featureValue === undefined) { + return featureValue; + } else if (_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES) { + return true; + } else { + return false; + } + } +}); +enifed('ember-debug/handlers', ['exports'], function (exports) { + 'use strict'; + + var HANDLERS = exports.HANDLERS = {}; + + var registerHandler = function () {}; + var invoke = function () {}; + + if (true) { + exports.registerHandler = registerHandler = function registerHandler(type, callback) { + var nextHandler = HANDLERS[type] || function () {}; + + HANDLERS[type] = function (message, options) { + callback(message, options, nextHandler); + }; + }; + + exports.invoke = invoke = function invoke(type, message, test, options) { + if (test) { + return; + } + + var handlerForType = HANDLERS[type]; + + if (handlerForType) { + handlerForType(message, options); + } + }; + } + + exports.registerHandler = registerHandler; + exports.invoke = invoke; +}); +enifed('ember-debug/index', ['exports', 'ember-debug/warn', 'ember-debug/deprecate', 'ember-debug/features', 'ember-debug/error', 'ember-debug/testing', 'ember-environment', 'ember-console', 'ember/features'], function (exports, _warn2, _deprecate2, _features, _error, _testing, _emberEnvironment, _emberConsole, _features2) { + 'use strict'; + + exports._warnIfUsingStrippedFeatureFlags = exports.getDebugFunction = exports.setDebugFunction = exports.deprecateFunc = exports.runInDebug = exports.debugFreeze = exports.debugSeal = exports.deprecate = exports.debug = exports.warn = exports.info = exports.assert = exports.setTesting = exports.isTesting = exports.Error = exports.isFeatureEnabled = exports.registerDeprecationHandler = exports.registerWarnHandler = undefined; + Object.defineProperty(exports, 'registerWarnHandler', { + enumerable: true, + get: function () { + return _warn2.registerHandler; + } + }); + Object.defineProperty(exports, 'registerDeprecationHandler', { + enumerable: true, + get: function () { + return _deprecate2.registerHandler; + } + }); + Object.defineProperty(exports, 'isFeatureEnabled', { + enumerable: true, + get: function () { + return _features.default; + } + }); + Object.defineProperty(exports, 'Error', { + enumerable: true, + get: function () { + return _error.default; + } + }); + Object.defineProperty(exports, 'isTesting', { + enumerable: true, + get: function () { + return _testing.isTesting; + } + }); + Object.defineProperty(exports, 'setTesting', { + enumerable: true, + get: function () { + return _testing.setTesting; + } + }); + var DEFAULT_FEATURES = _features2.DEFAULT_FEATURES, + FEATURES = _features2.FEATURES; + + + // These are the default production build versions: + var noop = function () {}; + + var assert = noop; + var info = noop; + var warn = noop; + var debug = noop; + var deprecate = noop; + var debugSeal = noop; + var debugFreeze = noop; + var runInDebug = noop; + var setDebugFunction = noop; + var getDebugFunction = noop; + + var deprecateFunc = function () { + return arguments[arguments.length - 1]; + }; + + if (true) { + exports.setDebugFunction = setDebugFunction = function (type, callback) { + switch (type) { + case 'assert': + return exports.assert = assert = callback; + case 'info': + return exports.info = info = callback; + case 'warn': + return exports.warn = warn = callback; + case 'debug': + return exports.debug = debug = callback; + case 'deprecate': + return exports.deprecate = deprecate = callback; + case 'debugSeal': + return exports.debugSeal = debugSeal = callback; + case 'debugFreeze': + return exports.debugFreeze = debugFreeze = callback; + case 'runInDebug': + return exports.runInDebug = runInDebug = callback; + case 'deprecateFunc': + return exports.deprecateFunc = deprecateFunc = callback; + } + }; + + exports.getDebugFunction = getDebugFunction = function (type) { + switch (type) { + case 'assert': + return assert; + case 'info': + return info; + case 'warn': + return warn; + case 'debug': + return debug; + case 'deprecate': + return deprecate; + case 'debugSeal': + return debugSeal; + case 'debugFreeze': + return debugFreeze; + case 'runInDebug': + return runInDebug; + case 'deprecateFunc': + return deprecateFunc; + } + }; + } + + /** + @module @ember/debug + */ + + if (true) { + /** + Define an assertion that will throw an exception if the condition is not met. + * In a production build, this method is defined as an empty function (NOP). + Uses of this method in Ember itself are stripped from the ember.prod.js build. + ```javascript + import { assert } from '@ember/debug'; + // Test for truthiness + assert('Must pass a valid object', obj); + // Fail unconditionally + assert('This code path should never be run'); + ``` + @method assert + @static + @for @ember/debug + @param {String} desc A description of the assertion. This will become + the text of the Error thrown if the assertion fails. + @param {Boolean} test Must be truthy for the assertion to pass. If + falsy, an exception will be thrown. + @public + @since 1.0.0 + */ + setDebugFunction('assert', function assert(desc, test) { + if (!test) { + throw new _error.default('Assertion Failed: ' + desc); + } + }); + + /** + Display a debug notice. + * In a production build, this method is defined as an empty function (NOP). + Uses of this method in Ember itself are stripped from the ember.prod.js build. + ```javascript + import { debug } from '@ember/debug'; + debug('I\'m a debug notice!'); + ``` + @method debug + @for @ember/debug + @static + @param {String} message A debug message to display. + @public + */ + setDebugFunction('debug', function debug(message) { + _emberConsole.default.debug('DEBUG: ' + message); + }); + + /** + Display an info notice. + * In a production build, this method is defined as an empty function (NOP). + Uses of this method in Ember itself are stripped from the ember.prod.js build. + @method info + @private + */ + setDebugFunction('info', function info() { + _emberConsole.default.info.apply(undefined, arguments); + }); + + /** + @module @ember/application + @public + */ + + /** + Alias an old, deprecated method with its new counterpart. + Display a deprecation warning with the provided message and a stack trace + (Chrome and Firefox only) when the assigned method is called. + * In a production build, this method is defined as an empty function (NOP). + ```javascript + import { deprecateFunc } from '@ember/application/deprecations'; + Ember.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod); + ``` + @method deprecateFunc + @static + @for @ember/application/deprecations + @param {String} message A description of the deprecation. + @param {Object} [options] The options object for `deprecate`. + @param {Function} func The new function called to replace its deprecated counterpart. + @return {Function} A new function that wraps the original function with a deprecation warning + @private + */ + setDebugFunction('deprecateFunc', function deprecateFunc() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (args.length === 3) { + var message = args[0], + options = args[1], + func = args[2]; + + return function () { + deprecate(message, false, options); + return func.apply(this, arguments); + }; + } else { + var _message = args[0], + _func = args[1]; + + return function () { + deprecate(_message); + return _func.apply(this, arguments); + }; + } + }); + + /** + @module @ember/debug + @public + */ + /** + Run a function meant for debugging. + * In a production build, this method is defined as an empty function (NOP). + Uses of this method in Ember itself are stripped from the ember.prod.js build. + ```javascript + import Component from '@ember/component'; + import { runInDebug } from '@ember/debug'; + runInDebug(() => { + Component.reopen({ + didInsertElement() { + console.log("I'm happy"); + } + }); + }); + ``` + @method runInDebug + @for @ember/debug + @static + @param {Function} func The function to be executed. + @since 1.5.0 + @public + */ + setDebugFunction('runInDebug', function runInDebug(func) { + func(); + }); + + setDebugFunction('debugSeal', function debugSeal(obj) { + Object.seal(obj); + }); + + setDebugFunction('debugFreeze', function debugFreeze(obj) { + Object.freeze(obj); + }); + + setDebugFunction('deprecate', _deprecate2.default); + + setDebugFunction('warn', _warn2.default); + } + + var _warnIfUsingStrippedFeatureFlags = void 0; + + if (true && !(0, _testing.isTesting)()) { + /** + Will call `warn()` if ENABLE_OPTIONAL_FEATURES or + any specific FEATURES flag is truthy. + This method is called automatically in debug canary builds. + @private + @method _warnIfUsingStrippedFeatureFlags + @return {void} + */ + exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags = function _warnIfUsingStrippedFeatureFlags(FEATURES, knownFeatures, featuresWereStripped) { + if (featuresWereStripped) { + warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' }); + + var keys = Object.keys(FEATURES || {}); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key === 'isEnabled' || !(key in knownFeatures)) { + continue; + } + + warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' }); + } + } + }; + + // Complain if they're using FEATURE flags in builds other than canary + FEATURES['features-stripped-test'] = true; + var featuresWereStripped = true; + + if ((0, _features.default)('features-stripped-test')) { + featuresWereStripped = false; + } + + delete FEATURES['features-stripped-test']; + _warnIfUsingStrippedFeatureFlags(_emberEnvironment.ENV.FEATURES, DEFAULT_FEATURES, featuresWereStripped); + + // Inform the developer about the Ember Inspector if not installed. + var isFirefox = _emberEnvironment.environment.isFirefox; + var isChrome = _emberEnvironment.environment.isChrome; + + if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) { + window.addEventListener('load', function () { + if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) { + var downloadURL = void 0; + + if (isChrome) { + downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi'; + } else if (isFirefox) { + downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/'; + } + + debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL); + } + }, false); + } + } + + exports.assert = assert; + exports.info = info; + exports.warn = warn; + exports.debug = debug; + exports.deprecate = deprecate; + exports.debugSeal = debugSeal; + exports.debugFreeze = debugFreeze; + exports.runInDebug = runInDebug; + exports.deprecateFunc = deprecateFunc; + exports.setDebugFunction = setDebugFunction; + exports.getDebugFunction = getDebugFunction; + exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags; +}); +enifed("ember-debug/testing", ["exports"], function (exports) { + "use strict"; + + exports.isTesting = isTesting; + exports.setTesting = setTesting; + var testing = false; + + function isTesting() { + return testing; + } + + function setTesting(value) { + testing = !!value; + } +}); +enifed('ember-debug/warn', ['exports', 'ember-environment', 'ember-console', 'ember-debug/deprecate', 'ember-debug/index', 'ember-debug/handlers'], function (exports, _emberEnvironment, _emberConsole, _deprecate, _index, _handlers) { + 'use strict'; + + exports.missingOptionsDeprecation = exports.missingOptionsIdDeprecation = exports.registerHandler = undefined; + + + var registerHandler = function () {}; + var warn = function () {}; + var missingOptionsDeprecation = void 0, + missingOptionsIdDeprecation = void 0; + + /** + @module @ember/debug + */ + + if (true) { + /** + Allows for runtime registration of handler functions that override the default warning behavior. + Warnings are invoked by calls made to [@ember/debug/warn](https://emberjs.com/api/ember/release/classes/@ember%2Fdebug/methods/warn?anchor=warn). + The following example demonstrates its usage by registering a handler that does nothing overriding Ember's + default warning behavior. + ```javascript + import { registerWarnHandler } from '@ember/debug'; + // next is not called, so no warnings get the default behavior + registerWarnHandler(() => {}); + ``` + The handler function takes the following arguments: +
    +
  • message - The message received from the warn call.
  • +
  • options - An object passed in with the warn call containing additional information including:
  • +
      +
    • id - An id of the warning in the form of package-name.specific-warning.
    • +
    +
  • next - A function that calls into the previously registered handler.
  • +
+ @public + @static + @method registerWarnHandler + @for @ember/debug + @param handler {Function} A function to handle warnings. + @since 2.1.0 + */ + exports.registerHandler = registerHandler = function registerHandler(handler) { + (0, _handlers.registerHandler)('warn', handler); + }; + + registerHandler(function logWarning(message) { + _emberConsole.default.warn('WARNING: ' + message); + if ('trace' in _emberConsole.default) { + _emberConsole.default.trace(); + } + }); + + exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.'; + exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `warn` you must provide `id` in options.'; + + /** + Display a warning with the provided message. + * In a production build, this method is defined as an empty function (NOP). + Uses of this method in Ember itself are stripped from the ember.prod.js build. + @method warn + @for @ember/debug + @static + @param {String} message A warning to display. + @param {Boolean} test An optional boolean. If falsy, the warning + will be displayed. + @param {Object} options An object that can be used to pass a unique + `id` for this warning. The `id` can be used by Ember debugging tools + to change the behavior (raise, log, or silence) for that specific warning. + The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped" + @public + @since 1.0.0 + */ + warn = function warn(message, test, options) { + if (arguments.length === 2 && typeof test === 'object') { + options = test; + test = false; + } + + if (_emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT !== true) { + (0, _index.assert)(missingOptionsDeprecation, options); + (0, _index.assert)(missingOptionsIdDeprecation, options && options.id); + } + + if (!options && _emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) { + (0, _deprecate.default)(missingOptionsDeprecation, false, { + id: 'ember-debug.warn-options-missing', + until: '3.0.0', + url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options' + }); + } + + if (options && !options.id && _emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) { + (0, _deprecate.default)(missingOptionsIdDeprecation, false, { + id: 'ember-debug.warn-id-missing', + until: '3.0.0', + url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options' + }); + } + + (0, _handlers.invoke)('warn', message, test, options); + }; + } + + exports.default = warn; + exports.registerHandler = registerHandler; + exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation; + exports.missingOptionsDeprecation = missingOptionsDeprecation; +}); +enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime'], function (exports, _emberRuntime) { + 'use strict'; + + function K() { + return this; + } + + /** + @module @ember/test + */ + + /** + The primary purpose of this class is to create hooks that can be implemented + by an adapter for various test frameworks. + + @class TestAdapter + @public + */ + exports.default = _emberRuntime.Object.extend({ + /** + This callback will be called whenever an async operation is about to start. + Override this to call your framework's methods that handle async + operations. + @public + @method asyncStart + */ + asyncStart: K, + + /** + This callback will be called whenever an async operation has completed. + @public + @method asyncEnd + */ + asyncEnd: K, + + /** + Override this method with your testing framework's false assertion. + This function is called whenever an exception occurs causing the testing + promise to fail. + QUnit example: + ```javascript + exception: function(error) { + ok(false, error); + }; + ``` + @public + @method exception + @param {String} error The exception to be raised. + */ + exception: function (error) { + throw error; + } + }); +}); +enifed('ember-testing/adapters/qunit', ['exports', 'ember-utils', 'ember-testing/adapters/adapter'], function (exports, _emberUtils, _adapter) { + 'use strict'; + + exports.default = _adapter.default.extend({ + asyncStart: function () { + QUnit.stop(); + }, + asyncEnd: function () { + QUnit.start(); + }, + exception: function (error) { + QUnit.config.current.assert.ok(false, (0, _emberUtils.inspect)(error)); + } + }); +}); +enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], function (exports, _emberViews, _emberMetal) { + 'use strict'; + + exports.focus = focus; + exports.fireEvent = fireEvent; + + + var DEFAULT_EVENT_OPTIONS = { canBubble: true, cancelable: true }; + var KEYBOARD_EVENT_TYPES = ['keydown', 'keypress', 'keyup']; + var MOUSE_EVENT_TYPES = ['click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover']; + + function focus(el) { + if (!el) { + return; + } + var $el = (0, _emberViews.jQuery)(el); + if ($el.is(':input, [contenteditable=true]')) { + var type = $el.prop('type'); + if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') { + (0, _emberMetal.run)(null, function () { + // Firefox does not trigger the `focusin` event if the window + // does not have focus. If the document doesn't have focus just + // use trigger('focusin') instead. + + if (!document.hasFocus || document.hasFocus()) { + el.focus(); + } else { + $el.trigger('focusin'); + } + }); + } + } + } + + function fireEvent(element, type) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + if (!element) { + return; + } + var event = void 0; + if (KEYBOARD_EVENT_TYPES.indexOf(type) > -1) { + event = buildKeyboardEvent(type, options); + } else if (MOUSE_EVENT_TYPES.indexOf(type) > -1) { + var rect = element.getBoundingClientRect(); + var x = rect.left + 1; + var y = rect.top + 1; + var simulatedCoordinates = { + screenX: x + 5, + screenY: y + 95, + clientX: x, + clientY: y + }; + event = buildMouseEvent(type, _emberViews.jQuery.extend(simulatedCoordinates, options)); + } else { + event = buildBasicEvent(type, options); + } + element.dispatchEvent(event); + } + + function buildBasicEvent(type) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var event = document.createEvent('Events'); + event.initEvent(type, true, true); + _emberViews.jQuery.extend(event, options); + return event; + } + + function buildMouseEvent(type) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var event = void 0; + try { + event = document.createEvent('MouseEvents'); + var eventOpts = _emberViews.jQuery.extend({}, DEFAULT_EVENT_OPTIONS, options); + event.initMouseEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget); + } catch (e) { + event = buildBasicEvent(type, options); + } + return event; + } + + function buildKeyboardEvent(type) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var event = void 0; + try { + event = document.createEvent('KeyEvents'); + var eventOpts = _emberViews.jQuery.extend({}, DEFAULT_EVENT_OPTIONS, options); + event.initKeyEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode); + } catch (e) { + event = buildBasicEvent(type, options); + } + return event; + } +}); +enifed('ember-testing/ext/application', ['ember-application', 'ember-testing/setup_for_testing', 'ember-testing/test/helpers', 'ember-testing/test/promise', 'ember-testing/test/run', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/adapter'], function (_emberApplication, _setup_for_testing, _helpers, _promise, _run, _on_inject_helpers, _adapter) { + 'use strict'; + + _emberApplication.Application.reopen({ + /** + This property contains the testing helpers for the current application. These + are created once you call `injectTestHelpers` on your `Application` + instance. The included helpers are also available on the `window` object by + default, but can be used from this object on the individual application also. + @property testHelpers + @type {Object} + @default {} + @public + */ + testHelpers: {}, + + /** + This property will contain the original methods that were registered + on the `helperContainer` before `injectTestHelpers` is called. + When `removeTestHelpers` is called, these methods are restored to the + `helperContainer`. + @property originalMethods + @type {Object} + @default {} + @private + @since 1.3.0 + */ + originalMethods: {}, + + /** + This property indicates whether or not this application is currently in + testing mode. This is set when `setupForTesting` is called on the current + application. + @property testing + @type {Boolean} + @default false + @since 1.3.0 + @public + */ + testing: false, + + setupForTesting: function () { + (0, _setup_for_testing.default)(); + + this.testing = true; + + this.resolveRegistration('router:main').reopen({ + location: 'none' + }); + }, + + + /** + This will be used as the container to inject the test helpers into. By + default the helpers are injected into `window`. + @property helperContainer + @type {Object} The object to be used for test helpers. + @default window + @since 1.2.0 + @private + */ + helperContainer: null, + + injectTestHelpers: function (helperContainer) { + if (helperContainer) { + this.helperContainer = helperContainer; + } else { + this.helperContainer = window; + } + + this.reopen({ + willDestroy: function () { + this._super.apply(this, arguments); + this.removeTestHelpers(); + } + }); + + this.testHelpers = {}; + for (var name in _helpers.helpers) { + this.originalMethods[name] = this.helperContainer[name]; + this.testHelpers[name] = this.helperContainer[name] = helper(this, name); + protoWrap(_promise.default.prototype, name, helper(this, name), _helpers.helpers[name].meta.wait); + } + + (0, _on_inject_helpers.invokeInjectHelpersCallbacks)(this); + }, + removeTestHelpers: function () { + if (!this.helperContainer) { + return; + } + + for (var name in _helpers.helpers) { + this.helperContainer[name] = this.originalMethods[name]; + delete _promise.default.prototype[name]; + delete this.testHelpers[name]; + delete this.originalMethods[name]; + } + } + }); + + // This method is no longer needed + // But still here for backwards compatibility + // of helper chaining + function protoWrap(proto, name, callback, isAsync) { + proto[name] = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (isAsync) { + return callback.apply(this, args); + } else { + return this.then(function () { + return callback.apply(this, args); + }); + } + }; + } + + function helper(app, name) { + var fn = _helpers.helpers[name].method; + var meta = _helpers.helpers[name].meta; + if (!meta.wait) { + return function () { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return fn.apply(app, [app].concat(args)); + }; + } + + return function () { + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + var lastPromise = (0, _run.default)(function () { + return (0, _promise.resolve)((0, _promise.getLastPromise)()); + }); + + // wait for last helper's promise to resolve and then + // execute. To be safe, we need to tell the adapter we're going + // asynchronous here, because fn may not be invoked before we + // return. + (0, _adapter.asyncStart)(); + return lastPromise.then(function () { + return fn.apply(app, [app].concat(args)); + }).finally(_adapter.asyncEnd); + }; + } +}); +enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime', 'ember-metal', 'ember-debug', 'ember-testing/test/adapter'], function (exports, _emberRuntime, _emberMetal, _emberDebug, _adapter) { + 'use strict'; + + _emberRuntime.RSVP.configure('async', function (callback, promise) { + // if schedule will cause autorun, we need to inform adapter + if ((0, _emberDebug.isTesting)() && !_emberMetal.run.backburner.currentInstance) { + (0, _adapter.asyncStart)(); + _emberMetal.run.backburner.schedule('actions', function () { + (0, _adapter.asyncEnd)(); + callback(promise); + }); + } else { + _emberMetal.run.backburner.schedule('actions', function () { + return callback(promise); + }); + } + }); + + exports.default = _emberRuntime.RSVP; +}); +enifed('ember-testing/helpers', ['ember-testing/test/helpers', 'ember-testing/helpers/and_then', 'ember-testing/helpers/click', 'ember-testing/helpers/current_path', 'ember-testing/helpers/current_route_name', 'ember-testing/helpers/current_url', 'ember-testing/helpers/fill_in', 'ember-testing/helpers/find', 'ember-testing/helpers/find_with_assert', 'ember-testing/helpers/key_event', 'ember-testing/helpers/pause_test', 'ember-testing/helpers/trigger_event', 'ember-testing/helpers/visit', 'ember-testing/helpers/wait'], function (_helpers, _and_then, _click, _current_path, _current_route_name, _current_url, _fill_in, _find, _find_with_assert, _key_event, _pause_test, _trigger_event, _visit, _wait) { + 'use strict'; + + (0, _helpers.registerAsyncHelper)('visit', _visit.default); + (0, _helpers.registerAsyncHelper)('click', _click.default); + (0, _helpers.registerAsyncHelper)('keyEvent', _key_event.default); + (0, _helpers.registerAsyncHelper)('fillIn', _fill_in.default); + (0, _helpers.registerAsyncHelper)('wait', _wait.default); + (0, _helpers.registerAsyncHelper)('andThen', _and_then.default); + (0, _helpers.registerAsyncHelper)('pauseTest', _pause_test.pauseTest); + (0, _helpers.registerAsyncHelper)('triggerEvent', _trigger_event.default); + + (0, _helpers.registerHelper)('find', _find.default); + (0, _helpers.registerHelper)('findWithAssert', _find_with_assert.default); + (0, _helpers.registerHelper)('currentRouteName', _current_route_name.default); + (0, _helpers.registerHelper)('currentPath', _current_path.default); + (0, _helpers.registerHelper)('currentURL', _current_url.default); + (0, _helpers.registerHelper)('resumeTest', _pause_test.resumeTest); +}); +enifed("ember-testing/helpers/and_then", ["exports"], function (exports) { + "use strict"; + + exports.default = andThen; + function andThen(app, callback) { + return app.testHelpers.wait(callback(app)); + } +}); +enifed('ember-testing/helpers/click', ['exports', 'ember-testing/events'], function (exports, _events) { + 'use strict'; + + exports.default = click; + + + /** + Clicks an element and triggers any actions triggered by the element's `click` + event. + + Example: + + ```javascript + click('.some-jQuery-selector').then(function() { + // assert something + }); + ``` + + @method click + @param {String} selector jQuery selector for finding element on the DOM + @param {Object} context A DOM Element, Document, or jQuery to use as context + @return {RSVP.Promise} + @public + */ + function click(app, selector, context) { + var $el = app.testHelpers.findWithAssert(selector, context); + var el = $el[0]; + + (0, _events.fireEvent)(el, 'mousedown'); + + (0, _events.focus)(el); + + (0, _events.fireEvent)(el, 'mouseup'); + (0, _events.fireEvent)(el, 'click'); + + return app.testHelpers.wait(); + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/current_path', ['exports', 'ember-metal'], function (exports, _emberMetal) { + 'use strict'; + + exports.default = currentPath; + + + /** + Returns the current path. + + Example: + + ```javascript + function validateURL() { + equal(currentPath(), 'some.path.index', "correct path was transitioned into."); + } + + click('#some-link-id').then(validateURL); + ``` + + @method currentPath + @return {Object} The currently active path. + @since 1.5.0 + @public + */ + function currentPath(app) { + var routingService = app.__container__.lookup('service:-routing'); + return (0, _emberMetal.get)(routingService, 'currentPath'); + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/current_route_name', ['exports', 'ember-metal'], function (exports, _emberMetal) { + 'use strict'; + + exports.default = currentRouteName; + + /** + Returns the currently active route name. + + Example: + + ```javascript + function validateRouteName() { + equal(currentRouteName(), 'some.path', "correct route was transitioned into."); + } + visit('/some/path').then(validateRouteName) + ``` + + @method currentRouteName + @return {Object} The name of the currently active route. + @since 1.5.0 + @public + */ + function currentRouteName(app) { + var routingService = app.__container__.lookup('service:-routing'); + return (0, _emberMetal.get)(routingService, 'currentRouteName'); + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/current_url', ['exports', 'ember-metal'], function (exports, _emberMetal) { + 'use strict'; + + exports.default = currentURL; + + + /** + Returns the current URL. + + Example: + + ```javascript + function validateURL() { + equal(currentURL(), '/some/path', "correct URL was transitioned into."); + } + + click('#some-link-id').then(validateURL); + ``` + + @method currentURL + @return {Object} The currently active URL. + @since 1.5.0 + @public + */ + function currentURL(app) { + var router = app.__container__.lookup('router:main'); + return (0, _emberMetal.get)(router, 'location').getURL(); + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/fill_in', ['exports', 'ember-testing/events'], function (exports, _events) { + 'use strict'; + + exports.default = fillIn; + + + /** + Fills in an input element with some text. + + Example: + + ```javascript + fillIn('#email', 'you@example.com').then(function() { + // assert something + }); + ``` + + @method fillIn + @param {String} selector jQuery selector finding an input element on the DOM + to fill text with + @param {String} text text to place inside the input element + @return {RSVP.Promise} + @public + */ + function fillIn(app, selector, contextOrText, text) { + var $el = void 0, + el = void 0, + context = void 0; + if (text === undefined) { + text = contextOrText; + } else { + context = contextOrText; + } + $el = app.testHelpers.findWithAssert(selector, context); + el = $el[0]; + (0, _events.focus)(el); + + $el.eq(0).val(text); + (0, _events.fireEvent)(el, 'input'); + (0, _events.fireEvent)(el, 'change'); + + return app.testHelpers.wait(); + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/find', ['exports', 'ember-metal'], function (exports, _emberMetal) { + 'use strict'; + + exports.default = find; + + + /** + Finds an element in the context of the app's container element. A simple alias + for `app.$(selector)`. + + Example: + + ```javascript + var $el = find('.my-selector'); + ``` + + With the `context` param: + + ```javascript + var $el = find('.my-selector', '.parent-element-class'); + ``` + + @method find + @param {String} selector jQuery string selector for element lookup + @param {String} [context] (optional) jQuery selector that will limit the selector + argument to find only within the context's children + @return {Object} jQuery object representing the results of the query + @public + */ + function find(app, selector, context) { + var $el = void 0; + context = context || (0, _emberMetal.get)(app, 'rootElement'); + $el = app.$(selector, context); + return $el; + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/find_with_assert', ['exports'], function (exports) { + 'use strict'; + + exports.default = findWithAssert; + /** + @module ember + */ + /** + Like `find`, but throws an error if the element selector returns no results. + + Example: + + ```javascript + var $el = findWithAssert('.doesnt-exist'); // throws error + ``` + + With the `context` param: + + ```javascript + var $el = findWithAssert('.selector-id', '.parent-element-class'); // assert will pass + ``` + + @method findWithAssert + @param {String} selector jQuery selector string for finding an element within + the DOM + @param {String} [context] (optional) jQuery selector that will limit the + selector argument to find only within the context's children + @return {Object} jQuery object representing the results of the query + @throws {Error} throws error if jQuery object returned has a length of 0 + @public + */ + function findWithAssert(app, selector, context) { + var $el = app.testHelpers.find(selector, context); + if ($el.length === 0) { + throw new Error('Element ' + selector + ' not found.'); + } + return $el; + } +}); +enifed("ember-testing/helpers/key_event", ["exports"], function (exports) { + "use strict"; + + exports.default = keyEvent; + /** + @module ember + */ + /** + Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode + Example: + ```javascript + keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() { + // assert something + }); + ``` + @method keyEvent + @param {String} selector jQuery selector for finding element on the DOM + @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup` + @param {Number} keyCode the keyCode of the simulated key event + @return {RSVP.Promise} + @since 1.5.0 + @public + */ + function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) { + var context = void 0, + type = void 0; + + if (keyCode === undefined) { + context = null; + keyCode = typeOrKeyCode; + type = contextOrType; + } else { + context = contextOrType; + type = typeOrKeyCode; + } + + return app.testHelpers.triggerEvent(selector, context, type, { keyCode: keyCode, which: keyCode }); + } +}); +enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime', 'ember-console', 'ember-debug'], function (exports, _emberRuntime, _emberConsole, _emberDebug) { + 'use strict'; + + exports.resumeTest = resumeTest; + exports.pauseTest = pauseTest; + + + var resume = void 0; + + /** + Resumes a test paused by `pauseTest`. + + @method resumeTest + @return {void} + @public + */ + /** + @module ember + */ + function resumeTest() { + (true && !(resume) && (0, _emberDebug.assert)('Testing has not been paused. There is nothing to resume.', resume)); + + resume(); + resume = undefined; + } + + /** + Pauses the current test - this is useful for debugging while testing or for test-driving. + It allows you to inspect the state of your application at any point. + Example (The test will pause before clicking the button): + + ```javascript + visit('/') + return pauseTest(); + click('.btn'); + ``` + + You may want to turn off the timeout before pausing. + + qunit (as of 2.4.0): + + ``` + visit('/'); + assert.timeout(0); + return pauseTest(); + click('.btn'); + ``` + + mocha: + + ``` + visit('/'); + this.timeout(0); + return pauseTest(); + click('.btn'); + ``` + + + @since 1.9.0 + @method pauseTest + @return {Object} A promise that will never resolve + @public + */ + function pauseTest() { + _emberConsole.default.info('Testing paused. Use `resumeTest()` to continue.'); + + return new _emberRuntime.RSVP.Promise(function (resolve) { + resume = resolve; + }, 'TestAdapter paused promise'); + } +}); +enifed('ember-testing/helpers/trigger_event', ['exports', 'ember-testing/events'], function (exports, _events) { + 'use strict'; + + exports.default = triggerEvent; + + /** + Triggers the given DOM event on the element identified by the provided selector. + Example: + ```javascript + triggerEvent('#some-elem-id', 'blur'); + ``` + This is actually used internally by the `keyEvent` helper like so: + ```javascript + triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 }); + ``` + @method triggerEvent + @param {String} selector jQuery selector for finding element on the DOM + @param {String} [context] jQuery selector that will limit the selector + argument to find only within the context's children + @param {String} type The event type to be triggered. + @param {Object} [options] The options to be passed to jQuery.Event. + @return {RSVP.Promise} + @since 1.5.0 + @public + */ + function triggerEvent(app, selector, contextOrType, typeOrOptions, possibleOptions) { + var arity = arguments.length; + var context = void 0, + type = void 0, + options = void 0; + + if (arity === 3) { + // context and options are optional, so this is + // app, selector, type + context = null; + type = contextOrType; + options = {}; + } else if (arity === 4) { + // context and options are optional, so this is + if (typeof typeOrOptions === 'object') { + // either + // app, selector, type, options + context = null; + type = contextOrType; + options = typeOrOptions; + } else { + // or + // app, selector, context, type + context = contextOrType; + type = typeOrOptions; + options = {}; + } + } else { + context = contextOrType; + type = typeOrOptions; + options = possibleOptions; + } + + var $el = app.testHelpers.findWithAssert(selector, context); + var el = $el[0]; + + (0, _events.fireEvent)(el, type, options); + + return app.testHelpers.wait(); + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/visit', ['exports', 'ember-metal'], function (exports, _emberMetal) { + 'use strict'; + + exports.default = visit; + + + /** + Loads a route, sets up any controllers, and renders any templates associated + with the route as though a real user had triggered the route change while + using your app. + + Example: + + ```javascript + visit('posts/index').then(function() { + // assert something + }); + ``` + + @method visit + @param {String} url the name of the route + @return {RSVP.Promise} + @public + */ + function visit(app, url) { + var router = app.__container__.lookup('router:main'); + var shouldHandleURL = false; + + app.boot().then(function () { + router.location.setURL(url); + + if (shouldHandleURL) { + (0, _emberMetal.run)(app.__deprecatedInstance__, 'handleURL', url); + } + }); + + if (app._readinessDeferrals > 0) { + router['initialURL'] = url; + (0, _emberMetal.run)(app, 'advanceReadiness'); + delete router['initialURL']; + } else { + shouldHandleURL = true; + } + + return app.testHelpers.wait(); + } /** + @module ember + */ +}); +enifed('ember-testing/helpers/wait', ['exports', 'ember-testing/test/waiters', 'ember-runtime', 'ember-metal', 'ember-testing/test/pending_requests'], function (exports, _waiters, _emberRuntime, _emberMetal, _pending_requests) { + 'use strict'; + + exports.default = wait; + + + /** + Causes the run loop to process any pending events. This is used to ensure that + any async operations from other helpers (or your assertions) have been processed. + + This is most often used as the return value for the helper functions (see 'click', + 'fillIn','visit',etc). However, there is a method to register a test helper which + utilizes this method without the need to actually call `wait()` in your helpers. + + The `wait` helper is built into `registerAsyncHelper` by default. You will not need + to `return app.testHelpers.wait();` - the wait behavior is provided for you. + + Example: + + ```javascript + import { registerAsyncHelper } from '@ember/test'; + + registerAsyncHelper('loginUser', function(app, username, password) { + visit('secured/path/here') + .fillIn('#username', username) + .fillIn('#password', password) + .click('.submit'); + }); + ``` + + @method wait + @param {Object} value The value to be returned. + @return {RSVP.Promise} Promise that resolves to the passed value. + @public + @since 1.0.0 + */ + /** + @module ember + */ + function wait(app, value) { + return new _emberRuntime.RSVP.Promise(function (resolve) { + var router = app.__container__.lookup('router:main'); + + // Every 10ms, poll for the async thing to have finished + var watcher = setInterval(function () { + // 1. If the router is loading, keep polling + var routerIsLoading = router._routerMicrolib && !!router._routerMicrolib.activeTransition; + if (routerIsLoading) { + return; + } + + // 2. If there are pending Ajax requests, keep polling + if ((0, _pending_requests.pendingRequests)()) { + return; + } + + // 3. If there are scheduled timers or we are inside of a run loop, keep polling + if (_emberMetal.run.hasScheduledTimers() || _emberMetal.run.currentRunLoop) { + return; + } + + if ((0, _waiters.checkWaiters)()) { + return; + } + + // Stop polling + clearInterval(watcher); + + // Synchronously resolve the promise + (0, _emberMetal.run)(null, resolve, value); + }, 10); + }); + } +}); +enifed('ember-testing/index', ['exports', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/setup_for_testing', 'ember-testing/adapters/qunit', 'ember-testing/support', 'ember-testing/ext/application', 'ember-testing/ext/rsvp', 'ember-testing/helpers', 'ember-testing/initializers'], function (exports, _test, _adapter, _setup_for_testing, _qunit) { + 'use strict'; + + exports.QUnitAdapter = exports.setupForTesting = exports.Adapter = exports.Test = undefined; + Object.defineProperty(exports, 'Test', { + enumerable: true, + get: function () { + return _test.default; + } + }); + Object.defineProperty(exports, 'Adapter', { + enumerable: true, + get: function () { + return _adapter.default; + } + }); + Object.defineProperty(exports, 'setupForTesting', { + enumerable: true, + get: function () { + return _setup_for_testing.default; + } + }); + Object.defineProperty(exports, 'QUnitAdapter', { + enumerable: true, + get: function () { + return _qunit.default; + } + }); +}); +enifed('ember-testing/initializers', ['ember-runtime'], function (_emberRuntime) { + 'use strict'; + + var name = 'deferReadiness in `testing` mode'; + + (0, _emberRuntime.onLoad)('Ember.Application', function (Application) { + if (!Application.initializers[name]) { + Application.initializer({ + name: name, + + initialize: function (application) { + if (application.testing) { + application.deferReadiness(); + } + } + }); + } + }); +}); +enifed('ember-testing/setup_for_testing', ['exports', 'ember-debug', 'ember-views', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit'], function (exports, _emberDebug, _emberViews, _adapter, _pending_requests, _adapter2, _qunit) { + 'use strict'; + + exports.default = setupForTesting; + + + /** + Sets Ember up for testing. This is useful to perform + basic setup steps in order to unit test. + + Use `App.setupForTesting` to perform integration tests (full + application testing). + + @method setupForTesting + @namespace Ember + @since 1.5.0 + @private + */ + /* global self */ + + function setupForTesting() { + (0, _emberDebug.setTesting)(true); + + var adapter = (0, _adapter.getAdapter)(); + // if adapter is not manually set default to QUnit + if (!adapter) { + (0, _adapter.setAdapter)(typeof self.QUnit === 'undefined' ? new _adapter2.default() : new _qunit.default()); + } + + if (_emberViews.jQuery) { + (0, _emberViews.jQuery)(document).off('ajaxSend', _pending_requests.incrementPendingRequests); + (0, _emberViews.jQuery)(document).off('ajaxComplete', _pending_requests.decrementPendingRequests); + + (0, _pending_requests.clearPendingRequests)(); + + (0, _emberViews.jQuery)(document).on('ajaxSend', _pending_requests.incrementPendingRequests); + (0, _emberViews.jQuery)(document).on('ajaxComplete', _pending_requests.decrementPendingRequests); + } + } +}); +enifed('ember-testing/support', ['ember-debug', 'ember-views', 'ember-environment'], function (_emberDebug, _emberViews, _emberEnvironment) { + 'use strict'; + + /** + @module ember + */ + + var $ = _emberViews.jQuery; + + /** + This method creates a checkbox and triggers the click event to fire the + passed in handler. It is used to correct for a bug in older versions + of jQuery (e.g 1.8.3). + + @private + @method testCheckboxClick + */ + function testCheckboxClick(handler) { + var input = document.createElement('input'); + $(input).attr('type', 'checkbox').css({ position: 'absolute', left: '-1000px', top: '-1000px' }).appendTo('body').on('click', handler).trigger('click').remove(); + } + + if (_emberEnvironment.environment.hasDOM && typeof $ === 'function') { + $(function () { + /* + Determine whether a checkbox checked using jQuery's "click" method will have + the correct value for its checked property. + If we determine that the current jQuery version exhibits this behavior, + patch it to work correctly as in the commit for the actual fix: + https://github.com/jquery/jquery/commit/1fb2f92. + */ + testCheckboxClick(function () { + if (!this.checked && !$.event.special.click) { + $.event.special.click = { + trigger: function () { + if ($.nodeName(this, 'input') && this.type === 'checkbox' && this.click) { + this.click(); + return false; + } + } + }; + } + }); + + // Try again to verify that the patch took effect or blow up. + testCheckboxClick(function () { + (true && (0, _emberDebug.warn)('clicked checkboxes should be checked! the jQuery patch didn\'t work', this.checked, { id: 'ember-testing.test-checkbox-click' })); + }); + }); + } +}); +enifed('ember-testing/test', ['exports', 'ember-testing/test/helpers', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/promise', 'ember-testing/test/waiters', 'ember-testing/test/adapter'], function (exports, _helpers, _on_inject_helpers, _promise, _waiters, _adapter) { + 'use strict'; + + /** + This is a container for an assortment of testing related functionality: + + * Choose your default test adapter (for your framework of choice). + * Register/Unregister additional test helpers. + * Setup callbacks to be fired when the test helpers are injected into + your application. + + @class Test + @namespace Ember + @public + */ + var Test = { + /** + Hash containing all known test helpers. + @property _helpers + @private + @since 1.7.0 + */ + _helpers: _helpers.helpers, + + registerHelper: _helpers.registerHelper, + registerAsyncHelper: _helpers.registerAsyncHelper, + unregisterHelper: _helpers.unregisterHelper, + onInjectHelpers: _on_inject_helpers.onInjectHelpers, + Promise: _promise.default, + promise: _promise.promise, + resolve: _promise.resolve, + registerWaiter: _waiters.registerWaiter, + unregisterWaiter: _waiters.unregisterWaiter, + checkWaiters: _waiters.checkWaiters + }; + + /** + Used to allow ember-testing to communicate with a specific testing + framework. + + You can manually set it before calling `App.setupForTesting()`. + + Example: + + ```javascript + Ember.Test.adapter = MyCustomAdapter.create() + ``` + + If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`. + + @public + @for Ember.Test + @property adapter + @type {Class} The adapter to be used. + @default Ember.Test.QUnitAdapter + */ + /** + @module ember + */ + Object.defineProperty(Test, 'adapter', { + get: _adapter.getAdapter, + set: _adapter.setAdapter + }); + + exports.default = Test; +}); +enifed('ember-testing/test/adapter', ['exports', 'ember-console', 'ember-metal'], function (exports, _emberConsole, _emberMetal) { + 'use strict'; + + exports.getAdapter = getAdapter; + exports.setAdapter = setAdapter; + exports.asyncStart = asyncStart; + exports.asyncEnd = asyncEnd; + + + var adapter = void 0; + function getAdapter() { + return adapter; + } + + function setAdapter(value) { + adapter = value; + if (value && typeof value.exception === 'function') { + (0, _emberMetal.setDispatchOverride)(adapterDispatch); + } else { + (0, _emberMetal.setDispatchOverride)(null); + } + } + + function asyncStart() { + if (adapter) { + adapter.asyncStart(); + } + } + + function asyncEnd() { + if (adapter) { + adapter.asyncEnd(); + } + } + + function adapterDispatch(error) { + adapter.exception(error); + _emberConsole.default.error(error.stack); + } +}); +enifed('ember-testing/test/helpers', ['exports', 'ember-testing/test/promise'], function (exports, _promise) { + 'use strict'; + + exports.helpers = undefined; + exports.registerHelper = registerHelper; + exports.registerAsyncHelper = registerAsyncHelper; + exports.unregisterHelper = unregisterHelper; + var helpers = exports.helpers = {}; + /** + @module @ember/test + */ + + /** + `registerHelper` is used to register a test helper that will be injected + when `App.injectTestHelpers` is called. + + The helper method will always be called with the current Application as + the first parameter. + + For example: + + ```javascript + import { registerHelper } from '@ember/test'; + import { run } from '@ember/runloop'; + + registerHelper('boot', function(app) { + run(app, app.advanceReadiness); + }); + ``` + + This helper can later be called without arguments because it will be + called with `app` as the first parameter. + + ```javascript + import Application from '@ember/application'; + + App = Application.create(); + App.injectTestHelpers(); + boot(); + ``` + + @public + @for @ember/test + @static + @method registerHelper + @param {String} name The name of the helper method to add. + @param {Function} helperMethod + @param options {Object} + */ + function registerHelper(name, helperMethod) { + helpers[name] = { + method: helperMethod, + meta: { wait: false } + }; + } + + /** + `registerAsyncHelper` is used to register an async test helper that will be injected + when `App.injectTestHelpers` is called. + + The helper method will always be called with the current Application as + the first parameter. + + For example: + + ```javascript + import { registerAsyncHelper } from '@ember/test'; + import { run } from '@ember/runloop'; + + registerAsyncHelper('boot', function(app) { + run(app, app.advanceReadiness); + }); + ``` + + The advantage of an async helper is that it will not run + until the last async helper has completed. All async helpers + after it will wait for it complete before running. + + + For example: + + ```javascript + import { registerAsyncHelper } from '@ember/test'; + + registerAsyncHelper('deletePost', function(app, postId) { + click('.delete-' + postId); + }); + + // ... in your test + visit('/post/2'); + deletePost(2); + visit('/post/3'); + deletePost(3); + ``` + + @public + @for @ember/test + @method registerAsyncHelper + @param {String} name The name of the helper method to add. + @param {Function} helperMethod + @since 1.2.0 + */ + function registerAsyncHelper(name, helperMethod) { + helpers[name] = { + method: helperMethod, + meta: { wait: true } + }; + } + + /** + Remove a previously added helper method. + + Example: + + ```javascript + import { unregisterHelper } from '@ember/test'; + + unregisterHelper('wait'); + ``` + + @public + @method unregisterHelper + @static + @for @ember/test + @param {String} name The helper to remove. + */ + function unregisterHelper(name) { + delete helpers[name]; + delete _promise.default.prototype[name]; + } +}); +enifed("ember-testing/test/on_inject_helpers", ["exports"], function (exports) { + "use strict"; + + exports.onInjectHelpers = onInjectHelpers; + exports.invokeInjectHelpersCallbacks = invokeInjectHelpersCallbacks; + var callbacks = exports.callbacks = []; + + /** + Used to register callbacks to be fired whenever `App.injectTestHelpers` + is called. + + The callback will receive the current application as an argument. + + Example: + + ```javascript + import $ from 'jquery'; + + Ember.Test.onInjectHelpers(function() { + $(document).ajaxSend(function() { + Test.pendingRequests++; + }); + + $(document).ajaxComplete(function() { + Test.pendingRequests--; + }); + }); + ``` + + @public + @for Ember.Test + @method onInjectHelpers + @param {Function} callback The function to be called. + */ + function onInjectHelpers(callback) { + callbacks.push(callback); + } + + function invokeInjectHelpersCallbacks(app) { + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](app); + } + } +}); +enifed("ember-testing/test/pending_requests", ["exports"], function (exports) { + "use strict"; + + exports.pendingRequests = pendingRequests; + exports.clearPendingRequests = clearPendingRequests; + exports.incrementPendingRequests = incrementPendingRequests; + exports.decrementPendingRequests = decrementPendingRequests; + var requests = []; + + function pendingRequests() { + return requests.length; + } + + function clearPendingRequests() { + requests.length = 0; + } + + function incrementPendingRequests(_, xhr) { + requests.push(xhr); + } + + function decrementPendingRequests(_, xhr) { + for (var i = 0; i < requests.length; i++) { + if (xhr === requests[i]) { + requests.splice(i, 1); + break; + } + } + } +}); +enifed('ember-testing/test/promise', ['exports', 'ember-babel', 'ember-runtime', 'ember-testing/test/run'], function (exports, _emberBabel, _emberRuntime, _run) { + 'use strict'; + + exports.promise = promise; + exports.resolve = resolve; + exports.getLastPromise = getLastPromise; + + + var lastPromise = void 0; + + var TestPromise = function (_RSVP$Promise) { + (0, _emberBabel.inherits)(TestPromise, _RSVP$Promise); + + function TestPromise() { + (0, _emberBabel.classCallCheck)(this, TestPromise); + + var _this = (0, _emberBabel.possibleConstructorReturn)(this, _RSVP$Promise.apply(this, arguments)); + + lastPromise = _this; + return _this; + } + + TestPromise.prototype.then = function then(_onFulfillment) { + var _RSVP$Promise$prototy; + + var onFulfillment = typeof _onFulfillment === 'function' ? function (result) { + return isolate(_onFulfillment, result); + } : undefined; + + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return (_RSVP$Promise$prototy = _RSVP$Promise.prototype.then).call.apply(_RSVP$Promise$prototy, [this, onFulfillment].concat(args)); + }; + + return TestPromise; + }(_emberRuntime.RSVP.Promise); + + exports.default = TestPromise; + + + /** + This returns a thenable tailored for testing. It catches failed + `onSuccess` callbacks and invokes the `Ember.Test.adapter.exception` + callback in the last chained then. + + This method should be returned by async helpers such as `wait`. + + @public + @for Ember.Test + @method promise + @param {Function} resolver The function used to resolve the promise. + @param {String} label An optional string for identifying the promise. + */ + function promise(resolver, label) { + var fullLabel = 'Ember.Test.promise: ' + (label || ''); + return new TestPromise(resolver, fullLabel); + } + + /** + Replacement for `Ember.RSVP.resolve` + The only difference is this uses + an instance of `Ember.Test.Promise` + + @public + @for Ember.Test + @method resolve + @param {Mixed} The value to resolve + @since 1.2.0 + */ + function resolve(result, label) { + return TestPromise.resolve(result, label); + } + + function getLastPromise() { + return lastPromise; + } + + // This method isolates nested async methods + // so that they don't conflict with other last promises. + // + // 1. Set `Ember.Test.lastPromise` to null + // 2. Invoke method + // 3. Return the last promise created during method + function isolate(onFulfillment, result) { + // Reset lastPromise for nested helpers + lastPromise = null; + + var value = onFulfillment(result); + + var promise = lastPromise; + lastPromise = null; + + // If the method returned a promise + // return that promise. If not, + // return the last async helper's promise + if (value && value instanceof TestPromise || !promise) { + return value; + } else { + return (0, _run.default)(function () { + return resolve(promise).then(function () { + return value; + }); + }); + } + } +}); +enifed('ember-testing/test/run', ['exports', 'ember-metal'], function (exports, _emberMetal) { + 'use strict'; + + exports.default = run; + function run(fn) { + if (!_emberMetal.run.currentRunLoop) { + return (0, _emberMetal.run)(fn); + } else { + return fn(); + } + } +}); +enifed("ember-testing/test/waiters", ["exports"], function (exports) { + "use strict"; + + exports.registerWaiter = registerWaiter; + exports.unregisterWaiter = unregisterWaiter; + exports.checkWaiters = checkWaiters; + /** + @module @ember/test + */ + var contexts = []; + var callbacks = []; + + /** + This allows ember-testing to play nicely with other asynchronous + events, such as an application that is waiting for a CSS3 + transition or an IndexDB transaction. The waiter runs periodically + after each async helper (i.e. `click`, `andThen`, `visit`, etc) has executed, + until the returning result is truthy. After the waiters finish, the next async helper + is executed and the process repeats. + + For example: + + ```javascript + import { registerWaiter } from '@ember/test'; + + registerWaiter(function() { + return myPendingTransactions() == 0; + }); + ``` + The `context` argument allows you to optionally specify the `this` + with which your callback will be invoked. + + For example: + + ```javascript + import { registerWaiter } from '@ember/test'; + + registerWaiter(MyDB, MyDB.hasPendingTransactions); + ``` + + @public + @for @ember/test + @static + @method registerWaiter + @param {Object} context (optional) + @param {Function} callback + @since 1.2.0 + */ + function registerWaiter(context, callback) { + if (arguments.length === 1) { + callback = context; + context = null; + } + if (indexOf(context, callback) > -1) { + return; + } + contexts.push(context); + callbacks.push(callback); + } + + /** + `unregisterWaiter` is used to unregister a callback that was + registered with `registerWaiter`. + + @public + @for @ember/test + @static + @method unregisterWaiter + @param {Object} context (optional) + @param {Function} callback + @since 1.2.0 + */ + function unregisterWaiter(context, callback) { + if (!callbacks.length) { + return; + } + if (arguments.length === 1) { + callback = context; + context = null; + } + var i = indexOf(context, callback); + if (i === -1) { + return; + } + contexts.splice(i, 1); + callbacks.splice(i, 1); + } + + /** + Iterates through each registered test waiter, and invokes + its callback. If any waiter returns false, this method will return + true indicating that the waiters have not settled yet. + + This is generally used internally from the acceptance/integration test + infrastructure. + + @public + @for @ember/test + @static + @method checkWaiters + */ + function checkWaiters() { + if (!callbacks.length) { + return false; + } + for (var i = 0; i < callbacks.length; i++) { + var context = contexts[i]; + var callback = callbacks[i]; + if (!callback.call(context)) { + return true; + } + } + return false; + } + + function indexOf(context, callback) { + for (var i = 0; i < callbacks.length; i++) { + if (callbacks[i] === callback && contexts[i] === context) { + return i; + } + } + return -1; + } +}); +/*global enifed */ +enifed('node-module', ['exports'], function(_exports) { + var IS_NODE = typeof module === 'object' && typeof module.require === 'function'; + if (IS_NODE) { + _exports.require = module.require; + _exports.module = module; + _exports.IS_NODE = IS_NODE; + } else { + _exports.require = null; + _exports.module = null; + _exports.IS_NODE = IS_NODE; + } +}); +var testing = requireModule('ember-testing'); +Ember.Test = testing.Test; +Ember.Test.Adapter = testing.Adapter; +Ember.Test.QUnitAdapter = testing.QUnitAdapter; +Ember.setupForTesting = testing.setupForTesting; +}()); + +/* globals require, Ember, jQuery */ + +(() => { + if (typeof jQuery !== 'undefined') { + let _Ember; + if (typeof Ember !== 'undefined') { + _Ember = Ember; + } else { + _Ember = require('ember').default; + } + + let pendingRequests; + if (Ember.__loader.registry['ember-testing/test/pending_requests']) { + pendingRequests = Ember.__loader.require('ember-testing/test/pending_requests'); + } + + if (pendingRequests) { + // This exists to ensure that the AJAX listeners setup by Ember itself + // (which as of 2.17 are not properly torn down) get cleared and released + // when the application is destroyed. Without this, any AJAX requests + // that happen _between_ acceptance tests will always share + // `pendingRequests`. + _Ember.Application.reopen({ + willDestroy() { + jQuery(document).off('ajaxSend', pendingRequests.incrementPendingRequests); + jQuery(document).off('ajaxComplete', pendingRequests.decrementPendingRequests); + + pendingRequests.clearPendingRequests(); + + this._super(...arguments); + } + }); + } + } +})(); +/*! + * QUnit 2.5.1 + * https://qunitjs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2018-02-28T01:37Z + */ +(function (global$1) { + 'use strict'; + + global$1 = global$1 && global$1.hasOwnProperty('default') ? global$1['default'] : global$1; + + var window = global$1.window; + var self$1 = global$1.self; + var console = global$1.console; + var setTimeout = global$1.setTimeout; + var clearTimeout = global$1.clearTimeout; + + var document = window && window.document; + var navigator = window && window.navigator; + + var localSessionStorage = function () { + var x = "qunit-test-string"; + try { + global$1.sessionStorage.setItem(x, x); + global$1.sessionStorage.removeItem(x); + return global$1.sessionStorage; + } catch (e) { + return undefined; + } + }(); + + var _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; + }; + + + + + + + + + + + + var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + + var createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } + }; + + var toString = Object.prototype.toString; + var hasOwn = Object.prototype.hasOwnProperty; + var now = Date.now || function () { + return new Date().getTime(); + }; + + var defined = { + document: window && window.document !== undefined, + setTimeout: setTimeout !== undefined + }; + + // Returns a new Array with the elements that are in a but not in b + function diff(a, b) { + var i, + j, + result = a.slice(); + + for (i = 0; i < result.length; i++) { + for (j = 0; j < b.length; j++) { + if (result[i] === b[j]) { + result.splice(i, 1); + i--; + break; + } + } + } + return result; + } + + /** + * Determines whether an element exists in a given array or not. + * + * @method inArray + * @param {Any} elem + * @param {Array} array + * @return {Boolean} + */ + function inArray(elem, array) { + return array.indexOf(elem) !== -1; + } + + /** + * Makes a clone of an object using only Array or Object as base, + * and copies over the own enumerable properties. + * + * @param {Object} obj + * @return {Object} New object with only the own properties (recursively). + */ + function objectValues(obj) { + var key, + val, + vals = is("array", obj) ? [] : {}; + for (key in obj) { + if (hasOwn.call(obj, key)) { + val = obj[key]; + vals[key] = val === Object(val) ? objectValues(val) : val; + } + } + return vals; + } + + function extend(a, b, undefOnly) { + for (var prop in b) { + if (hasOwn.call(b, prop)) { + if (b[prop] === undefined) { + delete a[prop]; + } else if (!(undefOnly && typeof a[prop] !== "undefined")) { + a[prop] = b[prop]; + } + } + } + + return a; + } + + function objectType(obj) { + if (typeof obj === "undefined") { + return "undefined"; + } + + // Consider: typeof null === object + if (obj === null) { + return "null"; + } + + var match = toString.call(obj).match(/^\[object\s(.*)\]$/), + type = match && match[1]; + + switch (type) { + case "Number": + if (isNaN(obj)) { + return "nan"; + } + return "number"; + case "String": + case "Boolean": + case "Array": + case "Set": + case "Map": + case "Date": + case "RegExp": + case "Function": + case "Symbol": + return type.toLowerCase(); + default: + return typeof obj === "undefined" ? "undefined" : _typeof(obj); + } + } + + // Safe object type checking + function is(type, obj) { + return objectType(obj) === type; + } + + // Based on Java's String.hashCode, a simple but not + // rigorously collision resistant hashing function + function generateHash(module, testName) { + var str = module + "\x1C" + testName; + var hash = 0; + + for (var i = 0; i < str.length; i++) { + hash = (hash << 5) - hash + str.charCodeAt(i); + hash |= 0; + } + + // Convert the possibly negative integer hash code into an 8 character hex string, which isn't + // strictly necessary but increases user understanding that the id is a SHA-like hash + var hex = (0x100000000 + hash).toString(16); + if (hex.length < 8) { + hex = "0000000" + hex; + } + + return hex.slice(-8); + } + + // Test for equality any JavaScript type. + // Authors: Philippe Rathé , David Chan + var equiv = (function () { + + // Value pairs queued for comparison. Used for breadth-first processing order, recursion + // detection and avoiding repeated comparison (see below for details). + // Elements are { a: val, b: val }. + var pairs = []; + + var getProto = Object.getPrototypeOf || function (obj) { + return obj.__proto__; + }; + + function useStrictEquality(a, b) { + + // This only gets called if a and b are not strict equal, and is used to compare on + // the primitive values inside object wrappers. For example: + // `var i = 1;` + // `var j = new Number(1);` + // Neither a nor b can be null, as a !== b and they have the same type. + if ((typeof a === "undefined" ? "undefined" : _typeof(a)) === "object") { + a = a.valueOf(); + } + if ((typeof b === "undefined" ? "undefined" : _typeof(b)) === "object") { + b = b.valueOf(); + } + + return a === b; + } + + function compareConstructors(a, b) { + var protoA = getProto(a); + var protoB = getProto(b); + + // Comparing constructors is more strict than using `instanceof` + if (a.constructor === b.constructor) { + return true; + } + + // Ref #851 + // If the obj prototype descends from a null constructor, treat it + // as a null prototype. + if (protoA && protoA.constructor === null) { + protoA = null; + } + if (protoB && protoB.constructor === null) { + protoB = null; + } + + // Allow objects with no prototype to be equivalent to + // objects with Object as their constructor. + if (protoA === null && protoB === Object.prototype || protoB === null && protoA === Object.prototype) { + return true; + } + + return false; + } + + function getRegExpFlags(regexp) { + return "flags" in regexp ? regexp.flags : regexp.toString().match(/[gimuy]*$/)[0]; + } + + function isContainer(val) { + return ["object", "array", "map", "set"].indexOf(objectType(val)) !== -1; + } + + function breadthFirstCompareChild(a, b) { + + // If a is a container not reference-equal to b, postpone the comparison to the + // end of the pairs queue -- unless (a, b) has been seen before, in which case skip + // over the pair. + if (a === b) { + return true; + } + if (!isContainer(a)) { + return typeEquiv(a, b); + } + if (pairs.every(function (pair) { + return pair.a !== a || pair.b !== b; + })) { + + // Not yet started comparing this pair + pairs.push({ a: a, b: b }); + } + return true; + } + + var callbacks = { + "string": useStrictEquality, + "boolean": useStrictEquality, + "number": useStrictEquality, + "null": useStrictEquality, + "undefined": useStrictEquality, + "symbol": useStrictEquality, + "date": useStrictEquality, + + "nan": function nan() { + return true; + }, + + "regexp": function regexp(a, b) { + return a.source === b.source && + + // Include flags in the comparison + getRegExpFlags(a) === getRegExpFlags(b); + }, + + // abort (identical references / instance methods were skipped earlier) + "function": function _function() { + return false; + }, + + "array": function array(a, b) { + var i, len; + + len = a.length; + if (len !== b.length) { + + // Safe and faster + return false; + } + + for (i = 0; i < len; i++) { + + // Compare non-containers; queue non-reference-equal containers + if (!breadthFirstCompareChild(a[i], b[i])) { + return false; + } + } + return true; + }, + + // Define sets a and b to be equivalent if for each element aVal in a, there + // is some element bVal in b such that aVal and bVal are equivalent. Element + // repetitions are not counted, so these are equivalent: + // a = new Set( [ {}, [], [] ] ); + // b = new Set( [ {}, {}, [] ] ); + "set": function set$$1(a, b) { + var innerEq, + outerEq = true; + + if (a.size !== b.size) { + + // This optimization has certain quirks because of the lack of + // repetition counting. For instance, adding the same + // (reference-identical) element to two equivalent sets can + // make them non-equivalent. + return false; + } + + a.forEach(function (aVal) { + + // Short-circuit if the result is already known. (Using for...of + // with a break clause would be cleaner here, but it would cause + // a syntax error on older Javascript implementations even if + // Set is unused) + if (!outerEq) { + return; + } + + innerEq = false; + + b.forEach(function (bVal) { + var parentPairs; + + // Likewise, short-circuit if the result is already known + if (innerEq) { + return; + } + + // Swap out the global pairs list, as the nested call to + // innerEquiv will clobber its contents + parentPairs = pairs; + if (innerEquiv(bVal, aVal)) { + innerEq = true; + } + + // Replace the global pairs list + pairs = parentPairs; + }); + + if (!innerEq) { + outerEq = false; + } + }); + + return outerEq; + }, + + // Define maps a and b to be equivalent if for each key-value pair (aKey, aVal) + // in a, there is some key-value pair (bKey, bVal) in b such that + // [ aKey, aVal ] and [ bKey, bVal ] are equivalent. Key repetitions are not + // counted, so these are equivalent: + // a = new Map( [ [ {}, 1 ], [ {}, 1 ], [ [], 1 ] ] ); + // b = new Map( [ [ {}, 1 ], [ [], 1 ], [ [], 1 ] ] ); + "map": function map(a, b) { + var innerEq, + outerEq = true; + + if (a.size !== b.size) { + + // This optimization has certain quirks because of the lack of + // repetition counting. For instance, adding the same + // (reference-identical) key-value pair to two equivalent maps + // can make them non-equivalent. + return false; + } + + a.forEach(function (aVal, aKey) { + + // Short-circuit if the result is already known. (Using for...of + // with a break clause would be cleaner here, but it would cause + // a syntax error on older Javascript implementations even if + // Map is unused) + if (!outerEq) { + return; + } + + innerEq = false; + + b.forEach(function (bVal, bKey) { + var parentPairs; + + // Likewise, short-circuit if the result is already known + if (innerEq) { + return; + } + + // Swap out the global pairs list, as the nested call to + // innerEquiv will clobber its contents + parentPairs = pairs; + if (innerEquiv([bVal, bKey], [aVal, aKey])) { + innerEq = true; + } + + // Replace the global pairs list + pairs = parentPairs; + }); + + if (!innerEq) { + outerEq = false; + } + }); + + return outerEq; + }, + + "object": function object(a, b) { + var i, + aProperties = [], + bProperties = []; + + if (compareConstructors(a, b) === false) { + return false; + } + + // Be strict: don't ensure hasOwnProperty and go deep + for (i in a) { + + // Collect a's properties + aProperties.push(i); + + // Skip OOP methods that look the same + if (a.constructor !== Object && typeof a.constructor !== "undefined" && typeof a[i] === "function" && typeof b[i] === "function" && a[i].toString() === b[i].toString()) { + continue; + } + + // Compare non-containers; queue non-reference-equal containers + if (!breadthFirstCompareChild(a[i], b[i])) { + return false; + } + } + + for (i in b) { + + // Collect b's properties + bProperties.push(i); + } + + // Ensures identical properties name + return typeEquiv(aProperties.sort(), bProperties.sort()); + } + }; + + function typeEquiv(a, b) { + var type = objectType(a); + + // Callbacks for containers will append to the pairs queue to achieve breadth-first + // search order. The pairs queue is also used to avoid reprocessing any pair of + // containers that are reference-equal to a previously visited pair (a special case + // this being recursion detection). + // + // Because of this approach, once typeEquiv returns a false value, it should not be + // called again without clearing the pair queue else it may wrongly report a visited + // pair as being equivalent. + return objectType(b) === type && callbacks[type](a, b); + } + + function innerEquiv(a, b) { + var i, pair; + + // We're done when there's nothing more to compare + if (arguments.length < 2) { + return true; + } + + // Clear the global pair queue and add the top-level values being compared + pairs = [{ a: a, b: b }]; + + for (i = 0; i < pairs.length; i++) { + pair = pairs[i]; + + // Perform type-specific comparison on any pairs that are not strictly + // equal. For container types, that comparison will postpone comparison + // of any sub-container pair to the end of the pair queue. This gives + // breadth-first search order. It also avoids the reprocessing of + // reference-equal siblings, cousins etc, which can have a significant speed + // impact when comparing a container of small objects each of which has a + // reference to the same (singleton) large object. + if (pair.a !== pair.b && !typeEquiv(pair.a, pair.b)) { + return false; + } + } + + // ...across all consecutive argument pairs + return arguments.length === 2 || innerEquiv.apply(this, [].slice.call(arguments, 1)); + } + + return function () { + var result = innerEquiv.apply(undefined, arguments); + + // Release any retained objects + pairs.length = 0; + return result; + }; + })(); + + /** + * Config object: Maintain internal state + * Later exposed as QUnit.config + * `config` initialized at top of scope + */ + var config = { + + // The queue of tests to run + queue: [], + + // Block until document ready + blocking: true, + + // By default, run previously failed tests first + // very useful in combination with "Hide passed tests" checked + reorder: true, + + // By default, modify document.title when suite is done + altertitle: true, + + // HTML Reporter: collapse every test except the first failing test + // If false, all failing tests will be expanded + collapse: true, + + // By default, scroll to top of the page when suite is done + scrolltop: true, + + // Depth up-to which object will be dumped + maxDepth: 5, + + // When enabled, all tests must call expect() + requireExpects: false, + + // Placeholder for user-configurable form-exposed URL parameters + urlConfig: [], + + // Set of all modules. + modules: [], + + // The first unnamed module + currentModule: { + name: "", + tests: [], + childModules: [], + testsRun: 0, + unskippedTestsRun: 0, + hooks: { + before: [], + beforeEach: [], + afterEach: [], + after: [] + } + }, + + callbacks: {}, + + // The storage module to use for reordering tests + storage: localSessionStorage + }; + + // take a predefined QUnit.config and extend the defaults + var globalConfig = window && window.QUnit && window.QUnit.config; + + // only extend the global config if there is no QUnit overload + if (window && window.QUnit && !window.QUnit.version) { + extend(config, globalConfig); + } + + // Push a loose unnamed module to the modules collection + config.modules.push(config.currentModule); + + // Based on jsDump by Ariel Flesler + // http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html + var dump = (function () { + function quote(str) { + return "\"" + str.toString().replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\""; + } + function literal(o) { + return o + ""; + } + function join(pre, arr, post) { + var s = dump.separator(), + base = dump.indent(), + inner = dump.indent(1); + if (arr.join) { + arr = arr.join("," + s + inner); + } + if (!arr) { + return pre + post; + } + return [pre, inner + arr, base + post].join(s); + } + function array(arr, stack) { + var i = arr.length, + ret = new Array(i); + + if (dump.maxDepth && dump.depth > dump.maxDepth) { + return "[object Array]"; + } + + this.up(); + while (i--) { + ret[i] = this.parse(arr[i], undefined, stack); + } + this.down(); + return join("[", ret, "]"); + } + + function isArray(obj) { + return ( + + //Native Arrays + toString.call(obj) === "[object Array]" || + + // NodeList objects + typeof obj.length === "number" && obj.item !== undefined && (obj.length ? obj.item(0) === obj[0] : obj.item(0) === null && obj[0] === undefined) + ); + } + + var reName = /^function (\w+)/, + dump = { + + // The objType is used mostly internally, you can fix a (custom) type in advance + parse: function parse(obj, objType, stack) { + stack = stack || []; + var res, + parser, + parserType, + objIndex = stack.indexOf(obj); + + if (objIndex !== -1) { + return "recursion(" + (objIndex - stack.length) + ")"; + } + + objType = objType || this.typeOf(obj); + parser = this.parsers[objType]; + parserType = typeof parser === "undefined" ? "undefined" : _typeof(parser); + + if (parserType === "function") { + stack.push(obj); + res = parser.call(this, obj, stack); + stack.pop(); + return res; + } + return parserType === "string" ? parser : this.parsers.error; + }, + typeOf: function typeOf(obj) { + var type; + + if (obj === null) { + type = "null"; + } else if (typeof obj === "undefined") { + type = "undefined"; + } else if (is("regexp", obj)) { + type = "regexp"; + } else if (is("date", obj)) { + type = "date"; + } else if (is("function", obj)) { + type = "function"; + } else if (obj.setInterval !== undefined && obj.document !== undefined && obj.nodeType === undefined) { + type = "window"; + } else if (obj.nodeType === 9) { + type = "document"; + } else if (obj.nodeType) { + type = "node"; + } else if (isArray(obj)) { + type = "array"; + } else if (obj.constructor === Error.prototype.constructor) { + type = "error"; + } else { + type = typeof obj === "undefined" ? "undefined" : _typeof(obj); + } + return type; + }, + + separator: function separator() { + if (this.multiline) { + return this.HTML ? "
" : "\n"; + } else { + return this.HTML ? " " : " "; + } + }, + + // Extra can be a number, shortcut for increasing-calling-decreasing + indent: function indent(extra) { + if (!this.multiline) { + return ""; + } + var chr = this.indentChar; + if (this.HTML) { + chr = chr.replace(/\t/g, " ").replace(/ /g, " "); + } + return new Array(this.depth + (extra || 0)).join(chr); + }, + up: function up(a) { + this.depth += a || 1; + }, + down: function down(a) { + this.depth -= a || 1; + }, + setParser: function setParser(name, parser) { + this.parsers[name] = parser; + }, + + // The next 3 are exposed so you can use them + quote: quote, + literal: literal, + join: join, + depth: 1, + maxDepth: config.maxDepth, + + // This is the list of parsers, to modify them, use dump.setParser + parsers: { + window: "[Window]", + document: "[Document]", + error: function error(_error) { + return "Error(\"" + _error.message + "\")"; + }, + unknown: "[Unknown]", + "null": "null", + "undefined": "undefined", + "function": function _function(fn) { + var ret = "function", + + + // Functions never have name in IE + name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1]; + + if (name) { + ret += " " + name; + } + ret += "("; + + ret = [ret, dump.parse(fn, "functionArgs"), "){"].join(""); + return join(ret, dump.parse(fn, "functionCode"), "}"); + }, + array: array, + nodelist: array, + "arguments": array, + object: function object(map, stack) { + var keys, + key, + val, + i, + nonEnumerableProperties, + ret = []; + + if (dump.maxDepth && dump.depth > dump.maxDepth) { + return "[object Object]"; + } + + dump.up(); + keys = []; + for (key in map) { + keys.push(key); + } + + // Some properties are not always enumerable on Error objects. + nonEnumerableProperties = ["message", "name"]; + for (i in nonEnumerableProperties) { + key = nonEnumerableProperties[i]; + if (key in map && !inArray(key, keys)) { + keys.push(key); + } + } + keys.sort(); + for (i = 0; i < keys.length; i++) { + key = keys[i]; + val = map[key]; + ret.push(dump.parse(key, "key") + ": " + dump.parse(val, undefined, stack)); + } + dump.down(); + return join("{", ret, "}"); + }, + node: function node(_node) { + var len, + i, + val, + open = dump.HTML ? "<" : "<", + close = dump.HTML ? ">" : ">", + tag = _node.nodeName.toLowerCase(), + ret = open + tag, + attrs = _node.attributes; + + if (attrs) { + for (i = 0, len = attrs.length; i < len; i++) { + val = attrs[i].nodeValue; + + // IE6 includes all attributes in .attributes, even ones not explicitly + // set. Those have values like undefined, null, 0, false, "" or + // "inherit". + if (val && val !== "inherit") { + ret += " " + attrs[i].nodeName + "=" + dump.parse(val, "attribute"); + } + } + } + ret += close; + + // Show content of TextNode or CDATASection + if (_node.nodeType === 3 || _node.nodeType === 4) { + ret += _node.nodeValue; + } + + return ret + open + "/" + tag + close; + }, + + // Function calls it internally, it's the arguments part of the function + functionArgs: function functionArgs(fn) { + var args, + l = fn.length; + + if (!l) { + return ""; + } + + args = new Array(l); + while (l--) { + + // 97 is 'a' + args[l] = String.fromCharCode(97 + l); + } + return " " + args.join(", ") + " "; + }, + + // Object calls it internally, the key part of an item in a map + key: quote, + + // Function calls it internally, it's the content of the function + functionCode: "[code]", + + // Node calls it internally, it's a html attribute value + attribute: quote, + string: quote, + date: quote, + regexp: literal, + number: literal, + "boolean": literal, + symbol: function symbol(sym) { + return sym.toString(); + } + }, + + // If true, entities are escaped ( <, >, \t, space and \n ) + HTML: false, + + // Indentation unit + indentChar: " ", + + // If true, items in a collection, are separated by a \n, else just a space. + multiline: true + }; + + return dump; + })(); + + var LISTENERS = Object.create(null); + var SUPPORTED_EVENTS = ["runStart", "suiteStart", "testStart", "assertion", "testEnd", "suiteEnd", "runEnd"]; + + /** + * Emits an event with the specified data to all currently registered listeners. + * Callbacks will fire in the order in which they are registered (FIFO). This + * function is not exposed publicly; it is used by QUnit internals to emit + * logging events. + * + * @private + * @method emit + * @param {String} eventName + * @param {Object} data + * @return {Void} + */ + function emit(eventName, data) { + if (objectType(eventName) !== "string") { + throw new TypeError("eventName must be a string when emitting an event"); + } + + // Clone the callbacks in case one of them registers a new callback + var originalCallbacks = LISTENERS[eventName]; + var callbacks = originalCallbacks ? [].concat(toConsumableArray(originalCallbacks)) : []; + + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](data); + } + } + + /** + * Registers a callback as a listener to the specified event. + * + * @public + * @method on + * @param {String} eventName + * @param {Function} callback + * @return {Void} + */ + function on(eventName, callback) { + if (objectType(eventName) !== "string") { + throw new TypeError("eventName must be a string when registering a listener"); + } else if (!inArray(eventName, SUPPORTED_EVENTS)) { + var events = SUPPORTED_EVENTS.join(", "); + throw new Error("\"" + eventName + "\" is not a valid event; must be one of: " + events + "."); + } else if (objectType(callback) !== "function") { + throw new TypeError("callback must be a function when registering a listener"); + } + + if (!LISTENERS[eventName]) { + LISTENERS[eventName] = []; + } + + // Don't register the same callback more than once + if (!inArray(callback, LISTENERS[eventName])) { + LISTENERS[eventName].push(callback); + } + } + + // Register logging callbacks + function registerLoggingCallbacks(obj) { + var i, + l, + key, + callbackNames = ["begin", "done", "log", "testStart", "testDone", "moduleStart", "moduleDone"]; + + function registerLoggingCallback(key) { + var loggingCallback = function loggingCallback(callback) { + if (objectType(callback) !== "function") { + throw new Error("QUnit logging methods require a callback function as their first parameters."); + } + + config.callbacks[key].push(callback); + }; + + return loggingCallback; + } + + for (i = 0, l = callbackNames.length; i < l; i++) { + key = callbackNames[i]; + + // Initialize key collection of logging callback + if (objectType(config.callbacks[key]) === "undefined") { + config.callbacks[key] = []; + } + + obj[key] = registerLoggingCallback(key); + } + } + + function runLoggingCallbacks(key, args) { + var i, l, callbacks; + + callbacks = config.callbacks[key]; + for (i = 0, l = callbacks.length; i < l; i++) { + callbacks[i](args); + } + } + + // Doesn't support IE9, it will return undefined on these browsers + // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack + var fileName = (sourceFromStacktrace(0) || "").replace(/(:\d+)+\)?/, "").replace(/.+\//, ""); + + function extractStacktrace(e, offset) { + offset = offset === undefined ? 4 : offset; + + var stack, include, i; + + if (e && e.stack) { + stack = e.stack.split("\n"); + if (/^error$/i.test(stack[0])) { + stack.shift(); + } + if (fileName) { + include = []; + for (i = offset; i < stack.length; i++) { + if (stack[i].indexOf(fileName) !== -1) { + break; + } + include.push(stack[i]); + } + if (include.length) { + return include.join("\n"); + } + } + return stack[offset]; + } + } + + function sourceFromStacktrace(offset) { + var error = new Error(); + + // Support: Safari <=7 only, IE <=10 - 11 only + // Not all browsers generate the `stack` property for `new Error()`, see also #636 + if (!error.stack) { + try { + throw error; + } catch (err) { + error = err; + } + } + + return extractStacktrace(error, offset); + } + + var priorityCount = 0; + var unitSampler = void 0; + + /** + * Advances the ProcessingQueue to the next item if it is ready. + * @param {Boolean} last + */ + function advance() { + var start = now(); + config.depth = (config.depth || 0) + 1; + + while (config.queue.length && !config.blocking) { + var elapsedTime = now() - start; + + if (!defined.setTimeout || config.updateRate <= 0 || elapsedTime < config.updateRate) { + if (priorityCount > 0) { + priorityCount--; + } + + config.queue.shift()(); + } else { + setTimeout(advance); + break; + } + } + + config.depth--; + + if (!config.blocking && !config.queue.length && config.depth === 0) { + done(); + } + } + + function addToQueueImmediate(callback) { + if (objectType(callback) === "array") { + while (callback.length) { + addToQueueImmediate(callback.pop()); + } + + return; + } + + config.queue.unshift(callback); + priorityCount++; + } + + /** + * Adds a function to the ProcessingQueue for execution. + * @param {Function|Array} callback + * @param {Boolean} priority + * @param {String} seed + */ + function addToQueue(callback, prioritize, seed) { + if (prioritize) { + config.queue.splice(priorityCount++, 0, callback); + } else if (seed) { + if (!unitSampler) { + unitSampler = unitSamplerGenerator(seed); + } + + // Insert into a random position after all prioritized items + var index = Math.floor(unitSampler() * (config.queue.length - priorityCount + 1)); + config.queue.splice(priorityCount + index, 0, callback); + } else { + config.queue.push(callback); + } + } + + /** + * Creates a seeded "sample" generator which is used for randomizing tests. + */ + function unitSamplerGenerator(seed) { + + // 32-bit xorshift, requires only a nonzero seed + // http://excamera.com/sphinx/article-xorshift.html + var sample = parseInt(generateHash(seed), 16) || -1; + return function () { + sample ^= sample << 13; + sample ^= sample >>> 17; + sample ^= sample << 5; + + // ECMAScript has no unsigned number type + if (sample < 0) { + sample += 0x100000000; + } + + return sample / 0x100000000; + }; + } + + /** + * This function is called when the ProcessingQueue is done processing all + * items. It handles emitting the final run events. + */ + function done() { + var storage = config.storage; + + ProcessingQueue.finished = true; + + var runtime = now() - config.started; + var passed = config.stats.all - config.stats.bad; + + emit("runEnd", globalSuite.end(true)); + runLoggingCallbacks("done", { + passed: passed, + failed: config.stats.bad, + total: config.stats.all, + runtime: runtime + }); + + // Clear own storage items if all tests passed + if (storage && config.stats.bad === 0) { + for (var i = storage.length - 1; i >= 0; i--) { + var key = storage.key(i); + + if (key.indexOf("qunit-test-") === 0) { + storage.removeItem(key); + } + } + } + } + + var ProcessingQueue = { + finished: false, + add: addToQueue, + addImmediate: addToQueueImmediate, + advance: advance + }; + + var TestReport = function () { + function TestReport(name, suite, options) { + classCallCheck(this, TestReport); + + this.name = name; + this.suiteName = suite.name; + this.fullName = suite.fullName.concat(name); + this.runtime = 0; + this.assertions = []; + + this.skipped = !!options.skip; + this.todo = !!options.todo; + + this.valid = options.valid; + + this._startTime = 0; + this._endTime = 0; + + suite.pushTest(this); + } + + createClass(TestReport, [{ + key: "start", + value: function start(recordTime) { + if (recordTime) { + this._startTime = Date.now(); + } + + return { + name: this.name, + suiteName: this.suiteName, + fullName: this.fullName.slice() + }; + } + }, { + key: "end", + value: function end(recordTime) { + if (recordTime) { + this._endTime = Date.now(); + } + + return extend(this.start(), { + runtime: this.getRuntime(), + status: this.getStatus(), + errors: this.getFailedAssertions(), + assertions: this.getAssertions() + }); + } + }, { + key: "pushAssertion", + value: function pushAssertion(assertion) { + this.assertions.push(assertion); + } + }, { + key: "getRuntime", + value: function getRuntime() { + return this._endTime - this._startTime; + } + }, { + key: "getStatus", + value: function getStatus() { + if (this.skipped) { + return "skipped"; + } + + var testPassed = this.getFailedAssertions().length > 0 ? this.todo : !this.todo; + + if (!testPassed) { + return "failed"; + } else if (this.todo) { + return "todo"; + } else { + return "passed"; + } + } + }, { + key: "getFailedAssertions", + value: function getFailedAssertions() { + return this.assertions.filter(function (assertion) { + return !assertion.passed; + }); + } + }, { + key: "getAssertions", + value: function getAssertions() { + return this.assertions.slice(); + } + + // Remove actual and expected values from assertions. This is to prevent + // leaking memory throughout a test suite. + + }, { + key: "slimAssertions", + value: function slimAssertions() { + this.assertions = this.assertions.map(function (assertion) { + delete assertion.actual; + delete assertion.expected; + return assertion; + }); + } + }]); + return TestReport; + }(); + + var focused$1 = false; + + function Test(settings) { + var i, l; + + ++Test.count; + + this.expected = null; + this.assertions = []; + this.semaphore = 0; + this.module = config.currentModule; + this.stack = sourceFromStacktrace(3); + this.steps = []; + this.timeout = undefined; + + // If a module is skipped, all its tests and the tests of the child suites + // should be treated as skipped even if they are defined as `only` or `todo`. + // As for `todo` module, all its tests will be treated as `todo` except for + // tests defined as `skip` which will be left intact. + // + // So, if a test is defined as `todo` and is inside a skipped module, we should + // then treat that test as if was defined as `skip`. + if (this.module.skip) { + settings.skip = true; + settings.todo = false; + + // Skipped tests should be left intact + } else if (this.module.todo && !settings.skip) { + settings.todo = true; + } + + extend(this, settings); + + this.testReport = new TestReport(settings.testName, this.module.suiteReport, { + todo: settings.todo, + skip: settings.skip, + valid: this.valid() + }); + + // Register unique strings + for (i = 0, l = this.module.tests; i < l.length; i++) { + if (this.module.tests[i].name === this.testName) { + this.testName += " "; + } + } + + this.testId = generateHash(this.module.name, this.testName); + + this.module.tests.push({ + name: this.testName, + testId: this.testId, + skip: !!settings.skip + }); + + if (settings.skip) { + + // Skipped tests will fully ignore any sent callback + this.callback = function () {}; + this.async = false; + this.expected = 0; + } else { + if (typeof this.callback !== "function") { + var method = this.todo ? "todo" : "test"; + + // eslint-disable-next-line max-len + throw new TypeError("You must provide a function as a test callback to QUnit." + method + "(\"" + settings.testName + "\")"); + } + + this.assert = new Assert(this); + } + } + + Test.count = 0; + + function getNotStartedModules(startModule) { + var module = startModule, + modules = []; + + while (module && module.testsRun === 0) { + modules.push(module); + module = module.parentModule; + } + + return modules; + } + + Test.prototype = { + before: function before() { + var i, + startModule, + module = this.module, + notStartedModules = getNotStartedModules(module); + + for (i = notStartedModules.length - 1; i >= 0; i--) { + startModule = notStartedModules[i]; + startModule.stats = { all: 0, bad: 0, started: now() }; + emit("suiteStart", startModule.suiteReport.start(true)); + runLoggingCallbacks("moduleStart", { + name: startModule.name, + tests: startModule.tests + }); + } + + config.current = this; + + this.testEnvironment = extend({}, module.testEnvironment); + + this.started = now(); + emit("testStart", this.testReport.start(true)); + runLoggingCallbacks("testStart", { + name: this.testName, + module: module.name, + testId: this.testId, + previousFailure: this.previousFailure + }); + + if (!config.pollution) { + saveGlobal(); + } + }, + + run: function run() { + var promise; + + config.current = this; + + this.callbackStarted = now(); + + if (config.notrycatch) { + runTest(this); + return; + } + + try { + runTest(this); + } catch (e) { + this.pushFailure("Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + (e.message || e), extractStacktrace(e, 0)); + + // Else next test will carry the responsibility + saveGlobal(); + + // Restart the tests if they're blocking + if (config.blocking) { + internalRecover(this); + } + } + + function runTest(test) { + promise = test.callback.call(test.testEnvironment, test.assert); + test.resolvePromise(promise); + + // If the test has a "lock" on it, but the timeout is 0, then we push a + // failure as the test should be synchronous. + if (test.timeout === 0 && test.semaphore !== 0) { + pushFailure("Test did not finish synchronously even though assert.timeout( 0 ) was used.", sourceFromStacktrace(2)); + } + } + }, + + after: function after() { + checkPollution(); + }, + + queueHook: function queueHook(hook, hookName, hookOwner) { + var _this = this; + + var callHook = function callHook() { + var promise = hook.call(_this.testEnvironment, _this.assert); + _this.resolvePromise(promise, hookName); + }; + + var runHook = function runHook() { + if (hookName === "before") { + if (hookOwner.unskippedTestsRun !== 0) { + return; + } + + _this.preserveEnvironment = true; + } + + if (hookName === "after" && hookOwner.unskippedTestsRun !== numberOfUnskippedTests(hookOwner) - 1 && config.queue.length > 2) { + return; + } + + config.current = _this; + if (config.notrycatch) { + callHook(); + return; + } + try { + callHook(); + } catch (error) { + _this.pushFailure(hookName + " failed on " + _this.testName + ": " + (error.message || error), extractStacktrace(error, 0)); + } + }; + + return runHook; + }, + + + // Currently only used for module level hooks, can be used to add global level ones + hooks: function hooks(handler) { + var hooks = []; + + function processHooks(test, module) { + if (module.parentModule) { + processHooks(test, module.parentModule); + } + + if (module.hooks[handler].length) { + for (var i = 0; i < module.hooks[handler].length; i++) { + hooks.push(test.queueHook(module.hooks[handler][i], handler, module)); + } + } + } + + // Hooks are ignored on skipped tests + if (!this.skip) { + processHooks(this, this.module); + } + + return hooks; + }, + + + finish: function finish() { + config.current = this; + + if (this.steps.length) { + var stepsList = this.steps.join(", "); + this.pushFailure("Expected assert.verifySteps() to be called before end of test " + ("after using assert.step(). Unverified steps: " + stepsList), this.stack); + } + + if (config.requireExpects && this.expected === null) { + this.pushFailure("Expected number of assertions to be defined, but expect() was " + "not called.", this.stack); + } else if (this.expected !== null && this.expected !== this.assertions.length) { + this.pushFailure("Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack); + } else if (this.expected === null && !this.assertions.length) { + this.pushFailure("Expected at least one assertion, but none were run - call " + "expect(0) to accept zero assertions.", this.stack); + } + + var i, + module = this.module, + moduleName = module.name, + testName = this.testName, + skipped = !!this.skip, + todo = !!this.todo, + bad = 0, + storage = config.storage; + + this.runtime = now() - this.started; + + config.stats.all += this.assertions.length; + module.stats.all += this.assertions.length; + + for (i = 0; i < this.assertions.length; i++) { + if (!this.assertions[i].result) { + bad++; + config.stats.bad++; + module.stats.bad++; + } + } + + notifyTestsRan(module, skipped); + + // Store result when possible + if (storage) { + if (bad) { + storage.setItem("qunit-test-" + moduleName + "-" + testName, bad); + } else { + storage.removeItem("qunit-test-" + moduleName + "-" + testName); + } + } + + // After emitting the js-reporters event we cleanup the assertion data to + // avoid leaking it. It is not used by the legacy testDone callbacks. + emit("testEnd", this.testReport.end(true)); + this.testReport.slimAssertions(); + + runLoggingCallbacks("testDone", { + name: testName, + module: moduleName, + skipped: skipped, + todo: todo, + failed: bad, + passed: this.assertions.length - bad, + total: this.assertions.length, + runtime: skipped ? 0 : this.runtime, + + // HTML Reporter use + assertions: this.assertions, + testId: this.testId, + + // Source of Test + source: this.stack + }); + + if (module.testsRun === numberOfTests(module)) { + logSuiteEnd(module); + + // Check if the parent modules, iteratively, are done. If that the case, + // we emit the `suiteEnd` event and trigger `moduleDone` callback. + var parent = module.parentModule; + while (parent && parent.testsRun === numberOfTests(parent)) { + logSuiteEnd(parent); + parent = parent.parentModule; + } + } + + config.current = undefined; + + function logSuiteEnd(module) { + emit("suiteEnd", module.suiteReport.end(true)); + runLoggingCallbacks("moduleDone", { + name: module.name, + tests: module.tests, + failed: module.stats.bad, + passed: module.stats.all - module.stats.bad, + total: module.stats.all, + runtime: now() - module.stats.started + }); + } + }, + + preserveTestEnvironment: function preserveTestEnvironment() { + if (this.preserveEnvironment) { + this.module.testEnvironment = this.testEnvironment; + this.testEnvironment = extend({}, this.module.testEnvironment); + } + }, + + queue: function queue() { + var test = this; + + if (!this.valid()) { + return; + } + + function runTest() { + + // Each of these can by async + ProcessingQueue.addImmediate([function () { + test.before(); + }, test.hooks("before"), function () { + test.preserveTestEnvironment(); + }, test.hooks("beforeEach"), function () { + test.run(); + }, test.hooks("afterEach").reverse(), test.hooks("after").reverse(), function () { + test.after(); + }, function () { + test.finish(); + }]); + } + + var previousFailCount = config.storage && +config.storage.getItem("qunit-test-" + this.module.name + "-" + this.testName); + + // Prioritize previously failed tests, detected from storage + var prioritize = config.reorder && !!previousFailCount; + + this.previousFailure = !!previousFailCount; + + ProcessingQueue.add(runTest, prioritize, config.seed); + + // If the queue has already finished, we manually process the new test + if (ProcessingQueue.finished) { + ProcessingQueue.advance(); + } + }, + + + pushResult: function pushResult(resultInfo) { + if (this !== config.current) { + throw new Error("Assertion occurred after test had finished."); + } + + // Destructure of resultInfo = { result, actual, expected, message, negative } + var source, + details = { + module: this.module.name, + name: this.testName, + result: resultInfo.result, + message: resultInfo.message, + actual: resultInfo.actual, + testId: this.testId, + negative: resultInfo.negative || false, + runtime: now() - this.started, + todo: !!this.todo + }; + + if (hasOwn.call(resultInfo, "expected")) { + details.expected = resultInfo.expected; + } + + if (!resultInfo.result) { + source = resultInfo.source || sourceFromStacktrace(); + + if (source) { + details.source = source; + } + } + + this.logAssertion(details); + + this.assertions.push({ + result: !!resultInfo.result, + message: resultInfo.message + }); + }, + + pushFailure: function pushFailure(message, source, actual) { + if (!(this instanceof Test)) { + throw new Error("pushFailure() assertion outside test context, was " + sourceFromStacktrace(2)); + } + + this.pushResult({ + result: false, + message: message || "error", + actual: actual || null, + source: source + }); + }, + + /** + * Log assertion details using both the old QUnit.log interface and + * QUnit.on( "assertion" ) interface. + * + * @private + */ + logAssertion: function logAssertion(details) { + runLoggingCallbacks("log", details); + + var assertion = { + passed: details.result, + actual: details.actual, + expected: details.expected, + message: details.message, + stack: details.source, + todo: details.todo + }; + this.testReport.pushAssertion(assertion); + emit("assertion", assertion); + }, + + + resolvePromise: function resolvePromise(promise, phase) { + var then, + resume, + message, + test = this; + if (promise != null) { + then = promise.then; + if (objectType(then) === "function") { + resume = internalStop(test); + if (config.notrycatch) { + then.call(promise, function () { + resume(); + }); + } else { + then.call(promise, function () { + resume(); + }, function (error) { + message = "Promise rejected " + (!phase ? "during" : phase.replace(/Each$/, "")) + " \"" + test.testName + "\": " + (error && error.message || error); + test.pushFailure(message, extractStacktrace(error, 0)); + + // Else next test will carry the responsibility + saveGlobal(); + + // Unblock + internalRecover(test); + }); + } + } + } + }, + + valid: function valid() { + var filter = config.filter, + regexFilter = /^(!?)\/([\w\W]*)\/(i?$)/.exec(filter), + module = config.module && config.module.toLowerCase(), + fullName = this.module.name + ": " + this.testName; + + function moduleChainNameMatch(testModule) { + var testModuleName = testModule.name ? testModule.name.toLowerCase() : null; + if (testModuleName === module) { + return true; + } else if (testModule.parentModule) { + return moduleChainNameMatch(testModule.parentModule); + } else { + return false; + } + } + + function moduleChainIdMatch(testModule) { + return inArray(testModule.moduleId, config.moduleId) || testModule.parentModule && moduleChainIdMatch(testModule.parentModule); + } + + // Internally-generated tests are always valid + if (this.callback && this.callback.validTest) { + return true; + } + + if (config.moduleId && config.moduleId.length > 0 && !moduleChainIdMatch(this.module)) { + + return false; + } + + if (config.testId && config.testId.length > 0 && !inArray(this.testId, config.testId)) { + + return false; + } + + if (module && !moduleChainNameMatch(this.module)) { + return false; + } + + if (!filter) { + return true; + } + + return regexFilter ? this.regexFilter(!!regexFilter[1], regexFilter[2], regexFilter[3], fullName) : this.stringFilter(filter, fullName); + }, + + regexFilter: function regexFilter(exclude, pattern, flags, fullName) { + var regex = new RegExp(pattern, flags); + var match = regex.test(fullName); + + return match !== exclude; + }, + + stringFilter: function stringFilter(filter, fullName) { + filter = filter.toLowerCase(); + fullName = fullName.toLowerCase(); + + var include = filter.charAt(0) !== "!"; + if (!include) { + filter = filter.slice(1); + } + + // If the filter matches, we need to honour include + if (fullName.indexOf(filter) !== -1) { + return include; + } + + // Otherwise, do the opposite + return !include; + } + }; + + function pushFailure() { + if (!config.current) { + throw new Error("pushFailure() assertion outside test context, in " + sourceFromStacktrace(2)); + } + + // Gets current test obj + var currentTest = config.current; + + return currentTest.pushFailure.apply(currentTest, arguments); + } + + function saveGlobal() { + config.pollution = []; + + if (config.noglobals) { + for (var key in global$1) { + if (hasOwn.call(global$1, key)) { + + // In Opera sometimes DOM element ids show up here, ignore them + if (/^qunit-test-output/.test(key)) { + continue; + } + config.pollution.push(key); + } + } + } + } + + function checkPollution() { + var newGlobals, + deletedGlobals, + old = config.pollution; + + saveGlobal(); + + newGlobals = diff(config.pollution, old); + if (newGlobals.length > 0) { + pushFailure("Introduced global variable(s): " + newGlobals.join(", ")); + } + + deletedGlobals = diff(old, config.pollution); + if (deletedGlobals.length > 0) { + pushFailure("Deleted global variable(s): " + deletedGlobals.join(", ")); + } + } + + // Will be exposed as QUnit.test + function test(testName, callback) { + if (focused$1) { + return; + } + + var newTest = new Test({ + testName: testName, + callback: callback + }); + + newTest.queue(); + } + + function todo(testName, callback) { + if (focused$1) { + return; + } + + var newTest = new Test({ + testName: testName, + callback: callback, + todo: true + }); + + newTest.queue(); + } + + // Will be exposed as QUnit.skip + function skip(testName) { + if (focused$1) { + return; + } + + var test = new Test({ + testName: testName, + skip: true + }); + + test.queue(); + } + + // Will be exposed as QUnit.only + function only(testName, callback) { + if (focused$1) { + return; + } + + config.queue.length = 0; + focused$1 = true; + + var newTest = new Test({ + testName: testName, + callback: callback + }); + + newTest.queue(); + } + + // Put a hold on processing and return a function that will release it. + function internalStop(test) { + test.semaphore += 1; + config.blocking = true; + + // Set a recovery timeout, if so configured. + if (defined.setTimeout) { + var timeoutDuration = void 0; + + if (typeof test.timeout === "number") { + timeoutDuration = test.timeout; + } else if (typeof config.testTimeout === "number") { + timeoutDuration = config.testTimeout; + } + + if (typeof timeoutDuration === "number" && timeoutDuration > 0) { + clearTimeout(config.timeout); + config.timeout = setTimeout(function () { + pushFailure("Test took longer than " + timeoutDuration + "ms; test timed out.", sourceFromStacktrace(2)); + internalRecover(test); + }, timeoutDuration); + } + } + + var released = false; + return function resume() { + if (released) { + return; + } + + released = true; + test.semaphore -= 1; + internalStart(test); + }; + } + + // Forcefully release all processing holds. + function internalRecover(test) { + test.semaphore = 0; + internalStart(test); + } + + // Release a processing hold, scheduling a resumption attempt if no holds remain. + function internalStart(test) { + + // If semaphore is non-numeric, throw error + if (isNaN(test.semaphore)) { + test.semaphore = 0; + + pushFailure("Invalid value on test.semaphore", sourceFromStacktrace(2)); + return; + } + + // Don't start until equal number of stop-calls + if (test.semaphore > 0) { + return; + } + + // Throw an Error if start is called more often than stop + if (test.semaphore < 0) { + test.semaphore = 0; + + pushFailure("Tried to restart test while already started (test's semaphore was 0 already)", sourceFromStacktrace(2)); + return; + } + + // Add a slight delay to allow more assertions etc. + if (defined.setTimeout) { + if (config.timeout) { + clearTimeout(config.timeout); + } + config.timeout = setTimeout(function () { + if (test.semaphore > 0) { + return; + } + + if (config.timeout) { + clearTimeout(config.timeout); + } + + begin(); + }); + } else { + begin(); + } + } + + function collectTests(module) { + var tests = [].concat(module.tests); + var modules = [].concat(toConsumableArray(module.childModules)); + + // Do a breadth-first traversal of the child modules + while (modules.length) { + var nextModule = modules.shift(); + tests.push.apply(tests, nextModule.tests); + modules.push.apply(modules, toConsumableArray(nextModule.childModules)); + } + + return tests; + } + + function numberOfTests(module) { + return collectTests(module).length; + } + + function numberOfUnskippedTests(module) { + return collectTests(module).filter(function (test) { + return !test.skip; + }).length; + } + + function notifyTestsRan(module, skipped) { + module.testsRun++; + if (!skipped) { + module.unskippedTestsRun++; + } + while (module = module.parentModule) { + module.testsRun++; + if (!skipped) { + module.unskippedTestsRun++; + } + } + } + + /** + * Returns a function that proxies to the given method name on the globals + * console object. The proxy will also detect if the console doesn't exist and + * will appropriately no-op. This allows support for IE9, which doesn't have a + * console if the developer tools are not open. + */ + function consoleProxy(method) { + return function () { + if (console) { + console[method].apply(console, arguments); + } + }; + } + + var Logger = { + warn: consoleProxy("warn") + }; + + var Assert = function () { + function Assert(testContext) { + classCallCheck(this, Assert); + + this.test = testContext; + } + + // Assert helpers + + createClass(Assert, [{ + key: "timeout", + value: function timeout(duration) { + if (typeof duration !== "number") { + throw new Error("You must pass a number as the duration to assert.timeout"); + } + + this.test.timeout = duration; + } + + // Documents a "step", which is a string value, in a test as a passing assertion + + }, { + key: "step", + value: function step(message) { + var result = !!message; + + this.test.steps.push(message); + + return this.pushResult({ + result: result, + message: message || "You must provide a message to assert.step" + }); + } + + // Verifies the steps in a test match a given array of string values + + }, { + key: "verifySteps", + value: function verifySteps(steps, message) { + this.deepEqual(this.test.steps, steps, message); + this.test.steps.length = 0; + } + + // Specify the number of expected assertions to guarantee that failed test + // (no assertions are run at all) don't slip through. + + }, { + key: "expect", + value: function expect(asserts) { + if (arguments.length === 1) { + this.test.expected = asserts; + } else { + return this.test.expected; + } + } + + // Put a hold on processing and return a function that will release it a maximum of once. + + }, { + key: "async", + value: function async(count) { + var test$$1 = this.test; + + var popped = false, + acceptCallCount = count; + + if (typeof acceptCallCount === "undefined") { + acceptCallCount = 1; + } + + var resume = internalStop(test$$1); + + return function done() { + if (config.current !== test$$1) { + throw Error("assert.async callback called after test finished."); + } + + if (popped) { + test$$1.pushFailure("Too many calls to the `assert.async` callback", sourceFromStacktrace(2)); + return; + } + + acceptCallCount -= 1; + if (acceptCallCount > 0) { + return; + } + + popped = true; + resume(); + }; + } + + // Exports test.push() to the user API + // Alias of pushResult. + + }, { + key: "push", + value: function push(result, actual, expected, message, negative) { + Logger.warn("assert.push is deprecated and will be removed in QUnit 3.0." + " Please use assert.pushResult instead (https://api.qunitjs.com/assert/pushResult)."); + + var currentAssert = this instanceof Assert ? this : config.current.assert; + return currentAssert.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message, + negative: negative + }); + } + }, { + key: "pushResult", + value: function pushResult(resultInfo) { + + // Destructure of resultInfo = { result, actual, expected, message, negative } + var assert = this; + var currentTest = assert instanceof Assert && assert.test || config.current; + + // Backwards compatibility fix. + // Allows the direct use of global exported assertions and QUnit.assert.* + // Although, it's use is not recommended as it can leak assertions + // to other tests from async tests, because we only get a reference to the current test, + // not exactly the test where assertion were intended to be called. + if (!currentTest) { + throw new Error("assertion outside test context, in " + sourceFromStacktrace(2)); + } + + if (!(assert instanceof Assert)) { + assert = currentTest.assert; + } + + return assert.test.pushResult(resultInfo); + } + }, { + key: "ok", + value: function ok(result, message) { + if (!message) { + message = result ? "okay" : "failed, expected argument to be truthy, was: " + dump.parse(result); + } + + this.pushResult({ + result: !!result, + actual: result, + expected: true, + message: message + }); + } + }, { + key: "notOk", + value: function notOk(result, message) { + if (!message) { + message = !result ? "okay" : "failed, expected argument to be falsy, was: " + dump.parse(result); + } + + this.pushResult({ + result: !result, + actual: result, + expected: false, + message: message + }); + } + }, { + key: "equal", + value: function equal(actual, expected, message) { + + // eslint-disable-next-line eqeqeq + var result = expected == actual; + + this.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message + }); + } + }, { + key: "notEqual", + value: function notEqual(actual, expected, message) { + + // eslint-disable-next-line eqeqeq + var result = expected != actual; + + this.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message, + negative: true + }); + } + }, { + key: "propEqual", + value: function propEqual(actual, expected, message) { + actual = objectValues(actual); + expected = objectValues(expected); + + this.pushResult({ + result: equiv(actual, expected), + actual: actual, + expected: expected, + message: message + }); + } + }, { + key: "notPropEqual", + value: function notPropEqual(actual, expected, message) { + actual = objectValues(actual); + expected = objectValues(expected); + + this.pushResult({ + result: !equiv(actual, expected), + actual: actual, + expected: expected, + message: message, + negative: true + }); + } + }, { + key: "deepEqual", + value: function deepEqual(actual, expected, message) { + this.pushResult({ + result: equiv(actual, expected), + actual: actual, + expected: expected, + message: message + }); + } + }, { + key: "notDeepEqual", + value: function notDeepEqual(actual, expected, message) { + this.pushResult({ + result: !equiv(actual, expected), + actual: actual, + expected: expected, + message: message, + negative: true + }); + } + }, { + key: "strictEqual", + value: function strictEqual(actual, expected, message) { + this.pushResult({ + result: expected === actual, + actual: actual, + expected: expected, + message: message + }); + } + }, { + key: "notStrictEqual", + value: function notStrictEqual(actual, expected, message) { + this.pushResult({ + result: expected !== actual, + actual: actual, + expected: expected, + message: message, + negative: true + }); + } + }, { + key: "throws", + value: function throws(block, expected, message) { + var actual = void 0, + result = false; + + var currentTest = this instanceof Assert && this.test || config.current; + + // 'expected' is optional unless doing string comparison + if (objectType(expected) === "string") { + if (message == null) { + message = expected; + expected = null; + } else { + throw new Error("throws/raises does not accept a string value for the expected argument.\n" + "Use a non-string object value (e.g. regExp) instead if it's necessary."); + } + } + + currentTest.ignoreGlobalErrors = true; + try { + block.call(currentTest.testEnvironment); + } catch (e) { + actual = e; + } + currentTest.ignoreGlobalErrors = false; + + if (actual) { + var expectedType = objectType(expected); + + // We don't want to validate thrown error + if (!expected) { + result = true; + expected = null; + + // Expected is a regexp + } else if (expectedType === "regexp") { + result = expected.test(errorString(actual)); + + // Expected is a constructor, maybe an Error constructor + } else if (expectedType === "function" && actual instanceof expected) { + result = true; + + // Expected is an Error object + } else if (expectedType === "object") { + result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message; + + // Expected is a validation function which returns true if validation passed + } else if (expectedType === "function" && expected.call({}, actual) === true) { + expected = null; + result = true; + } + } + + currentTest.assert.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message + }); + } + }, { + key: "rejects", + value: function rejects(promise, expected, message) { + var result = false; + + var currentTest = this instanceof Assert && this.test || config.current; + + // 'expected' is optional unless doing string comparison + if (objectType(expected) === "string") { + if (message === undefined) { + message = expected; + expected = undefined; + } else { + message = "assert.rejects does not accept a string value for the expected " + "argument.\nUse a non-string object value (e.g. validator function) instead " + "if necessary."; + + currentTest.assert.pushResult({ + result: false, + message: message + }); + + return; + } + } + + var then = promise && promise.then; + if (objectType(then) !== "function") { + var _message = "The value provided to `assert.rejects` in " + "\"" + currentTest.testName + "\" was not a promise."; + + currentTest.assert.pushResult({ + result: false, + message: _message, + actual: promise + }); + + return; + } + + var done = this.async(); + + return then.call(promise, function handleFulfillment() { + var message = "The promise returned by the `assert.rejects` callback in " + "\"" + currentTest.testName + "\" did not reject."; + + currentTest.assert.pushResult({ + result: false, + message: message, + actual: promise + }); + + done(); + }, function handleRejection(actual) { + if (actual) { + var expectedType = objectType(expected); + + // We don't want to validate + if (expected === undefined) { + result = true; + expected = null; + + // Expected is a regexp + } else if (expectedType === "regexp") { + result = expected.test(errorString(actual)); + + // Expected is a constructor, maybe an Error constructor + } else if (expectedType === "function" && actual instanceof expected) { + result = true; + + // Expected is an Error object + } else if (expectedType === "object") { + result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message; + + // Expected is a validation function which returns true if validation passed + } else { + if (expectedType === "function") { + result = expected.call({}, actual) === true; + expected = null; + + // Expected is some other invalid type + } else { + result = false; + message = "invalid expected value provided to `assert.rejects` " + "callback in \"" + currentTest.testName + "\": " + expectedType + "."; + } + } + } + + currentTest.assert.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message + }); + + done(); + }); + } + }]); + return Assert; + }(); + + // Provide an alternative to assert.throws(), for environments that consider throws a reserved word + // Known to us are: Closure Compiler, Narwhal + // eslint-disable-next-line dot-notation + + + Assert.prototype.raises = Assert.prototype["throws"]; + + /** + * Converts an error into a simple string for comparisons. + * + * @param {Error} error + * @return {String} + */ + function errorString(error) { + var resultErrorString = error.toString(); + + if (resultErrorString.substring(0, 7) === "[object") { + var name = error.name ? error.name.toString() : "Error"; + var message = error.message ? error.message.toString() : ""; + + if (name && message) { + return name + ": " + message; + } else if (name) { + return name; + } else if (message) { + return message; + } else { + return "Error"; + } + } else { + return resultErrorString; + } + } + + /* global module, exports, define */ + function exportQUnit(QUnit) { + + if (defined.document) { + + // QUnit may be defined when it is preconfigured but then only QUnit and QUnit.config may be defined. + if (window.QUnit && window.QUnit.version) { + throw new Error("QUnit has already been defined."); + } + + window.QUnit = QUnit; + } + + // For nodejs + if (typeof module !== "undefined" && module && module.exports) { + module.exports = QUnit; + + // For consistency with CommonJS environments' exports + module.exports.QUnit = QUnit; + } + + // For CommonJS with exports, but without module.exports, like Rhino + if (typeof exports !== "undefined" && exports) { + exports.QUnit = QUnit; + } + + if (typeof define === "function" && define.amd) { + define(function () { + return QUnit; + }); + QUnit.config.autostart = false; + } + + // For Web/Service Workers + if (self$1 && self$1.WorkerGlobalScope && self$1 instanceof self$1.WorkerGlobalScope) { + self$1.QUnit = QUnit; + } + } + + var SuiteReport = function () { + function SuiteReport(name, parentSuite) { + classCallCheck(this, SuiteReport); + + this.name = name; + this.fullName = parentSuite ? parentSuite.fullName.concat(name) : []; + + this.tests = []; + this.childSuites = []; + + if (parentSuite) { + parentSuite.pushChildSuite(this); + } + } + + createClass(SuiteReport, [{ + key: "start", + value: function start(recordTime) { + if (recordTime) { + this._startTime = Date.now(); + } + + return { + name: this.name, + fullName: this.fullName.slice(), + tests: this.tests.map(function (test) { + return test.start(); + }), + childSuites: this.childSuites.map(function (suite) { + return suite.start(); + }), + testCounts: { + total: this.getTestCounts().total + } + }; + } + }, { + key: "end", + value: function end(recordTime) { + if (recordTime) { + this._endTime = Date.now(); + } + + return { + name: this.name, + fullName: this.fullName.slice(), + tests: this.tests.map(function (test) { + return test.end(); + }), + childSuites: this.childSuites.map(function (suite) { + return suite.end(); + }), + testCounts: this.getTestCounts(), + runtime: this.getRuntime(), + status: this.getStatus() + }; + } + }, { + key: "pushChildSuite", + value: function pushChildSuite(suite) { + this.childSuites.push(suite); + } + }, { + key: "pushTest", + value: function pushTest(test) { + this.tests.push(test); + } + }, { + key: "getRuntime", + value: function getRuntime() { + return this._endTime - this._startTime; + } + }, { + key: "getTestCounts", + value: function getTestCounts() { + var counts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { passed: 0, failed: 0, skipped: 0, todo: 0, total: 0 }; + + counts = this.tests.reduce(function (counts, test) { + if (test.valid) { + counts[test.getStatus()]++; + counts.total++; + } + + return counts; + }, counts); + + return this.childSuites.reduce(function (counts, suite) { + return suite.getTestCounts(counts); + }, counts); + } + }, { + key: "getStatus", + value: function getStatus() { + var _getTestCounts = this.getTestCounts(), + total = _getTestCounts.total, + failed = _getTestCounts.failed, + skipped = _getTestCounts.skipped, + todo = _getTestCounts.todo; + + if (failed) { + return "failed"; + } else { + if (skipped === total) { + return "skipped"; + } else if (todo === total) { + return "todo"; + } else { + return "passed"; + } + } + } + }]); + return SuiteReport; + }(); + + // Handle an unhandled exception. By convention, returns true if further + // error handling should be suppressed and false otherwise. + // In this case, we will only suppress further error handling if the + // "ignoreGlobalErrors" configuration option is enabled. + function onError(error) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + if (config.current) { + if (config.current.ignoreGlobalErrors) { + return true; + } + pushFailure.apply(undefined, [error.message, error.fileName + ":" + error.lineNumber].concat(args)); + } else { + test("global failure", extend(function () { + pushFailure.apply(undefined, [error.message, error.fileName + ":" + error.lineNumber].concat(args)); + }, { validTest: true })); + } + + return false; + } + + // Handle an unhandled rejection + function onUnhandledRejection(reason) { + var resultInfo = { + result: false, + message: reason.message || "error", + actual: reason, + source: reason.stack || sourceFromStacktrace(3) + }; + + var currentTest = config.current; + if (currentTest) { + currentTest.assert.pushResult(resultInfo); + } else { + test("global failure", extend(function (assert) { + assert.pushResult(resultInfo); + }, { validTest: true })); + } + } + + var focused = false; + var QUnit = {}; + var globalSuite = new SuiteReport(); + + // The initial "currentModule" represents the global (or top-level) module that + // is not explicitly defined by the user, therefore we add the "globalSuite" to + // it since each module has a suiteReport associated with it. + config.currentModule.suiteReport = globalSuite; + + var moduleStack = []; + var globalStartCalled = false; + var runStarted = false; + + // Figure out if we're running the tests from a server or not + QUnit.isLocal = !(defined.document && window.location.protocol !== "file:"); + + // Expose the current QUnit version + QUnit.version = "2.5.1"; + + function createModule(name, testEnvironment, modifiers) { + var parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null; + var moduleName = parentModule !== null ? [parentModule.name, name].join(" > ") : name; + var parentSuite = parentModule ? parentModule.suiteReport : globalSuite; + + var skip$$1 = parentModule !== null && parentModule.skip || modifiers.skip; + var todo$$1 = parentModule !== null && parentModule.todo || modifiers.todo; + + var module = { + name: moduleName, + parentModule: parentModule, + tests: [], + moduleId: generateHash(moduleName), + testsRun: 0, + unskippedTestsRun: 0, + childModules: [], + suiteReport: new SuiteReport(name, parentSuite), + + // Pass along `skip` and `todo` properties from parent module, in case + // there is one, to childs. And use own otherwise. + // This property will be used to mark own tests and tests of child suites + // as either `skipped` or `todo`. + skip: skip$$1, + todo: skip$$1 ? false : todo$$1 + }; + + var env = {}; + if (parentModule) { + parentModule.childModules.push(module); + extend(env, parentModule.testEnvironment); + } + extend(env, testEnvironment); + module.testEnvironment = env; + + config.modules.push(module); + return module; + } + + function processModule(name, options, executeNow) { + var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + var module = createModule(name, options, modifiers); + + // Move any hooks to a 'hooks' object + var testEnvironment = module.testEnvironment; + var hooks = module.hooks = {}; + + setHookFromEnvironment(hooks, testEnvironment, "before"); + setHookFromEnvironment(hooks, testEnvironment, "beforeEach"); + setHookFromEnvironment(hooks, testEnvironment, "afterEach"); + setHookFromEnvironment(hooks, testEnvironment, "after"); + + function setHookFromEnvironment(hooks, environment, name) { + var potentialHook = environment[name]; + hooks[name] = typeof potentialHook === "function" ? [potentialHook] : []; + delete environment[name]; + } + + var moduleFns = { + before: setHookFunction(module, "before"), + beforeEach: setHookFunction(module, "beforeEach"), + afterEach: setHookFunction(module, "afterEach"), + after: setHookFunction(module, "after") + }; + + var currentModule = config.currentModule; + if (objectType(executeNow) === "function") { + moduleStack.push(module); + config.currentModule = module; + executeNow.call(module.testEnvironment, moduleFns); + moduleStack.pop(); + module = module.parentModule || currentModule; + } + + config.currentModule = module; + } + + // TODO: extract this to a new file alongside its related functions + function module$1(name, options, executeNow) { + if (focused) { + return; + } + + if (arguments.length === 2) { + if (objectType(options) === "function") { + executeNow = options; + options = undefined; + } + } + + processModule(name, options, executeNow); + } + + module$1.only = function () { + if (focused) { + return; + } + + config.modules.length = 0; + config.queue.length = 0; + + module$1.apply(undefined, arguments); + + focused = true; + }; + + module$1.skip = function (name, options, executeNow) { + if (focused) { + return; + } + + if (arguments.length === 2) { + if (objectType(options) === "function") { + executeNow = options; + options = undefined; + } + } + + processModule(name, options, executeNow, { skip: true }); + }; + + module$1.todo = function (name, options, executeNow) { + if (focused) { + return; + } + + if (arguments.length === 2) { + if (objectType(options) === "function") { + executeNow = options; + options = undefined; + } + } + + processModule(name, options, executeNow, { todo: true }); + }; + + extend(QUnit, { + on: on, + + module: module$1, + + test: test, + + todo: todo, + + skip: skip, + + only: only, + + start: function start(count) { + var globalStartAlreadyCalled = globalStartCalled; + + if (!config.current) { + globalStartCalled = true; + + if (runStarted) { + throw new Error("Called start() while test already started running"); + } else if (globalStartAlreadyCalled || count > 1) { + throw new Error("Called start() outside of a test context too many times"); + } else if (config.autostart) { + throw new Error("Called start() outside of a test context when " + "QUnit.config.autostart was true"); + } else if (!config.pageLoaded) { + + // The page isn't completely loaded yet, so we set autostart and then + // load if we're in Node or wait for the browser's load event. + config.autostart = true; + + // Starts from Node even if .load was not previously called. We still return + // early otherwise we'll wind up "beginning" twice. + if (!defined.document) { + QUnit.load(); + } + + return; + } + } else { + throw new Error("QUnit.start cannot be called inside a test context."); + } + + scheduleBegin(); + }, + + config: config, + + is: is, + + objectType: objectType, + + extend: extend, + + load: function load() { + config.pageLoaded = true; + + // Initialize the configuration options + extend(config, { + stats: { all: 0, bad: 0 }, + started: 0, + updateRate: 1000, + autostart: true, + filter: "" + }, true); + + if (!runStarted) { + config.blocking = false; + + if (config.autostart) { + scheduleBegin(); + } + } + }, + + stack: function stack(offset) { + offset = (offset || 0) + 2; + return sourceFromStacktrace(offset); + }, + + onError: onError, + + onUnhandledRejection: onUnhandledRejection + }); + + QUnit.pushFailure = pushFailure; + QUnit.assert = Assert.prototype; + QUnit.equiv = equiv; + QUnit.dump = dump; + + registerLoggingCallbacks(QUnit); + + function scheduleBegin() { + + runStarted = true; + + // Add a slight delay to allow definition of more modules and tests. + if (defined.setTimeout) { + setTimeout(function () { + begin(); + }); + } else { + begin(); + } + } + + function begin() { + var i, + l, + modulesLog = []; + + // If the test run hasn't officially begun yet + if (!config.started) { + + // Record the time of the test run's beginning + config.started = now(); + + // Delete the loose unnamed module if unused. + if (config.modules[0].name === "" && config.modules[0].tests.length === 0) { + config.modules.shift(); + } + + // Avoid unnecessary information by not logging modules' test environments + for (i = 0, l = config.modules.length; i < l; i++) { + modulesLog.push({ + name: config.modules[i].name, + tests: config.modules[i].tests + }); + } + + // The test run is officially beginning now + emit("runStart", globalSuite.start(true)); + runLoggingCallbacks("begin", { + totalTests: Test.count, + modules: modulesLog + }); + } + + config.blocking = false; + ProcessingQueue.advance(); + } + + function setHookFunction(module, hookName) { + return function setHook(callback) { + module.hooks[hookName].push(callback); + }; + } + + exportQUnit(QUnit); + + (function () { + + if (typeof window === "undefined" || typeof document === "undefined") { + return; + } + + var config = QUnit.config, + hasOwn = Object.prototype.hasOwnProperty; + + // Stores fixture HTML for resetting later + function storeFixture() { + + // Avoid overwriting user-defined values + if (hasOwn.call(config, "fixture")) { + return; + } + + var fixture = document.getElementById("qunit-fixture"); + if (fixture) { + config.fixture = fixture.cloneNode(true); + } + } + + QUnit.begin(storeFixture); + + // Resets the fixture DOM element if available. + function resetFixture() { + if (config.fixture == null) { + return; + } + + var fixture = document.getElementById("qunit-fixture"); + var resetFixtureType = _typeof(config.fixture); + if (resetFixtureType === "string") { + + // support user defined values for `config.fixture` + var newFixture = document.createElement("div"); + newFixture.setAttribute("id", "qunit-fixture"); + newFixture.innerHTML = config.fixture; + fixture.parentNode.replaceChild(newFixture, fixture); + } else { + var clonedFixture = config.fixture.cloneNode(true); + fixture.parentNode.replaceChild(clonedFixture, fixture); + } + } + + QUnit.testStart(resetFixture); + })(); + + (function () { + + // Only interact with URLs via window.location + var location = typeof window !== "undefined" && window.location; + if (!location) { + return; + } + + var urlParams = getUrlParams(); + + QUnit.urlParams = urlParams; + + // Match module/test by inclusion in an array + QUnit.config.moduleId = [].concat(urlParams.moduleId || []); + QUnit.config.testId = [].concat(urlParams.testId || []); + + // Exact case-insensitive match of the module name + QUnit.config.module = urlParams.module; + + // Regular expression or case-insenstive substring match against "moduleName: testName" + QUnit.config.filter = urlParams.filter; + + // Test order randomization + if (urlParams.seed === true) { + + // Generate a random seed if the option is specified without a value + QUnit.config.seed = Math.random().toString(36).slice(2); + } else if (urlParams.seed) { + QUnit.config.seed = urlParams.seed; + } + + // Add URL-parameter-mapped config values with UI form rendering data + QUnit.config.urlConfig.push({ + id: "hidepassed", + label: "Hide passed tests", + tooltip: "Only show tests and assertions that fail. Stored as query-strings." + }, { + id: "noglobals", + label: "Check for Globals", + tooltip: "Enabling this will test if any test introduces new properties on the " + "global object (`window` in Browsers). Stored as query-strings." + }, { + id: "notrycatch", + label: "No try-catch", + tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging " + "exceptions in IE reasonable. Stored as query-strings." + }); + + QUnit.begin(function () { + var i, + option, + urlConfig = QUnit.config.urlConfig; + + for (i = 0; i < urlConfig.length; i++) { + + // Options can be either strings or objects with nonempty "id" properties + option = QUnit.config.urlConfig[i]; + if (typeof option !== "string") { + option = option.id; + } + + if (QUnit.config[option] === undefined) { + QUnit.config[option] = urlParams[option]; + } + } + }); + + function getUrlParams() { + var i, param, name, value; + var urlParams = Object.create(null); + var params = location.search.slice(1).split("&"); + var length = params.length; + + for (i = 0; i < length; i++) { + if (params[i]) { + param = params[i].split("="); + name = decodeQueryParam(param[0]); + + // Allow just a key to turn on a flag, e.g., test.html?noglobals + value = param.length === 1 || decodeQueryParam(param.slice(1).join("=")); + if (name in urlParams) { + urlParams[name] = [].concat(urlParams[name], value); + } else { + urlParams[name] = value; + } + } + } + + return urlParams; + } + + function decodeQueryParam(param) { + return decodeURIComponent(param.replace(/\+/g, "%20")); + } + })(); + + var stats = { + passedTests: 0, + failedTests: 0, + skippedTests: 0, + todoTests: 0 + }; + + // Escape text for attribute or text content. + function escapeText(s) { + if (!s) { + return ""; + } + s = s + ""; + + // Both single quotes and double quotes (for attributes) + return s.replace(/['"<>&]/g, function (s) { + switch (s) { + case "'": + return "'"; + case "\"": + return """; + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + } + }); + } + + (function () { + + // Don't load the HTML Reporter on non-browser environments + if (typeof window === "undefined" || !window.document) { + return; + } + + var config = QUnit.config, + document$$1 = window.document, + collapseNext = false, + hasOwn = Object.prototype.hasOwnProperty, + unfilteredUrl = setUrl({ filter: undefined, module: undefined, + moduleId: undefined, testId: undefined }), + modulesList = []; + + function addEvent(elem, type, fn) { + elem.addEventListener(type, fn, false); + } + + function removeEvent(elem, type, fn) { + elem.removeEventListener(type, fn, false); + } + + function addEvents(elems, type, fn) { + var i = elems.length; + while (i--) { + addEvent(elems[i], type, fn); + } + } + + function hasClass(elem, name) { + return (" " + elem.className + " ").indexOf(" " + name + " ") >= 0; + } + + function addClass(elem, name) { + if (!hasClass(elem, name)) { + elem.className += (elem.className ? " " : "") + name; + } + } + + function toggleClass(elem, name, force) { + if (force || typeof force === "undefined" && !hasClass(elem, name)) { + addClass(elem, name); + } else { + removeClass(elem, name); + } + } + + function removeClass(elem, name) { + var set = " " + elem.className + " "; + + // Class name may appear multiple times + while (set.indexOf(" " + name + " ") >= 0) { + set = set.replace(" " + name + " ", " "); + } + + // Trim for prettiness + elem.className = typeof set.trim === "function" ? set.trim() : set.replace(/^\s+|\s+$/g, ""); + } + + function id(name) { + return document$$1.getElementById && document$$1.getElementById(name); + } + + function abortTests() { + var abortButton = id("qunit-abort-tests-button"); + if (abortButton) { + abortButton.disabled = true; + abortButton.innerHTML = "Aborting..."; + } + QUnit.config.queue.length = 0; + return false; + } + + function interceptNavigation(ev) { + applyUrlParams(); + + if (ev && ev.preventDefault) { + ev.preventDefault(); + } + + return false; + } + + function getUrlConfigHtml() { + var i, + j, + val, + escaped, + escapedTooltip, + selection = false, + urlConfig = config.urlConfig, + urlConfigHtml = ""; + + for (i = 0; i < urlConfig.length; i++) { + + // Options can be either strings or objects with nonempty "id" properties + val = config.urlConfig[i]; + if (typeof val === "string") { + val = { + id: val, + label: val + }; + } + + escaped = escapeText(val.id); + escapedTooltip = escapeText(val.tooltip); + + if (!val.value || typeof val.value === "string") { + urlConfigHtml += ""; + } else { + urlConfigHtml += ""; + } + } + + return urlConfigHtml; + } + + // Handle "click" events on toolbar checkboxes and "change" for select menus. + // Updates the URL with the new state of `config.urlConfig` values. + function toolbarChanged() { + var updatedUrl, + value, + tests, + field = this, + params = {}; + + // Detect if field is a select menu or a checkbox + if ("selectedIndex" in field) { + value = field.options[field.selectedIndex].value || undefined; + } else { + value = field.checked ? field.defaultValue || true : undefined; + } + + params[field.name] = value; + updatedUrl = setUrl(params); + + // Check if we can apply the change without a page refresh + if ("hidepassed" === field.name && "replaceState" in window.history) { + QUnit.urlParams[field.name] = value; + config[field.name] = value || false; + tests = id("qunit-tests"); + if (tests) { + toggleClass(tests, "hidepass", value || false); + } + window.history.replaceState(null, "", updatedUrl); + } else { + window.location = updatedUrl; + } + } + + function setUrl(params) { + var key, + arrValue, + i, + querystring = "?", + location = window.location; + + params = QUnit.extend(QUnit.extend({}, QUnit.urlParams), params); + + for (key in params) { + + // Skip inherited or undefined properties + if (hasOwn.call(params, key) && params[key] !== undefined) { + + // Output a parameter for each value of this key + // (but usually just one) + arrValue = [].concat(params[key]); + for (i = 0; i < arrValue.length; i++) { + querystring += encodeURIComponent(key); + if (arrValue[i] !== true) { + querystring += "=" + encodeURIComponent(arrValue[i]); + } + querystring += "&"; + } + } + } + return location.protocol + "//" + location.host + location.pathname + querystring.slice(0, -1); + } + + function applyUrlParams() { + var i, + selectedModules = [], + modulesList = id("qunit-modulefilter-dropdown-list").getElementsByTagName("input"), + filter = id("qunit-filter-input").value; + + for (i = 0; i < modulesList.length; i++) { + if (modulesList[i].checked) { + selectedModules.push(modulesList[i].value); + } + } + + window.location = setUrl({ + filter: filter === "" ? undefined : filter, + moduleId: selectedModules.length === 0 ? undefined : selectedModules, + + // Remove module and testId filter + module: undefined, + testId: undefined + }); + } + + function toolbarUrlConfigContainer() { + var urlConfigContainer = document$$1.createElement("span"); + + urlConfigContainer.innerHTML = getUrlConfigHtml(); + addClass(urlConfigContainer, "qunit-url-config"); + + addEvents(urlConfigContainer.getElementsByTagName("input"), "change", toolbarChanged); + addEvents(urlConfigContainer.getElementsByTagName("select"), "change", toolbarChanged); + + return urlConfigContainer; + } + + function abortTestsButton() { + var button = document$$1.createElement("button"); + button.id = "qunit-abort-tests-button"; + button.innerHTML = "Abort"; + addEvent(button, "click", abortTests); + return button; + } + + function toolbarLooseFilter() { + var filter = document$$1.createElement("form"), + label = document$$1.createElement("label"), + input = document$$1.createElement("input"), + button = document$$1.createElement("button"); + + addClass(filter, "qunit-filter"); + + label.innerHTML = "Filter: "; + + input.type = "text"; + input.value = config.filter || ""; + input.name = "filter"; + input.id = "qunit-filter-input"; + + button.innerHTML = "Go"; + + label.appendChild(input); + + filter.appendChild(label); + filter.appendChild(document$$1.createTextNode(" ")); + filter.appendChild(button); + addEvent(filter, "submit", interceptNavigation); + + return filter; + } + + function moduleListHtml() { + var i, + checked, + html = ""; + + for (i = 0; i < config.modules.length; i++) { + if (config.modules[i].name !== "") { + checked = config.moduleId.indexOf(config.modules[i].moduleId) > -1; + html += "
  • "; + } + } + + return html; + } + + function toolbarModuleFilter() { + var allCheckbox, + commit, + reset, + moduleFilter = document$$1.createElement("form"), + label = document$$1.createElement("label"), + moduleSearch = document$$1.createElement("input"), + dropDown = document$$1.createElement("div"), + actions = document$$1.createElement("span"), + dropDownList = document$$1.createElement("ul"), + dirty = false; + + moduleSearch.id = "qunit-modulefilter-search"; + addEvent(moduleSearch, "input", searchInput); + addEvent(moduleSearch, "input", searchFocus); + addEvent(moduleSearch, "focus", searchFocus); + addEvent(moduleSearch, "click", searchFocus); + + label.id = "qunit-modulefilter-search-container"; + label.innerHTML = "Module: "; + label.appendChild(moduleSearch); + + actions.id = "qunit-modulefilter-actions"; + actions.innerHTML = "" + "" + ""; + allCheckbox = actions.lastChild.firstChild; + commit = actions.firstChild; + reset = commit.nextSibling; + addEvent(commit, "click", applyUrlParams); + + dropDownList.id = "qunit-modulefilter-dropdown-list"; + dropDownList.innerHTML = moduleListHtml(); + + dropDown.id = "qunit-modulefilter-dropdown"; + dropDown.style.display = "none"; + dropDown.appendChild(actions); + dropDown.appendChild(dropDownList); + addEvent(dropDown, "change", selectionChange); + selectionChange(); + + moduleFilter.id = "qunit-modulefilter"; + moduleFilter.appendChild(label); + moduleFilter.appendChild(dropDown); + addEvent(moduleFilter, "submit", interceptNavigation); + addEvent(moduleFilter, "reset", function () { + + // Let the reset happen, then update styles + window.setTimeout(selectionChange); + }); + + // Enables show/hide for the dropdown + function searchFocus() { + if (dropDown.style.display !== "none") { + return; + } + + dropDown.style.display = "block"; + addEvent(document$$1, "click", hideHandler); + addEvent(document$$1, "keydown", hideHandler); + + // Hide on Escape keydown or outside-container click + function hideHandler(e) { + var inContainer = moduleFilter.contains(e.target); + + if (e.keyCode === 27 || !inContainer) { + if (e.keyCode === 27 && inContainer) { + moduleSearch.focus(); + } + dropDown.style.display = "none"; + removeEvent(document$$1, "click", hideHandler); + removeEvent(document$$1, "keydown", hideHandler); + moduleSearch.value = ""; + searchInput(); + } + } + } + + // Processes module search box input + function searchInput() { + var i, + item, + searchText = moduleSearch.value.toLowerCase(), + listItems = dropDownList.children; + + for (i = 0; i < listItems.length; i++) { + item = listItems[i]; + if (!searchText || item.textContent.toLowerCase().indexOf(searchText) > -1) { + item.style.display = ""; + } else { + item.style.display = "none"; + } + } + } + + // Processes selection changes + function selectionChange(evt) { + var i, + item, + checkbox = evt && evt.target || allCheckbox, + modulesList = dropDownList.getElementsByTagName("input"), + selectedNames = []; + + toggleClass(checkbox.parentNode, "checked", checkbox.checked); + + dirty = false; + if (checkbox.checked && checkbox !== allCheckbox) { + allCheckbox.checked = false; + removeClass(allCheckbox.parentNode, "checked"); + } + for (i = 0; i < modulesList.length; i++) { + item = modulesList[i]; + if (!evt) { + toggleClass(item.parentNode, "checked", item.checked); + } else if (checkbox === allCheckbox && checkbox.checked) { + item.checked = false; + removeClass(item.parentNode, "checked"); + } + dirty = dirty || item.checked !== item.defaultChecked; + if (item.checked) { + selectedNames.push(item.parentNode.textContent); + } + } + + commit.style.display = reset.style.display = dirty ? "" : "none"; + moduleSearch.placeholder = selectedNames.join(", ") || allCheckbox.parentNode.textContent; + moduleSearch.title = "Type to filter list. Current selection:\n" + (selectedNames.join("\n") || allCheckbox.parentNode.textContent); + } + + return moduleFilter; + } + + function appendToolbar() { + var toolbar = id("qunit-testrunner-toolbar"); + + if (toolbar) { + toolbar.appendChild(toolbarUrlConfigContainer()); + toolbar.appendChild(toolbarModuleFilter()); + toolbar.appendChild(toolbarLooseFilter()); + toolbar.appendChild(document$$1.createElement("div")).className = "clearfix"; + } + } + + function appendHeader() { + var header = id("qunit-header"); + + if (header) { + header.innerHTML = "" + header.innerHTML + " "; + } + } + + function appendBanner() { + var banner = id("qunit-banner"); + + if (banner) { + banner.className = ""; + } + } + + function appendTestResults() { + var tests = id("qunit-tests"), + result = id("qunit-testresult"), + controls; + + if (result) { + result.parentNode.removeChild(result); + } + + if (tests) { + tests.innerHTML = ""; + result = document$$1.createElement("p"); + result.id = "qunit-testresult"; + result.className = "result"; + tests.parentNode.insertBefore(result, tests); + result.innerHTML = "
    Running...
     
    " + "
    " + "
    "; + controls = id("qunit-testresult-controls"); + } + + if (controls) { + controls.appendChild(abortTestsButton()); + } + } + + function appendFilteredTest() { + var testId = QUnit.config.testId; + if (!testId || testId.length <= 0) { + return ""; + } + return "
    Rerunning selected tests: " + escapeText(testId.join(", ")) + " Run all tests
    "; + } + + function appendUserAgent() { + var userAgent = id("qunit-userAgent"); + + if (userAgent) { + userAgent.innerHTML = ""; + userAgent.appendChild(document$$1.createTextNode("QUnit " + QUnit.version + "; " + navigator.userAgent)); + } + } + + function appendInterface() { + var qunit = id("qunit"); + + if (qunit) { + qunit.innerHTML = "

    " + escapeText(document$$1.title) + "

    " + "

    " + "
    " + appendFilteredTest() + "

    " + "
      "; + } + + appendHeader(); + appendBanner(); + appendTestResults(); + appendUserAgent(); + appendToolbar(); + } + + function appendTestsList(modules) { + var i, l, x, z, test, moduleObj; + + for (i = 0, l = modules.length; i < l; i++) { + moduleObj = modules[i]; + + for (x = 0, z = moduleObj.tests.length; x < z; x++) { + test = moduleObj.tests[x]; + + appendTest(test.name, test.testId, moduleObj.name); + } + } + } + + function appendTest(name, testId, moduleName) { + var title, + rerunTrigger, + testBlock, + assertList, + tests = id("qunit-tests"); + + if (!tests) { + return; + } + + title = document$$1.createElement("strong"); + title.innerHTML = getNameHtml(name, moduleName); + + rerunTrigger = document$$1.createElement("a"); + rerunTrigger.innerHTML = "Rerun"; + rerunTrigger.href = setUrl({ testId: testId }); + + testBlock = document$$1.createElement("li"); + testBlock.appendChild(title); + testBlock.appendChild(rerunTrigger); + testBlock.id = "qunit-test-output-" + testId; + + assertList = document$$1.createElement("ol"); + assertList.className = "qunit-assert-list"; + + testBlock.appendChild(assertList); + + tests.appendChild(testBlock); + } + + // HTML Reporter initialization and load + QUnit.begin(function (details) { + var i, moduleObj, tests; + + // Sort modules by name for the picker + for (i = 0; i < details.modules.length; i++) { + moduleObj = details.modules[i]; + if (moduleObj.name) { + modulesList.push(moduleObj.name); + } + } + modulesList.sort(function (a, b) { + return a.localeCompare(b); + }); + + // Initialize QUnit elements + appendInterface(); + appendTestsList(details.modules); + tests = id("qunit-tests"); + if (tests && config.hidepassed) { + addClass(tests, "hidepass"); + } + }); + + QUnit.done(function (details) { + var banner = id("qunit-banner"), + tests = id("qunit-tests"), + abortButton = id("qunit-abort-tests-button"), + totalTests = stats.passedTests + stats.skippedTests + stats.todoTests + stats.failedTests, + html = [totalTests, " tests completed in ", details.runtime, " milliseconds, with ", stats.failedTests, " failed, ", stats.skippedTests, " skipped, and ", stats.todoTests, " todo.
      ", "", details.passed, " assertions of ", details.total, " passed, ", details.failed, " failed."].join(""), + test, + assertLi, + assertList; + + // Update remaing tests to aborted + if (abortButton && abortButton.disabled) { + html = "Tests aborted after " + details.runtime + " milliseconds."; + + for (var i = 0; i < tests.children.length; i++) { + test = tests.children[i]; + if (test.className === "" || test.className === "running") { + test.className = "aborted"; + assertList = test.getElementsByTagName("ol")[0]; + assertLi = document$$1.createElement("li"); + assertLi.className = "fail"; + assertLi.innerHTML = "Test aborted."; + assertList.appendChild(assertLi); + } + } + } + + if (banner && (!abortButton || abortButton.disabled === false)) { + banner.className = stats.failedTests ? "qunit-fail" : "qunit-pass"; + } + + if (abortButton) { + abortButton.parentNode.removeChild(abortButton); + } + + if (tests) { + id("qunit-testresult-display").innerHTML = html; + } + + if (config.altertitle && document$$1.title) { + + // Show ✖ for good, ✔ for bad suite result in title + // use escape sequences in case file gets loaded with non-utf-8 + // charset + document$$1.title = [stats.failedTests ? "\u2716" : "\u2714", document$$1.title.replace(/^[\u2714\u2716] /i, "")].join(" "); + } + + // Scroll back to top to show results + if (config.scrolltop && window.scrollTo) { + window.scrollTo(0, 0); + } + }); + + function getNameHtml(name, module) { + var nameHtml = ""; + + if (module) { + nameHtml = "" + escapeText(module) + ": "; + } + + nameHtml += "" + escapeText(name) + ""; + + return nameHtml; + } + + QUnit.testStart(function (details) { + var running, testBlock, bad; + + testBlock = id("qunit-test-output-" + details.testId); + if (testBlock) { + testBlock.className = "running"; + } else { + + // Report later registered tests + appendTest(details.name, details.testId, details.module); + } + + running = id("qunit-testresult-display"); + if (running) { + bad = QUnit.config.reorder && details.previousFailure; + + running.innerHTML = [bad ? "Rerunning previously failed test:
      " : "Running:
      ", getNameHtml(details.name, details.module)].join(""); + } + }); + + function stripHtml(string) { + + // Strip tags, html entity and whitespaces + return string.replace(/<\/?[^>]+(>|$)/g, "").replace(/\"/g, "").replace(/\s+/g, ""); + } + + QUnit.log(function (details) { + var assertList, + assertLi, + message, + expected, + actual, + diff, + showDiff = false, + testItem = id("qunit-test-output-" + details.testId); + + if (!testItem) { + return; + } + + message = escapeText(details.message) || (details.result ? "okay" : "failed"); + message = "" + message + ""; + message += "@ " + details.runtime + " ms"; + + // The pushFailure doesn't provide details.expected + // when it calls, it's implicit to also not show expected and diff stuff + // Also, we need to check details.expected existence, as it can exist and be undefined + if (!details.result && hasOwn.call(details, "expected")) { + if (details.negative) { + expected = "NOT " + QUnit.dump.parse(details.expected); + } else { + expected = QUnit.dump.parse(details.expected); + } + + actual = QUnit.dump.parse(details.actual); + message += ""; + + if (actual !== expected) { + + message += ""; + + if (typeof details.actual === "number" && typeof details.expected === "number") { + if (!isNaN(details.actual) && !isNaN(details.expected)) { + showDiff = true; + diff = details.actual - details.expected; + diff = (diff > 0 ? "+" : "") + diff; + } + } else if (typeof details.actual !== "boolean" && typeof details.expected !== "boolean") { + diff = QUnit.diff(expected, actual); + + // don't show diff if there is zero overlap + showDiff = stripHtml(diff).length !== stripHtml(expected).length + stripHtml(actual).length; + } + + if (showDiff) { + message += ""; + } + } else if (expected.indexOf("[object Array]") !== -1 || expected.indexOf("[object Object]") !== -1) { + message += ""; + } else { + message += ""; + } + + if (details.source) { + message += ""; + } + + message += "
      Expected:
      " + escapeText(expected) + "
      Result:
      " + escapeText(actual) + "
      Diff:
      " + diff + "
      Message: " + "Diff suppressed as the depth of object is more than current max depth (" + QUnit.config.maxDepth + ").

      Hint: Use QUnit.dump.maxDepth to " + " run with a higher max depth or " + "Rerun without max depth.

      Message: " + "Diff suppressed as the expected and actual results have an equivalent" + " serialization
      Source:
      " + escapeText(details.source) + "
      "; + + // This occurs when pushFailure is set and we have an extracted stack trace + } else if (!details.result && details.source) { + message += "" + "" + "
      Source:
      " + escapeText(details.source) + "
      "; + } + + assertList = testItem.getElementsByTagName("ol")[0]; + + assertLi = document$$1.createElement("li"); + assertLi.className = details.result ? "pass" : "fail"; + assertLi.innerHTML = message; + assertList.appendChild(assertLi); + }); + + QUnit.testDone(function (details) { + var testTitle, + time, + testItem, + assertList, + good, + bad, + testCounts, + skipped, + sourceName, + tests = id("qunit-tests"); + + if (!tests) { + return; + } + + testItem = id("qunit-test-output-" + details.testId); + + assertList = testItem.getElementsByTagName("ol")[0]; + + good = details.passed; + bad = details.failed; + + // This test passed if it has no unexpected failed assertions + var testPassed = details.failed > 0 ? details.todo : !details.todo; + + if (testPassed) { + + // Collapse the passing tests + addClass(assertList, "qunit-collapsed"); + } else if (config.collapse) { + if (!collapseNext) { + + // Skip collapsing the first failing test + collapseNext = true; + } else { + + // Collapse remaining tests + addClass(assertList, "qunit-collapsed"); + } + } + + // The testItem.firstChild is the test name + testTitle = testItem.firstChild; + + testCounts = bad ? "" + bad + ", " + "" + good + ", " : ""; + + testTitle.innerHTML += " (" + testCounts + details.assertions.length + ")"; + + if (details.skipped) { + stats.skippedTests++; + + testItem.className = "skipped"; + skipped = document$$1.createElement("em"); + skipped.className = "qunit-skipped-label"; + skipped.innerHTML = "skipped"; + testItem.insertBefore(skipped, testTitle); + } else { + addEvent(testTitle, "click", function () { + toggleClass(assertList, "qunit-collapsed"); + }); + + testItem.className = testPassed ? "pass" : "fail"; + + if (details.todo) { + var todoLabel = document$$1.createElement("em"); + todoLabel.className = "qunit-todo-label"; + todoLabel.innerHTML = "todo"; + testItem.className += " todo"; + testItem.insertBefore(todoLabel, testTitle); + } + + time = document$$1.createElement("span"); + time.className = "runtime"; + time.innerHTML = details.runtime + " ms"; + testItem.insertBefore(time, assertList); + + if (!testPassed) { + stats.failedTests++; + } else if (details.todo) { + stats.todoTests++; + } else { + stats.passedTests++; + } + } + + // Show the source of the test when showing assertions + if (details.source) { + sourceName = document$$1.createElement("p"); + sourceName.innerHTML = "Source: " + details.source; + addClass(sourceName, "qunit-source"); + if (testPassed) { + addClass(sourceName, "qunit-collapsed"); + } + addEvent(testTitle, "click", function () { + toggleClass(sourceName, "qunit-collapsed"); + }); + testItem.appendChild(sourceName); + } + }); + + // Avoid readyState issue with phantomjs + // Ref: #818 + var notPhantom = function (p) { + return !(p && p.version && p.version.major > 0); + }(window.phantom); + + if (notPhantom && document$$1.readyState === "complete") { + QUnit.load(); + } else { + addEvent(window, "load", QUnit.load); + } + + // Wrap window.onerror. We will call the original window.onerror to see if + // the existing handler fully handles the error; if not, we will call the + // QUnit.onError function. + var originalWindowOnError = window.onerror; + + // Cover uncaught exceptions + // Returning true will suppress the default browser handler, + // returning false will let it run. + window.onerror = function (message, fileName, lineNumber) { + var ret = false; + if (originalWindowOnError) { + for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + args[_key - 3] = arguments[_key]; + } + + ret = originalWindowOnError.call.apply(originalWindowOnError, [this, message, fileName, lineNumber].concat(args)); + } + + // Treat return value as window.onerror itself does, + // Only do our handling if not suppressed. + if (ret !== true) { + var error = { + message: message, + fileName: fileName, + lineNumber: lineNumber + }; + + ret = QUnit.onError(error); + } + + return ret; + }; + + // Listen for unhandled rejections, and call QUnit.onUnhandledRejection + window.addEventListener("unhandledrejection", function (event) { + QUnit.onUnhandledRejection(event.reason); + }); + })(); + + /* + * This file is a modified version of google-diff-match-patch's JavaScript implementation + * (https://code.google.com/p/google-diff-match-patch/source/browse/trunk/javascript/diff_match_patch_uncompressed.js), + * modifications are licensed as more fully set forth in LICENSE.txt. + * + * The original source of google-diff-match-patch is attributable and licensed as follows: + * + * Copyright 2006 Google Inc. + * https://code.google.com/p/google-diff-match-patch/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * More Info: + * https://code.google.com/p/google-diff-match-patch/ + * + * Usage: QUnit.diff(expected, actual) + * + */ + QUnit.diff = function () { + function DiffMatchPatch() {} + + // DIFF FUNCTIONS + + /** + * The data structure representing a diff is an array of tuples: + * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] + * which means: delete 'Hello', add 'Goodbye' and keep ' world.' + */ + var DIFF_DELETE = -1, + DIFF_INSERT = 1, + DIFF_EQUAL = 0; + + /** + * Find the differences between two texts. Simplifies the problem by stripping + * any common prefix or suffix off the texts before diffing. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @param {boolean=} optChecklines Optional speedup flag. If present and false, + * then don't run a line-level diff first to identify the changed areas. + * Defaults to true, which does a faster, slightly less optimal diff. + * @return {!Array.} Array of diff tuples. + */ + DiffMatchPatch.prototype.DiffMain = function (text1, text2, optChecklines) { + var deadline, checklines, commonlength, commonprefix, commonsuffix, diffs; + + // The diff must be complete in up to 1 second. + deadline = new Date().getTime() + 1000; + + // Check for null inputs. + if (text1 === null || text2 === null) { + throw new Error("Null input. (DiffMain)"); + } + + // Check for equality (speedup). + if (text1 === text2) { + if (text1) { + return [[DIFF_EQUAL, text1]]; + } + return []; + } + + if (typeof optChecklines === "undefined") { + optChecklines = true; + } + + checklines = optChecklines; + + // Trim off common prefix (speedup). + commonlength = this.diffCommonPrefix(text1, text2); + commonprefix = text1.substring(0, commonlength); + text1 = text1.substring(commonlength); + text2 = text2.substring(commonlength); + + // Trim off common suffix (speedup). + commonlength = this.diffCommonSuffix(text1, text2); + commonsuffix = text1.substring(text1.length - commonlength); + text1 = text1.substring(0, text1.length - commonlength); + text2 = text2.substring(0, text2.length - commonlength); + + // Compute the diff on the middle block. + diffs = this.diffCompute(text1, text2, checklines, deadline); + + // Restore the prefix and suffix. + if (commonprefix) { + diffs.unshift([DIFF_EQUAL, commonprefix]); + } + if (commonsuffix) { + diffs.push([DIFF_EQUAL, commonsuffix]); + } + this.diffCleanupMerge(diffs); + return diffs; + }; + + /** + * Reduce the number of edits by eliminating operationally trivial equalities. + * @param {!Array.} diffs Array of diff tuples. + */ + DiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) { + var changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel; + changes = false; + equalities = []; // Stack of indices where equalities are found. + equalitiesLength = 0; // Keeping our own length var is faster in JS. + /** @type {?string} */ + lastequality = null; + + // Always equal to diffs[equalities[equalitiesLength - 1]][1] + pointer = 0; // Index of current position. + + // Is there an insertion operation before the last equality. + preIns = false; + + // Is there a deletion operation before the last equality. + preDel = false; + + // Is there an insertion operation after the last equality. + postIns = false; + + // Is there a deletion operation after the last equality. + postDel = false; + while (pointer < diffs.length) { + + // Equality found. + if (diffs[pointer][0] === DIFF_EQUAL) { + if (diffs[pointer][1].length < 4 && (postIns || postDel)) { + + // Candidate found. + equalities[equalitiesLength++] = pointer; + preIns = postIns; + preDel = postDel; + lastequality = diffs[pointer][1]; + } else { + + // Not a candidate, and can never become one. + equalitiesLength = 0; + lastequality = null; + } + postIns = postDel = false; + + // An insertion or deletion. + } else { + + if (diffs[pointer][0] === DIFF_DELETE) { + postDel = true; + } else { + postIns = true; + } + + /* + * Five types to be split: + * ABXYCD + * AXCD + * ABXC + * AXCD + * ABXC + */ + if (lastequality && (preIns && preDel && postIns && postDel || lastequality.length < 2 && preIns + preDel + postIns + postDel === 3)) { + + // Duplicate record. + diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); + + // Change second copy to insert. + diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; + equalitiesLength--; // Throw away the equality we just deleted; + lastequality = null; + if (preIns && preDel) { + + // No changes made which could affect previous entry, keep going. + postIns = postDel = true; + equalitiesLength = 0; + } else { + equalitiesLength--; // Throw away the previous equality. + pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1; + postIns = postDel = false; + } + changes = true; + } + } + pointer++; + } + + if (changes) { + this.diffCleanupMerge(diffs); + } + }; + + /** + * Convert a diff array into a pretty HTML report. + * @param {!Array.} diffs Array of diff tuples. + * @param {integer} string to be beautified. + * @return {string} HTML representation. + */ + DiffMatchPatch.prototype.diffPrettyHtml = function (diffs) { + var op, + data, + x, + html = []; + for (x = 0; x < diffs.length; x++) { + op = diffs[x][0]; // Operation (insert, delete, equal) + data = diffs[x][1]; // Text of change. + switch (op) { + case DIFF_INSERT: + html[x] = "" + escapeText(data) + ""; + break; + case DIFF_DELETE: + html[x] = "" + escapeText(data) + ""; + break; + case DIFF_EQUAL: + html[x] = "" + escapeText(data) + ""; + break; + } + } + return html.join(""); + }; + + /** + * Determine the common prefix of two strings. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {number} The number of characters common to the start of each + * string. + */ + DiffMatchPatch.prototype.diffCommonPrefix = function (text1, text2) { + var pointermid, pointermax, pointermin, pointerstart; + + // Quick check for common null cases. + if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) { + return 0; + } + + // Binary search. + // Performance analysis: https://neil.fraser.name/news/2007/10/09/ + pointermin = 0; + pointermax = Math.min(text1.length, text2.length); + pointermid = pointermax; + pointerstart = 0; + while (pointermin < pointermid) { + if (text1.substring(pointerstart, pointermid) === text2.substring(pointerstart, pointermid)) { + pointermin = pointermid; + pointerstart = pointermin; + } else { + pointermax = pointermid; + } + pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + } + return pointermid; + }; + + /** + * Determine the common suffix of two strings. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {number} The number of characters common to the end of each string. + */ + DiffMatchPatch.prototype.diffCommonSuffix = function (text1, text2) { + var pointermid, pointermax, pointermin, pointerend; + + // Quick check for common null cases. + if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) { + return 0; + } + + // Binary search. + // Performance analysis: https://neil.fraser.name/news/2007/10/09/ + pointermin = 0; + pointermax = Math.min(text1.length, text2.length); + pointermid = pointermax; + pointerend = 0; + while (pointermin < pointermid) { + if (text1.substring(text1.length - pointermid, text1.length - pointerend) === text2.substring(text2.length - pointermid, text2.length - pointerend)) { + pointermin = pointermid; + pointerend = pointermin; + } else { + pointermax = pointermid; + } + pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + } + return pointermid; + }; + + /** + * Find the differences between two texts. Assumes that the texts do not + * have any common prefix or suffix. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @param {boolean} checklines Speedup flag. If false, then don't run a + * line-level diff first to identify the changed areas. + * If true, then run a faster, slightly less optimal diff. + * @param {number} deadline Time when the diff should be complete by. + * @return {!Array.} Array of diff tuples. + * @private + */ + DiffMatchPatch.prototype.diffCompute = function (text1, text2, checklines, deadline) { + var diffs, longtext, shorttext, i, hm, text1A, text2A, text1B, text2B, midCommon, diffsA, diffsB; + + if (!text1) { + + // Just add some text (speedup). + return [[DIFF_INSERT, text2]]; + } + + if (!text2) { + + // Just delete some text (speedup). + return [[DIFF_DELETE, text1]]; + } + + longtext = text1.length > text2.length ? text1 : text2; + shorttext = text1.length > text2.length ? text2 : text1; + i = longtext.indexOf(shorttext); + if (i !== -1) { + + // Shorter text is inside the longer text (speedup). + diffs = [[DIFF_INSERT, longtext.substring(0, i)], [DIFF_EQUAL, shorttext], [DIFF_INSERT, longtext.substring(i + shorttext.length)]]; + + // Swap insertions for deletions if diff is reversed. + if (text1.length > text2.length) { + diffs[0][0] = diffs[2][0] = DIFF_DELETE; + } + return diffs; + } + + if (shorttext.length === 1) { + + // Single character string. + // After the previous speedup, the character can't be an equality. + return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; + } + + // Check to see if the problem can be split in two. + hm = this.diffHalfMatch(text1, text2); + if (hm) { + + // A half-match was found, sort out the return data. + text1A = hm[0]; + text1B = hm[1]; + text2A = hm[2]; + text2B = hm[3]; + midCommon = hm[4]; + + // Send both pairs off for separate processing. + diffsA = this.DiffMain(text1A, text2A, checklines, deadline); + diffsB = this.DiffMain(text1B, text2B, checklines, deadline); + + // Merge the results. + return diffsA.concat([[DIFF_EQUAL, midCommon]], diffsB); + } + + if (checklines && text1.length > 100 && text2.length > 100) { + return this.diffLineMode(text1, text2, deadline); + } + + return this.diffBisect(text1, text2, deadline); + }; + + /** + * Do the two texts share a substring which is at least half the length of the + * longer text? + * This speedup can produce non-minimal diffs. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {Array.} Five element Array, containing the prefix of + * text1, the suffix of text1, the prefix of text2, the suffix of + * text2 and the common middle. Or null if there was no match. + * @private + */ + DiffMatchPatch.prototype.diffHalfMatch = function (text1, text2) { + var longtext, shorttext, dmp, text1A, text2B, text2A, text1B, midCommon, hm1, hm2, hm; + + longtext = text1.length > text2.length ? text1 : text2; + shorttext = text1.length > text2.length ? text2 : text1; + if (longtext.length < 4 || shorttext.length * 2 < longtext.length) { + return null; // Pointless. + } + dmp = this; // 'this' becomes 'window' in a closure. + + /** + * Does a substring of shorttext exist within longtext such that the substring + * is at least half the length of longtext? + * Closure, but does not reference any external variables. + * @param {string} longtext Longer string. + * @param {string} shorttext Shorter string. + * @param {number} i Start index of quarter length substring within longtext. + * @return {Array.} Five element Array, containing the prefix of + * longtext, the suffix of longtext, the prefix of shorttext, the suffix + * of shorttext and the common middle. Or null if there was no match. + * @private + */ + function diffHalfMatchI(longtext, shorttext, i) { + var seed, j, bestCommon, prefixLength, suffixLength, bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB; + + // Start with a 1/4 length substring at position i as a seed. + seed = longtext.substring(i, i + Math.floor(longtext.length / 4)); + j = -1; + bestCommon = ""; + while ((j = shorttext.indexOf(seed, j + 1)) !== -1) { + prefixLength = dmp.diffCommonPrefix(longtext.substring(i), shorttext.substring(j)); + suffixLength = dmp.diffCommonSuffix(longtext.substring(0, i), shorttext.substring(0, j)); + if (bestCommon.length < suffixLength + prefixLength) { + bestCommon = shorttext.substring(j - suffixLength, j) + shorttext.substring(j, j + prefixLength); + bestLongtextA = longtext.substring(0, i - suffixLength); + bestLongtextB = longtext.substring(i + prefixLength); + bestShorttextA = shorttext.substring(0, j - suffixLength); + bestShorttextB = shorttext.substring(j + prefixLength); + } + } + if (bestCommon.length * 2 >= longtext.length) { + return [bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB, bestCommon]; + } else { + return null; + } + } + + // First check if the second quarter is the seed for a half-match. + hm1 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 4)); + + // Check again based on the third quarter. + hm2 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 2)); + if (!hm1 && !hm2) { + return null; + } else if (!hm2) { + hm = hm1; + } else if (!hm1) { + hm = hm2; + } else { + + // Both matched. Select the longest. + hm = hm1[4].length > hm2[4].length ? hm1 : hm2; + } + + // A half-match was found, sort out the return data. + if (text1.length > text2.length) { + text1A = hm[0]; + text1B = hm[1]; + text2A = hm[2]; + text2B = hm[3]; + } else { + text2A = hm[0]; + text2B = hm[1]; + text1A = hm[2]; + text1B = hm[3]; + } + midCommon = hm[4]; + return [text1A, text1B, text2A, text2B, midCommon]; + }; + + /** + * Do a quick line-level diff on both strings, then rediff the parts for + * greater accuracy. + * This speedup can produce non-minimal diffs. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @param {number} deadline Time when the diff should be complete by. + * @return {!Array.} Array of diff tuples. + * @private + */ + DiffMatchPatch.prototype.diffLineMode = function (text1, text2, deadline) { + var a, diffs, linearray, pointer, countInsert, countDelete, textInsert, textDelete, j; + + // Scan the text on a line-by-line basis first. + a = this.diffLinesToChars(text1, text2); + text1 = a.chars1; + text2 = a.chars2; + linearray = a.lineArray; + + diffs = this.DiffMain(text1, text2, false, deadline); + + // Convert the diff back to original text. + this.diffCharsToLines(diffs, linearray); + + // Eliminate freak matches (e.g. blank lines) + this.diffCleanupSemantic(diffs); + + // Rediff any replacement blocks, this time character-by-character. + // Add a dummy entry at the end. + diffs.push([DIFF_EQUAL, ""]); + pointer = 0; + countDelete = 0; + countInsert = 0; + textDelete = ""; + textInsert = ""; + while (pointer < diffs.length) { + switch (diffs[pointer][0]) { + case DIFF_INSERT: + countInsert++; + textInsert += diffs[pointer][1]; + break; + case DIFF_DELETE: + countDelete++; + textDelete += diffs[pointer][1]; + break; + case DIFF_EQUAL: + + // Upon reaching an equality, check for prior redundancies. + if (countDelete >= 1 && countInsert >= 1) { + + // Delete the offending records and add the merged ones. + diffs.splice(pointer - countDelete - countInsert, countDelete + countInsert); + pointer = pointer - countDelete - countInsert; + a = this.DiffMain(textDelete, textInsert, false, deadline); + for (j = a.length - 1; j >= 0; j--) { + diffs.splice(pointer, 0, a[j]); + } + pointer = pointer + a.length; + } + countInsert = 0; + countDelete = 0; + textDelete = ""; + textInsert = ""; + break; + } + pointer++; + } + diffs.pop(); // Remove the dummy entry at the end. + + return diffs; + }; + + /** + * Find the 'middle snake' of a diff, split the problem in two + * and return the recursively constructed diff. + * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @param {number} deadline Time at which to bail if not yet complete. + * @return {!Array.} Array of diff tuples. + * @private + */ + DiffMatchPatch.prototype.diffBisect = function (text1, text2, deadline) { + var text1Length, text2Length, maxD, vOffset, vLength, v1, v2, x, delta, front, k1start, k1end, k2start, k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2; + + // Cache the text lengths to prevent multiple calls. + text1Length = text1.length; + text2Length = text2.length; + maxD = Math.ceil((text1Length + text2Length) / 2); + vOffset = maxD; + vLength = 2 * maxD; + v1 = new Array(vLength); + v2 = new Array(vLength); + + // Setting all elements to -1 is faster in Chrome & Firefox than mixing + // integers and undefined. + for (x = 0; x < vLength; x++) { + v1[x] = -1; + v2[x] = -1; + } + v1[vOffset + 1] = 0; + v2[vOffset + 1] = 0; + delta = text1Length - text2Length; + + // If the total number of characters is odd, then the front path will collide + // with the reverse path. + front = delta % 2 !== 0; + + // Offsets for start and end of k loop. + // Prevents mapping of space beyond the grid. + k1start = 0; + k1end = 0; + k2start = 0; + k2end = 0; + for (d = 0; d < maxD; d++) { + + // Bail out if deadline is reached. + if (new Date().getTime() > deadline) { + break; + } + + // Walk the front path one step. + for (k1 = -d + k1start; k1 <= d - k1end; k1 += 2) { + k1Offset = vOffset + k1; + if (k1 === -d || k1 !== d && v1[k1Offset - 1] < v1[k1Offset + 1]) { + x1 = v1[k1Offset + 1]; + } else { + x1 = v1[k1Offset - 1] + 1; + } + y1 = x1 - k1; + while (x1 < text1Length && y1 < text2Length && text1.charAt(x1) === text2.charAt(y1)) { + x1++; + y1++; + } + v1[k1Offset] = x1; + if (x1 > text1Length) { + + // Ran off the right of the graph. + k1end += 2; + } else if (y1 > text2Length) { + + // Ran off the bottom of the graph. + k1start += 2; + } else if (front) { + k2Offset = vOffset + delta - k1; + if (k2Offset >= 0 && k2Offset < vLength && v2[k2Offset] !== -1) { + + // Mirror x2 onto top-left coordinate system. + x2 = text1Length - v2[k2Offset]; + if (x1 >= x2) { + + // Overlap detected. + return this.diffBisectSplit(text1, text2, x1, y1, deadline); + } + } + } + } + + // Walk the reverse path one step. + for (k2 = -d + k2start; k2 <= d - k2end; k2 += 2) { + k2Offset = vOffset + k2; + if (k2 === -d || k2 !== d && v2[k2Offset - 1] < v2[k2Offset + 1]) { + x2 = v2[k2Offset + 1]; + } else { + x2 = v2[k2Offset - 1] + 1; + } + y2 = x2 - k2; + while (x2 < text1Length && y2 < text2Length && text1.charAt(text1Length - x2 - 1) === text2.charAt(text2Length - y2 - 1)) { + x2++; + y2++; + } + v2[k2Offset] = x2; + if (x2 > text1Length) { + + // Ran off the left of the graph. + k2end += 2; + } else if (y2 > text2Length) { + + // Ran off the top of the graph. + k2start += 2; + } else if (!front) { + k1Offset = vOffset + delta - k2; + if (k1Offset >= 0 && k1Offset < vLength && v1[k1Offset] !== -1) { + x1 = v1[k1Offset]; + y1 = vOffset + x1 - k1Offset; + + // Mirror x2 onto top-left coordinate system. + x2 = text1Length - x2; + if (x1 >= x2) { + + // Overlap detected. + return this.diffBisectSplit(text1, text2, x1, y1, deadline); + } + } + } + } + } + + // Diff took too long and hit the deadline or + // number of diffs equals number of characters, no commonality at all. + return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; + }; + + /** + * Given the location of the 'middle snake', split the diff in two parts + * and recurse. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @param {number} x Index of split point in text1. + * @param {number} y Index of split point in text2. + * @param {number} deadline Time at which to bail if not yet complete. + * @return {!Array.} Array of diff tuples. + * @private + */ + DiffMatchPatch.prototype.diffBisectSplit = function (text1, text2, x, y, deadline) { + var text1a, text1b, text2a, text2b, diffs, diffsb; + text1a = text1.substring(0, x); + text2a = text2.substring(0, y); + text1b = text1.substring(x); + text2b = text2.substring(y); + + // Compute both diffs serially. + diffs = this.DiffMain(text1a, text2a, false, deadline); + diffsb = this.DiffMain(text1b, text2b, false, deadline); + + return diffs.concat(diffsb); + }; + + /** + * Reduce the number of edits by eliminating semantically trivial equalities. + * @param {!Array.} diffs Array of diff tuples. + */ + DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) { + var changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2; + changes = false; + equalities = []; // Stack of indices where equalities are found. + equalitiesLength = 0; // Keeping our own length var is faster in JS. + /** @type {?string} */ + lastequality = null; + + // Always equal to diffs[equalities[equalitiesLength - 1]][1] + pointer = 0; // Index of current position. + + // Number of characters that changed prior to the equality. + lengthInsertions1 = 0; + lengthDeletions1 = 0; + + // Number of characters that changed after the equality. + lengthInsertions2 = 0; + lengthDeletions2 = 0; + while (pointer < diffs.length) { + if (diffs[pointer][0] === DIFF_EQUAL) { + // Equality found. + equalities[equalitiesLength++] = pointer; + lengthInsertions1 = lengthInsertions2; + lengthDeletions1 = lengthDeletions2; + lengthInsertions2 = 0; + lengthDeletions2 = 0; + lastequality = diffs[pointer][1]; + } else { + // An insertion or deletion. + if (diffs[pointer][0] === DIFF_INSERT) { + lengthInsertions2 += diffs[pointer][1].length; + } else { + lengthDeletions2 += diffs[pointer][1].length; + } + + // Eliminate an equality that is smaller or equal to the edits on both + // sides of it. + if (lastequality && lastequality.length <= Math.max(lengthInsertions1, lengthDeletions1) && lastequality.length <= Math.max(lengthInsertions2, lengthDeletions2)) { + + // Duplicate record. + diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); + + // Change second copy to insert. + diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; + + // Throw away the equality we just deleted. + equalitiesLength--; + + // Throw away the previous equality (it needs to be reevaluated). + equalitiesLength--; + pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1; + + // Reset the counters. + lengthInsertions1 = 0; + lengthDeletions1 = 0; + lengthInsertions2 = 0; + lengthDeletions2 = 0; + lastequality = null; + changes = true; + } + } + pointer++; + } + + // Normalize the diff. + if (changes) { + this.diffCleanupMerge(diffs); + } + + // Find any overlaps between deletions and insertions. + // e.g: abcxxxxxxdef + // -> abcxxxdef + // e.g: xxxabcdefxxx + // -> defxxxabc + // Only extract an overlap if it is as big as the edit ahead or behind it. + pointer = 1; + while (pointer < diffs.length) { + if (diffs[pointer - 1][0] === DIFF_DELETE && diffs[pointer][0] === DIFF_INSERT) { + deletion = diffs[pointer - 1][1]; + insertion = diffs[pointer][1]; + overlapLength1 = this.diffCommonOverlap(deletion, insertion); + overlapLength2 = this.diffCommonOverlap(insertion, deletion); + if (overlapLength1 >= overlapLength2) { + if (overlapLength1 >= deletion.length / 2 || overlapLength1 >= insertion.length / 2) { + + // Overlap found. Insert an equality and trim the surrounding edits. + diffs.splice(pointer, 0, [DIFF_EQUAL, insertion.substring(0, overlapLength1)]); + diffs[pointer - 1][1] = deletion.substring(0, deletion.length - overlapLength1); + diffs[pointer + 1][1] = insertion.substring(overlapLength1); + pointer++; + } + } else { + if (overlapLength2 >= deletion.length / 2 || overlapLength2 >= insertion.length / 2) { + + // Reverse overlap found. + // Insert an equality and swap and trim the surrounding edits. + diffs.splice(pointer, 0, [DIFF_EQUAL, deletion.substring(0, overlapLength2)]); + + diffs[pointer - 1][0] = DIFF_INSERT; + diffs[pointer - 1][1] = insertion.substring(0, insertion.length - overlapLength2); + diffs[pointer + 1][0] = DIFF_DELETE; + diffs[pointer + 1][1] = deletion.substring(overlapLength2); + pointer++; + } + } + pointer++; + } + pointer++; + } + }; + + /** + * Determine if the suffix of one string is the prefix of another. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {number} The number of characters common to the end of the first + * string and the start of the second string. + * @private + */ + DiffMatchPatch.prototype.diffCommonOverlap = function (text1, text2) { + var text1Length, text2Length, textLength, best, length, pattern, found; + + // Cache the text lengths to prevent multiple calls. + text1Length = text1.length; + text2Length = text2.length; + + // Eliminate the null case. + if (text1Length === 0 || text2Length === 0) { + return 0; + } + + // Truncate the longer string. + if (text1Length > text2Length) { + text1 = text1.substring(text1Length - text2Length); + } else if (text1Length < text2Length) { + text2 = text2.substring(0, text1Length); + } + textLength = Math.min(text1Length, text2Length); + + // Quick check for the worst case. + if (text1 === text2) { + return textLength; + } + + // Start by looking for a single character match + // and increase length until no match is found. + // Performance analysis: https://neil.fraser.name/news/2010/11/04/ + best = 0; + length = 1; + while (true) { + pattern = text1.substring(textLength - length); + found = text2.indexOf(pattern); + if (found === -1) { + return best; + } + length += found; + if (found === 0 || text1.substring(textLength - length) === text2.substring(0, length)) { + best = length; + length++; + } + } + }; + + /** + * Split two texts into an array of strings. Reduce the texts to a string of + * hashes where each Unicode character represents one line. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {{chars1: string, chars2: string, lineArray: !Array.}} + * An object containing the encoded text1, the encoded text2 and + * the array of unique strings. + * The zeroth element of the array of unique strings is intentionally blank. + * @private + */ + DiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) { + var lineArray, lineHash, chars1, chars2; + lineArray = []; // E.g. lineArray[4] === 'Hello\n' + lineHash = {}; // E.g. lineHash['Hello\n'] === 4 + + // '\x00' is a valid character, but various debuggers don't like it. + // So we'll insert a junk entry to avoid generating a null character. + lineArray[0] = ""; + + /** + * Split a text into an array of strings. Reduce the texts to a string of + * hashes where each Unicode character represents one line. + * Modifies linearray and linehash through being a closure. + * @param {string} text String to encode. + * @return {string} Encoded string. + * @private + */ + function diffLinesToCharsMunge(text) { + var chars, lineStart, lineEnd, lineArrayLength, line; + chars = ""; + + // Walk the text, pulling out a substring for each line. + // text.split('\n') would would temporarily double our memory footprint. + // Modifying text would create many large strings to garbage collect. + lineStart = 0; + lineEnd = -1; + + // Keeping our own length variable is faster than looking it up. + lineArrayLength = lineArray.length; + while (lineEnd < text.length - 1) { + lineEnd = text.indexOf("\n", lineStart); + if (lineEnd === -1) { + lineEnd = text.length - 1; + } + line = text.substring(lineStart, lineEnd + 1); + lineStart = lineEnd + 1; + + var lineHashExists = lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) : lineHash[line] !== undefined; + + if (lineHashExists) { + chars += String.fromCharCode(lineHash[line]); + } else { + chars += String.fromCharCode(lineArrayLength); + lineHash[line] = lineArrayLength; + lineArray[lineArrayLength++] = line; + } + } + return chars; + } + + chars1 = diffLinesToCharsMunge(text1); + chars2 = diffLinesToCharsMunge(text2); + return { + chars1: chars1, + chars2: chars2, + lineArray: lineArray + }; + }; + + /** + * Rehydrate the text in a diff from a string of line hashes to real lines of + * text. + * @param {!Array.} diffs Array of diff tuples. + * @param {!Array.} lineArray Array of unique strings. + * @private + */ + DiffMatchPatch.prototype.diffCharsToLines = function (diffs, lineArray) { + var x, chars, text, y; + for (x = 0; x < diffs.length; x++) { + chars = diffs[x][1]; + text = []; + for (y = 0; y < chars.length; y++) { + text[y] = lineArray[chars.charCodeAt(y)]; + } + diffs[x][1] = text.join(""); + } + }; + + /** + * Reorder and merge like edit sections. Merge equalities. + * Any edit section can move as long as it doesn't cross an equality. + * @param {!Array.} diffs Array of diff tuples. + */ + DiffMatchPatch.prototype.diffCleanupMerge = function (diffs) { + var pointer, countDelete, countInsert, textInsert, textDelete, commonlength, changes, diffPointer, position; + diffs.push([DIFF_EQUAL, ""]); // Add a dummy entry at the end. + pointer = 0; + countDelete = 0; + countInsert = 0; + textDelete = ""; + textInsert = ""; + + while (pointer < diffs.length) { + switch (diffs[pointer][0]) { + case DIFF_INSERT: + countInsert++; + textInsert += diffs[pointer][1]; + pointer++; + break; + case DIFF_DELETE: + countDelete++; + textDelete += diffs[pointer][1]; + pointer++; + break; + case DIFF_EQUAL: + + // Upon reaching an equality, check for prior redundancies. + if (countDelete + countInsert > 1) { + if (countDelete !== 0 && countInsert !== 0) { + + // Factor out any common prefixes. + commonlength = this.diffCommonPrefix(textInsert, textDelete); + if (commonlength !== 0) { + if (pointer - countDelete - countInsert > 0 && diffs[pointer - countDelete - countInsert - 1][0] === DIFF_EQUAL) { + diffs[pointer - countDelete - countInsert - 1][1] += textInsert.substring(0, commonlength); + } else { + diffs.splice(0, 0, [DIFF_EQUAL, textInsert.substring(0, commonlength)]); + pointer++; + } + textInsert = textInsert.substring(commonlength); + textDelete = textDelete.substring(commonlength); + } + + // Factor out any common suffixies. + commonlength = this.diffCommonSuffix(textInsert, textDelete); + if (commonlength !== 0) { + diffs[pointer][1] = textInsert.substring(textInsert.length - commonlength) + diffs[pointer][1]; + textInsert = textInsert.substring(0, textInsert.length - commonlength); + textDelete = textDelete.substring(0, textDelete.length - commonlength); + } + } + + // Delete the offending records and add the merged ones. + if (countDelete === 0) { + diffs.splice(pointer - countInsert, countDelete + countInsert, [DIFF_INSERT, textInsert]); + } else if (countInsert === 0) { + diffs.splice(pointer - countDelete, countDelete + countInsert, [DIFF_DELETE, textDelete]); + } else { + diffs.splice(pointer - countDelete - countInsert, countDelete + countInsert, [DIFF_DELETE, textDelete], [DIFF_INSERT, textInsert]); + } + pointer = pointer - countDelete - countInsert + (countDelete ? 1 : 0) + (countInsert ? 1 : 0) + 1; + } else if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) { + + // Merge this equality with the previous one. + diffs[pointer - 1][1] += diffs[pointer][1]; + diffs.splice(pointer, 1); + } else { + pointer++; + } + countInsert = 0; + countDelete = 0; + textDelete = ""; + textInsert = ""; + break; + } + } + if (diffs[diffs.length - 1][1] === "") { + diffs.pop(); // Remove the dummy entry at the end. + } + + // Second pass: look for single edits surrounded on both sides by equalities + // which can be shifted sideways to eliminate an equality. + // e.g: ABAC -> ABAC + changes = false; + pointer = 1; + + // Intentionally ignore the first and last element (don't need checking). + while (pointer < diffs.length - 1) { + if (diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) { + + diffPointer = diffs[pointer][1]; + position = diffPointer.substring(diffPointer.length - diffs[pointer - 1][1].length); + + // This is a single edit surrounded by equalities. + if (position === diffs[pointer - 1][1]) { + + // Shift the edit over the previous equality. + diffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring(0, diffs[pointer][1].length - diffs[pointer - 1][1].length); + diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1]; + diffs.splice(pointer - 1, 1); + changes = true; + } else if (diffPointer.substring(0, diffs[pointer + 1][1].length) === diffs[pointer + 1][1]) { + + // Shift the edit over the next equality. + diffs[pointer - 1][1] += diffs[pointer + 1][1]; + diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1]; + diffs.splice(pointer + 1, 1); + changes = true; + } + } + pointer++; + } + + // If shifts were made, the diff needs reordering and another shift sweep. + if (changes) { + this.diffCleanupMerge(diffs); + } + }; + + return function (o, n) { + var diff, output, text; + diff = new DiffMatchPatch(); + output = diff.DiffMain(o, n); + diff.diffCleanupEfficiency(output); + text = diff.diffPrettyHtml(output); + + return text; + }; + }(); + +}((function() { return this; }()))); + +/* globals QUnit */ + +(function() { + QUnit.config.autostart = false; + QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container' }); + QUnit.config.urlConfig.push({ id: 'nolint', label: 'Disable Linting' }); + QUnit.config.urlConfig.push({ id: 'dockcontainer', label: 'Dock container' }); + QUnit.config.urlConfig.push({ id: 'devmode', label: 'Development mode' }); + + QUnit.config.testTimeout = QUnit.urlParams.devmode ? null : 60000; //Default Test Timeout 60 Seconds +})(); + +define('@ember/test-helpers/-utils', ['exports'], function (exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.nextTickPromise = nextTickPromise; + exports.runDestroyablesFor = runDestroyablesFor; + const nextTick = exports.nextTick = setTimeout; + const futureTick = exports.futureTick = setTimeout; + + /** + @private + @returns {Promise} promise which resolves on the next turn of the event loop + */ + function nextTickPromise() { + return new Ember.RSVP.Promise(resolve => { + nextTick(resolve); + }); + } + + /** + Retrieves an array of destroyables from the specified property on the object + provided, iterates that array invoking each function, then deleting the + property (clearing the array). + + @private + @param {Object} object an object to search for the destroyable array within + @param {string} property the property on the object that contains the destroyable array + */ + function runDestroyablesFor(object, property) { + let destroyables = object[property]; + + if (!destroyables) { + return; + } + + for (let i = 0; i < destroyables.length; i++) { + destroyables[i](); + } + + delete object[property]; + } +}); +define('@ember/test-helpers/application', ['exports', '@ember/test-helpers/resolver'], function (exports, _resolver) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.setApplication = setApplication; + exports.getApplication = getApplication; + + + var __application__; + + /** + Stores the provided application instance so that tests being ran will be aware of the application under test. + + - Required by `setupApplicationContext` method. + - Used by `setupContext` and `setupRenderingContext` when present. + + @public + @param {Ember.Application} application the application that will be tested + */ + function setApplication(application) { + __application__ = application; + + if (!(0, _resolver.getResolver)()) { + let Resolver = application.Resolver; + let resolver = Resolver.create({ namespace: application }); + + (0, _resolver.setResolver)(resolver); + } + } + + /** + Retrieve the application instance stored by `setApplication`. + + @public + @returns {Ember.Application} the previously stored application instance under test + */ + function getApplication() { + return __application__; + } +}); +define('@ember/test-helpers/build-owner', ['exports', 'ember-test-helpers/legacy-0-6-x/build-registry'], function (exports, _buildRegistry) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = buildOwner; + + + /** + Creates an "owner" (an object that either _is_ or duck-types like an + `Ember.ApplicationInstance`) from the provided options. + + If `options.application` is present (e.g. setup by an earlier call to + `setApplication`) an `Ember.ApplicationInstance` is built via + `application.buildInstance()`. + + If `options.application` is not present, we fall back to using + `options.resolver` instead (setup via `setResolver`). This creates a mock + "owner" by using a custom created combination of `Ember.Registry`, + `Ember.Container`, `Ember._ContainerProxyMixin`, and + `Ember._RegistryProxyMixin`. + + @private + @param {Ember.Application} [application] the Ember.Application to build an instance from + @param {Ember.Resolver} [resolver] the resolver to use to back a "mock owner" + @returns {Promise} a promise resolving to the generated "owner" + */ + function buildOwner(application, resolver) { + if (application) { + return application.boot().then(app => app.buildInstance().boot()); + } + + if (!resolver) { + throw new Error('You must set up the ember-test-helpers environment with either `setResolver` or `setApplication` before running any tests.'); + } + + let { owner } = (0, _buildRegistry.default)(resolver); + return Ember.RSVP.Promise.resolve(owner); + } +}); +define('@ember/test-helpers/dom/-get-element', ['exports', '@ember/test-helpers/dom/get-root-element'], function (exports, _getRootElement) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = getElement; + + + /** + Used internally by the DOM interaction helpers to find one element. + + @private + @param {string|Element} target the element or selector to retrieve + @returns {Element} the target or selector + */ + function getElement(target) { + if (target.nodeType === Node.ELEMENT_NODE || target.nodeType === Node.DOCUMENT_NODE || target instanceof Window) { + return target; + } else if (typeof target === 'string') { + let rootElement = (0, _getRootElement.default)(); + + return rootElement.querySelector(target); + } else { + throw new Error('Must use an element or a selector string'); + } + } +}); +define('@ember/test-helpers/dom/-get-elements', ['exports', '@ember/test-helpers/dom/get-root-element'], function (exports, _getRootElement) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = getElements; + + + /** + Used internally by the DOM interaction helpers to find multiple elements. + + @private + @param {string} target the selector to retrieve + @returns {NodeList} the matched elements + */ + function getElements(target) { + if (typeof target === 'string') { + let rootElement = (0, _getRootElement.default)(); + + return rootElement.querySelectorAll(target); + } else { + throw new Error('Must use a selector string'); + } + } +}); +define('@ember/test-helpers/dom/-is-focusable', ['exports', '@ember/test-helpers/dom/-is-form-control'], function (exports, _isFormControl) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = isFocusable; + + + const FOCUSABLE_TAGS = ['A']; + + /** + @private + @param {Element} element the element to check + @returns {boolean} `true` when the element is focusable, `false` otherwise + */ + function isFocusable(element) { + if ((0, _isFormControl.default)(element) || element.isContentEditable || FOCUSABLE_TAGS.indexOf(element.tagName) > -1) { + return true; + } + + return element.hasAttribute('tabindex'); + } +}); +define('@ember/test-helpers/dom/-is-form-control', ['exports'], function (exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = isFormControl; + const FORM_CONTROL_TAGS = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA']; + + /** + @private + @param {Element} element the element to check + @returns {boolean} `true` when the element is a form control, `false` otherwise + */ + function isFormControl(element) { + let { tagName, type } = element; + + if (type === 'hidden') { + return false; + } + + return FORM_CONTROL_TAGS.indexOf(tagName) > -1; + } +}); +define("@ember/test-helpers/dom/-to-array", ["exports"], function (exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = toArray; + /** + @private + @param {NodeList} nodelist the nodelist to convert to an array + @returns {Array} an array + */ + function toArray(nodelist) { + let array = new Array(nodelist.length); + for (let i = 0; i < nodelist.length; i++) { + array[i] = nodelist[i]; + } + + return array; + } +}); +define('@ember/test-helpers/dom/blur', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/dom/-is-focusable', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.__blur__ = __blur__; + exports.default = blur; + + + /** + @private + @param {Element} element the element to trigger events on + */ + function __blur__(element) { + let browserIsNotFocused = document.hasFocus && !document.hasFocus(); + + // makes `document.activeElement` be `body`. + // If the browser is focused, it also fires a blur event + element.blur(); + + // Chrome/Firefox does not trigger the `blur` event if the window + // does not have focus. If the document does not have focus then + // fire `blur` event via native event. + if (browserIsNotFocused) { + (0, _fireEvent.default)(element, 'blur', { bubbles: false }); + (0, _fireEvent.default)(element, 'focusout'); + } + } + + /** + Unfocus the specified target. + + Sends a number of events intending to simulate a "real" user unfocusing an + element. + + The following events are triggered (in order): + + - `blur` + - `focusout` + + The exact listing of events that are triggered may change over time as needed + to continue to emulate how actual browsers handle unfocusing a given element. + + @public + @param {string|Element} [target=document.activeElement] the element or selector to unfocus + @return {Promise} resolves when settled + */ + function blur(target = document.activeElement) { + return (0, _utils.nextTickPromise)().then(() => { + let element = (0, _getElement.default)(target); + if (!element) { + throw new Error(`Element not found when calling \`blur('${target}')\`.`); + } + + if (!(0, _isFocusable.default)(element)) { + throw new Error(`${target} is not focusable`); + } + + __blur__(element); + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/dom/click', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/dom/focus', '@ember/test-helpers/settled', '@ember/test-helpers/dom/-is-focusable', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _focus, _settled, _isFocusable, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.__click__ = __click__; + exports.default = click; + + + /** + @private + @param {Element} element the element to click on + */ + function __click__(element) { + (0, _fireEvent.default)(element, 'mousedown'); + + if ((0, _isFocusable.default)(element)) { + (0, _focus.__focus__)(element); + } + + (0, _fireEvent.default)(element, 'mouseup'); + (0, _fireEvent.default)(element, 'click'); + } + + /** + Clicks on the specified target. + + Sends a number of events intending to simulate a "real" user clicking on an + element. + + For non-focusable elements the following events are triggered (in order): + + - `mousedown` + - `mouseup` + - `click` + + For focusable (e.g. form control) elements the following events are triggered + (in order): + + - `mousedown` + - `focus` + - `focusin` + - `mouseup` + - `click` + + The exact listing of events that are triggered may change over time as needed + to continue to emulate how actual browsers handle clicking a given element. + + @public + @param {string|Element} target the element or selector to click on + @return {Promise} resolves when settled + */ + function click(target) { + return (0, _utils.nextTickPromise)().then(() => { + if (!target) { + throw new Error('Must pass an element or selector to `click`.'); + } + + let element = (0, _getElement.default)(target); + if (!element) { + throw new Error(`Element not found when calling \`click('${target}')\`.`); + } + + __click__(element); + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/dom/fill-in', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/-is-form-control', '@ember/test-helpers/dom/focus', '@ember/test-helpers/settled', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/-utils'], function (exports, _getElement, _isFormControl, _focus, _settled, _fireEvent, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = fillIn; + + + /** + Fill the provided text into the `value` property (or set `.innerHTML` when + the target is a content editable element) then trigger `change` and `input` + events on the specified target. + + @public + @param {string|Element} target the element or selector to enter text into + @param {string} text the text to fill into the target element + @return {Promise} resolves when the application is settled + */ + function fillIn(target, text) { + return (0, _utils.nextTickPromise)().then(() => { + if (!target) { + throw new Error('Must pass an element or selector to `fillIn`.'); + } + + let element = (0, _getElement.default)(target); + if (!element) { + throw new Error(`Element not found when calling \`fillIn('${target}')\`.`); + } + let isControl = (0, _isFormControl.default)(element); + if (!isControl && !element.isContentEditable) { + throw new Error('`fillIn` is only usable on form controls or contenteditable elements.'); + } + + if (typeof text === 'undefined' || text === null) { + throw new Error('Must provide `text` when calling `fillIn`.'); + } + + (0, _focus.__focus__)(element); + + if (isControl) { + element.value = text; + } else { + element.innerHTML = text; + } + + (0, _fireEvent.default)(element, 'input'); + (0, _fireEvent.default)(element, 'change'); + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/dom/find-all', ['exports', '@ember/test-helpers/dom/-get-elements', '@ember/test-helpers/dom/-to-array'], function (exports, _getElements, _toArray) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = find; + + + /** + Find all elements matched by the given selector. Equivalent to calling + `querySelectorAll()` on the test root element. + + @public + @param {string} selector the selector to search for + @return {Array} array of matched elements + */ + function find(selector) { + if (!selector) { + throw new Error('Must pass a selector to `findAll`.'); + } + + return (0, _toArray.default)((0, _getElements.default)(selector)); + } +}); +define('@ember/test-helpers/dom/find', ['exports', '@ember/test-helpers/dom/-get-element'], function (exports, _getElement) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = find; + + + /** + Find the first element matched by the given selector. Equivalent to calling + `querySelector()` on the test root element. + + @public + @param {string} selector the selector to search for + @return {Element} matched element or null + */ + function find(selector) { + if (!selector) { + throw new Error('Must pass a selector to `find`.'); + } + + return (0, _getElement.default)(selector); + } +}); +define('@ember/test-helpers/dom/fire-event', ['exports'], function (exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = fireEvent; + + + const DEFAULT_EVENT_OPTIONS = { bubbles: true, cancelable: true }; + const KEYBOARD_EVENT_TYPES = exports.KEYBOARD_EVENT_TYPES = Object.freeze(['keydown', 'keypress', 'keyup']); + const MOUSE_EVENT_TYPES = ['click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover']; + const FILE_SELECTION_EVENT_TYPES = ['change']; + + /** + Internal helper used to build and dispatch events throughout the other DOM helpers. + + @private + @param {Element} element the element to dispatch the event to + @param {string} eventType the type of event + @param {Object} [options] additional properties to be set on the event + @returns {Event} the event that was dispatched + */ + function fireEvent(element, eventType, options = {}) { + if (!element) { + throw new Error('Must pass an element to `fireEvent`'); + } + + let event; + if (KEYBOARD_EVENT_TYPES.indexOf(eventType) > -1) { + event = buildKeyboardEvent(eventType, options); + } else if (MOUSE_EVENT_TYPES.indexOf(eventType) > -1) { + let rect; + if (element instanceof Window) { + rect = element.document.documentElement.getBoundingClientRect(); + } else if (element.nodeType === Node.DOCUMENT_NODE) { + rect = element.documentElement.getBoundingClientRect(); + } else if (element.nodeType === Node.ELEMENT_NODE) { + rect = element.getBoundingClientRect(); + } else { + return; + } + + let x = rect.left + 1; + let y = rect.top + 1; + let simulatedCoordinates = { + screenX: x + 5, // Those numbers don't really mean anything. + screenY: y + 95, // They're just to make the screenX/Y be different of clientX/Y.. + clientX: x, + clientY: y + }; + + event = buildMouseEvent(eventType, Ember.merge(simulatedCoordinates, options)); + } else if (FILE_SELECTION_EVENT_TYPES.indexOf(eventType) > -1 && element.files) { + event = buildFileEvent(eventType, element, options); + } else { + event = buildBasicEvent(eventType, options); + } + + element.dispatchEvent(event); + return event; + } + + // eslint-disable-next-line require-jsdoc + function buildBasicEvent(type, options = {}) { + let event = document.createEvent('Events'); + + let bubbles = options.bubbles !== undefined ? options.bubbles : true; + let cancelable = options.cancelable !== undefined ? options.cancelable : true; + + delete options.bubbles; + delete options.cancelable; + + // bubbles and cancelable are readonly, so they can be + // set when initializing event + event.initEvent(type, bubbles, cancelable); + Ember.merge(event, options); + return event; + } + + // eslint-disable-next-line require-jsdoc + function buildMouseEvent(type, options = {}) { + let event; + try { + event = document.createEvent('MouseEvents'); + let eventOpts = Ember.merge(Ember.merge({}, DEFAULT_EVENT_OPTIONS), options); + event.initMouseEvent(type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget); + } catch (e) { + event = buildBasicEvent(type, options); + } + return event; + } + + // eslint-disable-next-line require-jsdoc + function buildKeyboardEvent(type, options = {}) { + let eventOpts = Ember.merge(Ember.merge({}, DEFAULT_EVENT_OPTIONS), options); + let event, eventMethodName; + + try { + event = new KeyboardEvent(type, eventOpts); + + // Property definitions are required for B/C for keyboard event usage + // If this properties are not defined, when listening for key events + // keyCode/which will be 0. Also, keyCode and which now are string + // and if app compare it with === with integer key definitions, + // there will be a fail. + // + // https://w3c.github.io/uievents/#interface-keyboardevent + // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent + Object.defineProperty(event, 'keyCode', { + get() { + return parseInt(this.key); + } + }); + + Object.defineProperty(event, 'which', { + get() { + return parseInt(this.key); + } + }); + + return event; + } catch (e) { + // left intentionally blank + } + + try { + event = document.createEvent('KeyboardEvents'); + eventMethodName = 'initKeyboardEvent'; + } catch (e) { + // left intentionally blank + } + + if (!event) { + try { + event = document.createEvent('KeyEvents'); + eventMethodName = 'initKeyEvent'; + } catch (e) { + // left intentionally blank + } + } + + if (event) { + event[eventMethodName](type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode); + } else { + event = buildBasicEvent(type, options); + } + + return event; + } + + // eslint-disable-next-line require-jsdoc + function buildFileEvent(type, element, files = []) { + let event = buildBasicEvent(type); + + if (files.length > 0) { + Object.defineProperty(files, 'item', { + value(index) { + return typeof index === 'number' ? this[index] : null; + } + }); + Object.defineProperty(element, 'files', { + value: files, + configurable: true + }); + } + + Object.defineProperty(event, 'target', { + value: element + }); + + return event; + } +}); +define('@ember/test-helpers/dom/focus', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/dom/-is-focusable', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.__focus__ = __focus__; + exports.default = focus; + + + /** + @private + @param {Element} element the element to trigger events on + */ + function __focus__(element) { + let browserIsNotFocused = document.hasFocus && !document.hasFocus(); + + // makes `document.activeElement` be `element`. If the browser is focused, it also fires a focus event + element.focus(); + + // Firefox does not trigger the `focusin` event if the window + // does not have focus. If the document does not have focus then + // fire `focusin` event as well. + if (browserIsNotFocused) { + // if the browser is not focused the previous `el.focus()` didn't fire an event, so we simulate it + (0, _fireEvent.default)(element, 'focus', { + bubbles: false + }); + + (0, _fireEvent.default)(element, 'focusin'); + } + } + + /** + Focus the specified target. + + Sends a number of events intending to simulate a "real" user focusing an + element. + + The following events are triggered (in order): + + - `focus` + - `focusin` + + The exact listing of events that are triggered may change over time as needed + to continue to emulate how actual browsers handle focusing a given element. + + @public + @param {string|Element} target the element or selector to focus + @return {Promise} resolves when the application is settled + */ + function focus(target) { + return (0, _utils.nextTickPromise)().then(() => { + if (!target) { + throw new Error('Must pass an element or selector to `focus`.'); + } + + let element = (0, _getElement.default)(target); + if (!element) { + throw new Error(`Element not found when calling \`focus('${target}')\`.`); + } + + if (!(0, _isFocusable.default)(element)) { + throw new Error(`${target} is not focusable`); + } + + __focus__(element); + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/dom/get-root-element', ['exports', '@ember/test-helpers/setup-context'], function (exports, _setupContext) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = getRootElement; + + + /** + Get the root element of the application under test (usually `#ember-testing`) + + @public + @returns {Element} the root element + */ + function getRootElement() { + let context = (0, _setupContext.getContext)(); + let owner = context && context.owner; + + if (!owner) { + throw new Error('Must setup rendering context before attempting to interact with elements.'); + } + + let rootElementSelector; + // When the host app uses `setApplication` (instead of `setResolver`) the owner has + // a `rootElement` set on it with the element id to be used + if (owner && owner._emberTestHelpersMockOwner === undefined) { + rootElementSelector = owner.rootElement; + } else { + rootElementSelector = '#ember-testing'; + } + + let rootElement = document.querySelector(rootElementSelector); + + return rootElement; + } +}); +define('@ember/test-helpers/dom/tap', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/dom/click', '@ember/test-helpers/settled', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _click, _settled, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = tap; + + + /** + Taps on the specified target. + + Sends a number of events intending to simulate a "real" user tapping on an + element. + + For non-focusable elements the following events are triggered (in order): + + - `touchstart` + - `touchend` + - `mousedown` + - `mouseup` + - `click` + + For focusable (e.g. form control) elements the following events are triggered + (in order): + + - `touchstart` + - `touchend` + - `mousedown` + - `focus` + - `focusin` + - `mouseup` + - `click` + + The exact listing of events that are triggered may change over time as needed + to continue to emulate how actual browsers handle tapping on a given element. + + @public + @param {string|Element} target the element or selector to tap on + @param {Object} options the options to be provided to the touch events + @return {Promise} resolves when settled + */ + function tap(target, options = {}) { + return (0, _utils.nextTickPromise)().then(() => { + if (!target) { + throw new Error('Must pass an element or selector to `tap`.'); + } + + let element = (0, _getElement.default)(target); + if (!element) { + throw new Error(`Element not found when calling \`tap('${target}')\`.`); + } + + let touchstartEv = (0, _fireEvent.default)(element, 'touchstart', options); + let touchendEv = (0, _fireEvent.default)(element, 'touchend', options); + + if (!touchstartEv.defaultPrevented && !touchendEv.defaultPrevented) { + (0, _click.__click__)(element); + } + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/dom/trigger-event', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = triggerEvent; + + + /** + Triggers an event on the specified target. + + @public + @param {string|Element} target the element or selector to trigger the event on + @param {string} eventType the type of event to trigger + @param {Object} options additional properties to be set on the event + @return {Promise} resolves when the application is settled + */ + function triggerEvent(target, eventType, options) { + return (0, _utils.nextTickPromise)().then(() => { + if (!target) { + throw new Error('Must pass an element or selector to `triggerEvent`.'); + } + + let element = (0, _getElement.default)(target); + if (!element) { + throw new Error(`Element not found when calling \`triggerEvent('${target}', ...)\`.`); + } + + if (!eventType) { + throw new Error(`Must provide an \`eventType\` to \`triggerEvent\``); + } + + (0, _fireEvent.default)(element, eventType, options); + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/dom/trigger-key-event', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = triggerKeyEvent; + + + const DEFAULT_MODIFIERS = Object.freeze({ + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false + }); + + /** + Triggers a keyboard event on the specified target. + + @public + @param {string|Element} target the element or selector to trigger the event on + @param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger + @param {string} keyCode the keyCode of the event being triggered + @param {Object} [modifiers] the state of various modifier keys + @param {boolean} [modifiers.ctrlKey=false] if true the generated event will indicate the control key was pressed during the key event + @param {boolean} [modifiers.altKey=false] if true the generated event will indicate the alt key was pressed during the key event + @param {boolean} [modifiers.shiftKey=false] if true the generated event will indicate the shift key was pressed during the key event + @param {boolean} [modifiers.metaKey=false] if true the generated event will indicate the meta key was pressed during the key event + @return {Promise} resolves when the application is settled + */ + function triggerKeyEvent(target, eventType, keyCode, modifiers = DEFAULT_MODIFIERS) { + return (0, _utils.nextTickPromise)().then(() => { + if (!target) { + throw new Error('Must pass an element or selector to `triggerKeyEvent`.'); + } + + let element = (0, _getElement.default)(target); + if (!element) { + throw new Error(`Element not found when calling \`triggerKeyEvent('${target}', ...)\`.`); + } + + if (!eventType) { + throw new Error(`Must provide an \`eventType\` to \`triggerKeyEvent\``); + } + + if (_fireEvent.KEYBOARD_EVENT_TYPES.indexOf(eventType) === -1) { + let validEventTypes = _fireEvent.KEYBOARD_EVENT_TYPES.join(', '); + throw new Error(`Must provide an \`eventType\` of ${validEventTypes} to \`triggerKeyEvent\` but you passed \`${eventType}\`.`); + } + + if (!keyCode) { + throw new Error(`Must provide a \`keyCode\` to \`triggerKeyEvent\``); + } + + let options = Ember.merge({ keyCode, which: keyCode, key: keyCode }, modifiers); + + (0, _fireEvent.default)(element, eventType, options); + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/dom/wait-for', ['exports', '@ember/test-helpers/wait-until', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/-get-elements', '@ember/test-helpers/dom/-to-array', '@ember/test-helpers/-utils'], function (exports, _waitUntil, _getElement, _getElements, _toArray, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = waitFor; + + + /** + Used to wait for a particular selector to appear in the DOM. Due to the fact + that it does not wait for general settledness, this is quite useful for testing + interim DOM states (e.g. loading states, pending promises, etc). + + @param {string} selector the selector to wait for + @param {Object} [options] the options to be used + @param {number} [options.timeout=1000] the time to wait (in ms) for a match + @param {number} [options.count=1] the number of elements that should match the provided selector + @returns {Element|Array} the element (or array of elements) that were being waited upon + */ + function waitFor(selector, { timeout = 1000, count = null } = {}) { + return (0, _utils.nextTickPromise)().then(() => { + if (!selector) { + throw new Error('Must pass a selector to `waitFor`.'); + } + + let callback; + if (count !== null) { + callback = () => { + let elements = (0, _getElements.default)(selector); + if (elements.length === count) { + return (0, _toArray.default)(elements); + } + }; + } else { + callback = () => (0, _getElement.default)(selector); + } + return (0, _waitUntil.default)(callback, { timeout }); + }); + } +}); +define('@ember/test-helpers/global', ['exports'], function (exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = (() => { + if (typeof self !== 'undefined') { + return self; + } else if (typeof window !== 'undefined') { + return window; + } else if (typeof global !== 'undefined') { + return global; + } else { + return Function('return this')(); + } + })(); +}); +define('@ember/test-helpers/has-ember-version', ['exports'], function (exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = hasEmberVersion; + + + /** + Checks if the currently running Ember version is greater than or equal to the + specified major and minor version numbers. + + @private + @param {number} major the major version number to compare + @param {number} minor the minor version number to compare + @returns {boolean} true if the Ember version is >= MAJOR.MINOR specified, false otherwise + */ + function hasEmberVersion(major, minor) { + var numbers = Ember.VERSION.split('-')[0].split('.'); + var actualMajor = parseInt(numbers[0], 10); + var actualMinor = parseInt(numbers[1], 10); + return actualMajor > major || actualMajor === major && actualMinor >= minor; + } +}); +define('@ember/test-helpers/index', ['exports', '@ember/test-helpers/resolver', '@ember/test-helpers/application', '@ember/test-helpers/setup-context', '@ember/test-helpers/teardown-context', '@ember/test-helpers/setup-rendering-context', '@ember/test-helpers/teardown-rendering-context', '@ember/test-helpers/setup-application-context', '@ember/test-helpers/teardown-application-context', '@ember/test-helpers/settled', '@ember/test-helpers/wait-until', '@ember/test-helpers/validate-error-handler', '@ember/test-helpers/dom/click', '@ember/test-helpers/dom/tap', '@ember/test-helpers/dom/focus', '@ember/test-helpers/dom/blur', '@ember/test-helpers/dom/trigger-event', '@ember/test-helpers/dom/trigger-key-event', '@ember/test-helpers/dom/fill-in', '@ember/test-helpers/dom/wait-for', '@ember/test-helpers/dom/get-root-element', '@ember/test-helpers/dom/find', '@ember/test-helpers/dom/find-all'], function (exports, _resolver, _application, _setupContext, _teardownContext, _setupRenderingContext, _teardownRenderingContext, _setupApplicationContext, _teardownApplicationContext, _settled, _waitUntil, _validateErrorHandler, _click, _tap, _focus, _blur, _triggerEvent, _triggerKeyEvent, _fillIn, _waitFor, _getRootElement, _find, _findAll) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, 'setResolver', { + enumerable: true, + get: function () { + return _resolver.setResolver; + } + }); + Object.defineProperty(exports, 'getResolver', { + enumerable: true, + get: function () { + return _resolver.getResolver; + } + }); + Object.defineProperty(exports, 'getApplication', { + enumerable: true, + get: function () { + return _application.getApplication; + } + }); + Object.defineProperty(exports, 'setApplication', { + enumerable: true, + get: function () { + return _application.setApplication; + } + }); + Object.defineProperty(exports, 'setupContext', { + enumerable: true, + get: function () { + return _setupContext.default; + } + }); + Object.defineProperty(exports, 'getContext', { + enumerable: true, + get: function () { + return _setupContext.getContext; + } + }); + Object.defineProperty(exports, 'setContext', { + enumerable: true, + get: function () { + return _setupContext.setContext; + } + }); + Object.defineProperty(exports, 'unsetContext', { + enumerable: true, + get: function () { + return _setupContext.unsetContext; + } + }); + Object.defineProperty(exports, 'pauseTest', { + enumerable: true, + get: function () { + return _setupContext.pauseTest; + } + }); + Object.defineProperty(exports, 'resumeTest', { + enumerable: true, + get: function () { + return _setupContext.resumeTest; + } + }); + Object.defineProperty(exports, 'teardownContext', { + enumerable: true, + get: function () { + return _teardownContext.default; + } + }); + Object.defineProperty(exports, 'setupRenderingContext', { + enumerable: true, + get: function () { + return _setupRenderingContext.default; + } + }); + Object.defineProperty(exports, 'render', { + enumerable: true, + get: function () { + return _setupRenderingContext.render; + } + }); + Object.defineProperty(exports, 'clearRender', { + enumerable: true, + get: function () { + return _setupRenderingContext.clearRender; + } + }); + Object.defineProperty(exports, 'teardownRenderingContext', { + enumerable: true, + get: function () { + return _teardownRenderingContext.default; + } + }); + Object.defineProperty(exports, 'setupApplicationContext', { + enumerable: true, + get: function () { + return _setupApplicationContext.default; + } + }); + Object.defineProperty(exports, 'visit', { + enumerable: true, + get: function () { + return _setupApplicationContext.visit; + } + }); + Object.defineProperty(exports, 'currentRouteName', { + enumerable: true, + get: function () { + return _setupApplicationContext.currentRouteName; + } + }); + Object.defineProperty(exports, 'currentURL', { + enumerable: true, + get: function () { + return _setupApplicationContext.currentURL; + } + }); + Object.defineProperty(exports, 'teardownApplicationContext', { + enumerable: true, + get: function () { + return _teardownApplicationContext.default; + } + }); + Object.defineProperty(exports, 'settled', { + enumerable: true, + get: function () { + return _settled.default; + } + }); + Object.defineProperty(exports, 'isSettled', { + enumerable: true, + get: function () { + return _settled.isSettled; + } + }); + Object.defineProperty(exports, 'getSettledState', { + enumerable: true, + get: function () { + return _settled.getSettledState; + } + }); + Object.defineProperty(exports, 'waitUntil', { + enumerable: true, + get: function () { + return _waitUntil.default; + } + }); + Object.defineProperty(exports, 'validateErrorHandler', { + enumerable: true, + get: function () { + return _validateErrorHandler.default; + } + }); + Object.defineProperty(exports, 'click', { + enumerable: true, + get: function () { + return _click.default; + } + }); + Object.defineProperty(exports, 'tap', { + enumerable: true, + get: function () { + return _tap.default; + } + }); + Object.defineProperty(exports, 'focus', { + enumerable: true, + get: function () { + return _focus.default; + } + }); + Object.defineProperty(exports, 'blur', { + enumerable: true, + get: function () { + return _blur.default; + } + }); + Object.defineProperty(exports, 'triggerEvent', { + enumerable: true, + get: function () { + return _triggerEvent.default; + } + }); + Object.defineProperty(exports, 'triggerKeyEvent', { + enumerable: true, + get: function () { + return _triggerKeyEvent.default; + } + }); + Object.defineProperty(exports, 'fillIn', { + enumerable: true, + get: function () { + return _fillIn.default; + } + }); + Object.defineProperty(exports, 'waitFor', { + enumerable: true, + get: function () { + return _waitFor.default; + } + }); + Object.defineProperty(exports, 'getRootElement', { + enumerable: true, + get: function () { + return _getRootElement.default; + } + }); + Object.defineProperty(exports, 'find', { + enumerable: true, + get: function () { + return _find.default; + } + }); + Object.defineProperty(exports, 'findAll', { + enumerable: true, + get: function () { + return _findAll.default; + } + }); +}); +define("@ember/test-helpers/resolver", ["exports"], function (exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.setResolver = setResolver; + exports.getResolver = getResolver; + var __resolver__; + + /** + Stores the provided resolver instance so that tests being ran can resolve + objects in the same way as a normal application. + + Used by `setupContext` and `setupRenderingContext` as a fallback when `setApplication` was _not_ used. + + @public + @param {Ember.Resolver} resolver the resolver to be used for testing + */ + function setResolver(resolver) { + __resolver__ = resolver; + } + + /** + Retrieve the resolver instance stored by `setResolver`. + + @public + @returns {Ember.Resolver} the previously stored resolver + */ + function getResolver() { + return __resolver__; + } +}); +define('@ember/test-helpers/settled', ['exports', '@ember/test-helpers/-utils', '@ember/test-helpers/wait-until'], function (exports, _utils, _waitUntil) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports._teardownAJAXHooks = _teardownAJAXHooks; + exports._setupAJAXHooks = _setupAJAXHooks; + exports.getSettledState = getSettledState; + exports.isSettled = isSettled; + exports.default = settled; + + + // Ember internally tracks AJAX requests in the same way that we do here for + // legacy style "acceptance" tests using the `ember-testing.js` asset provided + // by emberjs/ember.js itself. When `@ember/test-helpers`'s `settled` utility + // is used in a legacy acceptance test context any pending AJAX requests are + // not properly considered during the `isSettled` check below. + // + // This utilizes a local utility method present in Ember since around 2.8.0 to + // properly consider pending AJAX requests done within legacy acceptance tests. + const _internalPendingRequests = (() => { + if (Ember.__loader.registry['ember-testing/test/pending_requests']) { + return Ember.__loader.require('ember-testing/test/pending_requests').pendingRequests; + } + + return () => 0; + })(); + + let requests; + + /** + @private + @returns {number} the count of pending requests + */ + function pendingRequests() { + let localRequestsPending = requests !== undefined ? requests.length : 0; + let internalRequestsPending = _internalPendingRequests(); + + return localRequestsPending + internalRequestsPending; + } + + /** + @private + @param {Event} event (unused) + @param {XMLHTTPRequest} xhr the XHR that has initiated a request + */ + function incrementAjaxPendingRequests(event, xhr) { + requests.push(xhr); + } + + /** + @private + @param {Event} event (unused) + @param {XMLHTTPRequest} xhr the XHR that has initiated a request + */ + function decrementAjaxPendingRequests(event, xhr) { + // In most Ember versions to date (current version is 2.16) RSVP promises are + // configured to flush in the actions queue of the Ember run loop, however it + // is possible that in the future this changes to use "true" micro-task + // queues. + // + // The entire point here, is that _whenever_ promises are resolved will be + // before the next run of the JS event loop. Then in the next event loop this + // counter will decrement. In the specific case of AJAX, this means that any + // promises chained off of `$.ajax` will properly have their `.then` called + // _before_ this is decremented (and testing continues) + (0, _utils.nextTick)(() => { + for (let i = 0; i < requests.length; i++) { + if (xhr === requests[i]) { + requests.splice(i, 1); + } + } + }, 0); + } + + /** + Clears listeners that were previously setup for `ajaxSend` and `ajaxComplete`. + + @private + */ + function _teardownAJAXHooks() { + if (!Ember.$) { + return; + } + + Ember.$(document).off('ajaxSend', incrementAjaxPendingRequests); + Ember.$(document).off('ajaxComplete', decrementAjaxPendingRequests); + } + + /** + Sets up listeners for `ajaxSend` and `ajaxComplete`. + + @private + */ + function _setupAJAXHooks() { + requests = []; + + if (!Ember.$) { + return; + } + + Ember.$(document).on('ajaxSend', incrementAjaxPendingRequests); + Ember.$(document).on('ajaxComplete', decrementAjaxPendingRequests); + } + + let _internalCheckWaiters; + if (Ember.__loader.registry['ember-testing/test/waiters']) { + _internalCheckWaiters = Ember.__loader.require('ember-testing/test/waiters').checkWaiters; + } + + /** + @private + @returns {boolean} true if waiters are still pending + */ + function checkWaiters() { + if (_internalCheckWaiters) { + return _internalCheckWaiters(); + } else if (Ember.Test.waiters) { + if (Ember.Test.waiters.any(([context, callback]) => !callback.call(context))) { + return true; + } + } + + return false; + } + + /** + Check various settledness metrics, and return an object with the following properties: + + * `hasRunLoop` - Checks if a run-loop has been started. If it has, this will + be `true` otherwise it will be `false`. + * `hasPendingTimers` - Checks if there are scheduled timers in the run-loop. + These pending timers are primarily registered by `Ember.run.schedule`. If + there are pending timers, this will be `true`, otherwise `false`. + * `hasPendingWaiters` - Checks if any registered test waiters are still + pending (e.g. the waiter returns `true`). If there are pending waiters, + this will be `true`, otherwise `false`. + * `hasPendingRequests` - Checks if there are pending AJAX requests (based on + `ajaxSend` / `ajaxComplete` events triggered by `jQuery.ajax`). If there + are pending requests, this will be `true`, otherwise `false`. + * `pendingRequestCount` - The count of pending AJAX requests. + + @public + @returns {Object} object with properties for each of the metrics used to determine settledness + */ + function getSettledState() { + let pendingRequestCount = pendingRequests(); + + return { + hasPendingTimers: Boolean(Ember.run.hasScheduledTimers()), + hasRunLoop: Boolean(Ember.run.currentRunLoop), + hasPendingWaiters: checkWaiters(), + hasPendingRequests: pendingRequestCount > 0, + pendingRequestCount + }; + } + + /** + Checks various settledness metrics (via `getSettledState()`) to determine if things are settled or not. + + Settled generally means that there are no pending timers, no pending waiters, + no pending AJAX requests, and no current run loop. However, new settledness + metrics may be added and used as they become available. + + @public + @returns {boolean} `true` if settled, `false` otherwise + */ + function isSettled() { + let { hasPendingTimers, hasRunLoop, hasPendingRequests, hasPendingWaiters } = getSettledState(); + + if (hasPendingTimers || hasRunLoop || hasPendingRequests || hasPendingWaiters) { + return false; + } + + return true; + } + + /** + Returns a promise that resolves when in a settled state (see `isSettled` for + a definition of "settled state"). + + @public + @returns {Promise} resolves when settled + */ + function settled() { + return (0, _waitUntil.default)(isSettled, { timeout: Infinity }); + } +}); +define('@ember/test-helpers/setup-application-context', ['exports', '@ember/test-helpers/-utils', '@ember/test-helpers/setup-context', '@ember/test-helpers/has-ember-version', '@ember/test-helpers/settled'], function (exports, _utils, _setupContext, _hasEmberVersion, _settled) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.visit = visit; + exports.currentRouteName = currentRouteName; + exports.currentURL = currentURL; + exports.default = setupApplicationContext; + + + /** + Navigate the application to the provided URL. + + @public + @returns {Promise} resolves when settled + */ + function visit() { + let context = (0, _setupContext.getContext)(); + let { owner } = context; + + return (0, _utils.nextTickPromise)().then(() => { + return owner.visit(...arguments); + }).then(() => { + if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) { + context.element = document.querySelector('#ember-testing > .ember-view'); + } else { + context.element = document.querySelector('#ember-testing'); + } + }).then(_settled.default); + } + + /** + @public + @returns {string} the currently active route name + */ + /* globals EmberENV */ + function currentRouteName() { + let { owner } = (0, _setupContext.getContext)(); + let router = owner.lookup('router:main'); + return Ember.get(router, 'currentRouteName'); + } + + const HAS_CURRENT_URL_ON_ROUTER = (0, _hasEmberVersion.default)(2, 13); + + /** + @public + @returns {string} the applications current url + */ + function currentURL() { + let { owner } = (0, _setupContext.getContext)(); + let router = owner.lookup('router:main'); + + if (HAS_CURRENT_URL_ON_ROUTER) { + return Ember.get(router, 'currentURL'); + } else { + return Ember.get(router, 'location').getURL(); + } + } + + /** + Used by test framework addons to setup the provided context for working with + an application (e.g. routing). + + `setupContext` must have been ran on the provided context prior to calling + `setupApplicatinContext`. + + Sets up the basic framework used by application tests. + + @public + @param {Object} context the context to setup + @returns {Promise} resolves with the context that was setup + */ + function setupApplicationContext() { + return (0, _utils.nextTickPromise)(); + } +}); +define('@ember/test-helpers/setup-context', ['exports', '@ember/test-helpers/build-owner', '@ember/test-helpers/settled', '@ember/test-helpers/global', '@ember/test-helpers/resolver', '@ember/test-helpers/application', '@ember/test-helpers/-utils'], function (exports, _buildOwner, _settled, _global, _resolver, _application, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.CLEANUP = undefined; + exports.setContext = setContext; + exports.getContext = getContext; + exports.unsetContext = unsetContext; + exports.pauseTest = pauseTest; + exports.resumeTest = resumeTest; + + exports.default = function (context, options = {}) { + Ember.testing = true; + setContext(context); + + let contextGuid = Ember.guidFor(context); + CLEANUP[contextGuid] = []; + + return (0, _utils.nextTickPromise)().then(() => { + let application = (0, _application.getApplication)(); + if (application) { + return application.boot(); + } + }).then(() => { + let testElementContainer = document.getElementById('ember-testing-container'); + let fixtureResetValue = testElementContainer.innerHTML; + + // push this into the final cleanup bucket, to be ran _after_ the owner + // is destroyed and settled (e.g. flushed run loops, etc) + CLEANUP[contextGuid].push(() => { + testElementContainer.innerHTML = fixtureResetValue; + }); + + let { resolver } = options; + + // This handles precendence, specifying a specific option of + // resolver always trumps whatever is auto-detected, then we fallback to + // the suite-wide registrations + // + // At some later time this can be extended to support specifying a custom + // engine or application... + if (resolver) { + return (0, _buildOwner.default)(null, resolver); + } + + return (0, _buildOwner.default)((0, _application.getApplication)(), (0, _resolver.getResolver)()); + }).then(owner => { + context.owner = owner; + + context.set = function (key, value) { + let ret = Ember.run(function () { + return Ember.set(context, key, value); + }); + + return ret; + }; + + context.setProperties = function (hash) { + let ret = Ember.run(function () { + return Ember.setProperties(context, hash); + }); + + return ret; + }; + + context.get = function (key) { + return Ember.get(context, key); + }; + + context.getProperties = function (...args) { + return Ember.getProperties(context, args); + }; + + let resume; + context.resumeTest = function resumeTest() { + (true && !(resume) && Ember.assert('Testing has not been paused. There is nothing to resume.', resume)); + + resume(); + _global.default.resumeTest = resume = undefined; + }; + + context.pauseTest = function pauseTest() { + console.info('Testing paused. Use `resumeTest()` to continue.'); // eslint-disable-line no-console + + return new Ember.RSVP.Promise(resolve => { + resume = resolve; + _global.default.resumeTest = resumeTest; + }, 'TestAdapter paused promise'); + }; + + (0, _settled._setupAJAXHooks)(); + + return context; + }); + }; + + let __test_context__; + + /** + Stores the provided context as the "global testing context". + + Generally setup automatically by `setupContext`. + + @public + @param {Object} context the context to use + */ + function setContext(context) { + __test_context__ = context; + } + + /** + Retrive the "global testing context" as stored by `setContext`. + + @public + @returns {Object} the previously stored testing context + */ + function getContext() { + return __test_context__; + } + + /** + Clear the "global testing context". + + Generally invoked from `teardownContext`. + + @public + */ + function unsetContext() { + __test_context__ = undefined; + } + + /** + * Returns a promise to be used to pauses the current test (due to being + * returned from the test itself). This is useful for debugging while testing + * or for test-driving. It allows you to inspect the state of your application + * at any point. + * + * The test framework wrapper (e.g. `ember-qunit` or `ember-mocha`) should + * ensure that when `pauseTest()` is used, any framework specific test timeouts + * are disabled. + * + * @public + * @returns {Promise} resolves _only_ when `resumeTest()` is invoked + * @example Usage via ember-qunit + * + * import { setupRenderingTest } from 'ember-qunit'; + * import { render, click, pauseTest } from '@ember/test-helpers'; + * + * + * module('awesome-sauce', function(hooks) { + * setupRenderingTest(hooks); + * + * test('does something awesome', async function(assert) { + * await render(hbs`{{awesome-sauce}}`); + * + * // added here to visualize / interact with the DOM prior + * // to the interaction below + * await pauseTest(); + * + * click('.some-selector'); + * + * assert.equal(this.element.textContent, 'this sauce is awesome!'); + * }); + * }); + */ + function pauseTest() { + let context = getContext(); + + if (!context || typeof context.pauseTest !== 'function') { + throw new Error('Cannot call `pauseTest` without having first called `setupTest` or `setupRenderingTest`.'); + } + + return context.pauseTest(); + } + + /** + Resumes a test previously paused by `await pauseTest()`. + + @public + */ + function resumeTest() { + let context = getContext(); + + if (!context || typeof context.resumeTest !== 'function') { + throw new Error('Cannot call `resumeTest` without having first called `setupTest` or `setupRenderingTest`.'); + } + + context.resumeTest(); + } + + const CLEANUP = exports.CLEANUP = Object.create(null); + + /** + Used by test framework addons to setup the provided context for testing. + + Responsible for: + + - sets the "global testing context" to the provided context (`setContext`) + - create an owner object and set it on the provided context (e.g. `this.owner`) + - setup `this.set`, `this.setProperties`, `this.get`, and `this.getProperties` to the provided context + - setting up AJAX listeners + - setting up `pauseTest` (also available as `this.pauseTest()`) and `resumeTest` helpers + + @public + @param {Object} context the context to setup + @param {Object} [options] options used to override defaults + @param {Resolver} [options.resolver] a resolver to use for customizing normal resolution + @returns {Promise} resolves with the context that was setup + */ +}); +define('@ember/test-helpers/setup-rendering-context', ['exports', '@ember/test-helpers/global', '@ember/test-helpers/setup-context', '@ember/test-helpers/-utils', '@ember/test-helpers/settled', '@ember/test-helpers/dom/get-root-element'], function (exports, _global, _setupContext, _utils, _settled, _getRootElement) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.RENDERING_CLEANUP = undefined; + exports.render = render; + exports.clearRender = clearRender; + exports.default = setupRenderingContext; + /* globals EmberENV */ + const RENDERING_CLEANUP = exports.RENDERING_CLEANUP = Object.create(null); + const OUTLET_TEMPLATE = Ember.HTMLBars.template({ + "id": "gc40spmP", + "block": "{\"symbols\":[],\"statements\":[[1,[18,\"outlet\"],false]],\"hasEval\":false}", + "meta": {} + }); + const EMPTY_TEMPLATE = Ember.HTMLBars.template({ + "id": "xOcW61lH", + "block": "{\"symbols\":[],\"statements\":[],\"hasEval\":false}", + "meta": {} + }); + + /** + @private + @param {Ember.ApplicationInstance} owner the current owner instance + @returns {Template} a template representing {{outlet}} + */ + function lookupOutletTemplate(owner) { + let OutletTemplate = owner.lookup('template:-outlet'); + if (!OutletTemplate) { + owner.register('template:-outlet', OUTLET_TEMPLATE); + OutletTemplate = owner.lookup('template:-outlet'); + } + + return OutletTemplate; + } + + /** + @private + @param {string} [selector] the selector to search for relative to element + @returns {jQuery} a jQuery object representing the selector (or element itself if no selector) + */ + function jQuerySelector(selector) { + let { element } = (0, _setupContext.getContext)(); + + // emulates Ember internal behavor of `this.$` in a component + // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18 + return selector ? _global.default.jQuery(selector, element) : _global.default.jQuery(element); + } + + let templateId = 0; + /** + Renders the provided template and appends it to the DOM. + + @public + @param {CompiledTemplate} template the template to render + @returns {Promise} resolves when settled + */ + function render(template) { + let context = (0, _setupContext.getContext)(); + + if (!template) { + throw new Error('you must pass a template to `render()`'); + } + + return (0, _utils.nextTickPromise)().then(() => { + let { owner } = context; + + let toplevelView = owner.lookup('-top-level-view:main'); + let OutletTemplate = lookupOutletTemplate(owner); + templateId += 1; + let templateFullName = `template:-undertest-${templateId}`; + owner.register(templateFullName, template); + + let outletState = { + render: { + owner, + into: undefined, + outlet: 'main', + name: 'application', + controller: undefined, + ViewClass: undefined, + template: OutletTemplate + }, + + outlets: { + main: { + render: { + owner, + into: undefined, + outlet: 'main', + name: 'index', + controller: context, + ViewClass: undefined, + template: owner.lookup(templateFullName), + outlets: {} + }, + outlets: {} + } + } + }; + toplevelView.setOutletState(outletState); + + // returning settled here because the actual rendering does not happen until + // the renderer detects it is dirty (which happens on backburner's end + // hook), see the following implementation details: + // + // * [view:outlet](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/views/outlet.js#L129-L145) manually dirties its own tag upon `setOutletState` + // * [backburner's custom end hook](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/renderer.js#L145-L159) detects that the current revision of the root is no longer the latest, and triggers a new rendering transaction + return (0, _settled.default)(); + }); + } + + /** + Clears any templates previously rendered. This is commonly used for + confirming behavior that is triggered by teardown (e.g. + `willDestroyElement`). + + @public + @returns {Promise} resolves when settled + */ + function clearRender() { + let context = (0, _setupContext.getContext)(); + + if (!context || typeof context.clearRender !== 'function') { + throw new Error('Cannot call `clearRender` without having first called `setupRenderingContext`.'); + } + + return render(EMPTY_TEMPLATE); + } + + /** + Used by test framework addons to setup the provided context for rendering. + + `setupContext` must have been ran on the provided context + prior to calling `setupRenderingContext`. + + Responsible for: + + - Setup the basic framework used for rendering by the + `render` helper. + - Ensuring the event dispatcher is properly setup. + - Setting `this.element` to the root element of the testing + container (things rendered via `render` will go _into_ this + element). + + @public + @param {Object} context the context to setup for rendering + @returns {Promise} resolves with the context that was setup + */ + function setupRenderingContext(context) { + let contextGuid = Ember.guidFor(context); + RENDERING_CLEANUP[contextGuid] = []; + + return (0, _utils.nextTickPromise)().then(() => { + let { owner } = context; + + // these methods being placed on the context itself will be deprecated in + // a future version (no giant rush) to remove some confusion about which + // is the "right" way to things... + context.render = render; + context.clearRender = clearRender; + + if (_global.default.jQuery) { + context.$ = jQuerySelector; + } + + // When the host app uses `setApplication` (instead of `setResolver`) the event dispatcher has + // already been setup via `applicationInstance.boot()` in `./build-owner`. If using + // `setResolver` (instead of `setApplication`) a "mock owner" is created by extending + // `Ember._ContainerProxyMixin` and `Ember._RegistryProxyMixin` in this scenario we need to + // manually start the event dispatcher. + if (owner._emberTestHelpersMockOwner) { + let dispatcher = owner.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); + dispatcher.setup({}, '#ember-testing'); + } + + let OutletView = owner.factoryFor ? owner.factoryFor('view:-outlet') : owner._lookupFactory('view:-outlet'); + let toplevelView = OutletView.create(); + + owner.register('-top-level-view:main', { + create() { + return toplevelView; + } + }); + + // initially render a simple empty template + return render(EMPTY_TEMPLATE).then(() => { + Ember.run(toplevelView, 'appendTo', (0, _getRootElement.default)()); + + return (0, _settled.default)(); + }); + }).then(() => { + // ensure the element is based on the wrapping toplevel view + // Ember still wraps the main application template with a + // normal tagged view + // + // In older Ember versions (2.4) the element itself is not stable, + // and therefore we cannot update the `this.element` until after the + // rendering is completed + if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) { + context.element = (0, _getRootElement.default)().querySelector('.ember-view'); + } else { + context.element = (0, _getRootElement.default)(); + } + + return context; + }); + } +}); +define('@ember/test-helpers/teardown-application-context', ['exports', '@ember/test-helpers/settled'], function (exports, _settled) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = function () { + return (0, _settled.default)(); + }; +}); +define('@ember/test-helpers/teardown-context', ['exports', '@ember/test-helpers/settled', '@ember/test-helpers/setup-context', '@ember/test-helpers/-utils'], function (exports, _settled, _setupContext, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = teardownContext; + + + /** + Used by test framework addons to tear down the provided context after testing is completed. + + Responsible for: + + - un-setting the "global testing context" (`unsetContext`) + - destroy the contexts owner object + - remove AJAX listeners + + @public + @param {Object} context the context to setup + @returns {Promise} resolves when settled + */ + function teardownContext(context) { + return (0, _utils.nextTickPromise)().then(() => { + let { owner } = context; + + (0, _settled._teardownAJAXHooks)(); + + Ember.run(owner, 'destroy'); + Ember.testing = false; + + (0, _setupContext.unsetContext)(); + + return (0, _settled.default)(); + }).finally(() => { + let contextGuid = Ember.guidFor(context); + + (0, _utils.runDestroyablesFor)(_setupContext.CLEANUP, contextGuid); + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/teardown-rendering-context', ['exports', '@ember/test-helpers/setup-rendering-context', '@ember/test-helpers/-utils', '@ember/test-helpers/settled'], function (exports, _setupRenderingContext, _utils, _settled) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = teardownRenderingContext; + + + /** + Used by test framework addons to tear down the provided context after testing is completed. + + Responsible for: + + - resetting the `ember-testing-container` to its original state (the value + when `setupRenderingContext` was called). + + @public + @param {Object} context the context to setup + @returns {Promise} resolves when settled + */ + function teardownRenderingContext(context) { + return (0, _utils.nextTickPromise)().then(() => { + let contextGuid = Ember.guidFor(context); + + (0, _utils.runDestroyablesFor)(_setupRenderingContext.RENDERING_CLEANUP, contextGuid); + + return (0, _settled.default)(); + }); + } +}); +define('@ember/test-helpers/validate-error-handler', ['exports'], function (exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = validateErrorHandler; + + const VALID = Object.freeze({ isValid: true, message: null }); + const INVALID = Object.freeze({ + isValid: false, + message: 'error handler should have re-thrown the provided error' + }); + + /** + * Validate the provided error handler to confirm that it properly re-throws + * errors when `Ember.testing` is true. + * + * This is intended to be used by test framework hosts (or other libraries) to + * ensure that `Ember.onerror` is properly configured. Without a check like + * this, `Ember.onerror` could _easily_ swallow all errors and make it _seem_ + * like everything is just fine (and have green tests) when in reality + * everything is on fire... + * + * @public + * @param {Function} [callback=Ember.onerror] the callback to validate + * @returns {Object} object with `isValid` and `message` + * + * @example Example implementation for `ember-qunit` + * + * import { validateErrorHandler } from '@ember/test-helpers'; + * + * test('Ember.onerror is functioning properly', function(assert) { + * let result = validateErrorHandler(); + * assert.ok(result.isValid, result.message); + * }); + */ + function validateErrorHandler(callback = Ember.onerror) { + if (callback === undefined || callback === null) { + return VALID; + } + + let error = new Error('Error handler validation error!'); + + let originalEmberTesting = Ember.testing; + Ember.testing = true; + try { + callback(error); + } catch (e) { + if (e === error) { + return VALID; + } + } finally { + Ember.testing = originalEmberTesting; + } + + return INVALID; + } +}); +define('@ember/test-helpers/wait-until', ['exports', '@ember/test-helpers/-utils'], function (exports, _utils) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = waitUntil; + + + const TIMEOUTS = [0, 1, 2, 5, 7]; + const MAX_TIMEOUT = 10; + + /** + Wait for the provided callback to return a truthy value. + + This does not leverage `settled()`, and as such can be used to manage async + while _not_ settled (e.g. "loading" or "pending" states). + + @public + @param {Function} callback the callback to use for testing when waiting should stop + @param {Object} [options] options used to override defaults + @param {number} [options.timeout=1000] the maximum amount of time to wait + @returns {Promise} resolves with the callback value when it returns a truthy value + */ + function waitUntil(callback, options = {}) { + let timeout = 'timeout' in options ? options.timeout : 1000; + + // creating this error eagerly so it has the proper invocation stack + let waitUntilTimedOut = new Error('waitUntil timed out'); + + return new Ember.RSVP.Promise(function (resolve, reject) { + let time = 0; + + // eslint-disable-next-line require-jsdoc + function scheduleCheck(timeoutsIndex) { + let interval = TIMEOUTS[timeoutsIndex]; + if (interval === undefined) { + interval = MAX_TIMEOUT; + } + + (0, _utils.futureTick)(function () { + time += interval; + + let value; + try { + value = callback(); + } catch (error) { + reject(error); + } + + if (value) { + resolve(value); + } else if (time < timeout) { + scheduleCheck(timeoutsIndex + 1); + } else { + reject(waitUntilTimedOut); + } + }, interval); + } + + scheduleCheck(0); + }); + } +}); +define('ember-cli-qunit', ['exports', 'ember-qunit'], function (exports, _emberQunit) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, 'TestLoader', { + enumerable: true, + get: function () { + return _emberQunit.TestLoader; + } + }); + Object.defineProperty(exports, 'setupTestContainer', { + enumerable: true, + get: function () { + return _emberQunit.setupTestContainer; + } + }); + Object.defineProperty(exports, 'loadTests', { + enumerable: true, + get: function () { + return _emberQunit.loadTests; + } + }); + Object.defineProperty(exports, 'startTests', { + enumerable: true, + get: function () { + return _emberQunit.startTests; + } + }); + Object.defineProperty(exports, 'setupTestAdapter', { + enumerable: true, + get: function () { + return _emberQunit.setupTestAdapter; + } + }); + Object.defineProperty(exports, 'start', { + enumerable: true, + get: function () { + return _emberQunit.start; + } + }); +}); +define('ember-cli-test-loader/test-support/index', ['exports'], function (exports) { + /* globals requirejs, require */ + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.addModuleIncludeMatcher = addModuleIncludeMatcher; + exports.addModuleExcludeMatcher = addModuleExcludeMatcher; + let moduleIncludeMatchers = []; + let moduleExcludeMatchers = []; + + function addModuleIncludeMatcher(fn) { + moduleIncludeMatchers.push(fn); + } + + function addModuleExcludeMatcher(fn) { + moduleExcludeMatchers.push(fn); + } + + function checkMatchers(matchers, moduleName) { + return matchers.some(matcher => matcher(moduleName)); + } + + class TestLoader { + static load() { + new TestLoader().loadModules(); + } + + constructor() { + this._didLogMissingUnsee = false; + } + + shouldLoadModule(moduleName) { + return moduleName.match(/[-_]test$/); + } + + listModules() { + return Object.keys(requirejs.entries); + } + + listTestModules() { + let moduleNames = this.listModules(); + let testModules = []; + let moduleName; + + for (let i = 0; i < moduleNames.length; i++) { + moduleName = moduleNames[i]; + + if (checkMatchers(moduleExcludeMatchers, moduleName)) { + continue; + } + + if (checkMatchers(moduleIncludeMatchers, moduleName) || this.shouldLoadModule(moduleName)) { + testModules.push(moduleName); + } + } + + return testModules; + } + + loadModules() { + let testModules = this.listTestModules(); + let testModule; + + for (let i = 0; i < testModules.length; i++) { + testModule = testModules[i]; + this.require(testModule); + this.unsee(testModule); + } + } + + require(moduleName) { + try { + require(moduleName); + } catch (e) { + this.moduleLoadFailure(moduleName, e); + } + } + + unsee(moduleName) { + if (typeof require.unsee === 'function') { + require.unsee(moduleName); + } else if (!this._didLogMissingUnsee) { + this._didLogMissingUnsee = true; + if (typeof console !== 'undefined') { + console.warn('unable to require.unsee, please upgrade loader.js to >= v3.3.0'); + } + } + } + + moduleLoadFailure(moduleName, error) { + console.error('Error loading: ' + moduleName, error.stack); + } + }exports.default = TestLoader; + ; +}); +define('ember-qunit/adapter', ['exports', 'qunit', '@ember/test-helpers/has-ember-version'], function (exports, _qunit, _hasEmberVersion) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + + function unhandledRejectionAssertion(current, error) { + let message, source; + + if (typeof error === 'object' && error !== null) { + message = error.message; + source = error.stack; + } else if (typeof error === 'string') { + message = error; + source = 'unknown source'; + } else { + message = 'unhandledRejection occured, but it had no message'; + source = 'unknown source'; + } + + current.assert.pushResult({ + result: false, + actual: false, + expected: true, + message: message, + source: source + }); + } + + let Adapter = Ember.Test.Adapter.extend({ + init() { + this.doneCallbacks = []; + }, + + asyncStart() { + this.doneCallbacks.push(_qunit.default.config.current ? _qunit.default.config.current.assert.async() : null); + }, + + asyncEnd() { + let done = this.doneCallbacks.pop(); + // This can be null if asyncStart() was called outside of a test + if (done) { + done(); + } + }, + + // clobber default implementation of `exception` will be added back for Ember + // < 2.17 just below... + exception: null + }); + + // Ember 2.17 and higher do not require the test adapter to have an `exception` + // method When `exception` is not present, the unhandled rejection is + // automatically re-thrown and will therefore hit QUnit's own global error + // handler (therefore appropriately causing test failure) + if (!(0, _hasEmberVersion.default)(2, 17)) { + Adapter = Adapter.extend({ + exception(error) { + unhandledRejectionAssertion(_qunit.default.config.current, error); + } + }); + } + + exports.default = Adapter; +}); +define('ember-qunit/index', ['exports', 'ember-qunit/legacy-2-x/module-for', 'ember-qunit/legacy-2-x/module-for-component', 'ember-qunit/legacy-2-x/module-for-model', 'ember-qunit/adapter', 'qunit', 'ember-qunit/test-loader', '@ember/test-helpers'], function (exports, _moduleFor, _moduleForComponent, _moduleForModel, _adapter, _qunit, _testLoader, _testHelpers) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.loadTests = exports.todo = exports.only = exports.skip = exports.test = exports.module = exports.QUnitAdapter = exports.moduleForModel = exports.moduleForComponent = exports.moduleFor = undefined; + Object.defineProperty(exports, 'moduleFor', { + enumerable: true, + get: function () { + return _moduleFor.default; + } + }); + Object.defineProperty(exports, 'moduleForComponent', { + enumerable: true, + get: function () { + return _moduleForComponent.default; + } + }); + Object.defineProperty(exports, 'moduleForModel', { + enumerable: true, + get: function () { + return _moduleForModel.default; + } + }); + Object.defineProperty(exports, 'QUnitAdapter', { + enumerable: true, + get: function () { + return _adapter.default; + } + }); + Object.defineProperty(exports, 'module', { + enumerable: true, + get: function () { + return _qunit.module; + } + }); + Object.defineProperty(exports, 'test', { + enumerable: true, + get: function () { + return _qunit.test; + } + }); + Object.defineProperty(exports, 'skip', { + enumerable: true, + get: function () { + return _qunit.skip; + } + }); + Object.defineProperty(exports, 'only', { + enumerable: true, + get: function () { + return _qunit.only; + } + }); + Object.defineProperty(exports, 'todo', { + enumerable: true, + get: function () { + return _qunit.todo; + } + }); + Object.defineProperty(exports, 'loadTests', { + enumerable: true, + get: function () { + return _testLoader.loadTests; + } + }); + exports.setResolver = setResolver; + exports.render = render; + exports.clearRender = clearRender; + exports.settled = settled; + exports.pauseTest = pauseTest; + exports.resumeTest = resumeTest; + exports.setupTest = setupTest; + exports.setupRenderingTest = setupRenderingTest; + exports.setupApplicationTest = setupApplicationTest; + exports.setupTestContainer = setupTestContainer; + exports.startTests = startTests; + exports.setupTestAdapter = setupTestAdapter; + exports.setupEmberTesting = setupEmberTesting; + exports.setupEmberOnerrorValidation = setupEmberOnerrorValidation; + exports.start = start; + function setResolver() { + (true && !(false) && Ember.deprecate('`setResolver` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, { + id: 'ember-qunit.deprecated-reexports.setResolver', + until: '4.0.0' + })); + + + return (0, _testHelpers.setResolver)(...arguments); + } + + function render() { + (true && !(false) && Ember.deprecate('`render` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, { + id: 'ember-qunit.deprecated-reexports.render', + until: '4.0.0' + })); + + + return (0, _testHelpers.render)(...arguments); + } + + function clearRender() { + (true && !(false) && Ember.deprecate('`clearRender` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, { + id: 'ember-qunit.deprecated-reexports.clearRender', + until: '4.0.0' + })); + + + return (0, _testHelpers.clearRender)(...arguments); + } + + function settled() { + (true && !(false) && Ember.deprecate('`settled` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, { + id: 'ember-qunit.deprecated-reexports.settled', + until: '4.0.0' + })); + + + return (0, _testHelpers.settled)(...arguments); + } + + function pauseTest() { + (true && !(false) && Ember.deprecate('`pauseTest` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, { + id: 'ember-qunit.deprecated-reexports.pauseTest', + until: '4.0.0' + })); + + + return (0, _testHelpers.pauseTest)(...arguments); + } + + function resumeTest() { + (true && !(false) && Ember.deprecate('`resumeTest` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, { + id: 'ember-qunit.deprecated-reexports.resumeTest', + until: '4.0.0' + })); + + + return (0, _testHelpers.resumeTest)(...arguments); + } + + function setupTest(hooks, options) { + hooks.beforeEach(function (assert) { + return (0, _testHelpers.setupContext)(this, options).then(() => { + let originalPauseTest = this.pauseTest; + this.pauseTest = function QUnit_pauseTest() { + assert.timeout(-1); // prevent the test from timing out + + return originalPauseTest.call(this); + }; + }); + }); + + hooks.afterEach(function () { + return (0, _testHelpers.teardownContext)(this); + }); + } + + function setupRenderingTest(hooks, options) { + setupTest(hooks, options); + + hooks.beforeEach(function () { + return (0, _testHelpers.setupRenderingContext)(this); + }); + + hooks.afterEach(function () { + return (0, _testHelpers.teardownRenderingContext)(this); + }); + } + + function setupApplicationTest(hooks, options) { + setupTest(hooks, options); + + hooks.beforeEach(function () { + return (0, _testHelpers.setupApplicationContext)(this); + }); + + hooks.afterEach(function () { + return (0, _testHelpers.teardownApplicationContext)(this); + }); + } + + /** + Uses current URL configuration to setup the test container. + + * If `?nocontainer` is set, the test container will be hidden. + * If `?dockcontainer` or `?devmode` are set the test container will be + absolutely positioned. + * If `?devmode` is set, the test container will be made full screen. + + @method setupTestContainer + */ + function setupTestContainer() { + let testContainer = document.getElementById('ember-testing-container'); + if (!testContainer) { + return; + } + + let params = _qunit.default.urlParams; + + let containerVisibility = params.nocontainer ? 'hidden' : 'visible'; + let containerPosition = params.dockcontainer || params.devmode ? 'fixed' : 'relative'; + + if (params.devmode) { + testContainer.className = ' full-screen'; + } + + testContainer.style.visibility = containerVisibility; + testContainer.style.position = containerPosition; + + let qunitContainer = document.getElementById('qunit'); + if (params.dockcontainer) { + qunitContainer.style.marginBottom = window.getComputedStyle(testContainer).height; + } + } + + /** + Instruct QUnit to start the tests. + @method startTests + */ + function startTests() { + _qunit.default.start(); + } + + /** + Sets up the `Ember.Test` adapter for usage with QUnit 2.x. + + @method setupTestAdapter + */ + function setupTestAdapter() { + Ember.Test.adapter = _adapter.default.create(); + } + + /** + Ensures that `Ember.testing` is set to `true` before each test begins + (including `before` / `beforeEach`), and reset to `false` after each test is + completed. This is done via `QUnit.testStart` and `QUnit.testDone`. + + */ + function setupEmberTesting() { + _qunit.default.testStart(() => { + Ember.testing = true; + }); + + _qunit.default.testDone(() => { + Ember.testing = false; + }); + } + + /** + Ensures that `Ember.onerror` (if present) is properly configured to re-throw + errors that occur while `Ember.testing` is `true`. + */ + function setupEmberOnerrorValidation() { + _qunit.default.module('ember-qunit: Ember.onerror validation', function () { + _qunit.default.test('Ember.onerror is functioning properly', function (assert) { + assert.expect(1); + let result = (0, _testHelpers.validateErrorHandler)(); + assert.ok(result.isValid, `Ember.onerror handler with invalid testing behavior detected. An Ember.onerror handler _must_ rethrow exceptions when \`Ember.testing\` is \`true\` or the test suite is unreliable. See https://git.io/vbine for more details.`); + }); + }); + } + + /** + @method start + @param {Object} [options] Options to be used for enabling/disabling behaviors + @param {Boolean} [options.loadTests] If `false` tests will not be loaded automatically. + @param {Boolean} [options.setupTestContainer] If `false` the test container will not + be setup based on `devmode`, `dockcontainer`, or `nocontainer` URL params. + @param {Boolean} [options.startTests] If `false` tests will not be automatically started + (you must run `QUnit.start()` to kick them off). + @param {Boolean} [options.setupTestAdapter] If `false` the default Ember.Test adapter will + not be updated. + @param {Boolean} [options.setupEmberTesting] `false` opts out of the + default behavior of setting `Ember.testing` to `true` before all tests and + back to `false` after each test will. + @param {Boolean} [options.setupEmberOnerrorValidation] If `false` validation + of `Ember.onerror` will be disabled. + */ + function start(options = {}) { + if (options.loadTests !== false) { + (0, _testLoader.loadTests)(); + } + + if (options.setupTestContainer !== false) { + setupTestContainer(); + } + + if (options.setupTestAdapter !== false) { + setupTestAdapter(); + } + + if (options.setupEmberTesting !== false) { + setupEmberTesting(); + } + + if (options.setupEmberOnerrorValidation !== false) { + setupEmberOnerrorValidation(); + } + + if (options.startTests !== false) { + startTests(); + } + } +}); +define('ember-qunit/legacy-2-x/module-for-component', ['exports', 'ember-qunit/legacy-2-x/qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = moduleForComponent; + function moduleForComponent(name, description, callbacks) { + (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForComponent, name, description, callbacks); + } +}); +define('ember-qunit/legacy-2-x/module-for-model', ['exports', 'ember-qunit/legacy-2-x/qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = moduleForModel; + function moduleForModel(name, description, callbacks) { + (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForModel, name, description, callbacks); + } +}); +define('ember-qunit/legacy-2-x/module-for', ['exports', 'ember-qunit/legacy-2-x/qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = moduleFor; + function moduleFor(name, description, callbacks) { + (0, _qunitModule.createModule)(_emberTestHelpers.TestModule, name, description, callbacks); + } +}); +define('ember-qunit/legacy-2-x/qunit-module', ['exports', 'qunit'], function (exports, _qunit) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.createModule = createModule; + + + function noop() {} + + function callbackFor(name, callbacks) { + if (typeof callbacks !== 'object') { + return noop; + } + if (!callbacks) { + return noop; + } + + var callback = noop; + + if (callbacks[name]) { + callback = callbacks[name]; + delete callbacks[name]; + } + + return callback; + } + + function createModule(Constructor, name, description, callbacks) { + if (!callbacks && typeof description === 'object') { + callbacks = description; + description = name; + } + + var before = callbackFor('before', callbacks); + var beforeEach = callbackFor('beforeEach', callbacks); + var afterEach = callbackFor('afterEach', callbacks); + var after = callbackFor('after', callbacks); + + var module; + var moduleName = typeof description === 'string' ? description : name; + + (0, _qunit.module)(moduleName, { + before() { + // storing this in closure scope to avoid exposing these + // private internals to the test context + module = new Constructor(name, description, callbacks); + return before.apply(this, arguments); + }, + + beforeEach() { + // provide the test context to the underlying module + module.setContext(this); + + return module.setup(...arguments).then(() => { + return beforeEach.apply(this, arguments); + }); + }, + + afterEach() { + let result = afterEach.apply(this, arguments); + return Ember.RSVP.resolve(result).then(() => module.teardown(...arguments)); + }, + + after() { + try { + return after.apply(this, arguments); + } finally { + after = afterEach = before = beforeEach = callbacks = module = null; + } + } + }); + } +}); +define('ember-qunit/test-loader', ['exports', 'qunit', 'ember-cli-test-loader/test-support/index'], function (exports, _qunit, _index) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.TestLoader = undefined; + exports.loadTests = loadTests; + + + (0, _index.addModuleExcludeMatcher)(function (moduleName) { + return _qunit.default.urlParams.nolint && moduleName.match(/\.(jshint|lint-test)$/); + }); + + (0, _index.addModuleIncludeMatcher)(function (moduleName) { + return moduleName.match(/\.jshint$/); + }); + + let moduleLoadFailures = []; + + _qunit.default.done(function () { + if (moduleLoadFailures.length) { + throw new Error('\n' + moduleLoadFailures.join('\n')); + } + }); + + class TestLoader extends _index.default { + moduleLoadFailure(moduleName, error) { + moduleLoadFailures.push(error); + + _qunit.default.module('TestLoader Failures'); + _qunit.default.test(moduleName + ': could not be loaded', function () { + throw error; + }); + } + } + + exports.TestLoader = TestLoader; + /** + Load tests following the default patterns: + + * The module name ends with `-test` + * The module name ends with `.jshint` + + Excludes tests that match the following + patterns when `?nolint` URL param is set: + + * The module name ends with `.jshint` + * The module name ends with `-lint-test` + + @method loadTests + */ + function loadTests() { + new TestLoader().loadModules(); + } +}); +define('ember-test-helpers/has-ember-version', ['exports', '@ember/test-helpers/has-ember-version'], function (exports, _hasEmberVersion) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, 'default', { + enumerable: true, + get: function () { + return _hasEmberVersion.default; + } + }); +}); +define('ember-test-helpers/index', ['exports', '@ember/test-helpers', 'ember-test-helpers/legacy-0-6-x/test-module', 'ember-test-helpers/legacy-0-6-x/test-module-for-acceptance', 'ember-test-helpers/legacy-0-6-x/test-module-for-component', 'ember-test-helpers/legacy-0-6-x/test-module-for-model'], function (exports, _testHelpers, _testModule, _testModuleForAcceptance, _testModuleForComponent, _testModuleForModel) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.keys(_testHelpers).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _testHelpers[key]; + } + }); + }); + Object.defineProperty(exports, 'TestModule', { + enumerable: true, + get: function () { + return _testModule.default; + } + }); + Object.defineProperty(exports, 'TestModuleForAcceptance', { + enumerable: true, + get: function () { + return _testModuleForAcceptance.default; + } + }); + Object.defineProperty(exports, 'TestModuleForComponent', { + enumerable: true, + get: function () { + return _testModuleForComponent.default; + } + }); + Object.defineProperty(exports, 'TestModuleForModel', { + enumerable: true, + get: function () { + return _testModuleForModel.default; + } + }); +}); +define('ember-test-helpers/legacy-0-6-x/-legacy-overrides', ['exports', 'ember-test-helpers/has-ember-version'], function (exports, _hasEmberVersion) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.preGlimmerSetupIntegrationForComponent = preGlimmerSetupIntegrationForComponent; + function preGlimmerSetupIntegrationForComponent() { + var module = this; + var context = this.context; + + this.actionHooks = {}; + + context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); + context.dispatcher.setup({}, '#ember-testing'); + context.actions = module.actionHooks; + + (this.registry || this.container).register('component:-test-holder', Ember.Component.extend()); + + context.render = function (template) { + // in case `this.render` is called twice, make sure to teardown the first invocation + module.teardownComponent(); + + if (!template) { + throw new Error('in a component integration test you must pass a template to `render()`'); + } + if (Ember.isArray(template)) { + template = template.join(''); + } + if (typeof template === 'string') { + template = Ember.Handlebars.compile(template); + } + module.component = module.container.lookupFactory('component:-test-holder').create({ + layout: template + }); + + module.component.set('context', context); + module.component.set('controller', context); + + Ember.run(function () { + module.component.appendTo('#ember-testing'); + }); + + context._element = module.component.element; + }; + + context.$ = function () { + return module.component.$.apply(module.component, arguments); + }; + + context.set = function (key, value) { + var ret = Ember.run(function () { + return Ember.set(context, key, value); + }); + + if ((0, _hasEmberVersion.default)(2, 0)) { + return ret; + } + }; + + context.setProperties = function (hash) { + var ret = Ember.run(function () { + return Ember.setProperties(context, hash); + }); + + if ((0, _hasEmberVersion.default)(2, 0)) { + return ret; + } + }; + + context.get = function (key) { + return Ember.get(context, key); + }; + + context.getProperties = function () { + var args = Array.prototype.slice.call(arguments); + return Ember.getProperties(context, args); + }; + + context.on = function (actionName, handler) { + module.actionHooks[actionName] = handler; + }; + + context.send = function (actionName) { + var hook = module.actionHooks[actionName]; + if (!hook) { + throw new Error('integration testing template received unexpected action ' + actionName); + } + hook.apply(module, Array.prototype.slice.call(arguments, 1)); + }; + + context.clearRender = function () { + module.teardownComponent(); + }; + } +}); +define('ember-test-helpers/legacy-0-6-x/abstract-test-module', ['exports', 'ember-test-helpers/legacy-0-6-x/ext/rsvp', '@ember/test-helpers/settled', '@ember/test-helpers'], function (exports, _rsvp, _settled, _testHelpers) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + + // calling this `merge` here because we cannot + // actually assume it is like `Object.assign` + // with > 2 args + const merge = Ember.assign || Ember.merge; + + exports.default = class { + constructor(name, options) { + this.context = undefined; + this.name = name; + this.callbacks = options || {}; + + this.initSetupSteps(); + this.initTeardownSteps(); + } + + setup(assert) { + Ember.testing = true; + return this.invokeSteps(this.setupSteps, this, assert).then(() => { + this.contextualizeCallbacks(); + return this.invokeSteps(this.contextualizedSetupSteps, this.context, assert); + }); + } + + teardown(assert) { + return this.invokeSteps(this.contextualizedTeardownSteps, this.context, assert).then(() => { + return this.invokeSteps(this.teardownSteps, this, assert); + }).then(() => { + this.cache = null; + this.cachedCalls = null; + }).finally(function () { + Ember.testing = false; + }); + } + + initSetupSteps() { + this.setupSteps = []; + this.contextualizedSetupSteps = []; + + if (this.callbacks.beforeSetup) { + this.setupSteps.push(this.callbacks.beforeSetup); + delete this.callbacks.beforeSetup; + } + + this.setupSteps.push(this.setupContext); + this.setupSteps.push(this.setupTestElements); + this.setupSteps.push(this.setupAJAXListeners); + this.setupSteps.push(this.setupPromiseListeners); + + if (this.callbacks.setup) { + this.contextualizedSetupSteps.push(this.callbacks.setup); + delete this.callbacks.setup; + } + } + + invokeSteps(steps, context, assert) { + steps = steps.slice(); + + function nextStep() { + var step = steps.shift(); + if (step) { + // guard against exceptions, for example missing components referenced from needs. + return new Ember.RSVP.Promise(resolve => { + resolve(step.call(context, assert)); + }).then(nextStep); + } else { + return Ember.RSVP.resolve(); + } + } + return nextStep(); + } + + contextualizeCallbacks() {} + + initTeardownSteps() { + this.teardownSteps = []; + this.contextualizedTeardownSteps = []; + + if (this.callbacks.teardown) { + this.contextualizedTeardownSteps.push(this.callbacks.teardown); + delete this.callbacks.teardown; + } + + this.teardownSteps.push(this.teardownContext); + this.teardownSteps.push(this.teardownTestElements); + this.teardownSteps.push(this.teardownAJAXListeners); + this.teardownSteps.push(this.teardownPromiseListeners); + + if (this.callbacks.afterTeardown) { + this.teardownSteps.push(this.callbacks.afterTeardown); + delete this.callbacks.afterTeardown; + } + } + + setupTestElements() { + let testElementContainer = document.querySelector('#ember-testing-container'); + if (!testElementContainer) { + testElementContainer = document.createElement('div'); + testElementContainer.setAttribute('id', 'ember-testing-container'); + document.body.appendChild(testElementContainer); + } + + let testEl = document.querySelector('#ember-testing'); + if (!testEl) { + let element = document.createElement('div'); + element.setAttribute('id', 'ember-testing'); + + testElementContainer.appendChild(element); + this.fixtureResetValue = ''; + } else { + this.fixtureResetValue = testElementContainer.innerHTML; + } + } + + setupContext(options) { + let context = this.getContext(); + + merge(context, { + dispatcher: null, + inject: {} + }); + merge(context, options); + + this.setToString(); + (0, _testHelpers.setContext)(context); + this.context = context; + } + + setContext(context) { + this.context = context; + } + + getContext() { + if (this.context) { + return this.context; + } + + return this.context = (0, _testHelpers.getContext)() || {}; + } + + setToString() { + this.context.toString = () => { + if (this.subjectName) { + return `test context for: ${this.subjectName}`; + } + + if (this.name) { + return `test context for: ${this.name}`; + } + }; + } + + setupAJAXListeners() { + (0, _settled._setupAJAXHooks)(); + } + + teardownAJAXListeners() { + (0, _settled._teardownAJAXHooks)(); + } + + setupPromiseListeners() { + (0, _rsvp._setupPromiseListeners)(); + } + + teardownPromiseListeners() { + (0, _rsvp._teardownPromiseListeners)(); + } + + teardownTestElements() { + document.getElementById('ember-testing-container').innerHTML = this.fixtureResetValue; + + // Ember 2.0.0 removed Ember.View as public API, so only do this when + // Ember.View is present + if (Ember.View && Ember.View.views) { + Ember.View.views = {}; + } + } + + teardownContext() { + var context = this.context; + this.context = undefined; + (0, _testHelpers.unsetContext)(); + + if (context && context.dispatcher && !context.dispatcher.isDestroyed) { + Ember.run(function () { + context.dispatcher.destroy(); + }); + } + } + }; +}); +define('ember-test-helpers/legacy-0-6-x/build-registry', ['exports', 'require'], function (exports, _require2) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = function (resolver) { + var fallbackRegistry, registry, container; + var namespace = Ember.Object.create({ + Resolver: { + create() { + return resolver; + } + } + }); + + function register(name, factory) { + var thingToRegisterWith = registry || container; + + if (!(container.factoryFor ? container.factoryFor(name) : container.lookupFactory(name))) { + thingToRegisterWith.register(name, factory); + } + } + + if (Ember.Application.buildRegistry) { + fallbackRegistry = Ember.Application.buildRegistry(namespace); + fallbackRegistry.register('component-lookup:main', Ember.ComponentLookup); + + registry = new Ember.Registry({ + fallback: fallbackRegistry + }); + + if (Ember.ApplicationInstance && Ember.ApplicationInstance.setupRegistry) { + Ember.ApplicationInstance.setupRegistry(registry); + } + + // these properties are set on the fallback registry by `buildRegistry` + // and on the primary registry within the ApplicationInstance constructor + // but we need to manually recreate them since ApplicationInstance's are not + // exposed externally + registry.normalizeFullName = fallbackRegistry.normalizeFullName; + registry.makeToString = fallbackRegistry.makeToString; + registry.describe = fallbackRegistry.describe; + + var owner = Owner.create({ + __registry__: registry, + __container__: null + }); + + container = registry.container({ owner: owner }); + owner.__container__ = container; + + exposeRegistryMethodsWithoutDeprecations(container); + } else { + container = Ember.Application.buildContainer(namespace); + container.register('component-lookup:main', Ember.ComponentLookup); + } + + // Ember 1.10.0 did not properly add `view:toplevel` or `view:default` + // to the registry in Ember.Application.buildRegistry :( + // + // Ember 2.0.0 removed Ember.View as public API, so only do this when + // Ember.View is present + if (Ember.View) { + register('view:toplevel', Ember.View.extend()); + } + + // Ember 2.0.0 removed Ember._MetamorphView from the Ember global, so only + // do this when present + if (Ember._MetamorphView) { + register('view:default', Ember._MetamorphView); + } + + var globalContext = typeof global === 'object' && global || self; + if (requirejs.entries['ember-data/setup-container']) { + // ember-data is a proper ember-cli addon since 2.3; if no 'import + // 'ember-data'' is present somewhere in the tests, there is also no `DS` + // available on the globalContext and hence ember-data wouldn't be setup + // correctly for the tests; that's why we import and call setupContainer + // here; also see https://github.com/emberjs/data/issues/4071 for context + var setupContainer = (0, _require2.default)('ember-data/setup-container')['default']; + setupContainer(registry || container); + } else if (globalContext.DS) { + var DS = globalContext.DS; + if (DS._setupContainer) { + DS._setupContainer(registry || container); + } else { + register('transform:boolean', DS.BooleanTransform); + register('transform:date', DS.DateTransform); + register('transform:number', DS.NumberTransform); + register('transform:string', DS.StringTransform); + register('serializer:-default', DS.JSONSerializer); + register('serializer:-rest', DS.RESTSerializer); + register('adapter:-rest', DS.RESTAdapter); + } + } + + return { + registry, + container, + owner + }; + }; + + /* globals global, self, requirejs */ + + function exposeRegistryMethodsWithoutDeprecations(container) { + var methods = ['register', 'unregister', 'resolve', 'normalize', 'typeInjection', 'injection', 'factoryInjection', 'factoryTypeInjection', 'has', 'options', 'optionsForType']; + + function exposeRegistryMethod(container, method) { + if (method in container) { + container[method] = function () { + return container._registry[method].apply(container._registry, arguments); + }; + } + } + + for (var i = 0, l = methods.length; i < l; i++) { + exposeRegistryMethod(container, methods[i]); + } + } + + var Owner = function () { + if (Ember._RegistryProxyMixin && Ember._ContainerProxyMixin) { + return Ember.Object.extend(Ember._RegistryProxyMixin, Ember._ContainerProxyMixin, { + _emberTestHelpersMockOwner: true + }); + } + + return Ember.Object.extend({ + _emberTestHelpersMockOwner: true + }); + }(); +}); +define('ember-test-helpers/legacy-0-6-x/ext/rsvp', ['exports'], function (exports) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports._setupPromiseListeners = _setupPromiseListeners; + exports._teardownPromiseListeners = _teardownPromiseListeners; + + + let originalAsync; + + /** + Configures `RSVP` to resolve promises on the run-loop's action queue. This is + done by Ember internally since Ember 1.7 and it is only needed to + provide a consistent testing experience for users of Ember < 1.7. + + @private + */ + function _setupPromiseListeners() { + originalAsync = Ember.RSVP.configure('async'); + + Ember.RSVP.configure('async', function (callback, promise) { + Ember.run.backburner.schedule('actions', () => { + callback(promise); + }); + }); + } + + /** + Resets `RSVP`'s `async` to its prior value. + + @private + */ + function _teardownPromiseListeners() { + Ember.RSVP.configure('async', originalAsync); + } +}); +define('ember-test-helpers/legacy-0-6-x/test-module-for-acceptance', ['exports', 'ember-test-helpers/legacy-0-6-x/abstract-test-module', '@ember/test-helpers'], function (exports, _abstractTestModule, _testHelpers) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = class extends _abstractTestModule.default { + setupContext() { + super.setupContext({ application: this.createApplication() }); + } + + teardownContext() { + Ember.run(() => { + (0, _testHelpers.getContext)().application.destroy(); + }); + + super.teardownContext(); + } + + createApplication() { + let { Application, config } = this.callbacks; + let application; + + Ember.run(() => { + application = Application.create(config); + application.setupForTesting(); + application.injectTestHelpers(); + }); + + return application; + } + }; +}); +define('ember-test-helpers/legacy-0-6-x/test-module-for-component', ['exports', 'ember-test-helpers/legacy-0-6-x/test-module', 'ember-test-helpers/has-ember-version', 'ember-test-helpers/legacy-0-6-x/-legacy-overrides'], function (exports, _testModule, _hasEmberVersion, _legacyOverrides) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.setupComponentIntegrationTest = setupComponentIntegrationTest; + /* globals EmberENV */ + let ACTION_KEY; + if ((0, _hasEmberVersion.default)(2, 0)) { + ACTION_KEY = 'actions'; + } else { + ACTION_KEY = '_actions'; + } + + const isPreGlimmer = !(0, _hasEmberVersion.default)(1, 13); + + exports.default = class extends _testModule.default { + constructor(componentName, description, callbacks) { + // Allow `description` to be omitted + if (!callbacks && typeof description === 'object') { + callbacks = description; + description = null; + } else if (!callbacks) { + callbacks = {}; + } + + let integrationOption = callbacks.integration; + let hasNeeds = Array.isArray(callbacks.needs); + + super('component:' + componentName, description, callbacks); + + this.componentName = componentName; + + if (hasNeeds || callbacks.unit || integrationOption === false) { + this.isUnitTest = true; + } else if (integrationOption) { + this.isUnitTest = false; + } else { + Ember.deprecate('the component:' + componentName + ' test module is implicitly running in unit test mode, ' + 'which will change to integration test mode by default in an upcoming version of ' + 'ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit ' + 'test mode.', false, { + id: 'ember-test-helpers.test-module-for-component.test-type', + until: '0.6.0' + }); + this.isUnitTest = true; + } + + if (!this.isUnitTest && !this.isLegacy) { + callbacks.integration = true; + } + + if (this.isUnitTest || this.isLegacy) { + this.setupSteps.push(this.setupComponentUnitTest); + } else { + this.callbacks.subject = function () { + throw new Error("component integration tests do not support `subject()`. Instead, render the component as if it were HTML: `this.render('');`. For more information, read: http://guides.emberjs.com/v2.2.0/testing/testing-components/"); + }; + this.setupSteps.push(this.setupComponentIntegrationTest); + this.teardownSteps.unshift(this.teardownComponent); + } + + if (Ember.View && Ember.View.views) { + this.setupSteps.push(this._aliasViewRegistry); + this.teardownSteps.unshift(this._resetViewRegistry); + } + } + + initIntegration(options) { + this.isLegacy = options.integration === 'legacy'; + this.isIntegration = options.integration !== 'legacy'; + } + + _aliasViewRegistry() { + this._originalGlobalViewRegistry = Ember.View.views; + var viewRegistry = this.container.lookup('-view-registry:main'); + + if (viewRegistry) { + Ember.View.views = viewRegistry; + } + } + + _resetViewRegistry() { + Ember.View.views = this._originalGlobalViewRegistry; + } + + setupComponentUnitTest() { + var _this = this; + var resolver = this.resolver; + var context = this.context; + + var layoutName = 'template:components/' + this.componentName; + + var layout = resolver.resolve(layoutName); + + var thingToRegisterWith = this.registry || this.container; + if (layout) { + thingToRegisterWith.register(layoutName, layout); + thingToRegisterWith.injection(this.subjectName, 'layout', layoutName); + } + var eventDispatcher = resolver.resolve('event_dispatcher:main'); + if (eventDispatcher) { + thingToRegisterWith.register('event_dispatcher:main', eventDispatcher); + } + + context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); + context.dispatcher.setup({}, '#ember-testing'); + + context._element = null; + + this.callbacks.render = function () { + var subject; + + Ember.run(function () { + subject = context.subject(); + subject.appendTo('#ember-testing'); + }); + + context._element = subject.element; + + _this.teardownSteps.unshift(function () { + Ember.run(function () { + Ember.tryInvoke(subject, 'destroy'); + }); + }); + }; + + this.callbacks.append = function () { + Ember.deprecate('this.append() is deprecated. Please use this.render() or this.$() instead.', false, { + id: 'ember-test-helpers.test-module-for-component.append', + until: '0.6.0' + }); + return context.$(); + }; + + context.$ = function () { + this.render(); + var subject = this.subject(); + + return subject.$.apply(subject, arguments); + }; + } + + setupComponentIntegrationTest() { + if (isPreGlimmer) { + return _legacyOverrides.preGlimmerSetupIntegrationForComponent.apply(this, arguments); + } else { + return setupComponentIntegrationTest.apply(this, arguments); + } + } + + setupContext() { + super.setupContext(); + + // only setup the injection if we are running against a version + // of Ember that has `-view-registry:main` (Ember >= 1.12) + if (this.container.factoryFor ? this.container.factoryFor('-view-registry:main') : this.container.lookupFactory('-view-registry:main')) { + (this.registry || this.container).injection('component', '_viewRegistry', '-view-registry:main'); + } + + if (!this.isUnitTest && !this.isLegacy) { + this.context.factory = function () {}; + } + } + + teardownComponent() { + var component = this.component; + if (component) { + Ember.run(component, 'destroy'); + this.component = null; + } + } + }; + function setupComponentIntegrationTest() { + var module = this; + var context = this.context; + + this.actionHooks = context[ACTION_KEY] = {}; + context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); + context.dispatcher.setup({}, '#ember-testing'); + + var hasRendered = false; + var OutletView = module.container.factoryFor ? module.container.factoryFor('view:-outlet') : module.container.lookupFactory('view:-outlet'); + var OutletTemplate = module.container.lookup('template:-outlet'); + var toplevelView = module.component = OutletView.create(); + var hasOutletTemplate = !!OutletTemplate; + var outletState = { + render: { + owner: Ember.getOwner ? Ember.getOwner(module.container) : undefined, + into: undefined, + outlet: 'main', + name: 'application', + controller: module.context, + ViewClass: undefined, + template: OutletTemplate + }, + + outlets: {} + }; + + var element = document.getElementById('ember-testing'); + var templateId = 0; + + if (hasOutletTemplate) { + Ember.run(() => { + toplevelView.setOutletState(outletState); + }); + } + + context.render = function (template) { + if (!template) { + throw new Error('in a component integration test you must pass a template to `render()`'); + } + if (Ember.isArray(template)) { + template = template.join(''); + } + if (typeof template === 'string') { + template = Ember.Handlebars.compile(template); + } + + var templateFullName = 'template:-undertest-' + ++templateId; + this.registry.register(templateFullName, template); + var stateToRender = { + owner: Ember.getOwner ? Ember.getOwner(module.container) : undefined, + into: undefined, + outlet: 'main', + name: 'index', + controller: module.context, + ViewClass: undefined, + template: module.container.lookup(templateFullName), + outlets: {} + }; + + if (hasOutletTemplate) { + stateToRender.name = 'index'; + outletState.outlets.main = { render: stateToRender, outlets: {} }; + } else { + stateToRender.name = 'application'; + outletState = { render: stateToRender, outlets: {} }; + } + + Ember.run(() => { + toplevelView.setOutletState(outletState); + }); + + if (!hasRendered) { + Ember.run(module.component, 'appendTo', '#ember-testing'); + hasRendered = true; + } + + if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) { + // ensure the element is based on the wrapping toplevel view + // Ember still wraps the main application template with a + // normal tagged view + context._element = element = document.querySelector('#ember-testing > .ember-view'); + } else { + context._element = element = document.querySelector('#ember-testing'); + } + }; + + context.$ = function (selector) { + // emulates Ember internal behavor of `this.$` in a component + // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18 + return selector ? Ember.$(selector, element) : Ember.$(element); + }; + + context.set = function (key, value) { + var ret = Ember.run(function () { + return Ember.set(context, key, value); + }); + + if ((0, _hasEmberVersion.default)(2, 0)) { + return ret; + } + }; + + context.setProperties = function (hash) { + var ret = Ember.run(function () { + return Ember.setProperties(context, hash); + }); + + if ((0, _hasEmberVersion.default)(2, 0)) { + return ret; + } + }; + + context.get = function (key) { + return Ember.get(context, key); + }; + + context.getProperties = function () { + var args = Array.prototype.slice.call(arguments); + return Ember.getProperties(context, args); + }; + + context.on = function (actionName, handler) { + module.actionHooks[actionName] = handler; + }; + + context.send = function (actionName) { + var hook = module.actionHooks[actionName]; + if (!hook) { + throw new Error('integration testing template received unexpected action ' + actionName); + } + hook.apply(module.context, Array.prototype.slice.call(arguments, 1)); + }; + + context.clearRender = function () { + Ember.run(function () { + toplevelView.setOutletState({ + render: { + owner: module.container, + into: undefined, + outlet: 'main', + name: 'application', + controller: module.context, + ViewClass: undefined, + template: undefined + }, + outlets: {} + }); + }); + }; + } +}); +define('ember-test-helpers/legacy-0-6-x/test-module-for-model', ['exports', 'require', 'ember-test-helpers/legacy-0-6-x/test-module'], function (exports, _require2, _testModule) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = class extends _testModule.default { + constructor(modelName, description, callbacks) { + super('model:' + modelName, description, callbacks); + + this.modelName = modelName; + + this.setupSteps.push(this.setupModel); + } + + setupModel() { + var container = this.container; + var defaultSubject = this.defaultSubject; + var callbacks = this.callbacks; + var modelName = this.modelName; + + var adapterFactory = container.factoryFor ? container.factoryFor('adapter:application') : container.lookupFactory('adapter:application'); + if (!adapterFactory) { + if (requirejs.entries['ember-data/adapters/json-api']) { + adapterFactory = (0, _require2.default)('ember-data/adapters/json-api')['default']; + } + + // when ember-data/adapters/json-api is provided via ember-cli shims + // using Ember Data 1.x the actual JSONAPIAdapter isn't found, but the + // above require statement returns a bizzaro object with only a `default` + // property (circular reference actually) + if (!adapterFactory || !adapterFactory.create) { + adapterFactory = DS.JSONAPIAdapter || DS.FixtureAdapter; + } + + var thingToRegisterWith = this.registry || this.container; + thingToRegisterWith.register('adapter:application', adapterFactory); + } + + callbacks.store = function () { + var container = this.container; + return container.lookup('service:store') || container.lookup('store:main'); + }; + + if (callbacks.subject === defaultSubject) { + callbacks.subject = function (options) { + var container = this.container; + + return Ember.run(function () { + var store = container.lookup('service:store') || container.lookup('store:main'); + return store.createRecord(modelName, options); + }); + }; + } + } + }; +}); +define('ember-test-helpers/legacy-0-6-x/test-module', ['exports', 'ember-test-helpers/legacy-0-6-x/abstract-test-module', '@ember/test-helpers', 'ember-test-helpers/legacy-0-6-x/build-registry', '@ember/test-helpers/has-ember-version'], function (exports, _abstractTestModule, _testHelpers, _buildRegistry, _hasEmberVersion) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = class extends _abstractTestModule.default { + constructor(subjectName, description, callbacks) { + // Allow `description` to be omitted, in which case it should + // default to `subjectName` + if (!callbacks && typeof description === 'object') { + callbacks = description; + description = subjectName; + } + + super(description || subjectName, callbacks); + + this.subjectName = subjectName; + this.description = description || subjectName; + this.resolver = this.callbacks.resolver || (0, _testHelpers.getResolver)(); + + if (this.callbacks.integration && this.callbacks.needs) { + throw new Error("cannot declare 'integration: true' and 'needs' in the same module"); + } + + if (this.callbacks.integration) { + this.initIntegration(callbacks); + delete callbacks.integration; + } + + this.initSubject(); + this.initNeeds(); + } + + initIntegration(options) { + if (options.integration === 'legacy') { + throw new Error("`integration: 'legacy'` is only valid for component tests."); + } + this.isIntegration = true; + } + + initSubject() { + this.callbacks.subject = this.callbacks.subject || this.defaultSubject; + } + + initNeeds() { + this.needs = [this.subjectName]; + if (this.callbacks.needs) { + this.needs = this.needs.concat(this.callbacks.needs); + delete this.callbacks.needs; + } + } + + initSetupSteps() { + this.setupSteps = []; + this.contextualizedSetupSteps = []; + + if (this.callbacks.beforeSetup) { + this.setupSteps.push(this.callbacks.beforeSetup); + delete this.callbacks.beforeSetup; + } + + this.setupSteps.push(this.setupContainer); + this.setupSteps.push(this.setupContext); + this.setupSteps.push(this.setupTestElements); + this.setupSteps.push(this.setupAJAXListeners); + this.setupSteps.push(this.setupPromiseListeners); + + if (this.callbacks.setup) { + this.contextualizedSetupSteps.push(this.callbacks.setup); + delete this.callbacks.setup; + } + } + + initTeardownSteps() { + this.teardownSteps = []; + this.contextualizedTeardownSteps = []; + + if (this.callbacks.teardown) { + this.contextualizedTeardownSteps.push(this.callbacks.teardown); + delete this.callbacks.teardown; + } + + this.teardownSteps.push(this.teardownSubject); + this.teardownSteps.push(this.teardownContainer); + this.teardownSteps.push(this.teardownContext); + this.teardownSteps.push(this.teardownTestElements); + this.teardownSteps.push(this.teardownAJAXListeners); + this.teardownSteps.push(this.teardownPromiseListeners); + + if (this.callbacks.afterTeardown) { + this.teardownSteps.push(this.callbacks.afterTeardown); + delete this.callbacks.afterTeardown; + } + } + + setupContainer() { + if (this.isIntegration || this.isLegacy) { + this._setupIntegratedContainer(); + } else { + this._setupIsolatedContainer(); + } + } + + setupContext() { + var subjectName = this.subjectName; + var container = this.container; + + var factory = function () { + return container.factoryFor ? container.factoryFor(subjectName) : container.lookupFactory(subjectName); + }; + + super.setupContext({ + container: this.container, + registry: this.registry, + factory: factory, + register() { + var target = this.registry || this.container; + return target.register.apply(target, arguments); + } + }); + + if (Ember.setOwner) { + Ember.setOwner(this.context, this.container.owner); + } + + this.setupInject(); + } + + setupInject() { + var module = this; + var context = this.context; + + if (Ember.inject) { + var keys = (Object.keys || keys)(Ember.inject); + + keys.forEach(function (typeName) { + context.inject[typeName] = function (name, opts) { + var alias = opts && opts.as || name; + Ember.run(function () { + Ember.set(context, alias, module.container.lookup(typeName + ':' + name)); + }); + }; + }); + } + } + + teardownSubject() { + var subject = this.cache.subject; + + if (subject) { + Ember.run(function () { + Ember.tryInvoke(subject, 'destroy'); + }); + } + } + + teardownContainer() { + var container = this.container; + Ember.run(function () { + container.destroy(); + }); + } + + defaultSubject(options, factory) { + return factory.create(options); + } + + // allow arbitrary named factories, like rspec let + contextualizeCallbacks() { + var callbacks = this.callbacks; + var context = this.context; + + this.cache = this.cache || {}; + this.cachedCalls = this.cachedCalls || {}; + + var keys = (Object.keys || keys)(callbacks); + var keysLength = keys.length; + + if (keysLength) { + var deprecatedContext = this._buildDeprecatedContext(this, context); + for (var i = 0; i < keysLength; i++) { + this._contextualizeCallback(context, keys[i], deprecatedContext); + } + } + } + + _contextualizeCallback(context, key, callbackContext) { + var _this = this; + var callbacks = this.callbacks; + var factory = context.factory; + + context[key] = function (options) { + if (_this.cachedCalls[key]) { + return _this.cache[key]; + } + + var result = callbacks[key].call(callbackContext, options, factory()); + + _this.cache[key] = result; + _this.cachedCalls[key] = true; + + return result; + }; + } + + /* + Builds a version of the passed in context that contains deprecation warnings + for accessing properties that exist on the module. + */ + _buildDeprecatedContext(module, context) { + var deprecatedContext = Object.create(context); + + var keysForDeprecation = Object.keys(module); + + for (var i = 0, l = keysForDeprecation.length; i < l; i++) { + this._proxyDeprecation(module, deprecatedContext, keysForDeprecation[i]); + } + + return deprecatedContext; + } + + /* + Defines a key on an object to act as a proxy for deprecating the original. + */ + _proxyDeprecation(obj, proxy, key) { + if (typeof proxy[key] === 'undefined') { + Object.defineProperty(proxy, key, { + get() { + Ember.deprecate('Accessing the test module property "' + key + '" from a callback is deprecated.', false, { + id: 'ember-test-helpers.test-module.callback-context', + until: '0.6.0' + }); + return obj[key]; + } + }); + } + } + + _setupContainer(isolated) { + var resolver = this.resolver; + + var items = (0, _buildRegistry.default)(!isolated ? resolver : Object.create(resolver, { + resolve: { + value() {} + } + })); + + this.container = items.container; + this.registry = items.registry; + + if ((0, _hasEmberVersion.default)(1, 13)) { + var thingToRegisterWith = this.registry || this.container; + var router = resolver.resolve('router:main'); + router = router || Ember.Router.extend(); + thingToRegisterWith.register('router:main', router); + } + } + + _setupIsolatedContainer() { + var resolver = this.resolver; + this._setupContainer(true); + + var thingToRegisterWith = this.registry || this.container; + + for (var i = this.needs.length; i > 0; i--) { + var fullName = this.needs[i - 1]; + var normalizedFullName = resolver.normalize(fullName); + thingToRegisterWith.register(fullName, resolver.resolve(normalizedFullName)); + } + + if (!this.registry) { + this.container.resolver = function () {}; + } + } + + _setupIntegratedContainer() { + this._setupContainer(); + } + }; +}); +define('ember-test-helpers/wait', ['exports', '@ember/test-helpers/settled', '@ember/test-helpers'], function (exports, _settled, _testHelpers) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports._teardownPromiseListeners = exports._teardownAJAXHooks = exports._setupPromiseListeners = exports._setupAJAXHooks = undefined; + Object.defineProperty(exports, '_setupAJAXHooks', { + enumerable: true, + get: function () { + return _settled._setupAJAXHooks; + } + }); + Object.defineProperty(exports, '_setupPromiseListeners', { + enumerable: true, + get: function () { + return _settled._setupPromiseListeners; + } + }); + Object.defineProperty(exports, '_teardownAJAXHooks', { + enumerable: true, + get: function () { + return _settled._teardownAJAXHooks; + } + }); + Object.defineProperty(exports, '_teardownPromiseListeners', { + enumerable: true, + get: function () { + return _settled._teardownPromiseListeners; + } + }); + exports.default = wait; + + + /** + Returns a promise that resolves when in a settled state (see `isSettled` for + a definition of "settled state"). + + @private + @deprecated + @param {Object} [options={}] the options to be used for waiting + @param {boolean} [options.waitForTimers=true] should timers be waited upon + @param {boolean} [options.waitForAjax=true] should $.ajax requests be waited upon + @param {boolean} [options.waitForWaiters=true] should test waiters be waited upon + @returns {Promise} resolves when settled + */ + function wait(options = {}) { + if (typeof options !== 'object' || options === null) { + options = {}; + } + + return (0, _testHelpers.waitUntil)(() => { + let waitForTimers = 'waitForTimers' in options ? options.waitForTimers : true; + let waitForAJAX = 'waitForAJAX' in options ? options.waitForAJAX : true; + let waitForWaiters = 'waitForWaiters' in options ? options.waitForWaiters : true; + + let { + hasPendingTimers, + hasRunLoop, + hasPendingRequests, + hasPendingWaiters + } = (0, _testHelpers.getSettledState)(); + + if (waitForTimers && (hasPendingTimers || hasRunLoop)) { + return false; + } + + if (waitForAJAX && hasPendingRequests) { + return false; + } + + if (waitForWaiters && hasPendingWaiters) { + return false; + } + + return true; + }, { timeout: Infinity }); + } +}); +define("qunit/index", ["exports"], function (exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + /* globals QUnit */ + + var _module = QUnit.module; + exports.module = _module; + var test = exports.test = QUnit.test; + var skip = exports.skip = QUnit.skip; + var only = exports.only = QUnit.only; + var todo = exports.todo = QUnit.todo; + + exports.default = QUnit; +}); +runningTests = true; + +if (window.Testem) { + window.Testem.hookIntoTestFramework(); +} + + +//# sourceMappingURL=test-support.map diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.map b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.map new file mode 100644 index 0000000000..40a1a42864 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/test-support.map @@ -0,0 +1 @@ +{"version":3,"sources":["vendor/ember-cli/test-support-prefix.js","license.js","loader.js","ember-babel.js","ember-debug/deprecate.js","ember-debug/error.js","ember-debug/features.js","ember-debug/handlers.js","ember-debug/index.js","ember-debug/testing.js","ember-debug/warn.js","ember-testing/adapters/adapter.js","ember-testing/adapters/qunit.js","ember-testing/events.js","ember-testing/ext/application.js","ember-testing/ext/rsvp.js","ember-testing/helpers.js","ember-testing/helpers/and_then.js","ember-testing/helpers/click.js","ember-testing/helpers/current_path.js","ember-testing/helpers/current_route_name.js","ember-testing/helpers/current_url.js","ember-testing/helpers/fill_in.js","ember-testing/helpers/find.js","ember-testing/helpers/find_with_assert.js","ember-testing/helpers/key_event.js","ember-testing/helpers/pause_test.js","ember-testing/helpers/trigger_event.js","ember-testing/helpers/visit.js","ember-testing/helpers/wait.js","ember-testing/index.js","ember-testing/initializers.js","ember-testing/setup_for_testing.js","ember-testing/support.js","ember-testing/test.js","ember-testing/test/adapter.js","ember-testing/test/helpers.js","ember-testing/test/on_inject_helpers.js","ember-testing/test/pending_requests.js","ember-testing/test/promise.js","ember-testing/test/run.js","ember-testing/test/waiters.js","node-module.js","vendor/monkey-patches.js","vendor/qunit/qunit.js","vendor/ember-qunit/qunit-configuration.js","addon-test-support/@ember/test-helpers/-utils.js","addon-test-support/@ember/test-helpers/application.js","addon-test-support/@ember/test-helpers/build-owner.js","addon-test-support/@ember/test-helpers/dom/-get-element.js","addon-test-support/@ember/test-helpers/dom/-get-elements.js","addon-test-support/@ember/test-helpers/dom/-is-focusable.js","addon-test-support/@ember/test-helpers/dom/-is-form-control.js","addon-test-support/@ember/test-helpers/dom/-to-array.js","addon-test-support/@ember/test-helpers/dom/blur.js","addon-test-support/@ember/test-helpers/dom/click.js","addon-test-support/@ember/test-helpers/dom/fill-in.js","addon-test-support/@ember/test-helpers/dom/find-all.js","addon-test-support/@ember/test-helpers/dom/find.js","addon-test-support/@ember/test-helpers/dom/fire-event.js","addon-test-support/@ember/test-helpers/dom/focus.js","addon-test-support/@ember/test-helpers/dom/get-root-element.js","addon-test-support/@ember/test-helpers/dom/tap.js","addon-test-support/@ember/test-helpers/dom/trigger-event.js","addon-test-support/@ember/test-helpers/dom/trigger-key-event.js","addon-test-support/@ember/test-helpers/dom/wait-for.js","addon-test-support/@ember/test-helpers/global.js","addon-test-support/@ember/test-helpers/has-ember-version.js","addon-test-support/@ember/test-helpers/index.js","addon-test-support/@ember/test-helpers/resolver.js","addon-test-support/@ember/test-helpers/settled.js","addon-test-support/@ember/test-helpers/setup-application-context.js","addon-test-support/@ember/test-helpers/setup-context.js","addon-test-support/@ember/test-helpers/setup-rendering-context.js","addon-test-support/@ember/test-helpers/teardown-application-context.js","addon-test-support/@ember/test-helpers/teardown-context.js","addon-test-support/@ember/test-helpers/teardown-rendering-context.js","addon-test-support/@ember/test-helpers/validate-error-handler.js","addon-test-support/@ember/test-helpers/wait-until.js","addon-test-support/ember-cli-qunit.js","addon-test-support/ember-cli-test-loader/test-support/index.js","addon-test-support/ember-qunit/adapter.js","addon-test-support/ember-qunit/index.js","addon-test-support/ember-qunit/legacy-2-x/module-for-component.js","addon-test-support/ember-qunit/legacy-2-x/module-for-model.js","addon-test-support/ember-qunit/legacy-2-x/module-for.js","addon-test-support/ember-qunit/legacy-2-x/qunit-module.js","addon-test-support/ember-qunit/test-loader.js","addon-test-support/ember-test-helpers/has-ember-version.js","addon-test-support/ember-test-helpers/index.js","addon-test-support/ember-test-helpers/legacy-0-6-x/-legacy-overrides.js","addon-test-support/ember-test-helpers/legacy-0-6-x/abstract-test-module.js","addon-test-support/ember-test-helpers/legacy-0-6-x/build-registry.js","addon-test-support/ember-test-helpers/legacy-0-6-x/ext/rsvp.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module-for-acceptance.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module-for-component.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module-for-model.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module.js","addon-test-support/ember-test-helpers/wait.js","addon-test-support/qunit/index.js","vendor/ember-cli/test-support-suffix.js"],"sourcesContent":["\n","/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011-2018 Tilde Inc. and contributors\n * Portions Copyright 2006-2011 Strobe Inc.\n * Portions Copyright 2008-2011 Apple Inc. All rights reserved.\n * @license Licensed under MIT license\n * See https://raw.github.com/emberjs/ember.js/master/LICENSE\n * @version 3.0.0\n */\n","/*globals process */\nvar enifed, requireModule, Ember;\n\n// Used in ember-environment/lib/global.js\nmainContext = this; // eslint-disable-line no-undef\n\n(function() {\n function missingModule(name, referrerName) {\n if (referrerName) {\n throw new Error('Could not find module ' + name + ' required by: ' + referrerName);\n } else {\n throw new Error('Could not find module ' + name);\n }\n }\n\n function internalRequire(_name, referrerName) {\n var name = _name;\n var mod = registry[name];\n\n if (!mod) {\n name = name + '/index';\n mod = registry[name];\n }\n\n var exports = seen[name];\n\n if (exports !== undefined) {\n return exports;\n }\n\n exports = seen[name] = {};\n\n if (!mod) {\n missingModule(_name, referrerName);\n }\n\n var deps = mod.deps;\n var callback = mod.callback;\n var reified = new Array(deps.length);\n\n for (var i = 0; i < deps.length; i++) {\n if (deps[i] === 'exports') {\n reified[i] = exports;\n } else if (deps[i] === 'require') {\n reified[i] = requireModule;\n } else {\n reified[i] = internalRequire(deps[i], name);\n }\n }\n\n callback.apply(this, reified);\n\n return exports;\n }\n\n var isNode = typeof window === 'undefined' &&\n typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n if (!isNode) {\n Ember = this.Ember = this.Ember || {};\n }\n\n if (typeof Ember === 'undefined') { Ember = {}; }\n\n if (typeof Ember.__loader === 'undefined') {\n var registry = {};\n var seen = {};\n\n enifed = function(name, deps, callback) {\n var value = { };\n\n if (!callback) {\n value.deps = [];\n value.callback = deps;\n } else {\n value.deps = deps;\n value.callback = callback;\n }\n\n registry[name] = value;\n };\n\n requireModule = function(name) {\n return internalRequire(name, null);\n };\n\n // setup `require` module\n requireModule['default'] = requireModule;\n\n requireModule.has = function registryHas(moduleName) {\n return !!registry[moduleName] || !!registry[moduleName + '/index'];\n };\n\n requireModule._eak_seen = registry;\n\n Ember.__loader = {\n define: enifed,\n require: requireModule,\n registry: registry\n };\n } else {\n enifed = Ember.__loader.define;\n requireModule = Ember.__loader.require;\n }\n})();\n","enifed('ember-babel', ['exports'], function (exports) {\n 'use strict';\n\n exports.classCallCheck = classCallCheck;\n exports.inherits = inherits;\n exports.taggedTemplateLiteralLoose = taggedTemplateLiteralLoose;\n exports.createClass = createClass;\n exports.defaults = defaults;\n function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n function inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : defaults(subClass, superClass);\n }\n\n function taggedTemplateLiteralLoose(strings, raw) {\n strings.raw = raw;\n return strings;\n }\n\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function createClass(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n }\n\n var possibleConstructorReturn = exports.possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError('this hasn\\'t been initialized - super() hasn\\'t been called');\n }\n return call && (typeof call === 'object' || typeof call === 'function') ? call : self;\n };\n\n var slice = exports.slice = Array.prototype.slice;\n});","enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console', 'ember-environment', 'ember-debug/index', 'ember-debug/handlers'], function (exports, _error, _emberConsole, _emberEnvironment, _index, _handlers) {\n 'use strict';\n\n exports.missingOptionsUntilDeprecation = exports.missingOptionsIdDeprecation = exports.missingOptionsDeprecation = exports.registerHandler = undefined;\n\n /**\n @module @ember/debug\n @public\n */\n /**\n Allows for runtime registration of handler functions that override the default deprecation behavior.\n Deprecations are invoked by calls to [@ember/application/deprecations/deprecate](https://emberjs.com/api/ember/release/classes/@ember%2Fapplication%2Fdeprecations/methods/deprecate?anchor=deprecate).\n The following example demonstrates its usage by registering a handler that throws an error if the\n message contains the word \"should\", otherwise defers to the default handler.\n \n ```javascript\n import { registerDeprecationHandler } from '@ember/debug';\n \n registerDeprecationHandler((message, options, next) => {\n if (message.indexOf('should') !== -1) {\n throw new Error(`Deprecation message with should: ${message}`);\n } else {\n // defer to whatever handler was registered before this one\n next(message, options);\n }\n });\n ```\n \n The handler function takes the following arguments:\n \n
        \n
      • message - The message received from the deprecation call.
      • \n
      • options - An object passed in with the deprecation call containing additional information including:
      • \n
          \n
        • id - An id of the deprecation in the form of package-name.specific-deprecation.
        • \n
        • until - The Ember version number the feature and deprecation will be removed in.
        • \n
        \n
      • next - A function that calls into the previously registered handler.
      • \n
      \n \n @public\n @static\n @method registerDeprecationHandler\n @for @ember/debug\n @param handler {Function} A function to handle deprecation calls.\n @since 2.1.0\n */\n /*global __fail__*/\n var registerHandler = function () {};\n var missingOptionsDeprecation = void 0,\n missingOptionsIdDeprecation = void 0,\n missingOptionsUntilDeprecation = void 0,\n deprecate = void 0;\n\n if (true) {\n exports.registerHandler = registerHandler = function registerHandler(handler) {\n (0, _handlers.registerHandler)('deprecate', handler);\n };\n\n var formatMessage = function formatMessage(_message, options) {\n var message = _message;\n\n if (options && options.id) {\n message = message + (' [deprecation id: ' + options.id + ']');\n }\n\n if (options && options.url) {\n message += ' See ' + options.url + ' for more details.';\n }\n\n return message;\n };\n\n registerHandler(function logDeprecationToConsole(message, options) {\n var updatedMessage = formatMessage(message, options);\n\n _emberConsole.default.warn('DEPRECATION: ' + updatedMessage);\n });\n\n var captureErrorForStack = void 0;\n\n if (new Error().stack) {\n captureErrorForStack = function () {\n return new Error();\n };\n } else {\n captureErrorForStack = function () {\n try {\n __fail__.fail();\n } catch (e) {\n return e;\n }\n };\n }\n\n registerHandler(function logDeprecationStackTrace(message, options, next) {\n if (_emberEnvironment.ENV.LOG_STACKTRACE_ON_DEPRECATION) {\n var stackStr = '';\n var error = captureErrorForStack();\n var stack = void 0;\n\n if (error.stack) {\n if (error['arguments']) {\n // Chrome\n stack = error.stack.replace(/^\\s+at\\s+/gm, '').replace(/^([^\\(]+?)([\\n$])/gm, '{anonymous}($1)$2').replace(/^Object.\\s*\\(([^\\)]+)\\)/gm, '{anonymous}($1)').split('\\n');\n stack.shift();\n } else {\n // Firefox\n stack = error.stack.replace(/(?:\\n@:0)?\\s+$/m, '').replace(/^\\(/gm, '{anonymous}(').split('\\n');\n }\n\n stackStr = '\\n ' + stack.slice(2).join('\\n ');\n }\n\n var updatedMessage = formatMessage(message, options);\n\n _emberConsole.default.warn('DEPRECATION: ' + updatedMessage + stackStr);\n } else {\n next.apply(undefined, arguments);\n }\n });\n\n registerHandler(function raiseOnDeprecation(message, options, next) {\n if (_emberEnvironment.ENV.RAISE_ON_DEPRECATION) {\n var updatedMessage = formatMessage(message);\n\n throw new _error.default(updatedMessage);\n } else {\n next.apply(undefined, arguments);\n }\n });\n\n exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.';\n exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `deprecate` you must provide `id` in options.';\n exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation = 'When calling `deprecate` you must provide `until` in options.';\n /**\n @module @ember/application\n @public\n */\n /**\n Display a deprecation warning with the provided message and a stack trace\n (Chrome and Firefox only).\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n @method deprecate\n @for @ember/application/deprecations\n @param {String} message A description of the deprecation.\n @param {Boolean} test A boolean. If falsy, the deprecation will be displayed.\n @param {Object} options\n @param {String} options.id A unique id for this deprecation. The id can be\n used by Ember debugging tools to change the behavior (raise, log or silence)\n for that specific deprecation. The id should be namespaced by dots, e.g.\n \"view.helper.select\".\n @param {string} options.until The version of Ember when this deprecation\n warning will be removed.\n @param {String} [options.url] An optional url to the transition guide on the\n emberjs.com website.\n @static\n @public\n @since 1.0.0\n */\n deprecate = function deprecate(message, test, options) {\n if (_emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT !== true) {\n (0, _index.assert)(missingOptionsDeprecation, options && (options.id || options.until));\n (0, _index.assert)(missingOptionsIdDeprecation, options.id);\n (0, _index.assert)(missingOptionsUntilDeprecation, options.until);\n }\n\n if ((!options || !options.id && !options.until) && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {\n deprecate(missingOptionsDeprecation, false, {\n id: 'ember-debug.deprecate-options-missing',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'\n });\n }\n\n if (options && !options.id && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {\n deprecate(missingOptionsIdDeprecation, false, {\n id: 'ember-debug.deprecate-id-missing',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'\n });\n }\n\n if (options && !options.until && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {\n deprecate(missingOptionsUntilDeprecation, options && options.until, {\n id: 'ember-debug.deprecate-until-missing',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'\n });\n }\n\n _handlers.invoke.apply(undefined, ['deprecate'].concat(Array.prototype.slice.call(arguments)));\n };\n }\n\n exports.default = deprecate;\n exports.registerHandler = registerHandler;\n exports.missingOptionsDeprecation = missingOptionsDeprecation;\n exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;\n exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation;\n});","enifed(\"ember-debug/error\", [\"exports\", \"ember-babel\"], function (exports, _emberBabel) {\n \"use strict\";\n\n /**\n @module @ember/error\n */\n function ExtendBuiltin(klass) {\n function ExtendableBuiltin() {\n klass.apply(this, arguments);\n }\n\n ExtendableBuiltin.prototype = Object.create(klass.prototype);\n ExtendableBuiltin.prototype.constructor = ExtendableBuiltin;\n return ExtendableBuiltin;\n }\n\n /**\n A subclass of the JavaScript Error object for use in Ember.\n \n @class EmberError\n @extends Error\n @constructor\n @public\n */\n\n var EmberError = function (_ExtendBuiltin) {\n (0, _emberBabel.inherits)(EmberError, _ExtendBuiltin);\n\n function EmberError(message) {\n (0, _emberBabel.classCallCheck)(this, EmberError);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ExtendBuiltin.call(this));\n\n if (!(_this instanceof EmberError)) {\n var _ret;\n\n return _ret = new EmberError(message), (0, _emberBabel.possibleConstructorReturn)(_this, _ret);\n }\n\n var error = Error.call(_this, message);\n _this.stack = error.stack;\n _this.description = error.description;\n _this.fileName = error.fileName;\n _this.lineNumber = error.lineNumber;\n _this.message = error.message;\n _this.name = error.name;\n _this.number = error.number;\n _this.code = error.code;\n return _this;\n }\n\n return EmberError;\n }(ExtendBuiltin(Error));\n\n exports.default = EmberError;\n});","enifed('ember-debug/features', ['exports', 'ember-environment', 'ember/features'], function (exports, _emberEnvironment, _features) {\n 'use strict';\n\n exports.default = isEnabled;\n var FEATURES = _features.FEATURES;\n\n\n /**\n @module ember\n */\n\n /**\n The hash of enabled Canary features. Add to this, any canary features\n before creating your application.\n \n Alternatively (and recommended), you can also define `EmberENV.FEATURES`\n if you need to enable features flagged at runtime.\n \n @class FEATURES\n @namespace Ember\n @static\n @since 1.1.0\n @public\n */\n\n // Auto-generated\n\n /**\n Determine whether the specified `feature` is enabled. Used by Ember's\n build tools to exclude experimental features from beta/stable builds.\n \n You can define the following configuration options:\n \n * `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly\n enabled/disabled.\n \n @method isEnabled\n @param {String} feature The feature to check\n @return {Boolean}\n @for Ember.FEATURES\n @since 1.1.0\n @public\n */\n function isEnabled(feature) {\n var featureValue = FEATURES[feature];\n\n if (featureValue === true || featureValue === false || featureValue === undefined) {\n return featureValue;\n } else if (_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES) {\n return true;\n } else {\n return false;\n }\n }\n});","enifed('ember-debug/handlers', ['exports'], function (exports) {\n 'use strict';\n\n var HANDLERS = exports.HANDLERS = {};\n\n var registerHandler = function () {};\n var invoke = function () {};\n\n if (true) {\n exports.registerHandler = registerHandler = function registerHandler(type, callback) {\n var nextHandler = HANDLERS[type] || function () {};\n\n HANDLERS[type] = function (message, options) {\n callback(message, options, nextHandler);\n };\n };\n\n exports.invoke = invoke = function invoke(type, message, test, options) {\n if (test) {\n return;\n }\n\n var handlerForType = HANDLERS[type];\n\n if (handlerForType) {\n handlerForType(message, options);\n }\n };\n }\n\n exports.registerHandler = registerHandler;\n exports.invoke = invoke;\n});","enifed('ember-debug/index', ['exports', 'ember-debug/warn', 'ember-debug/deprecate', 'ember-debug/features', 'ember-debug/error', 'ember-debug/testing', 'ember-environment', 'ember-console', 'ember/features'], function (exports, _warn2, _deprecate2, _features, _error, _testing, _emberEnvironment, _emberConsole, _features2) {\n 'use strict';\n\n exports._warnIfUsingStrippedFeatureFlags = exports.getDebugFunction = exports.setDebugFunction = exports.deprecateFunc = exports.runInDebug = exports.debugFreeze = exports.debugSeal = exports.deprecate = exports.debug = exports.warn = exports.info = exports.assert = exports.setTesting = exports.isTesting = exports.Error = exports.isFeatureEnabled = exports.registerDeprecationHandler = exports.registerWarnHandler = undefined;\n Object.defineProperty(exports, 'registerWarnHandler', {\n enumerable: true,\n get: function () {\n return _warn2.registerHandler;\n }\n });\n Object.defineProperty(exports, 'registerDeprecationHandler', {\n enumerable: true,\n get: function () {\n return _deprecate2.registerHandler;\n }\n });\n Object.defineProperty(exports, 'isFeatureEnabled', {\n enumerable: true,\n get: function () {\n return _features.default;\n }\n });\n Object.defineProperty(exports, 'Error', {\n enumerable: true,\n get: function () {\n return _error.default;\n }\n });\n Object.defineProperty(exports, 'isTesting', {\n enumerable: true,\n get: function () {\n return _testing.isTesting;\n }\n });\n Object.defineProperty(exports, 'setTesting', {\n enumerable: true,\n get: function () {\n return _testing.setTesting;\n }\n });\n var DEFAULT_FEATURES = _features2.DEFAULT_FEATURES,\n FEATURES = _features2.FEATURES;\n\n\n // These are the default production build versions:\n var noop = function () {};\n\n var assert = noop;\n var info = noop;\n var warn = noop;\n var debug = noop;\n var deprecate = noop;\n var debugSeal = noop;\n var debugFreeze = noop;\n var runInDebug = noop;\n var setDebugFunction = noop;\n var getDebugFunction = noop;\n\n var deprecateFunc = function () {\n return arguments[arguments.length - 1];\n };\n\n if (true) {\n exports.setDebugFunction = setDebugFunction = function (type, callback) {\n switch (type) {\n case 'assert':\n return exports.assert = assert = callback;\n case 'info':\n return exports.info = info = callback;\n case 'warn':\n return exports.warn = warn = callback;\n case 'debug':\n return exports.debug = debug = callback;\n case 'deprecate':\n return exports.deprecate = deprecate = callback;\n case 'debugSeal':\n return exports.debugSeal = debugSeal = callback;\n case 'debugFreeze':\n return exports.debugFreeze = debugFreeze = callback;\n case 'runInDebug':\n return exports.runInDebug = runInDebug = callback;\n case 'deprecateFunc':\n return exports.deprecateFunc = deprecateFunc = callback;\n }\n };\n\n exports.getDebugFunction = getDebugFunction = function (type) {\n switch (type) {\n case 'assert':\n return assert;\n case 'info':\n return info;\n case 'warn':\n return warn;\n case 'debug':\n return debug;\n case 'deprecate':\n return deprecate;\n case 'debugSeal':\n return debugSeal;\n case 'debugFreeze':\n return debugFreeze;\n case 'runInDebug':\n return runInDebug;\n case 'deprecateFunc':\n return deprecateFunc;\n }\n };\n }\n\n /**\n @module @ember/debug\n */\n\n if (true) {\n /**\n Define an assertion that will throw an exception if the condition is not met.\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n ```javascript\n import { assert } from '@ember/debug';\n // Test for truthiness\n assert('Must pass a valid object', obj);\n // Fail unconditionally\n assert('This code path should never be run');\n ```\n @method assert\n @static\n @for @ember/debug\n @param {String} desc A description of the assertion. This will become\n the text of the Error thrown if the assertion fails.\n @param {Boolean} test Must be truthy for the assertion to pass. If\n falsy, an exception will be thrown.\n @public\n @since 1.0.0\n */\n setDebugFunction('assert', function assert(desc, test) {\n if (!test) {\n throw new _error.default('Assertion Failed: ' + desc);\n }\n });\n\n /**\n Display a debug notice.\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n ```javascript\n import { debug } from '@ember/debug';\n debug('I\\'m a debug notice!');\n ```\n @method debug\n @for @ember/debug\n @static\n @param {String} message A debug message to display.\n @public\n */\n setDebugFunction('debug', function debug(message) {\n _emberConsole.default.debug('DEBUG: ' + message);\n });\n\n /**\n Display an info notice.\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n @method info\n @private\n */\n setDebugFunction('info', function info() {\n _emberConsole.default.info.apply(undefined, arguments);\n });\n\n /**\n @module @ember/application\n @public\n */\n\n /**\n Alias an old, deprecated method with its new counterpart.\n Display a deprecation warning with the provided message and a stack trace\n (Chrome and Firefox only) when the assigned method is called.\n * In a production build, this method is defined as an empty function (NOP).\n ```javascript\n import { deprecateFunc } from '@ember/application/deprecations';\n Ember.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod);\n ```\n @method deprecateFunc\n @static\n @for @ember/application/deprecations\n @param {String} message A description of the deprecation.\n @param {Object} [options] The options object for `deprecate`.\n @param {Function} func The new function called to replace its deprecated counterpart.\n @return {Function} A new function that wraps the original function with a deprecation warning\n @private\n */\n setDebugFunction('deprecateFunc', function deprecateFunc() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (args.length === 3) {\n var message = args[0],\n options = args[1],\n func = args[2];\n\n return function () {\n deprecate(message, false, options);\n return func.apply(this, arguments);\n };\n } else {\n var _message = args[0],\n _func = args[1];\n\n return function () {\n deprecate(_message);\n return _func.apply(this, arguments);\n };\n }\n });\n\n /**\n @module @ember/debug\n @public\n */\n /**\n Run a function meant for debugging.\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n ```javascript\n import Component from '@ember/component';\n import { runInDebug } from '@ember/debug';\n runInDebug(() => {\n Component.reopen({\n didInsertElement() {\n console.log(\"I'm happy\");\n }\n });\n });\n ```\n @method runInDebug\n @for @ember/debug\n @static\n @param {Function} func The function to be executed.\n @since 1.5.0\n @public\n */\n setDebugFunction('runInDebug', function runInDebug(func) {\n func();\n });\n\n setDebugFunction('debugSeal', function debugSeal(obj) {\n Object.seal(obj);\n });\n\n setDebugFunction('debugFreeze', function debugFreeze(obj) {\n Object.freeze(obj);\n });\n\n setDebugFunction('deprecate', _deprecate2.default);\n\n setDebugFunction('warn', _warn2.default);\n }\n\n var _warnIfUsingStrippedFeatureFlags = void 0;\n\n if (true && !(0, _testing.isTesting)()) {\n /**\n Will call `warn()` if ENABLE_OPTIONAL_FEATURES or\n any specific FEATURES flag is truthy.\n This method is called automatically in debug canary builds.\n @private\n @method _warnIfUsingStrippedFeatureFlags\n @return {void}\n */\n exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags = function _warnIfUsingStrippedFeatureFlags(FEATURES, knownFeatures, featuresWereStripped) {\n if (featuresWereStripped) {\n warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });\n\n var keys = Object.keys(FEATURES || {});\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (key === 'isEnabled' || !(key in knownFeatures)) {\n continue;\n }\n\n warn('FEATURE[\"' + key + '\"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });\n }\n }\n };\n\n // Complain if they're using FEATURE flags in builds other than canary\n FEATURES['features-stripped-test'] = true;\n var featuresWereStripped = true;\n\n if ((0, _features.default)('features-stripped-test')) {\n featuresWereStripped = false;\n }\n\n delete FEATURES['features-stripped-test'];\n _warnIfUsingStrippedFeatureFlags(_emberEnvironment.ENV.FEATURES, DEFAULT_FEATURES, featuresWereStripped);\n\n // Inform the developer about the Ember Inspector if not installed.\n var isFirefox = _emberEnvironment.environment.isFirefox;\n var isChrome = _emberEnvironment.environment.isChrome;\n\n if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) {\n window.addEventListener('load', function () {\n if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) {\n var downloadURL = void 0;\n\n if (isChrome) {\n downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';\n } else if (isFirefox) {\n downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';\n }\n\n debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL);\n }\n }, false);\n }\n }\n\n exports.assert = assert;\n exports.info = info;\n exports.warn = warn;\n exports.debug = debug;\n exports.deprecate = deprecate;\n exports.debugSeal = debugSeal;\n exports.debugFreeze = debugFreeze;\n exports.runInDebug = runInDebug;\n exports.deprecateFunc = deprecateFunc;\n exports.setDebugFunction = setDebugFunction;\n exports.getDebugFunction = getDebugFunction;\n exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;\n});","enifed(\"ember-debug/testing\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.isTesting = isTesting;\n exports.setTesting = setTesting;\n var testing = false;\n\n function isTesting() {\n return testing;\n }\n\n function setTesting(value) {\n testing = !!value;\n }\n});","enifed('ember-debug/warn', ['exports', 'ember-environment', 'ember-console', 'ember-debug/deprecate', 'ember-debug/index', 'ember-debug/handlers'], function (exports, _emberEnvironment, _emberConsole, _deprecate, _index, _handlers) {\n 'use strict';\n\n exports.missingOptionsDeprecation = exports.missingOptionsIdDeprecation = exports.registerHandler = undefined;\n\n\n var registerHandler = function () {};\n var warn = function () {};\n var missingOptionsDeprecation = void 0,\n missingOptionsIdDeprecation = void 0;\n\n /**\n @module @ember/debug\n */\n\n if (true) {\n /**\n Allows for runtime registration of handler functions that override the default warning behavior.\n Warnings are invoked by calls made to [@ember/debug/warn](https://emberjs.com/api/ember/release/classes/@ember%2Fdebug/methods/warn?anchor=warn).\n The following example demonstrates its usage by registering a handler that does nothing overriding Ember's\n default warning behavior.\n ```javascript\n import { registerWarnHandler } from '@ember/debug';\n // next is not called, so no warnings get the default behavior\n registerWarnHandler(() => {});\n ```\n The handler function takes the following arguments:\n
        \n
      • message - The message received from the warn call.
      • \n
      • options - An object passed in with the warn call containing additional information including:
      • \n
          \n
        • id - An id of the warning in the form of package-name.specific-warning.
        • \n
        \n
      • next - A function that calls into the previously registered handler.
      • \n
      \n @public\n @static\n @method registerWarnHandler\n @for @ember/debug\n @param handler {Function} A function to handle warnings.\n @since 2.1.0\n */\n exports.registerHandler = registerHandler = function registerHandler(handler) {\n (0, _handlers.registerHandler)('warn', handler);\n };\n\n registerHandler(function logWarning(message) {\n _emberConsole.default.warn('WARNING: ' + message);\n if ('trace' in _emberConsole.default) {\n _emberConsole.default.trace();\n }\n });\n\n exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.';\n exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `warn` you must provide `id` in options.';\n\n /**\n Display a warning with the provided message.\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n @method warn\n @for @ember/debug\n @static\n @param {String} message A warning to display.\n @param {Boolean} test An optional boolean. If falsy, the warning\n will be displayed.\n @param {Object} options An object that can be used to pass a unique\n `id` for this warning. The `id` can be used by Ember debugging tools\n to change the behavior (raise, log, or silence) for that specific warning.\n The `id` should be namespaced by dots, e.g. \"ember-debug.feature-flag-with-features-stripped\"\n @public\n @since 1.0.0\n */\n warn = function warn(message, test, options) {\n if (arguments.length === 2 && typeof test === 'object') {\n options = test;\n test = false;\n }\n\n if (_emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT !== true) {\n (0, _index.assert)(missingOptionsDeprecation, options);\n (0, _index.assert)(missingOptionsIdDeprecation, options && options.id);\n }\n\n if (!options && _emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) {\n (0, _deprecate.default)(missingOptionsDeprecation, false, {\n id: 'ember-debug.warn-options-missing',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'\n });\n }\n\n if (options && !options.id && _emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) {\n (0, _deprecate.default)(missingOptionsIdDeprecation, false, {\n id: 'ember-debug.warn-id-missing',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'\n });\n }\n\n (0, _handlers.invoke)('warn', message, test, options);\n };\n }\n\n exports.default = warn;\n exports.registerHandler = registerHandler;\n exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;\n exports.missingOptionsDeprecation = missingOptionsDeprecation;\n});","enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime'], function (exports, _emberRuntime) {\n 'use strict';\n\n function K() {\n return this;\n }\n\n /**\n @module @ember/test\n */\n\n /**\n The primary purpose of this class is to create hooks that can be implemented\n by an adapter for various test frameworks.\n \n @class TestAdapter\n @public\n */\n exports.default = _emberRuntime.Object.extend({\n /**\n This callback will be called whenever an async operation is about to start.\n Override this to call your framework's methods that handle async\n operations.\n @public\n @method asyncStart\n */\n asyncStart: K,\n\n /**\n This callback will be called whenever an async operation has completed.\n @public\n @method asyncEnd\n */\n asyncEnd: K,\n\n /**\n Override this method with your testing framework's false assertion.\n This function is called whenever an exception occurs causing the testing\n promise to fail.\n QUnit example:\n ```javascript\n exception: function(error) {\n ok(false, error);\n };\n ```\n @public\n @method exception\n @param {String} error The exception to be raised.\n */\n exception: function (error) {\n throw error;\n }\n });\n});","enifed('ember-testing/adapters/qunit', ['exports', 'ember-utils', 'ember-testing/adapters/adapter'], function (exports, _emberUtils, _adapter) {\n 'use strict';\n\n exports.default = _adapter.default.extend({\n asyncStart: function () {\n QUnit.stop();\n },\n asyncEnd: function () {\n QUnit.start();\n },\n exception: function (error) {\n QUnit.config.current.assert.ok(false, (0, _emberUtils.inspect)(error));\n }\n });\n});","enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], function (exports, _emberViews, _emberMetal) {\n 'use strict';\n\n exports.focus = focus;\n exports.fireEvent = fireEvent;\n\n\n var DEFAULT_EVENT_OPTIONS = { canBubble: true, cancelable: true };\n var KEYBOARD_EVENT_TYPES = ['keydown', 'keypress', 'keyup'];\n var MOUSE_EVENT_TYPES = ['click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover'];\n\n function focus(el) {\n if (!el) {\n return;\n }\n var $el = (0, _emberViews.jQuery)(el);\n if ($el.is(':input, [contenteditable=true]')) {\n var type = $el.prop('type');\n if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') {\n (0, _emberMetal.run)(null, function () {\n // Firefox does not trigger the `focusin` event if the window\n // does not have focus. If the document doesn't have focus just\n // use trigger('focusin') instead.\n\n if (!document.hasFocus || document.hasFocus()) {\n el.focus();\n } else {\n $el.trigger('focusin');\n }\n });\n }\n }\n }\n\n function fireEvent(element, type) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!element) {\n return;\n }\n var event = void 0;\n if (KEYBOARD_EVENT_TYPES.indexOf(type) > -1) {\n event = buildKeyboardEvent(type, options);\n } else if (MOUSE_EVENT_TYPES.indexOf(type) > -1) {\n var rect = element.getBoundingClientRect();\n var x = rect.left + 1;\n var y = rect.top + 1;\n var simulatedCoordinates = {\n screenX: x + 5,\n screenY: y + 95,\n clientX: x,\n clientY: y\n };\n event = buildMouseEvent(type, _emberViews.jQuery.extend(simulatedCoordinates, options));\n } else {\n event = buildBasicEvent(type, options);\n }\n element.dispatchEvent(event);\n }\n\n function buildBasicEvent(type) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var event = document.createEvent('Events');\n event.initEvent(type, true, true);\n _emberViews.jQuery.extend(event, options);\n return event;\n }\n\n function buildMouseEvent(type) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var event = void 0;\n try {\n event = document.createEvent('MouseEvents');\n var eventOpts = _emberViews.jQuery.extend({}, DEFAULT_EVENT_OPTIONS, options);\n event.initMouseEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget);\n } catch (e) {\n event = buildBasicEvent(type, options);\n }\n return event;\n }\n\n function buildKeyboardEvent(type) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var event = void 0;\n try {\n event = document.createEvent('KeyEvents');\n var eventOpts = _emberViews.jQuery.extend({}, DEFAULT_EVENT_OPTIONS, options);\n event.initKeyEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode);\n } catch (e) {\n event = buildBasicEvent(type, options);\n }\n return event;\n }\n});","enifed('ember-testing/ext/application', ['ember-application', 'ember-testing/setup_for_testing', 'ember-testing/test/helpers', 'ember-testing/test/promise', 'ember-testing/test/run', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/adapter'], function (_emberApplication, _setup_for_testing, _helpers, _promise, _run, _on_inject_helpers, _adapter) {\n 'use strict';\n\n _emberApplication.Application.reopen({\n /**\n This property contains the testing helpers for the current application. These\n are created once you call `injectTestHelpers` on your `Application`\n instance. The included helpers are also available on the `window` object by\n default, but can be used from this object on the individual application also.\n @property testHelpers\n @type {Object}\n @default {}\n @public\n */\n testHelpers: {},\n\n /**\n This property will contain the original methods that were registered\n on the `helperContainer` before `injectTestHelpers` is called.\n When `removeTestHelpers` is called, these methods are restored to the\n `helperContainer`.\n @property originalMethods\n @type {Object}\n @default {}\n @private\n @since 1.3.0\n */\n originalMethods: {},\n\n /**\n This property indicates whether or not this application is currently in\n testing mode. This is set when `setupForTesting` is called on the current\n application.\n @property testing\n @type {Boolean}\n @default false\n @since 1.3.0\n @public\n */\n testing: false,\n\n setupForTesting: function () {\n (0, _setup_for_testing.default)();\n\n this.testing = true;\n\n this.resolveRegistration('router:main').reopen({\n location: 'none'\n });\n },\n\n\n /**\n This will be used as the container to inject the test helpers into. By\n default the helpers are injected into `window`.\n @property helperContainer\n @type {Object} The object to be used for test helpers.\n @default window\n @since 1.2.0\n @private\n */\n helperContainer: null,\n\n injectTestHelpers: function (helperContainer) {\n if (helperContainer) {\n this.helperContainer = helperContainer;\n } else {\n this.helperContainer = window;\n }\n\n this.reopen({\n willDestroy: function () {\n this._super.apply(this, arguments);\n this.removeTestHelpers();\n }\n });\n\n this.testHelpers = {};\n for (var name in _helpers.helpers) {\n this.originalMethods[name] = this.helperContainer[name];\n this.testHelpers[name] = this.helperContainer[name] = helper(this, name);\n protoWrap(_promise.default.prototype, name, helper(this, name), _helpers.helpers[name].meta.wait);\n }\n\n (0, _on_inject_helpers.invokeInjectHelpersCallbacks)(this);\n },\n removeTestHelpers: function () {\n if (!this.helperContainer) {\n return;\n }\n\n for (var name in _helpers.helpers) {\n this.helperContainer[name] = this.originalMethods[name];\n delete _promise.default.prototype[name];\n delete this.testHelpers[name];\n delete this.originalMethods[name];\n }\n }\n });\n\n // This method is no longer needed\n // But still here for backwards compatibility\n // of helper chaining\n function protoWrap(proto, name, callback, isAsync) {\n proto[name] = function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (isAsync) {\n return callback.apply(this, args);\n } else {\n return this.then(function () {\n return callback.apply(this, args);\n });\n }\n };\n }\n\n function helper(app, name) {\n var fn = _helpers.helpers[name].method;\n var meta = _helpers.helpers[name].meta;\n if (!meta.wait) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return fn.apply(app, [app].concat(args));\n };\n }\n\n return function () {\n for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var lastPromise = (0, _run.default)(function () {\n return (0, _promise.resolve)((0, _promise.getLastPromise)());\n });\n\n // wait for last helper's promise to resolve and then\n // execute. To be safe, we need to tell the adapter we're going\n // asynchronous here, because fn may not be invoked before we\n // return.\n (0, _adapter.asyncStart)();\n return lastPromise.then(function () {\n return fn.apply(app, [app].concat(args));\n }).finally(_adapter.asyncEnd);\n };\n }\n});","enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime', 'ember-metal', 'ember-debug', 'ember-testing/test/adapter'], function (exports, _emberRuntime, _emberMetal, _emberDebug, _adapter) {\n 'use strict';\n\n _emberRuntime.RSVP.configure('async', function (callback, promise) {\n // if schedule will cause autorun, we need to inform adapter\n if ((0, _emberDebug.isTesting)() && !_emberMetal.run.backburner.currentInstance) {\n (0, _adapter.asyncStart)();\n _emberMetal.run.backburner.schedule('actions', function () {\n (0, _adapter.asyncEnd)();\n callback(promise);\n });\n } else {\n _emberMetal.run.backburner.schedule('actions', function () {\n return callback(promise);\n });\n }\n });\n\n exports.default = _emberRuntime.RSVP;\n});","enifed('ember-testing/helpers', ['ember-testing/test/helpers', 'ember-testing/helpers/and_then', 'ember-testing/helpers/click', 'ember-testing/helpers/current_path', 'ember-testing/helpers/current_route_name', 'ember-testing/helpers/current_url', 'ember-testing/helpers/fill_in', 'ember-testing/helpers/find', 'ember-testing/helpers/find_with_assert', 'ember-testing/helpers/key_event', 'ember-testing/helpers/pause_test', 'ember-testing/helpers/trigger_event', 'ember-testing/helpers/visit', 'ember-testing/helpers/wait'], function (_helpers, _and_then, _click, _current_path, _current_route_name, _current_url, _fill_in, _find, _find_with_assert, _key_event, _pause_test, _trigger_event, _visit, _wait) {\n 'use strict';\n\n (0, _helpers.registerAsyncHelper)('visit', _visit.default);\n (0, _helpers.registerAsyncHelper)('click', _click.default);\n (0, _helpers.registerAsyncHelper)('keyEvent', _key_event.default);\n (0, _helpers.registerAsyncHelper)('fillIn', _fill_in.default);\n (0, _helpers.registerAsyncHelper)('wait', _wait.default);\n (0, _helpers.registerAsyncHelper)('andThen', _and_then.default);\n (0, _helpers.registerAsyncHelper)('pauseTest', _pause_test.pauseTest);\n (0, _helpers.registerAsyncHelper)('triggerEvent', _trigger_event.default);\n\n (0, _helpers.registerHelper)('find', _find.default);\n (0, _helpers.registerHelper)('findWithAssert', _find_with_assert.default);\n (0, _helpers.registerHelper)('currentRouteName', _current_route_name.default);\n (0, _helpers.registerHelper)('currentPath', _current_path.default);\n (0, _helpers.registerHelper)('currentURL', _current_url.default);\n (0, _helpers.registerHelper)('resumeTest', _pause_test.resumeTest);\n});","enifed(\"ember-testing/helpers/and_then\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.default = andThen;\n function andThen(app, callback) {\n return app.testHelpers.wait(callback(app));\n }\n});","enifed('ember-testing/helpers/click', ['exports', 'ember-testing/events'], function (exports, _events) {\n 'use strict';\n\n exports.default = click;\n\n\n /**\n Clicks an element and triggers any actions triggered by the element's `click`\n event.\n \n Example:\n \n ```javascript\n click('.some-jQuery-selector').then(function() {\n // assert something\n });\n ```\n \n @method click\n @param {String} selector jQuery selector for finding element on the DOM\n @param {Object} context A DOM Element, Document, or jQuery to use as context\n @return {RSVP.Promise}\n @public\n */\n function click(app, selector, context) {\n var $el = app.testHelpers.findWithAssert(selector, context);\n var el = $el[0];\n\n (0, _events.fireEvent)(el, 'mousedown');\n\n (0, _events.focus)(el);\n\n (0, _events.fireEvent)(el, 'mouseup');\n (0, _events.fireEvent)(el, 'click');\n\n return app.testHelpers.wait();\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/current_path', ['exports', 'ember-metal'], function (exports, _emberMetal) {\n 'use strict';\n\n exports.default = currentPath;\n\n\n /**\n Returns the current path.\n \n Example:\n \n ```javascript\n function validateURL() {\n equal(currentPath(), 'some.path.index', \"correct path was transitioned into.\");\n }\n \n click('#some-link-id').then(validateURL);\n ```\n \n @method currentPath\n @return {Object} The currently active path.\n @since 1.5.0\n @public\n */\n function currentPath(app) {\n var routingService = app.__container__.lookup('service:-routing');\n return (0, _emberMetal.get)(routingService, 'currentPath');\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/current_route_name', ['exports', 'ember-metal'], function (exports, _emberMetal) {\n 'use strict';\n\n exports.default = currentRouteName;\n\n /**\n Returns the currently active route name.\n \n Example:\n \n ```javascript\n function validateRouteName() {\n equal(currentRouteName(), 'some.path', \"correct route was transitioned into.\");\n }\n visit('/some/path').then(validateRouteName)\n ```\n \n @method currentRouteName\n @return {Object} The name of the currently active route.\n @since 1.5.0\n @public\n */\n function currentRouteName(app) {\n var routingService = app.__container__.lookup('service:-routing');\n return (0, _emberMetal.get)(routingService, 'currentRouteName');\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/current_url', ['exports', 'ember-metal'], function (exports, _emberMetal) {\n 'use strict';\n\n exports.default = currentURL;\n\n\n /**\n Returns the current URL.\n \n Example:\n \n ```javascript\n function validateURL() {\n equal(currentURL(), '/some/path', \"correct URL was transitioned into.\");\n }\n \n click('#some-link-id').then(validateURL);\n ```\n \n @method currentURL\n @return {Object} The currently active URL.\n @since 1.5.0\n @public\n */\n function currentURL(app) {\n var router = app.__container__.lookup('router:main');\n return (0, _emberMetal.get)(router, 'location').getURL();\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/fill_in', ['exports', 'ember-testing/events'], function (exports, _events) {\n 'use strict';\n\n exports.default = fillIn;\n\n\n /**\n Fills in an input element with some text.\n \n Example:\n \n ```javascript\n fillIn('#email', 'you@example.com').then(function() {\n // assert something\n });\n ```\n \n @method fillIn\n @param {String} selector jQuery selector finding an input element on the DOM\n to fill text with\n @param {String} text text to place inside the input element\n @return {RSVP.Promise}\n @public\n */\n function fillIn(app, selector, contextOrText, text) {\n var $el = void 0,\n el = void 0,\n context = void 0;\n if (text === undefined) {\n text = contextOrText;\n } else {\n context = contextOrText;\n }\n $el = app.testHelpers.findWithAssert(selector, context);\n el = $el[0];\n (0, _events.focus)(el);\n\n $el.eq(0).val(text);\n (0, _events.fireEvent)(el, 'input');\n (0, _events.fireEvent)(el, 'change');\n\n return app.testHelpers.wait();\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/find', ['exports', 'ember-metal'], function (exports, _emberMetal) {\n 'use strict';\n\n exports.default = find;\n\n\n /**\n Finds an element in the context of the app's container element. A simple alias\n for `app.$(selector)`.\n \n Example:\n \n ```javascript\n var $el = find('.my-selector');\n ```\n \n With the `context` param:\n \n ```javascript\n var $el = find('.my-selector', '.parent-element-class');\n ```\n \n @method find\n @param {String} selector jQuery string selector for element lookup\n @param {String} [context] (optional) jQuery selector that will limit the selector\n argument to find only within the context's children\n @return {Object} jQuery object representing the results of the query\n @public\n */\n function find(app, selector, context) {\n var $el = void 0;\n context = context || (0, _emberMetal.get)(app, 'rootElement');\n $el = app.$(selector, context);\n return $el;\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/find_with_assert', ['exports'], function (exports) {\n 'use strict';\n\n exports.default = findWithAssert;\n /**\n @module ember\n */\n /**\n Like `find`, but throws an error if the element selector returns no results.\n \n Example:\n \n ```javascript\n var $el = findWithAssert('.doesnt-exist'); // throws error\n ```\n \n With the `context` param:\n \n ```javascript\n var $el = findWithAssert('.selector-id', '.parent-element-class'); // assert will pass\n ```\n \n @method findWithAssert\n @param {String} selector jQuery selector string for finding an element within\n the DOM\n @param {String} [context] (optional) jQuery selector that will limit the\n selector argument to find only within the context's children\n @return {Object} jQuery object representing the results of the query\n @throws {Error} throws error if jQuery object returned has a length of 0\n @public\n */\n function findWithAssert(app, selector, context) {\n var $el = app.testHelpers.find(selector, context);\n if ($el.length === 0) {\n throw new Error('Element ' + selector + ' not found.');\n }\n return $el;\n }\n});","enifed(\"ember-testing/helpers/key_event\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.default = keyEvent;\n /**\n @module ember\n */\n /**\n Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode\n Example:\n ```javascript\n keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() {\n // assert something\n });\n ```\n @method keyEvent\n @param {String} selector jQuery selector for finding element on the DOM\n @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup`\n @param {Number} keyCode the keyCode of the simulated key event\n @return {RSVP.Promise}\n @since 1.5.0\n @public\n */\n function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) {\n var context = void 0,\n type = void 0;\n\n if (keyCode === undefined) {\n context = null;\n keyCode = typeOrKeyCode;\n type = contextOrType;\n } else {\n context = contextOrType;\n type = typeOrKeyCode;\n }\n\n return app.testHelpers.triggerEvent(selector, context, type, { keyCode: keyCode, which: keyCode });\n }\n});","enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime', 'ember-console', 'ember-debug'], function (exports, _emberRuntime, _emberConsole, _emberDebug) {\n 'use strict';\n\n exports.resumeTest = resumeTest;\n exports.pauseTest = pauseTest;\n\n\n var resume = void 0;\n\n /**\n Resumes a test paused by `pauseTest`.\n \n @method resumeTest\n @return {void}\n @public\n */\n /**\n @module ember\n */\n function resumeTest() {\n (true && !(resume) && (0, _emberDebug.assert)('Testing has not been paused. There is nothing to resume.', resume));\n\n resume();\n resume = undefined;\n }\n\n /**\n Pauses the current test - this is useful for debugging while testing or for test-driving.\n It allows you to inspect the state of your application at any point.\n Example (The test will pause before clicking the button):\n \n ```javascript\n visit('/')\n return pauseTest();\n click('.btn');\n ```\n \n You may want to turn off the timeout before pausing.\n \n qunit (as of 2.4.0):\n \n ```\n visit('/');\n assert.timeout(0);\n return pauseTest();\n click('.btn');\n ```\n \n mocha:\n \n ```\n visit('/');\n this.timeout(0);\n return pauseTest();\n click('.btn');\n ```\n \n \n @since 1.9.0\n @method pauseTest\n @return {Object} A promise that will never resolve\n @public\n */\n function pauseTest() {\n _emberConsole.default.info('Testing paused. Use `resumeTest()` to continue.');\n\n return new _emberRuntime.RSVP.Promise(function (resolve) {\n resume = resolve;\n }, 'TestAdapter paused promise');\n }\n});","enifed('ember-testing/helpers/trigger_event', ['exports', 'ember-testing/events'], function (exports, _events) {\n 'use strict';\n\n exports.default = triggerEvent;\n\n /**\n Triggers the given DOM event on the element identified by the provided selector.\n Example:\n ```javascript\n triggerEvent('#some-elem-id', 'blur');\n ```\n This is actually used internally by the `keyEvent` helper like so:\n ```javascript\n triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 });\n ```\n @method triggerEvent\n @param {String} selector jQuery selector for finding element on the DOM\n @param {String} [context] jQuery selector that will limit the selector\n argument to find only within the context's children\n @param {String} type The event type to be triggered.\n @param {Object} [options] The options to be passed to jQuery.Event.\n @return {RSVP.Promise}\n @since 1.5.0\n @public\n */\n function triggerEvent(app, selector, contextOrType, typeOrOptions, possibleOptions) {\n var arity = arguments.length;\n var context = void 0,\n type = void 0,\n options = void 0;\n\n if (arity === 3) {\n // context and options are optional, so this is\n // app, selector, type\n context = null;\n type = contextOrType;\n options = {};\n } else if (arity === 4) {\n // context and options are optional, so this is\n if (typeof typeOrOptions === 'object') {\n // either\n // app, selector, type, options\n context = null;\n type = contextOrType;\n options = typeOrOptions;\n } else {\n // or\n // app, selector, context, type\n context = contextOrType;\n type = typeOrOptions;\n options = {};\n }\n } else {\n context = contextOrType;\n type = typeOrOptions;\n options = possibleOptions;\n }\n\n var $el = app.testHelpers.findWithAssert(selector, context);\n var el = $el[0];\n\n (0, _events.fireEvent)(el, type, options);\n\n return app.testHelpers.wait();\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/visit', ['exports', 'ember-metal'], function (exports, _emberMetal) {\n 'use strict';\n\n exports.default = visit;\n\n\n /**\n Loads a route, sets up any controllers, and renders any templates associated\n with the route as though a real user had triggered the route change while\n using your app.\n \n Example:\n \n ```javascript\n visit('posts/index').then(function() {\n // assert something\n });\n ```\n \n @method visit\n @param {String} url the name of the route\n @return {RSVP.Promise}\n @public\n */\n function visit(app, url) {\n var router = app.__container__.lookup('router:main');\n var shouldHandleURL = false;\n\n app.boot().then(function () {\n router.location.setURL(url);\n\n if (shouldHandleURL) {\n (0, _emberMetal.run)(app.__deprecatedInstance__, 'handleURL', url);\n }\n });\n\n if (app._readinessDeferrals > 0) {\n router['initialURL'] = url;\n (0, _emberMetal.run)(app, 'advanceReadiness');\n delete router['initialURL'];\n } else {\n shouldHandleURL = true;\n }\n\n return app.testHelpers.wait();\n } /**\n @module ember\n */\n});","enifed('ember-testing/helpers/wait', ['exports', 'ember-testing/test/waiters', 'ember-runtime', 'ember-metal', 'ember-testing/test/pending_requests'], function (exports, _waiters, _emberRuntime, _emberMetal, _pending_requests) {\n 'use strict';\n\n exports.default = wait;\n\n\n /**\n Causes the run loop to process any pending events. This is used to ensure that\n any async operations from other helpers (or your assertions) have been processed.\n \n This is most often used as the return value for the helper functions (see 'click',\n 'fillIn','visit',etc). However, there is a method to register a test helper which\n utilizes this method without the need to actually call `wait()` in your helpers.\n \n The `wait` helper is built into `registerAsyncHelper` by default. You will not need\n to `return app.testHelpers.wait();` - the wait behavior is provided for you.\n \n Example:\n \n ```javascript\n import { registerAsyncHelper } from '@ember/test';\n \n registerAsyncHelper('loginUser', function(app, username, password) {\n visit('secured/path/here')\n .fillIn('#username', username)\n .fillIn('#password', password)\n .click('.submit');\n });\n ```\n \n @method wait\n @param {Object} value The value to be returned.\n @return {RSVP.Promise} Promise that resolves to the passed value.\n @public\n @since 1.0.0\n */\n /**\n @module ember\n */\n function wait(app, value) {\n return new _emberRuntime.RSVP.Promise(function (resolve) {\n var router = app.__container__.lookup('router:main');\n\n // Every 10ms, poll for the async thing to have finished\n var watcher = setInterval(function () {\n // 1. If the router is loading, keep polling\n var routerIsLoading = router._routerMicrolib && !!router._routerMicrolib.activeTransition;\n if (routerIsLoading) {\n return;\n }\n\n // 2. If there are pending Ajax requests, keep polling\n if ((0, _pending_requests.pendingRequests)()) {\n return;\n }\n\n // 3. If there are scheduled timers or we are inside of a run loop, keep polling\n if (_emberMetal.run.hasScheduledTimers() || _emberMetal.run.currentRunLoop) {\n return;\n }\n\n if ((0, _waiters.checkWaiters)()) {\n return;\n }\n\n // Stop polling\n clearInterval(watcher);\n\n // Synchronously resolve the promise\n (0, _emberMetal.run)(null, resolve, value);\n }, 10);\n });\n }\n});","enifed('ember-testing/index', ['exports', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/setup_for_testing', 'ember-testing/adapters/qunit', 'ember-testing/support', 'ember-testing/ext/application', 'ember-testing/ext/rsvp', 'ember-testing/helpers', 'ember-testing/initializers'], function (exports, _test, _adapter, _setup_for_testing, _qunit) {\n 'use strict';\n\n exports.QUnitAdapter = exports.setupForTesting = exports.Adapter = exports.Test = undefined;\n Object.defineProperty(exports, 'Test', {\n enumerable: true,\n get: function () {\n return _test.default;\n }\n });\n Object.defineProperty(exports, 'Adapter', {\n enumerable: true,\n get: function () {\n return _adapter.default;\n }\n });\n Object.defineProperty(exports, 'setupForTesting', {\n enumerable: true,\n get: function () {\n return _setup_for_testing.default;\n }\n });\n Object.defineProperty(exports, 'QUnitAdapter', {\n enumerable: true,\n get: function () {\n return _qunit.default;\n }\n });\n});","enifed('ember-testing/initializers', ['ember-runtime'], function (_emberRuntime) {\n 'use strict';\n\n var name = 'deferReadiness in `testing` mode';\n\n (0, _emberRuntime.onLoad)('Ember.Application', function (Application) {\n if (!Application.initializers[name]) {\n Application.initializer({\n name: name,\n\n initialize: function (application) {\n if (application.testing) {\n application.deferReadiness();\n }\n }\n });\n }\n });\n});","enifed('ember-testing/setup_for_testing', ['exports', 'ember-debug', 'ember-views', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit'], function (exports, _emberDebug, _emberViews, _adapter, _pending_requests, _adapter2, _qunit) {\n 'use strict';\n\n exports.default = setupForTesting;\n\n\n /**\n Sets Ember up for testing. This is useful to perform\n basic setup steps in order to unit test.\n \n Use `App.setupForTesting` to perform integration tests (full\n application testing).\n \n @method setupForTesting\n @namespace Ember\n @since 1.5.0\n @private\n */\n /* global self */\n\n function setupForTesting() {\n (0, _emberDebug.setTesting)(true);\n\n var adapter = (0, _adapter.getAdapter)();\n // if adapter is not manually set default to QUnit\n if (!adapter) {\n (0, _adapter.setAdapter)(typeof self.QUnit === 'undefined' ? new _adapter2.default() : new _qunit.default());\n }\n\n if (_emberViews.jQuery) {\n (0, _emberViews.jQuery)(document).off('ajaxSend', _pending_requests.incrementPendingRequests);\n (0, _emberViews.jQuery)(document).off('ajaxComplete', _pending_requests.decrementPendingRequests);\n\n (0, _pending_requests.clearPendingRequests)();\n\n (0, _emberViews.jQuery)(document).on('ajaxSend', _pending_requests.incrementPendingRequests);\n (0, _emberViews.jQuery)(document).on('ajaxComplete', _pending_requests.decrementPendingRequests);\n }\n }\n});","enifed('ember-testing/support', ['ember-debug', 'ember-views', 'ember-environment'], function (_emberDebug, _emberViews, _emberEnvironment) {\n 'use strict';\n\n /**\n @module ember\n */\n\n var $ = _emberViews.jQuery;\n\n /**\n This method creates a checkbox and triggers the click event to fire the\n passed in handler. It is used to correct for a bug in older versions\n of jQuery (e.g 1.8.3).\n \n @private\n @method testCheckboxClick\n */\n function testCheckboxClick(handler) {\n var input = document.createElement('input');\n $(input).attr('type', 'checkbox').css({ position: 'absolute', left: '-1000px', top: '-1000px' }).appendTo('body').on('click', handler).trigger('click').remove();\n }\n\n if (_emberEnvironment.environment.hasDOM && typeof $ === 'function') {\n $(function () {\n /*\n Determine whether a checkbox checked using jQuery's \"click\" method will have\n the correct value for its checked property.\n If we determine that the current jQuery version exhibits this behavior,\n patch it to work correctly as in the commit for the actual fix:\n https://github.com/jquery/jquery/commit/1fb2f92.\n */\n testCheckboxClick(function () {\n if (!this.checked && !$.event.special.click) {\n $.event.special.click = {\n trigger: function () {\n if ($.nodeName(this, 'input') && this.type === 'checkbox' && this.click) {\n this.click();\n return false;\n }\n }\n };\n }\n });\n\n // Try again to verify that the patch took effect or blow up.\n testCheckboxClick(function () {\n (true && (0, _emberDebug.warn)('clicked checkboxes should be checked! the jQuery patch didn\\'t work', this.checked, { id: 'ember-testing.test-checkbox-click' }));\n });\n });\n }\n});","enifed('ember-testing/test', ['exports', 'ember-testing/test/helpers', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/promise', 'ember-testing/test/waiters', 'ember-testing/test/adapter'], function (exports, _helpers, _on_inject_helpers, _promise, _waiters, _adapter) {\n 'use strict';\n\n /**\n This is a container for an assortment of testing related functionality:\n \n * Choose your default test adapter (for your framework of choice).\n * Register/Unregister additional test helpers.\n * Setup callbacks to be fired when the test helpers are injected into\n your application.\n \n @class Test\n @namespace Ember\n @public\n */\n var Test = {\n /**\n Hash containing all known test helpers.\n @property _helpers\n @private\n @since 1.7.0\n */\n _helpers: _helpers.helpers,\n\n registerHelper: _helpers.registerHelper,\n registerAsyncHelper: _helpers.registerAsyncHelper,\n unregisterHelper: _helpers.unregisterHelper,\n onInjectHelpers: _on_inject_helpers.onInjectHelpers,\n Promise: _promise.default,\n promise: _promise.promise,\n resolve: _promise.resolve,\n registerWaiter: _waiters.registerWaiter,\n unregisterWaiter: _waiters.unregisterWaiter,\n checkWaiters: _waiters.checkWaiters\n };\n\n /**\n Used to allow ember-testing to communicate with a specific testing\n framework.\n \n You can manually set it before calling `App.setupForTesting()`.\n \n Example:\n \n ```javascript\n Ember.Test.adapter = MyCustomAdapter.create()\n ```\n \n If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.\n \n @public\n @for Ember.Test\n @property adapter\n @type {Class} The adapter to be used.\n @default Ember.Test.QUnitAdapter\n */\n /**\n @module ember\n */\n Object.defineProperty(Test, 'adapter', {\n get: _adapter.getAdapter,\n set: _adapter.setAdapter\n });\n\n exports.default = Test;\n});","enifed('ember-testing/test/adapter', ['exports', 'ember-console', 'ember-metal'], function (exports, _emberConsole, _emberMetal) {\n 'use strict';\n\n exports.getAdapter = getAdapter;\n exports.setAdapter = setAdapter;\n exports.asyncStart = asyncStart;\n exports.asyncEnd = asyncEnd;\n\n\n var adapter = void 0;\n function getAdapter() {\n return adapter;\n }\n\n function setAdapter(value) {\n adapter = value;\n if (value && typeof value.exception === 'function') {\n (0, _emberMetal.setDispatchOverride)(adapterDispatch);\n } else {\n (0, _emberMetal.setDispatchOverride)(null);\n }\n }\n\n function asyncStart() {\n if (adapter) {\n adapter.asyncStart();\n }\n }\n\n function asyncEnd() {\n if (adapter) {\n adapter.asyncEnd();\n }\n }\n\n function adapterDispatch(error) {\n adapter.exception(error);\n _emberConsole.default.error(error.stack);\n }\n});","enifed('ember-testing/test/helpers', ['exports', 'ember-testing/test/promise'], function (exports, _promise) {\n 'use strict';\n\n exports.helpers = undefined;\n exports.registerHelper = registerHelper;\n exports.registerAsyncHelper = registerAsyncHelper;\n exports.unregisterHelper = unregisterHelper;\n var helpers = exports.helpers = {};\n /**\n @module @ember/test\n */\n\n /**\n `registerHelper` is used to register a test helper that will be injected\n when `App.injectTestHelpers` is called.\n \n The helper method will always be called with the current Application as\n the first parameter.\n \n For example:\n \n ```javascript\n import { registerHelper } from '@ember/test';\n import { run } from '@ember/runloop';\n \n registerHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n });\n ```\n \n This helper can later be called without arguments because it will be\n called with `app` as the first parameter.\n \n ```javascript\n import Application from '@ember/application';\n \n App = Application.create();\n App.injectTestHelpers();\n boot();\n ```\n \n @public\n @for @ember/test\n @static\n @method registerHelper\n @param {String} name The name of the helper method to add.\n @param {Function} helperMethod\n @param options {Object}\n */\n function registerHelper(name, helperMethod) {\n helpers[name] = {\n method: helperMethod,\n meta: { wait: false }\n };\n }\n\n /**\n `registerAsyncHelper` is used to register an async test helper that will be injected\n when `App.injectTestHelpers` is called.\n \n The helper method will always be called with the current Application as\n the first parameter.\n \n For example:\n \n ```javascript\n import { registerAsyncHelper } from '@ember/test';\n import { run } from '@ember/runloop';\n \n registerAsyncHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n });\n ```\n \n The advantage of an async helper is that it will not run\n until the last async helper has completed. All async helpers\n after it will wait for it complete before running.\n \n \n For example:\n \n ```javascript\n import { registerAsyncHelper } from '@ember/test';\n \n registerAsyncHelper('deletePost', function(app, postId) {\n click('.delete-' + postId);\n });\n \n // ... in your test\n visit('/post/2');\n deletePost(2);\n visit('/post/3');\n deletePost(3);\n ```\n \n @public\n @for @ember/test\n @method registerAsyncHelper\n @param {String} name The name of the helper method to add.\n @param {Function} helperMethod\n @since 1.2.0\n */\n function registerAsyncHelper(name, helperMethod) {\n helpers[name] = {\n method: helperMethod,\n meta: { wait: true }\n };\n }\n\n /**\n Remove a previously added helper method.\n \n Example:\n \n ```javascript\n import { unregisterHelper } from '@ember/test';\n \n unregisterHelper('wait');\n ```\n \n @public\n @method unregisterHelper\n @static\n @for @ember/test\n @param {String} name The helper to remove.\n */\n function unregisterHelper(name) {\n delete helpers[name];\n delete _promise.default.prototype[name];\n }\n});","enifed(\"ember-testing/test/on_inject_helpers\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.onInjectHelpers = onInjectHelpers;\n exports.invokeInjectHelpersCallbacks = invokeInjectHelpersCallbacks;\n var callbacks = exports.callbacks = [];\n\n /**\n Used to register callbacks to be fired whenever `App.injectTestHelpers`\n is called.\n \n The callback will receive the current application as an argument.\n \n Example:\n \n ```javascript\n import $ from 'jquery';\n \n Ember.Test.onInjectHelpers(function() {\n $(document).ajaxSend(function() {\n Test.pendingRequests++;\n });\n \n $(document).ajaxComplete(function() {\n Test.pendingRequests--;\n });\n });\n ```\n \n @public\n @for Ember.Test\n @method onInjectHelpers\n @param {Function} callback The function to be called.\n */\n function onInjectHelpers(callback) {\n callbacks.push(callback);\n }\n\n function invokeInjectHelpersCallbacks(app) {\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](app);\n }\n }\n});","enifed(\"ember-testing/test/pending_requests\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.pendingRequests = pendingRequests;\n exports.clearPendingRequests = clearPendingRequests;\n exports.incrementPendingRequests = incrementPendingRequests;\n exports.decrementPendingRequests = decrementPendingRequests;\n var requests = [];\n\n function pendingRequests() {\n return requests.length;\n }\n\n function clearPendingRequests() {\n requests.length = 0;\n }\n\n function incrementPendingRequests(_, xhr) {\n requests.push(xhr);\n }\n\n function decrementPendingRequests(_, xhr) {\n for (var i = 0; i < requests.length; i++) {\n if (xhr === requests[i]) {\n requests.splice(i, 1);\n break;\n }\n }\n }\n});","enifed('ember-testing/test/promise', ['exports', 'ember-babel', 'ember-runtime', 'ember-testing/test/run'], function (exports, _emberBabel, _emberRuntime, _run) {\n 'use strict';\n\n exports.promise = promise;\n exports.resolve = resolve;\n exports.getLastPromise = getLastPromise;\n\n\n var lastPromise = void 0;\n\n var TestPromise = function (_RSVP$Promise) {\n (0, _emberBabel.inherits)(TestPromise, _RSVP$Promise);\n\n function TestPromise() {\n (0, _emberBabel.classCallCheck)(this, TestPromise);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _RSVP$Promise.apply(this, arguments));\n\n lastPromise = _this;\n return _this;\n }\n\n TestPromise.prototype.then = function then(_onFulfillment) {\n var _RSVP$Promise$prototy;\n\n var onFulfillment = typeof _onFulfillment === 'function' ? function (result) {\n return isolate(_onFulfillment, result);\n } : undefined;\n\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return (_RSVP$Promise$prototy = _RSVP$Promise.prototype.then).call.apply(_RSVP$Promise$prototy, [this, onFulfillment].concat(args));\n };\n\n return TestPromise;\n }(_emberRuntime.RSVP.Promise);\n\n exports.default = TestPromise;\n\n\n /**\n This returns a thenable tailored for testing. It catches failed\n `onSuccess` callbacks and invokes the `Ember.Test.adapter.exception`\n callback in the last chained then.\n \n This method should be returned by async helpers such as `wait`.\n \n @public\n @for Ember.Test\n @method promise\n @param {Function} resolver The function used to resolve the promise.\n @param {String} label An optional string for identifying the promise.\n */\n function promise(resolver, label) {\n var fullLabel = 'Ember.Test.promise: ' + (label || '');\n return new TestPromise(resolver, fullLabel);\n }\n\n /**\n Replacement for `Ember.RSVP.resolve`\n The only difference is this uses\n an instance of `Ember.Test.Promise`\n \n @public\n @for Ember.Test\n @method resolve\n @param {Mixed} The value to resolve\n @since 1.2.0\n */\n function resolve(result, label) {\n return TestPromise.resolve(result, label);\n }\n\n function getLastPromise() {\n return lastPromise;\n }\n\n // This method isolates nested async methods\n // so that they don't conflict with other last promises.\n //\n // 1. Set `Ember.Test.lastPromise` to null\n // 2. Invoke method\n // 3. Return the last promise created during method\n function isolate(onFulfillment, result) {\n // Reset lastPromise for nested helpers\n lastPromise = null;\n\n var value = onFulfillment(result);\n\n var promise = lastPromise;\n lastPromise = null;\n\n // If the method returned a promise\n // return that promise. If not,\n // return the last async helper's promise\n if (value && value instanceof TestPromise || !promise) {\n return value;\n } else {\n return (0, _run.default)(function () {\n return resolve(promise).then(function () {\n return value;\n });\n });\n }\n }\n});","enifed('ember-testing/test/run', ['exports', 'ember-metal'], function (exports, _emberMetal) {\n 'use strict';\n\n exports.default = run;\n function run(fn) {\n if (!_emberMetal.run.currentRunLoop) {\n return (0, _emberMetal.run)(fn);\n } else {\n return fn();\n }\n }\n});","enifed(\"ember-testing/test/waiters\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.registerWaiter = registerWaiter;\n exports.unregisterWaiter = unregisterWaiter;\n exports.checkWaiters = checkWaiters;\n /**\n @module @ember/test\n */\n var contexts = [];\n var callbacks = [];\n\n /**\n This allows ember-testing to play nicely with other asynchronous\n events, such as an application that is waiting for a CSS3\n transition or an IndexDB transaction. The waiter runs periodically\n after each async helper (i.e. `click`, `andThen`, `visit`, etc) has executed,\n until the returning result is truthy. After the waiters finish, the next async helper\n is executed and the process repeats.\n \n For example:\n \n ```javascript\n import { registerWaiter } from '@ember/test';\n \n registerWaiter(function() {\n return myPendingTransactions() == 0;\n });\n ```\n The `context` argument allows you to optionally specify the `this`\n with which your callback will be invoked.\n \n For example:\n \n ```javascript\n import { registerWaiter } from '@ember/test';\n \n registerWaiter(MyDB, MyDB.hasPendingTransactions);\n ```\n \n @public\n @for @ember/test\n @static\n @method registerWaiter\n @param {Object} context (optional)\n @param {Function} callback\n @since 1.2.0\n */\n function registerWaiter(context, callback) {\n if (arguments.length === 1) {\n callback = context;\n context = null;\n }\n if (indexOf(context, callback) > -1) {\n return;\n }\n contexts.push(context);\n callbacks.push(callback);\n }\n\n /**\n `unregisterWaiter` is used to unregister a callback that was\n registered with `registerWaiter`.\n \n @public\n @for @ember/test\n @static\n @method unregisterWaiter\n @param {Object} context (optional)\n @param {Function} callback\n @since 1.2.0\n */\n function unregisterWaiter(context, callback) {\n if (!callbacks.length) {\n return;\n }\n if (arguments.length === 1) {\n callback = context;\n context = null;\n }\n var i = indexOf(context, callback);\n if (i === -1) {\n return;\n }\n contexts.splice(i, 1);\n callbacks.splice(i, 1);\n }\n\n /**\n Iterates through each registered test waiter, and invokes\n its callback. If any waiter returns false, this method will return\n true indicating that the waiters have not settled yet.\n \n This is generally used internally from the acceptance/integration test\n infrastructure.\n \n @public\n @for @ember/test\n @static\n @method checkWaiters\n */\n function checkWaiters() {\n if (!callbacks.length) {\n return false;\n }\n for (var i = 0; i < callbacks.length; i++) {\n var context = contexts[i];\n var callback = callbacks[i];\n if (!callback.call(context)) {\n return true;\n }\n }\n return false;\n }\n\n function indexOf(context, callback) {\n for (var i = 0; i < callbacks.length; i++) {\n if (callbacks[i] === callback && contexts[i] === context) {\n return i;\n }\n }\n return -1;\n }\n});","/*global enifed */\nenifed('node-module', ['exports'], function(_exports) {\n var IS_NODE = typeof module === 'object' && typeof module.require === 'function';\n if (IS_NODE) {\n _exports.require = module.require;\n _exports.module = module;\n _exports.IS_NODE = IS_NODE;\n } else {\n _exports.require = null;\n _exports.module = null;\n _exports.IS_NODE = IS_NODE;\n }\n});","/* globals require, Ember, jQuery */\n\n(() => {\n if (typeof jQuery !== 'undefined') {\n let _Ember;\n if (typeof Ember !== 'undefined') {\n _Ember = Ember;\n } else {\n _Ember = require('ember').default;\n }\n\n let pendingRequests;\n if (Ember.__loader.registry['ember-testing/test/pending_requests']) {\n pendingRequests = Ember.__loader.require('ember-testing/test/pending_requests');\n }\n\n if (pendingRequests) {\n // This exists to ensure that the AJAX listeners setup by Ember itself\n // (which as of 2.17 are not properly torn down) get cleared and released\n // when the application is destroyed. Without this, any AJAX requests\n // that happen _between_ acceptance tests will always share\n // `pendingRequests`.\n _Ember.Application.reopen({\n willDestroy() {\n jQuery(document).off('ajaxSend', pendingRequests.incrementPendingRequests);\n jQuery(document).off('ajaxComplete', pendingRequests.decrementPendingRequests);\n\n pendingRequests.clearPendingRequests();\n\n this._super(...arguments);\n }\n });\n }\n }\n})();","/*!\n * QUnit 2.5.1\n * https://qunitjs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2018-02-28T01:37Z\n */\n(function (global$1) {\n 'use strict';\n\n global$1 = global$1 && global$1.hasOwnProperty('default') ? global$1['default'] : global$1;\n\n var window = global$1.window;\n var self$1 = global$1.self;\n var console = global$1.console;\n var setTimeout = global$1.setTimeout;\n var clearTimeout = global$1.clearTimeout;\n\n var document = window && window.document;\n var navigator = window && window.navigator;\n\n var localSessionStorage = function () {\n \tvar x = \"qunit-test-string\";\n \ttry {\n \t\tglobal$1.sessionStorage.setItem(x, x);\n \t\tglobal$1.sessionStorage.removeItem(x);\n \t\treturn global$1.sessionStorage;\n \t} catch (e) {\n \t\treturn undefined;\n \t}\n }();\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n\n\n\n\n\n\n\n\n\n\n var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n\n var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n var toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n };\n\n var toString = Object.prototype.toString;\n var hasOwn = Object.prototype.hasOwnProperty;\n var now = Date.now || function () {\n \treturn new Date().getTime();\n };\n\n var defined = {\n \tdocument: window && window.document !== undefined,\n \tsetTimeout: setTimeout !== undefined\n };\n\n // Returns a new Array with the elements that are in a but not in b\n function diff(a, b) {\n \tvar i,\n \t j,\n \t result = a.slice();\n\n \tfor (i = 0; i < result.length; i++) {\n \t\tfor (j = 0; j < b.length; j++) {\n \t\t\tif (result[i] === b[j]) {\n \t\t\t\tresult.splice(i, 1);\n \t\t\t\ti--;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \treturn result;\n }\n\n /**\n * Determines whether an element exists in a given array or not.\n *\n * @method inArray\n * @param {Any} elem\n * @param {Array} array\n * @return {Boolean}\n */\n function inArray(elem, array) {\n \treturn array.indexOf(elem) !== -1;\n }\n\n /**\n * Makes a clone of an object using only Array or Object as base,\n * and copies over the own enumerable properties.\n *\n * @param {Object} obj\n * @return {Object} New object with only the own properties (recursively).\n */\n function objectValues(obj) {\n \tvar key,\n \t val,\n \t vals = is(\"array\", obj) ? [] : {};\n \tfor (key in obj) {\n \t\tif (hasOwn.call(obj, key)) {\n \t\t\tval = obj[key];\n \t\t\tvals[key] = val === Object(val) ? objectValues(val) : val;\n \t\t}\n \t}\n \treturn vals;\n }\n\n function extend(a, b, undefOnly) {\n \tfor (var prop in b) {\n \t\tif (hasOwn.call(b, prop)) {\n \t\t\tif (b[prop] === undefined) {\n \t\t\t\tdelete a[prop];\n \t\t\t} else if (!(undefOnly && typeof a[prop] !== \"undefined\")) {\n \t\t\t\ta[prop] = b[prop];\n \t\t\t}\n \t\t}\n \t}\n\n \treturn a;\n }\n\n function objectType(obj) {\n \tif (typeof obj === \"undefined\") {\n \t\treturn \"undefined\";\n \t}\n\n \t// Consider: typeof null === object\n \tif (obj === null) {\n \t\treturn \"null\";\n \t}\n\n \tvar match = toString.call(obj).match(/^\\[object\\s(.*)\\]$/),\n \t type = match && match[1];\n\n \tswitch (type) {\n \t\tcase \"Number\":\n \t\t\tif (isNaN(obj)) {\n \t\t\t\treturn \"nan\";\n \t\t\t}\n \t\t\treturn \"number\";\n \t\tcase \"String\":\n \t\tcase \"Boolean\":\n \t\tcase \"Array\":\n \t\tcase \"Set\":\n \t\tcase \"Map\":\n \t\tcase \"Date\":\n \t\tcase \"RegExp\":\n \t\tcase \"Function\":\n \t\tcase \"Symbol\":\n \t\t\treturn type.toLowerCase();\n \t\tdefault:\n \t\t\treturn typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n \t}\n }\n\n // Safe object type checking\n function is(type, obj) {\n \treturn objectType(obj) === type;\n }\n\n // Based on Java's String.hashCode, a simple but not\n // rigorously collision resistant hashing function\n function generateHash(module, testName) {\n \tvar str = module + \"\\x1C\" + testName;\n \tvar hash = 0;\n\n \tfor (var i = 0; i < str.length; i++) {\n \t\thash = (hash << 5) - hash + str.charCodeAt(i);\n \t\thash |= 0;\n \t}\n\n \t// Convert the possibly negative integer hash code into an 8 character hex string, which isn't\n \t// strictly necessary but increases user understanding that the id is a SHA-like hash\n \tvar hex = (0x100000000 + hash).toString(16);\n \tif (hex.length < 8) {\n \t\thex = \"0000000\" + hex;\n \t}\n\n \treturn hex.slice(-8);\n }\n\n // Test for equality any JavaScript type.\n // Authors: Philippe Rathé , David Chan \n var equiv = (function () {\n\n \t// Value pairs queued for comparison. Used for breadth-first processing order, recursion\n \t// detection and avoiding repeated comparison (see below for details).\n \t// Elements are { a: val, b: val }.\n \tvar pairs = [];\n\n \tvar getProto = Object.getPrototypeOf || function (obj) {\n \t\treturn obj.__proto__;\n \t};\n\n \tfunction useStrictEquality(a, b) {\n\n \t\t// This only gets called if a and b are not strict equal, and is used to compare on\n \t\t// the primitive values inside object wrappers. For example:\n \t\t// `var i = 1;`\n \t\t// `var j = new Number(1);`\n \t\t// Neither a nor b can be null, as a !== b and they have the same type.\n \t\tif ((typeof a === \"undefined\" ? \"undefined\" : _typeof(a)) === \"object\") {\n \t\t\ta = a.valueOf();\n \t\t}\n \t\tif ((typeof b === \"undefined\" ? \"undefined\" : _typeof(b)) === \"object\") {\n \t\t\tb = b.valueOf();\n \t\t}\n\n \t\treturn a === b;\n \t}\n\n \tfunction compareConstructors(a, b) {\n \t\tvar protoA = getProto(a);\n \t\tvar protoB = getProto(b);\n\n \t\t// Comparing constructors is more strict than using `instanceof`\n \t\tif (a.constructor === b.constructor) {\n \t\t\treturn true;\n \t\t}\n\n \t\t// Ref #851\n \t\t// If the obj prototype descends from a null constructor, treat it\n \t\t// as a null prototype.\n \t\tif (protoA && protoA.constructor === null) {\n \t\t\tprotoA = null;\n \t\t}\n \t\tif (protoB && protoB.constructor === null) {\n \t\t\tprotoB = null;\n \t\t}\n\n \t\t// Allow objects with no prototype to be equivalent to\n \t\t// objects with Object as their constructor.\n \t\tif (protoA === null && protoB === Object.prototype || protoB === null && protoA === Object.prototype) {\n \t\t\treturn true;\n \t\t}\n\n \t\treturn false;\n \t}\n\n \tfunction getRegExpFlags(regexp) {\n \t\treturn \"flags\" in regexp ? regexp.flags : regexp.toString().match(/[gimuy]*$/)[0];\n \t}\n\n \tfunction isContainer(val) {\n \t\treturn [\"object\", \"array\", \"map\", \"set\"].indexOf(objectType(val)) !== -1;\n \t}\n\n \tfunction breadthFirstCompareChild(a, b) {\n\n \t\t// If a is a container not reference-equal to b, postpone the comparison to the\n \t\t// end of the pairs queue -- unless (a, b) has been seen before, in which case skip\n \t\t// over the pair.\n \t\tif (a === b) {\n \t\t\treturn true;\n \t\t}\n \t\tif (!isContainer(a)) {\n \t\t\treturn typeEquiv(a, b);\n \t\t}\n \t\tif (pairs.every(function (pair) {\n \t\t\treturn pair.a !== a || pair.b !== b;\n \t\t})) {\n\n \t\t\t// Not yet started comparing this pair\n \t\t\tpairs.push({ a: a, b: b });\n \t\t}\n \t\treturn true;\n \t}\n\n \tvar callbacks = {\n \t\t\"string\": useStrictEquality,\n \t\t\"boolean\": useStrictEquality,\n \t\t\"number\": useStrictEquality,\n \t\t\"null\": useStrictEquality,\n \t\t\"undefined\": useStrictEquality,\n \t\t\"symbol\": useStrictEquality,\n \t\t\"date\": useStrictEquality,\n\n \t\t\"nan\": function nan() {\n \t\t\treturn true;\n \t\t},\n\n \t\t\"regexp\": function regexp(a, b) {\n \t\t\treturn a.source === b.source &&\n\n \t\t\t// Include flags in the comparison\n \t\t\tgetRegExpFlags(a) === getRegExpFlags(b);\n \t\t},\n\n \t\t// abort (identical references / instance methods were skipped earlier)\n \t\t\"function\": function _function() {\n \t\t\treturn false;\n \t\t},\n\n \t\t\"array\": function array(a, b) {\n \t\t\tvar i, len;\n\n \t\t\tlen = a.length;\n \t\t\tif (len !== b.length) {\n\n \t\t\t\t// Safe and faster\n \t\t\t\treturn false;\n \t\t\t}\n\n \t\t\tfor (i = 0; i < len; i++) {\n\n \t\t\t\t// Compare non-containers; queue non-reference-equal containers\n \t\t\t\tif (!breadthFirstCompareChild(a[i], b[i])) {\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// Define sets a and b to be equivalent if for each element aVal in a, there\n \t\t// is some element bVal in b such that aVal and bVal are equivalent. Element\n \t\t// repetitions are not counted, so these are equivalent:\n \t\t// a = new Set( [ {}, [], [] ] );\n \t\t// b = new Set( [ {}, {}, [] ] );\n \t\t\"set\": function set$$1(a, b) {\n \t\t\tvar innerEq,\n \t\t\t outerEq = true;\n\n \t\t\tif (a.size !== b.size) {\n\n \t\t\t\t// This optimization has certain quirks because of the lack of\n \t\t\t\t// repetition counting. For instance, adding the same\n \t\t\t\t// (reference-identical) element to two equivalent sets can\n \t\t\t\t// make them non-equivalent.\n \t\t\t\treturn false;\n \t\t\t}\n\n \t\t\ta.forEach(function (aVal) {\n\n \t\t\t\t// Short-circuit if the result is already known. (Using for...of\n \t\t\t\t// with a break clause would be cleaner here, but it would cause\n \t\t\t\t// a syntax error on older Javascript implementations even if\n \t\t\t\t// Set is unused)\n \t\t\t\tif (!outerEq) {\n \t\t\t\t\treturn;\n \t\t\t\t}\n\n \t\t\t\tinnerEq = false;\n\n \t\t\t\tb.forEach(function (bVal) {\n \t\t\t\t\tvar parentPairs;\n\n \t\t\t\t\t// Likewise, short-circuit if the result is already known\n \t\t\t\t\tif (innerEq) {\n \t\t\t\t\t\treturn;\n \t\t\t\t\t}\n\n \t\t\t\t\t// Swap out the global pairs list, as the nested call to\n \t\t\t\t\t// innerEquiv will clobber its contents\n \t\t\t\t\tparentPairs = pairs;\n \t\t\t\t\tif (innerEquiv(bVal, aVal)) {\n \t\t\t\t\t\tinnerEq = true;\n \t\t\t\t\t}\n\n \t\t\t\t\t// Replace the global pairs list\n \t\t\t\t\tpairs = parentPairs;\n \t\t\t\t});\n\n \t\t\t\tif (!innerEq) {\n \t\t\t\t\touterEq = false;\n \t\t\t\t}\n \t\t\t});\n\n \t\t\treturn outerEq;\n \t\t},\n\n \t\t// Define maps a and b to be equivalent if for each key-value pair (aKey, aVal)\n \t\t// in a, there is some key-value pair (bKey, bVal) in b such that\n \t\t// [ aKey, aVal ] and [ bKey, bVal ] are equivalent. Key repetitions are not\n \t\t// counted, so these are equivalent:\n \t\t// a = new Map( [ [ {}, 1 ], [ {}, 1 ], [ [], 1 ] ] );\n \t\t// b = new Map( [ [ {}, 1 ], [ [], 1 ], [ [], 1 ] ] );\n \t\t\"map\": function map(a, b) {\n \t\t\tvar innerEq,\n \t\t\t outerEq = true;\n\n \t\t\tif (a.size !== b.size) {\n\n \t\t\t\t// This optimization has certain quirks because of the lack of\n \t\t\t\t// repetition counting. For instance, adding the same\n \t\t\t\t// (reference-identical) key-value pair to two equivalent maps\n \t\t\t\t// can make them non-equivalent.\n \t\t\t\treturn false;\n \t\t\t}\n\n \t\t\ta.forEach(function (aVal, aKey) {\n\n \t\t\t\t// Short-circuit if the result is already known. (Using for...of\n \t\t\t\t// with a break clause would be cleaner here, but it would cause\n \t\t\t\t// a syntax error on older Javascript implementations even if\n \t\t\t\t// Map is unused)\n \t\t\t\tif (!outerEq) {\n \t\t\t\t\treturn;\n \t\t\t\t}\n\n \t\t\t\tinnerEq = false;\n\n \t\t\t\tb.forEach(function (bVal, bKey) {\n \t\t\t\t\tvar parentPairs;\n\n \t\t\t\t\t// Likewise, short-circuit if the result is already known\n \t\t\t\t\tif (innerEq) {\n \t\t\t\t\t\treturn;\n \t\t\t\t\t}\n\n \t\t\t\t\t// Swap out the global pairs list, as the nested call to\n \t\t\t\t\t// innerEquiv will clobber its contents\n \t\t\t\t\tparentPairs = pairs;\n \t\t\t\t\tif (innerEquiv([bVal, bKey], [aVal, aKey])) {\n \t\t\t\t\t\tinnerEq = true;\n \t\t\t\t\t}\n\n \t\t\t\t\t// Replace the global pairs list\n \t\t\t\t\tpairs = parentPairs;\n \t\t\t\t});\n\n \t\t\t\tif (!innerEq) {\n \t\t\t\t\touterEq = false;\n \t\t\t\t}\n \t\t\t});\n\n \t\t\treturn outerEq;\n \t\t},\n\n \t\t\"object\": function object(a, b) {\n \t\t\tvar i,\n \t\t\t aProperties = [],\n \t\t\t bProperties = [];\n\n \t\t\tif (compareConstructors(a, b) === false) {\n \t\t\t\treturn false;\n \t\t\t}\n\n \t\t\t// Be strict: don't ensure hasOwnProperty and go deep\n \t\t\tfor (i in a) {\n\n \t\t\t\t// Collect a's properties\n \t\t\t\taProperties.push(i);\n\n \t\t\t\t// Skip OOP methods that look the same\n \t\t\t\tif (a.constructor !== Object && typeof a.constructor !== \"undefined\" && typeof a[i] === \"function\" && typeof b[i] === \"function\" && a[i].toString() === b[i].toString()) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n\n \t\t\t\t// Compare non-containers; queue non-reference-equal containers\n \t\t\t\tif (!breadthFirstCompareChild(a[i], b[i])) {\n \t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t}\n\n \t\t\tfor (i in b) {\n\n \t\t\t\t// Collect b's properties\n \t\t\t\tbProperties.push(i);\n \t\t\t}\n\n \t\t\t// Ensures identical properties name\n \t\t\treturn typeEquiv(aProperties.sort(), bProperties.sort());\n \t\t}\n \t};\n\n \tfunction typeEquiv(a, b) {\n \t\tvar type = objectType(a);\n\n \t\t// Callbacks for containers will append to the pairs queue to achieve breadth-first\n \t\t// search order. The pairs queue is also used to avoid reprocessing any pair of\n \t\t// containers that are reference-equal to a previously visited pair (a special case\n \t\t// this being recursion detection).\n \t\t//\n \t\t// Because of this approach, once typeEquiv returns a false value, it should not be\n \t\t// called again without clearing the pair queue else it may wrongly report a visited\n \t\t// pair as being equivalent.\n \t\treturn objectType(b) === type && callbacks[type](a, b);\n \t}\n\n \tfunction innerEquiv(a, b) {\n \t\tvar i, pair;\n\n \t\t// We're done when there's nothing more to compare\n \t\tif (arguments.length < 2) {\n \t\t\treturn true;\n \t\t}\n\n \t\t// Clear the global pair queue and add the top-level values being compared\n \t\tpairs = [{ a: a, b: b }];\n\n \t\tfor (i = 0; i < pairs.length; i++) {\n \t\t\tpair = pairs[i];\n\n \t\t\t// Perform type-specific comparison on any pairs that are not strictly\n \t\t\t// equal. For container types, that comparison will postpone comparison\n \t\t\t// of any sub-container pair to the end of the pair queue. This gives\n \t\t\t// breadth-first search order. It also avoids the reprocessing of\n \t\t\t// reference-equal siblings, cousins etc, which can have a significant speed\n \t\t\t// impact when comparing a container of small objects each of which has a\n \t\t\t// reference to the same (singleton) large object.\n \t\t\tif (pair.a !== pair.b && !typeEquiv(pair.a, pair.b)) {\n \t\t\t\treturn false;\n \t\t\t}\n \t\t}\n\n \t\t// ...across all consecutive argument pairs\n \t\treturn arguments.length === 2 || innerEquiv.apply(this, [].slice.call(arguments, 1));\n \t}\n\n \treturn function () {\n \t\tvar result = innerEquiv.apply(undefined, arguments);\n\n \t\t// Release any retained objects\n \t\tpairs.length = 0;\n \t\treturn result;\n \t};\n })();\n\n /**\n * Config object: Maintain internal state\n * Later exposed as QUnit.config\n * `config` initialized at top of scope\n */\n var config = {\n\n \t// The queue of tests to run\n \tqueue: [],\n\n \t// Block until document ready\n \tblocking: true,\n\n \t// By default, run previously failed tests first\n \t// very useful in combination with \"Hide passed tests\" checked\n \treorder: true,\n\n \t// By default, modify document.title when suite is done\n \taltertitle: true,\n\n \t// HTML Reporter: collapse every test except the first failing test\n \t// If false, all failing tests will be expanded\n \tcollapse: true,\n\n \t// By default, scroll to top of the page when suite is done\n \tscrolltop: true,\n\n \t// Depth up-to which object will be dumped\n \tmaxDepth: 5,\n\n \t// When enabled, all tests must call expect()\n \trequireExpects: false,\n\n \t// Placeholder for user-configurable form-exposed URL parameters\n \turlConfig: [],\n\n \t// Set of all modules.\n \tmodules: [],\n\n \t// The first unnamed module\n \tcurrentModule: {\n \t\tname: \"\",\n \t\ttests: [],\n \t\tchildModules: [],\n \t\ttestsRun: 0,\n \t\tunskippedTestsRun: 0,\n \t\thooks: {\n \t\t\tbefore: [],\n \t\t\tbeforeEach: [],\n \t\t\tafterEach: [],\n \t\t\tafter: []\n \t\t}\n \t},\n\n \tcallbacks: {},\n\n \t// The storage module to use for reordering tests\n \tstorage: localSessionStorage\n };\n\n // take a predefined QUnit.config and extend the defaults\n var globalConfig = window && window.QUnit && window.QUnit.config;\n\n // only extend the global config if there is no QUnit overload\n if (window && window.QUnit && !window.QUnit.version) {\n \textend(config, globalConfig);\n }\n\n // Push a loose unnamed module to the modules collection\n config.modules.push(config.currentModule);\n\n // Based on jsDump by Ariel Flesler\n // http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html\n var dump = (function () {\n \tfunction quote(str) {\n \t\treturn \"\\\"\" + str.toString().replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\";\n \t}\n \tfunction literal(o) {\n \t\treturn o + \"\";\n \t}\n \tfunction join(pre, arr, post) {\n \t\tvar s = dump.separator(),\n \t\t base = dump.indent(),\n \t\t inner = dump.indent(1);\n \t\tif (arr.join) {\n \t\t\tarr = arr.join(\",\" + s + inner);\n \t\t}\n \t\tif (!arr) {\n \t\t\treturn pre + post;\n \t\t}\n \t\treturn [pre, inner + arr, base + post].join(s);\n \t}\n \tfunction array(arr, stack) {\n \t\tvar i = arr.length,\n \t\t ret = new Array(i);\n\n \t\tif (dump.maxDepth && dump.depth > dump.maxDepth) {\n \t\t\treturn \"[object Array]\";\n \t\t}\n\n \t\tthis.up();\n \t\twhile (i--) {\n \t\t\tret[i] = this.parse(arr[i], undefined, stack);\n \t\t}\n \t\tthis.down();\n \t\treturn join(\"[\", ret, \"]\");\n \t}\n\n \tfunction isArray(obj) {\n \t\treturn (\n\n \t\t\t//Native Arrays\n \t\t\ttoString.call(obj) === \"[object Array]\" ||\n\n \t\t\t// NodeList objects\n \t\t\ttypeof obj.length === \"number\" && obj.item !== undefined && (obj.length ? obj.item(0) === obj[0] : obj.item(0) === null && obj[0] === undefined)\n \t\t);\n \t}\n\n \tvar reName = /^function (\\w+)/,\n \t dump = {\n\n \t\t// The objType is used mostly internally, you can fix a (custom) type in advance\n \t\tparse: function parse(obj, objType, stack) {\n \t\t\tstack = stack || [];\n \t\t\tvar res,\n \t\t\t parser,\n \t\t\t parserType,\n \t\t\t objIndex = stack.indexOf(obj);\n\n \t\t\tif (objIndex !== -1) {\n \t\t\t\treturn \"recursion(\" + (objIndex - stack.length) + \")\";\n \t\t\t}\n\n \t\t\tobjType = objType || this.typeOf(obj);\n \t\t\tparser = this.parsers[objType];\n \t\t\tparserType = typeof parser === \"undefined\" ? \"undefined\" : _typeof(parser);\n\n \t\t\tif (parserType === \"function\") {\n \t\t\t\tstack.push(obj);\n \t\t\t\tres = parser.call(this, obj, stack);\n \t\t\t\tstack.pop();\n \t\t\t\treturn res;\n \t\t\t}\n \t\t\treturn parserType === \"string\" ? parser : this.parsers.error;\n \t\t},\n \t\ttypeOf: function typeOf(obj) {\n \t\t\tvar type;\n\n \t\t\tif (obj === null) {\n \t\t\t\ttype = \"null\";\n \t\t\t} else if (typeof obj === \"undefined\") {\n \t\t\t\ttype = \"undefined\";\n \t\t\t} else if (is(\"regexp\", obj)) {\n \t\t\t\ttype = \"regexp\";\n \t\t\t} else if (is(\"date\", obj)) {\n \t\t\t\ttype = \"date\";\n \t\t\t} else if (is(\"function\", obj)) {\n \t\t\t\ttype = \"function\";\n \t\t\t} else if (obj.setInterval !== undefined && obj.document !== undefined && obj.nodeType === undefined) {\n \t\t\t\ttype = \"window\";\n \t\t\t} else if (obj.nodeType === 9) {\n \t\t\t\ttype = \"document\";\n \t\t\t} else if (obj.nodeType) {\n \t\t\t\ttype = \"node\";\n \t\t\t} else if (isArray(obj)) {\n \t\t\t\ttype = \"array\";\n \t\t\t} else if (obj.constructor === Error.prototype.constructor) {\n \t\t\t\ttype = \"error\";\n \t\t\t} else {\n \t\t\t\ttype = typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n \t\t\t}\n \t\t\treturn type;\n \t\t},\n\n \t\tseparator: function separator() {\n \t\t\tif (this.multiline) {\n \t\t\t\treturn this.HTML ? \"
      \" : \"\\n\";\n \t\t\t} else {\n \t\t\t\treturn this.HTML ? \" \" : \" \";\n \t\t\t}\n \t\t},\n\n \t\t// Extra can be a number, shortcut for increasing-calling-decreasing\n \t\tindent: function indent(extra) {\n \t\t\tif (!this.multiline) {\n \t\t\t\treturn \"\";\n \t\t\t}\n \t\t\tvar chr = this.indentChar;\n \t\t\tif (this.HTML) {\n \t\t\t\tchr = chr.replace(/\\t/g, \" \").replace(/ /g, \" \");\n \t\t\t}\n \t\t\treturn new Array(this.depth + (extra || 0)).join(chr);\n \t\t},\n \t\tup: function up(a) {\n \t\t\tthis.depth += a || 1;\n \t\t},\n \t\tdown: function down(a) {\n \t\t\tthis.depth -= a || 1;\n \t\t},\n \t\tsetParser: function setParser(name, parser) {\n \t\t\tthis.parsers[name] = parser;\n \t\t},\n\n \t\t// The next 3 are exposed so you can use them\n \t\tquote: quote,\n \t\tliteral: literal,\n \t\tjoin: join,\n \t\tdepth: 1,\n \t\tmaxDepth: config.maxDepth,\n\n \t\t// This is the list of parsers, to modify them, use dump.setParser\n \t\tparsers: {\n \t\t\twindow: \"[Window]\",\n \t\t\tdocument: \"[Document]\",\n \t\t\terror: function error(_error) {\n \t\t\t\treturn \"Error(\\\"\" + _error.message + \"\\\")\";\n \t\t\t},\n \t\t\tunknown: \"[Unknown]\",\n \t\t\t\"null\": \"null\",\n \t\t\t\"undefined\": \"undefined\",\n \t\t\t\"function\": function _function(fn) {\n \t\t\t\tvar ret = \"function\",\n\n\n \t\t\t\t// Functions never have name in IE\n \t\t\t\tname = \"name\" in fn ? fn.name : (reName.exec(fn) || [])[1];\n\n \t\t\t\tif (name) {\n \t\t\t\t\tret += \" \" + name;\n \t\t\t\t}\n \t\t\t\tret += \"(\";\n\n \t\t\t\tret = [ret, dump.parse(fn, \"functionArgs\"), \"){\"].join(\"\");\n \t\t\t\treturn join(ret, dump.parse(fn, \"functionCode\"), \"}\");\n \t\t\t},\n \t\t\tarray: array,\n \t\t\tnodelist: array,\n \t\t\t\"arguments\": array,\n \t\t\tobject: function object(map, stack) {\n \t\t\t\tvar keys,\n \t\t\t\t key,\n \t\t\t\t val,\n \t\t\t\t i,\n \t\t\t\t nonEnumerableProperties,\n \t\t\t\t ret = [];\n\n \t\t\t\tif (dump.maxDepth && dump.depth > dump.maxDepth) {\n \t\t\t\t\treturn \"[object Object]\";\n \t\t\t\t}\n\n \t\t\t\tdump.up();\n \t\t\t\tkeys = [];\n \t\t\t\tfor (key in map) {\n \t\t\t\t\tkeys.push(key);\n \t\t\t\t}\n\n \t\t\t\t// Some properties are not always enumerable on Error objects.\n \t\t\t\tnonEnumerableProperties = [\"message\", \"name\"];\n \t\t\t\tfor (i in nonEnumerableProperties) {\n \t\t\t\t\tkey = nonEnumerableProperties[i];\n \t\t\t\t\tif (key in map && !inArray(key, keys)) {\n \t\t\t\t\t\tkeys.push(key);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tkeys.sort();\n \t\t\t\tfor (i = 0; i < keys.length; i++) {\n \t\t\t\t\tkey = keys[i];\n \t\t\t\t\tval = map[key];\n \t\t\t\t\tret.push(dump.parse(key, \"key\") + \": \" + dump.parse(val, undefined, stack));\n \t\t\t\t}\n \t\t\t\tdump.down();\n \t\t\t\treturn join(\"{\", ret, \"}\");\n \t\t\t},\n \t\t\tnode: function node(_node) {\n \t\t\t\tvar len,\n \t\t\t\t i,\n \t\t\t\t val,\n \t\t\t\t open = dump.HTML ? \"<\" : \"<\",\n \t\t\t\t close = dump.HTML ? \">\" : \">\",\n \t\t\t\t tag = _node.nodeName.toLowerCase(),\n \t\t\t\t ret = open + tag,\n \t\t\t\t attrs = _node.attributes;\n\n \t\t\t\tif (attrs) {\n \t\t\t\t\tfor (i = 0, len = attrs.length; i < len; i++) {\n \t\t\t\t\t\tval = attrs[i].nodeValue;\n\n \t\t\t\t\t\t// IE6 includes all attributes in .attributes, even ones not explicitly\n \t\t\t\t\t\t// set. Those have values like undefined, null, 0, false, \"\" or\n \t\t\t\t\t\t// \"inherit\".\n \t\t\t\t\t\tif (val && val !== \"inherit\") {\n \t\t\t\t\t\t\tret += \" \" + attrs[i].nodeName + \"=\" + dump.parse(val, \"attribute\");\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tret += close;\n\n \t\t\t\t// Show content of TextNode or CDATASection\n \t\t\t\tif (_node.nodeType === 3 || _node.nodeType === 4) {\n \t\t\t\t\tret += _node.nodeValue;\n \t\t\t\t}\n\n \t\t\t\treturn ret + open + \"/\" + tag + close;\n \t\t\t},\n\n \t\t\t// Function calls it internally, it's the arguments part of the function\n \t\t\tfunctionArgs: function functionArgs(fn) {\n \t\t\t\tvar args,\n \t\t\t\t l = fn.length;\n\n \t\t\t\tif (!l) {\n \t\t\t\t\treturn \"\";\n \t\t\t\t}\n\n \t\t\t\targs = new Array(l);\n \t\t\t\twhile (l--) {\n\n \t\t\t\t\t// 97 is 'a'\n \t\t\t\t\targs[l] = String.fromCharCode(97 + l);\n \t\t\t\t}\n \t\t\t\treturn \" \" + args.join(\", \") + \" \";\n \t\t\t},\n\n \t\t\t// Object calls it internally, the key part of an item in a map\n \t\t\tkey: quote,\n\n \t\t\t// Function calls it internally, it's the content of the function\n \t\t\tfunctionCode: \"[code]\",\n\n \t\t\t// Node calls it internally, it's a html attribute value\n \t\t\tattribute: quote,\n \t\t\tstring: quote,\n \t\t\tdate: quote,\n \t\t\tregexp: literal,\n \t\t\tnumber: literal,\n \t\t\t\"boolean\": literal,\n \t\t\tsymbol: function symbol(sym) {\n \t\t\t\treturn sym.toString();\n \t\t\t}\n \t\t},\n\n \t\t// If true, entities are escaped ( <, >, \\t, space and \\n )\n \t\tHTML: false,\n\n \t\t// Indentation unit\n \t\tindentChar: \" \",\n\n \t\t// If true, items in a collection, are separated by a \\n, else just a space.\n \t\tmultiline: true\n \t};\n\n \treturn dump;\n })();\n\n var LISTENERS = Object.create(null);\n var SUPPORTED_EVENTS = [\"runStart\", \"suiteStart\", \"testStart\", \"assertion\", \"testEnd\", \"suiteEnd\", \"runEnd\"];\n\n /**\n * Emits an event with the specified data to all currently registered listeners.\n * Callbacks will fire in the order in which they are registered (FIFO). This\n * function is not exposed publicly; it is used by QUnit internals to emit\n * logging events.\n *\n * @private\n * @method emit\n * @param {String} eventName\n * @param {Object} data\n * @return {Void}\n */\n function emit(eventName, data) {\n \tif (objectType(eventName) !== \"string\") {\n \t\tthrow new TypeError(\"eventName must be a string when emitting an event\");\n \t}\n\n \t// Clone the callbacks in case one of them registers a new callback\n \tvar originalCallbacks = LISTENERS[eventName];\n \tvar callbacks = originalCallbacks ? [].concat(toConsumableArray(originalCallbacks)) : [];\n\n \tfor (var i = 0; i < callbacks.length; i++) {\n \t\tcallbacks[i](data);\n \t}\n }\n\n /**\n * Registers a callback as a listener to the specified event.\n *\n * @public\n * @method on\n * @param {String} eventName\n * @param {Function} callback\n * @return {Void}\n */\n function on(eventName, callback) {\n \tif (objectType(eventName) !== \"string\") {\n \t\tthrow new TypeError(\"eventName must be a string when registering a listener\");\n \t} else if (!inArray(eventName, SUPPORTED_EVENTS)) {\n \t\tvar events = SUPPORTED_EVENTS.join(\", \");\n \t\tthrow new Error(\"\\\"\" + eventName + \"\\\" is not a valid event; must be one of: \" + events + \".\");\n \t} else if (objectType(callback) !== \"function\") {\n \t\tthrow new TypeError(\"callback must be a function when registering a listener\");\n \t}\n\n \tif (!LISTENERS[eventName]) {\n \t\tLISTENERS[eventName] = [];\n \t}\n\n \t// Don't register the same callback more than once\n \tif (!inArray(callback, LISTENERS[eventName])) {\n \t\tLISTENERS[eventName].push(callback);\n \t}\n }\n\n // Register logging callbacks\n function registerLoggingCallbacks(obj) {\n \tvar i,\n \t l,\n \t key,\n \t callbackNames = [\"begin\", \"done\", \"log\", \"testStart\", \"testDone\", \"moduleStart\", \"moduleDone\"];\n\n \tfunction registerLoggingCallback(key) {\n \t\tvar loggingCallback = function loggingCallback(callback) {\n \t\t\tif (objectType(callback) !== \"function\") {\n \t\t\t\tthrow new Error(\"QUnit logging methods require a callback function as their first parameters.\");\n \t\t\t}\n\n \t\t\tconfig.callbacks[key].push(callback);\n \t\t};\n\n \t\treturn loggingCallback;\n \t}\n\n \tfor (i = 0, l = callbackNames.length; i < l; i++) {\n \t\tkey = callbackNames[i];\n\n \t\t// Initialize key collection of logging callback\n \t\tif (objectType(config.callbacks[key]) === \"undefined\") {\n \t\t\tconfig.callbacks[key] = [];\n \t\t}\n\n \t\tobj[key] = registerLoggingCallback(key);\n \t}\n }\n\n function runLoggingCallbacks(key, args) {\n \tvar i, l, callbacks;\n\n \tcallbacks = config.callbacks[key];\n \tfor (i = 0, l = callbacks.length; i < l; i++) {\n \t\tcallbacks[i](args);\n \t}\n }\n\n // Doesn't support IE9, it will return undefined on these browsers\n // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack\n var fileName = (sourceFromStacktrace(0) || \"\").replace(/(:\\d+)+\\)?/, \"\").replace(/.+\\//, \"\");\n\n function extractStacktrace(e, offset) {\n \toffset = offset === undefined ? 4 : offset;\n\n \tvar stack, include, i;\n\n \tif (e && e.stack) {\n \t\tstack = e.stack.split(\"\\n\");\n \t\tif (/^error$/i.test(stack[0])) {\n \t\t\tstack.shift();\n \t\t}\n \t\tif (fileName) {\n \t\t\tinclude = [];\n \t\t\tfor (i = offset; i < stack.length; i++) {\n \t\t\t\tif (stack[i].indexOf(fileName) !== -1) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tinclude.push(stack[i]);\n \t\t\t}\n \t\t\tif (include.length) {\n \t\t\t\treturn include.join(\"\\n\");\n \t\t\t}\n \t\t}\n \t\treturn stack[offset];\n \t}\n }\n\n function sourceFromStacktrace(offset) {\n \tvar error = new Error();\n\n \t// Support: Safari <=7 only, IE <=10 - 11 only\n \t// Not all browsers generate the `stack` property for `new Error()`, see also #636\n \tif (!error.stack) {\n \t\ttry {\n \t\t\tthrow error;\n \t\t} catch (err) {\n \t\t\terror = err;\n \t\t}\n \t}\n\n \treturn extractStacktrace(error, offset);\n }\n\n var priorityCount = 0;\n var unitSampler = void 0;\n\n /**\n * Advances the ProcessingQueue to the next item if it is ready.\n * @param {Boolean} last\n */\n function advance() {\n \tvar start = now();\n \tconfig.depth = (config.depth || 0) + 1;\n\n \twhile (config.queue.length && !config.blocking) {\n \t\tvar elapsedTime = now() - start;\n\n \t\tif (!defined.setTimeout || config.updateRate <= 0 || elapsedTime < config.updateRate) {\n \t\t\tif (priorityCount > 0) {\n \t\t\t\tpriorityCount--;\n \t\t\t}\n\n \t\t\tconfig.queue.shift()();\n \t\t} else {\n \t\t\tsetTimeout(advance);\n \t\t\tbreak;\n \t\t}\n \t}\n\n \tconfig.depth--;\n\n \tif (!config.blocking && !config.queue.length && config.depth === 0) {\n \t\tdone();\n \t}\n }\n\n function addToQueueImmediate(callback) {\n \tif (objectType(callback) === \"array\") {\n \t\twhile (callback.length) {\n \t\t\taddToQueueImmediate(callback.pop());\n \t\t}\n\n \t\treturn;\n \t}\n\n \tconfig.queue.unshift(callback);\n \tpriorityCount++;\n }\n\n /**\n * Adds a function to the ProcessingQueue for execution.\n * @param {Function|Array} callback\n * @param {Boolean} priority\n * @param {String} seed\n */\n function addToQueue(callback, prioritize, seed) {\n \tif (prioritize) {\n \t\tconfig.queue.splice(priorityCount++, 0, callback);\n \t} else if (seed) {\n \t\tif (!unitSampler) {\n \t\t\tunitSampler = unitSamplerGenerator(seed);\n \t\t}\n\n \t\t// Insert into a random position after all prioritized items\n \t\tvar index = Math.floor(unitSampler() * (config.queue.length - priorityCount + 1));\n \t\tconfig.queue.splice(priorityCount + index, 0, callback);\n \t} else {\n \t\tconfig.queue.push(callback);\n \t}\n }\n\n /**\n * Creates a seeded \"sample\" generator which is used for randomizing tests.\n */\n function unitSamplerGenerator(seed) {\n\n \t// 32-bit xorshift, requires only a nonzero seed\n \t// http://excamera.com/sphinx/article-xorshift.html\n \tvar sample = parseInt(generateHash(seed), 16) || -1;\n \treturn function () {\n \t\tsample ^= sample << 13;\n \t\tsample ^= sample >>> 17;\n \t\tsample ^= sample << 5;\n\n \t\t// ECMAScript has no unsigned number type\n \t\tif (sample < 0) {\n \t\t\tsample += 0x100000000;\n \t\t}\n\n \t\treturn sample / 0x100000000;\n \t};\n }\n\n /**\n * This function is called when the ProcessingQueue is done processing all\n * items. It handles emitting the final run events.\n */\n function done() {\n \tvar storage = config.storage;\n\n \tProcessingQueue.finished = true;\n\n \tvar runtime = now() - config.started;\n \tvar passed = config.stats.all - config.stats.bad;\n\n \temit(\"runEnd\", globalSuite.end(true));\n \trunLoggingCallbacks(\"done\", {\n \t\tpassed: passed,\n \t\tfailed: config.stats.bad,\n \t\ttotal: config.stats.all,\n \t\truntime: runtime\n \t});\n\n \t// Clear own storage items if all tests passed\n \tif (storage && config.stats.bad === 0) {\n \t\tfor (var i = storage.length - 1; i >= 0; i--) {\n \t\t\tvar key = storage.key(i);\n\n \t\t\tif (key.indexOf(\"qunit-test-\") === 0) {\n \t\t\t\tstorage.removeItem(key);\n \t\t\t}\n \t\t}\n \t}\n }\n\n var ProcessingQueue = {\n \tfinished: false,\n \tadd: addToQueue,\n \taddImmediate: addToQueueImmediate,\n \tadvance: advance\n };\n\n var TestReport = function () {\n \tfunction TestReport(name, suite, options) {\n \t\tclassCallCheck(this, TestReport);\n\n \t\tthis.name = name;\n \t\tthis.suiteName = suite.name;\n \t\tthis.fullName = suite.fullName.concat(name);\n \t\tthis.runtime = 0;\n \t\tthis.assertions = [];\n\n \t\tthis.skipped = !!options.skip;\n \t\tthis.todo = !!options.todo;\n\n \t\tthis.valid = options.valid;\n\n \t\tthis._startTime = 0;\n \t\tthis._endTime = 0;\n\n \t\tsuite.pushTest(this);\n \t}\n\n \tcreateClass(TestReport, [{\n \t\tkey: \"start\",\n \t\tvalue: function start(recordTime) {\n \t\t\tif (recordTime) {\n \t\t\t\tthis._startTime = Date.now();\n \t\t\t}\n\n \t\t\treturn {\n \t\t\t\tname: this.name,\n \t\t\t\tsuiteName: this.suiteName,\n \t\t\t\tfullName: this.fullName.slice()\n \t\t\t};\n \t\t}\n \t}, {\n \t\tkey: \"end\",\n \t\tvalue: function end(recordTime) {\n \t\t\tif (recordTime) {\n \t\t\t\tthis._endTime = Date.now();\n \t\t\t}\n\n \t\t\treturn extend(this.start(), {\n \t\t\t\truntime: this.getRuntime(),\n \t\t\t\tstatus: this.getStatus(),\n \t\t\t\terrors: this.getFailedAssertions(),\n \t\t\t\tassertions: this.getAssertions()\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"pushAssertion\",\n \t\tvalue: function pushAssertion(assertion) {\n \t\t\tthis.assertions.push(assertion);\n \t\t}\n \t}, {\n \t\tkey: \"getRuntime\",\n \t\tvalue: function getRuntime() {\n \t\t\treturn this._endTime - this._startTime;\n \t\t}\n \t}, {\n \t\tkey: \"getStatus\",\n \t\tvalue: function getStatus() {\n \t\t\tif (this.skipped) {\n \t\t\t\treturn \"skipped\";\n \t\t\t}\n\n \t\t\tvar testPassed = this.getFailedAssertions().length > 0 ? this.todo : !this.todo;\n\n \t\t\tif (!testPassed) {\n \t\t\t\treturn \"failed\";\n \t\t\t} else if (this.todo) {\n \t\t\t\treturn \"todo\";\n \t\t\t} else {\n \t\t\t\treturn \"passed\";\n \t\t\t}\n \t\t}\n \t}, {\n \t\tkey: \"getFailedAssertions\",\n \t\tvalue: function getFailedAssertions() {\n \t\t\treturn this.assertions.filter(function (assertion) {\n \t\t\t\treturn !assertion.passed;\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"getAssertions\",\n \t\tvalue: function getAssertions() {\n \t\t\treturn this.assertions.slice();\n \t\t}\n\n \t\t// Remove actual and expected values from assertions. This is to prevent\n \t\t// leaking memory throughout a test suite.\n\n \t}, {\n \t\tkey: \"slimAssertions\",\n \t\tvalue: function slimAssertions() {\n \t\t\tthis.assertions = this.assertions.map(function (assertion) {\n \t\t\t\tdelete assertion.actual;\n \t\t\t\tdelete assertion.expected;\n \t\t\t\treturn assertion;\n \t\t\t});\n \t\t}\n \t}]);\n \treturn TestReport;\n }();\n\n var focused$1 = false;\n\n function Test(settings) {\n \tvar i, l;\n\n \t++Test.count;\n\n \tthis.expected = null;\n \tthis.assertions = [];\n \tthis.semaphore = 0;\n \tthis.module = config.currentModule;\n \tthis.stack = sourceFromStacktrace(3);\n \tthis.steps = [];\n \tthis.timeout = undefined;\n\n \t// If a module is skipped, all its tests and the tests of the child suites\n \t// should be treated as skipped even if they are defined as `only` or `todo`.\n \t// As for `todo` module, all its tests will be treated as `todo` except for\n \t// tests defined as `skip` which will be left intact.\n \t//\n \t// So, if a test is defined as `todo` and is inside a skipped module, we should\n \t// then treat that test as if was defined as `skip`.\n \tif (this.module.skip) {\n \t\tsettings.skip = true;\n \t\tsettings.todo = false;\n\n \t\t// Skipped tests should be left intact\n \t} else if (this.module.todo && !settings.skip) {\n \t\tsettings.todo = true;\n \t}\n\n \textend(this, settings);\n\n \tthis.testReport = new TestReport(settings.testName, this.module.suiteReport, {\n \t\ttodo: settings.todo,\n \t\tskip: settings.skip,\n \t\tvalid: this.valid()\n \t});\n\n \t// Register unique strings\n \tfor (i = 0, l = this.module.tests; i < l.length; i++) {\n \t\tif (this.module.tests[i].name === this.testName) {\n \t\t\tthis.testName += \" \";\n \t\t}\n \t}\n\n \tthis.testId = generateHash(this.module.name, this.testName);\n\n \tthis.module.tests.push({\n \t\tname: this.testName,\n \t\ttestId: this.testId,\n \t\tskip: !!settings.skip\n \t});\n\n \tif (settings.skip) {\n\n \t\t// Skipped tests will fully ignore any sent callback\n \t\tthis.callback = function () {};\n \t\tthis.async = false;\n \t\tthis.expected = 0;\n \t} else {\n \t\tif (typeof this.callback !== \"function\") {\n \t\t\tvar method = this.todo ? \"todo\" : \"test\";\n\n \t\t\t// eslint-disable-next-line max-len\n \t\t\tthrow new TypeError(\"You must provide a function as a test callback to QUnit.\" + method + \"(\\\"\" + settings.testName + \"\\\")\");\n \t\t}\n\n \t\tthis.assert = new Assert(this);\n \t}\n }\n\n Test.count = 0;\n\n function getNotStartedModules(startModule) {\n \tvar module = startModule,\n \t modules = [];\n\n \twhile (module && module.testsRun === 0) {\n \t\tmodules.push(module);\n \t\tmodule = module.parentModule;\n \t}\n\n \treturn modules;\n }\n\n Test.prototype = {\n \tbefore: function before() {\n \t\tvar i,\n \t\t startModule,\n \t\t module = this.module,\n \t\t notStartedModules = getNotStartedModules(module);\n\n \t\tfor (i = notStartedModules.length - 1; i >= 0; i--) {\n \t\t\tstartModule = notStartedModules[i];\n \t\t\tstartModule.stats = { all: 0, bad: 0, started: now() };\n \t\t\temit(\"suiteStart\", startModule.suiteReport.start(true));\n \t\t\trunLoggingCallbacks(\"moduleStart\", {\n \t\t\t\tname: startModule.name,\n \t\t\t\ttests: startModule.tests\n \t\t\t});\n \t\t}\n\n \t\tconfig.current = this;\n\n \t\tthis.testEnvironment = extend({}, module.testEnvironment);\n\n \t\tthis.started = now();\n \t\temit(\"testStart\", this.testReport.start(true));\n \t\trunLoggingCallbacks(\"testStart\", {\n \t\t\tname: this.testName,\n \t\t\tmodule: module.name,\n \t\t\ttestId: this.testId,\n \t\t\tpreviousFailure: this.previousFailure\n \t\t});\n\n \t\tif (!config.pollution) {\n \t\t\tsaveGlobal();\n \t\t}\n \t},\n\n \trun: function run() {\n \t\tvar promise;\n\n \t\tconfig.current = this;\n\n \t\tthis.callbackStarted = now();\n\n \t\tif (config.notrycatch) {\n \t\t\trunTest(this);\n \t\t\treturn;\n \t\t}\n\n \t\ttry {\n \t\t\trunTest(this);\n \t\t} catch (e) {\n \t\t\tthis.pushFailure(\"Died on test #\" + (this.assertions.length + 1) + \" \" + this.stack + \": \" + (e.message || e), extractStacktrace(e, 0));\n\n \t\t\t// Else next test will carry the responsibility\n \t\t\tsaveGlobal();\n\n \t\t\t// Restart the tests if they're blocking\n \t\t\tif (config.blocking) {\n \t\t\t\tinternalRecover(this);\n \t\t\t}\n \t\t}\n\n \t\tfunction runTest(test) {\n \t\t\tpromise = test.callback.call(test.testEnvironment, test.assert);\n \t\t\ttest.resolvePromise(promise);\n\n \t\t\t// If the test has a \"lock\" on it, but the timeout is 0, then we push a\n \t\t\t// failure as the test should be synchronous.\n \t\t\tif (test.timeout === 0 && test.semaphore !== 0) {\n \t\t\t\tpushFailure(\"Test did not finish synchronously even though assert.timeout( 0 ) was used.\", sourceFromStacktrace(2));\n \t\t\t}\n \t\t}\n \t},\n\n \tafter: function after() {\n \t\tcheckPollution();\n \t},\n\n \tqueueHook: function queueHook(hook, hookName, hookOwner) {\n \t\tvar _this = this;\n\n \t\tvar callHook = function callHook() {\n \t\t\tvar promise = hook.call(_this.testEnvironment, _this.assert);\n \t\t\t_this.resolvePromise(promise, hookName);\n \t\t};\n\n \t\tvar runHook = function runHook() {\n \t\t\tif (hookName === \"before\") {\n \t\t\t\tif (hookOwner.unskippedTestsRun !== 0) {\n \t\t\t\t\treturn;\n \t\t\t\t}\n\n \t\t\t\t_this.preserveEnvironment = true;\n \t\t\t}\n\n \t\t\tif (hookName === \"after\" && hookOwner.unskippedTestsRun !== numberOfUnskippedTests(hookOwner) - 1 && config.queue.length > 2) {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tconfig.current = _this;\n \t\t\tif (config.notrycatch) {\n \t\t\t\tcallHook();\n \t\t\t\treturn;\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tcallHook();\n \t\t\t} catch (error) {\n \t\t\t\t_this.pushFailure(hookName + \" failed on \" + _this.testName + \": \" + (error.message || error), extractStacktrace(error, 0));\n \t\t\t}\n \t\t};\n\n \t\treturn runHook;\n \t},\n\n\n \t// Currently only used for module level hooks, can be used to add global level ones\n \thooks: function hooks(handler) {\n \t\tvar hooks = [];\n\n \t\tfunction processHooks(test, module) {\n \t\t\tif (module.parentModule) {\n \t\t\t\tprocessHooks(test, module.parentModule);\n \t\t\t}\n\n \t\t\tif (module.hooks[handler].length) {\n \t\t\t\tfor (var i = 0; i < module.hooks[handler].length; i++) {\n \t\t\t\t\thooks.push(test.queueHook(module.hooks[handler][i], handler, module));\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\t// Hooks are ignored on skipped tests\n \t\tif (!this.skip) {\n \t\t\tprocessHooks(this, this.module);\n \t\t}\n\n \t\treturn hooks;\n \t},\n\n\n \tfinish: function finish() {\n \t\tconfig.current = this;\n\n \t\tif (this.steps.length) {\n \t\t\tvar stepsList = this.steps.join(\", \");\n \t\t\tthis.pushFailure(\"Expected assert.verifySteps() to be called before end of test \" + (\"after using assert.step(). Unverified steps: \" + stepsList), this.stack);\n \t\t}\n\n \t\tif (config.requireExpects && this.expected === null) {\n \t\t\tthis.pushFailure(\"Expected number of assertions to be defined, but expect() was \" + \"not called.\", this.stack);\n \t\t} else if (this.expected !== null && this.expected !== this.assertions.length) {\n \t\t\tthis.pushFailure(\"Expected \" + this.expected + \" assertions, but \" + this.assertions.length + \" were run\", this.stack);\n \t\t} else if (this.expected === null && !this.assertions.length) {\n \t\t\tthis.pushFailure(\"Expected at least one assertion, but none were run - call \" + \"expect(0) to accept zero assertions.\", this.stack);\n \t\t}\n\n \t\tvar i,\n \t\t module = this.module,\n \t\t moduleName = module.name,\n \t\t testName = this.testName,\n \t\t skipped = !!this.skip,\n \t\t todo = !!this.todo,\n \t\t bad = 0,\n \t\t storage = config.storage;\n\n \t\tthis.runtime = now() - this.started;\n\n \t\tconfig.stats.all += this.assertions.length;\n \t\tmodule.stats.all += this.assertions.length;\n\n \t\tfor (i = 0; i < this.assertions.length; i++) {\n \t\t\tif (!this.assertions[i].result) {\n \t\t\t\tbad++;\n \t\t\t\tconfig.stats.bad++;\n \t\t\t\tmodule.stats.bad++;\n \t\t\t}\n \t\t}\n\n \t\tnotifyTestsRan(module, skipped);\n\n \t\t// Store result when possible\n \t\tif (storage) {\n \t\t\tif (bad) {\n \t\t\t\tstorage.setItem(\"qunit-test-\" + moduleName + \"-\" + testName, bad);\n \t\t\t} else {\n \t\t\t\tstorage.removeItem(\"qunit-test-\" + moduleName + \"-\" + testName);\n \t\t\t}\n \t\t}\n\n \t\t// After emitting the js-reporters event we cleanup the assertion data to\n \t\t// avoid leaking it. It is not used by the legacy testDone callbacks.\n \t\temit(\"testEnd\", this.testReport.end(true));\n \t\tthis.testReport.slimAssertions();\n\n \t\trunLoggingCallbacks(\"testDone\", {\n \t\t\tname: testName,\n \t\t\tmodule: moduleName,\n \t\t\tskipped: skipped,\n \t\t\ttodo: todo,\n \t\t\tfailed: bad,\n \t\t\tpassed: this.assertions.length - bad,\n \t\t\ttotal: this.assertions.length,\n \t\t\truntime: skipped ? 0 : this.runtime,\n\n \t\t\t// HTML Reporter use\n \t\t\tassertions: this.assertions,\n \t\t\ttestId: this.testId,\n\n \t\t\t// Source of Test\n \t\t\tsource: this.stack\n \t\t});\n\n \t\tif (module.testsRun === numberOfTests(module)) {\n \t\t\tlogSuiteEnd(module);\n\n \t\t\t// Check if the parent modules, iteratively, are done. If that the case,\n \t\t\t// we emit the `suiteEnd` event and trigger `moduleDone` callback.\n \t\t\tvar parent = module.parentModule;\n \t\t\twhile (parent && parent.testsRun === numberOfTests(parent)) {\n \t\t\t\tlogSuiteEnd(parent);\n \t\t\t\tparent = parent.parentModule;\n \t\t\t}\n \t\t}\n\n \t\tconfig.current = undefined;\n\n \t\tfunction logSuiteEnd(module) {\n \t\t\temit(\"suiteEnd\", module.suiteReport.end(true));\n \t\t\trunLoggingCallbacks(\"moduleDone\", {\n \t\t\t\tname: module.name,\n \t\t\t\ttests: module.tests,\n \t\t\t\tfailed: module.stats.bad,\n \t\t\t\tpassed: module.stats.all - module.stats.bad,\n \t\t\t\ttotal: module.stats.all,\n \t\t\t\truntime: now() - module.stats.started\n \t\t\t});\n \t\t}\n \t},\n\n \tpreserveTestEnvironment: function preserveTestEnvironment() {\n \t\tif (this.preserveEnvironment) {\n \t\t\tthis.module.testEnvironment = this.testEnvironment;\n \t\t\tthis.testEnvironment = extend({}, this.module.testEnvironment);\n \t\t}\n \t},\n\n \tqueue: function queue() {\n \t\tvar test = this;\n\n \t\tif (!this.valid()) {\n \t\t\treturn;\n \t\t}\n\n \t\tfunction runTest() {\n\n \t\t\t// Each of these can by async\n \t\t\tProcessingQueue.addImmediate([function () {\n \t\t\t\ttest.before();\n \t\t\t}, test.hooks(\"before\"), function () {\n \t\t\t\ttest.preserveTestEnvironment();\n \t\t\t}, test.hooks(\"beforeEach\"), function () {\n \t\t\t\ttest.run();\n \t\t\t}, test.hooks(\"afterEach\").reverse(), test.hooks(\"after\").reverse(), function () {\n \t\t\t\ttest.after();\n \t\t\t}, function () {\n \t\t\t\ttest.finish();\n \t\t\t}]);\n \t\t}\n\n \t\tvar previousFailCount = config.storage && +config.storage.getItem(\"qunit-test-\" + this.module.name + \"-\" + this.testName);\n\n \t\t// Prioritize previously failed tests, detected from storage\n \t\tvar prioritize = config.reorder && !!previousFailCount;\n\n \t\tthis.previousFailure = !!previousFailCount;\n\n \t\tProcessingQueue.add(runTest, prioritize, config.seed);\n\n \t\t// If the queue has already finished, we manually process the new test\n \t\tif (ProcessingQueue.finished) {\n \t\t\tProcessingQueue.advance();\n \t\t}\n \t},\n\n\n \tpushResult: function pushResult(resultInfo) {\n \t\tif (this !== config.current) {\n \t\t\tthrow new Error(\"Assertion occurred after test had finished.\");\n \t\t}\n\n \t\t// Destructure of resultInfo = { result, actual, expected, message, negative }\n \t\tvar source,\n \t\t details = {\n \t\t\tmodule: this.module.name,\n \t\t\tname: this.testName,\n \t\t\tresult: resultInfo.result,\n \t\t\tmessage: resultInfo.message,\n \t\t\tactual: resultInfo.actual,\n \t\t\ttestId: this.testId,\n \t\t\tnegative: resultInfo.negative || false,\n \t\t\truntime: now() - this.started,\n \t\t\ttodo: !!this.todo\n \t\t};\n\n \t\tif (hasOwn.call(resultInfo, \"expected\")) {\n \t\t\tdetails.expected = resultInfo.expected;\n \t\t}\n\n \t\tif (!resultInfo.result) {\n \t\t\tsource = resultInfo.source || sourceFromStacktrace();\n\n \t\t\tif (source) {\n \t\t\t\tdetails.source = source;\n \t\t\t}\n \t\t}\n\n \t\tthis.logAssertion(details);\n\n \t\tthis.assertions.push({\n \t\t\tresult: !!resultInfo.result,\n \t\t\tmessage: resultInfo.message\n \t\t});\n \t},\n\n \tpushFailure: function pushFailure(message, source, actual) {\n \t\tif (!(this instanceof Test)) {\n \t\t\tthrow new Error(\"pushFailure() assertion outside test context, was \" + sourceFromStacktrace(2));\n \t\t}\n\n \t\tthis.pushResult({\n \t\t\tresult: false,\n \t\t\tmessage: message || \"error\",\n \t\t\tactual: actual || null,\n \t\t\tsource: source\n \t\t});\n \t},\n\n \t/**\n * Log assertion details using both the old QUnit.log interface and\n * QUnit.on( \"assertion\" ) interface.\n *\n * @private\n */\n \tlogAssertion: function logAssertion(details) {\n \t\trunLoggingCallbacks(\"log\", details);\n\n \t\tvar assertion = {\n \t\t\tpassed: details.result,\n \t\t\tactual: details.actual,\n \t\t\texpected: details.expected,\n \t\t\tmessage: details.message,\n \t\t\tstack: details.source,\n \t\t\ttodo: details.todo\n \t\t};\n \t\tthis.testReport.pushAssertion(assertion);\n \t\temit(\"assertion\", assertion);\n \t},\n\n\n \tresolvePromise: function resolvePromise(promise, phase) {\n \t\tvar then,\n \t\t resume,\n \t\t message,\n \t\t test = this;\n \t\tif (promise != null) {\n \t\t\tthen = promise.then;\n \t\t\tif (objectType(then) === \"function\") {\n \t\t\t\tresume = internalStop(test);\n \t\t\t\tif (config.notrycatch) {\n \t\t\t\t\tthen.call(promise, function () {\n \t\t\t\t\t\tresume();\n \t\t\t\t\t});\n \t\t\t\t} else {\n \t\t\t\t\tthen.call(promise, function () {\n \t\t\t\t\t\tresume();\n \t\t\t\t\t}, function (error) {\n \t\t\t\t\t\tmessage = \"Promise rejected \" + (!phase ? \"during\" : phase.replace(/Each$/, \"\")) + \" \\\"\" + test.testName + \"\\\": \" + (error && error.message || error);\n \t\t\t\t\t\ttest.pushFailure(message, extractStacktrace(error, 0));\n\n \t\t\t\t\t\t// Else next test will carry the responsibility\n \t\t\t\t\t\tsaveGlobal();\n\n \t\t\t\t\t\t// Unblock\n \t\t\t\t\t\tinternalRecover(test);\n \t\t\t\t\t});\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t},\n\n \tvalid: function valid() {\n \t\tvar filter = config.filter,\n \t\t regexFilter = /^(!?)\\/([\\w\\W]*)\\/(i?$)/.exec(filter),\n \t\t module = config.module && config.module.toLowerCase(),\n \t\t fullName = this.module.name + \": \" + this.testName;\n\n \t\tfunction moduleChainNameMatch(testModule) {\n \t\t\tvar testModuleName = testModule.name ? testModule.name.toLowerCase() : null;\n \t\t\tif (testModuleName === module) {\n \t\t\t\treturn true;\n \t\t\t} else if (testModule.parentModule) {\n \t\t\t\treturn moduleChainNameMatch(testModule.parentModule);\n \t\t\t} else {\n \t\t\t\treturn false;\n \t\t\t}\n \t\t}\n\n \t\tfunction moduleChainIdMatch(testModule) {\n \t\t\treturn inArray(testModule.moduleId, config.moduleId) || testModule.parentModule && moduleChainIdMatch(testModule.parentModule);\n \t\t}\n\n \t\t// Internally-generated tests are always valid\n \t\tif (this.callback && this.callback.validTest) {\n \t\t\treturn true;\n \t\t}\n\n \t\tif (config.moduleId && config.moduleId.length > 0 && !moduleChainIdMatch(this.module)) {\n\n \t\t\treturn false;\n \t\t}\n\n \t\tif (config.testId && config.testId.length > 0 && !inArray(this.testId, config.testId)) {\n\n \t\t\treturn false;\n \t\t}\n\n \t\tif (module && !moduleChainNameMatch(this.module)) {\n \t\t\treturn false;\n \t\t}\n\n \t\tif (!filter) {\n \t\t\treturn true;\n \t\t}\n\n \t\treturn regexFilter ? this.regexFilter(!!regexFilter[1], regexFilter[2], regexFilter[3], fullName) : this.stringFilter(filter, fullName);\n \t},\n\n \tregexFilter: function regexFilter(exclude, pattern, flags, fullName) {\n \t\tvar regex = new RegExp(pattern, flags);\n \t\tvar match = regex.test(fullName);\n\n \t\treturn match !== exclude;\n \t},\n\n \tstringFilter: function stringFilter(filter, fullName) {\n \t\tfilter = filter.toLowerCase();\n \t\tfullName = fullName.toLowerCase();\n\n \t\tvar include = filter.charAt(0) !== \"!\";\n \t\tif (!include) {\n \t\t\tfilter = filter.slice(1);\n \t\t}\n\n \t\t// If the filter matches, we need to honour include\n \t\tif (fullName.indexOf(filter) !== -1) {\n \t\t\treturn include;\n \t\t}\n\n \t\t// Otherwise, do the opposite\n \t\treturn !include;\n \t}\n };\n\n function pushFailure() {\n \tif (!config.current) {\n \t\tthrow new Error(\"pushFailure() assertion outside test context, in \" + sourceFromStacktrace(2));\n \t}\n\n \t// Gets current test obj\n \tvar currentTest = config.current;\n\n \treturn currentTest.pushFailure.apply(currentTest, arguments);\n }\n\n function saveGlobal() {\n \tconfig.pollution = [];\n\n \tif (config.noglobals) {\n \t\tfor (var key in global$1) {\n \t\t\tif (hasOwn.call(global$1, key)) {\n\n \t\t\t\t// In Opera sometimes DOM element ids show up here, ignore them\n \t\t\t\tif (/^qunit-test-output/.test(key)) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tconfig.pollution.push(key);\n \t\t\t}\n \t\t}\n \t}\n }\n\n function checkPollution() {\n \tvar newGlobals,\n \t deletedGlobals,\n \t old = config.pollution;\n\n \tsaveGlobal();\n\n \tnewGlobals = diff(config.pollution, old);\n \tif (newGlobals.length > 0) {\n \t\tpushFailure(\"Introduced global variable(s): \" + newGlobals.join(\", \"));\n \t}\n\n \tdeletedGlobals = diff(old, config.pollution);\n \tif (deletedGlobals.length > 0) {\n \t\tpushFailure(\"Deleted global variable(s): \" + deletedGlobals.join(\", \"));\n \t}\n }\n\n // Will be exposed as QUnit.test\n function test(testName, callback) {\n \tif (focused$1) {\n \t\treturn;\n \t}\n\n \tvar newTest = new Test({\n \t\ttestName: testName,\n \t\tcallback: callback\n \t});\n\n \tnewTest.queue();\n }\n\n function todo(testName, callback) {\n \tif (focused$1) {\n \t\treturn;\n \t}\n\n \tvar newTest = new Test({\n \t\ttestName: testName,\n \t\tcallback: callback,\n \t\ttodo: true\n \t});\n\n \tnewTest.queue();\n }\n\n // Will be exposed as QUnit.skip\n function skip(testName) {\n \tif (focused$1) {\n \t\treturn;\n \t}\n\n \tvar test = new Test({\n \t\ttestName: testName,\n \t\tskip: true\n \t});\n\n \ttest.queue();\n }\n\n // Will be exposed as QUnit.only\n function only(testName, callback) {\n \tif (focused$1) {\n \t\treturn;\n \t}\n\n \tconfig.queue.length = 0;\n \tfocused$1 = true;\n\n \tvar newTest = new Test({\n \t\ttestName: testName,\n \t\tcallback: callback\n \t});\n\n \tnewTest.queue();\n }\n\n // Put a hold on processing and return a function that will release it.\n function internalStop(test) {\n \ttest.semaphore += 1;\n \tconfig.blocking = true;\n\n \t// Set a recovery timeout, if so configured.\n \tif (defined.setTimeout) {\n \t\tvar timeoutDuration = void 0;\n\n \t\tif (typeof test.timeout === \"number\") {\n \t\t\ttimeoutDuration = test.timeout;\n \t\t} else if (typeof config.testTimeout === \"number\") {\n \t\t\ttimeoutDuration = config.testTimeout;\n \t\t}\n\n \t\tif (typeof timeoutDuration === \"number\" && timeoutDuration > 0) {\n \t\t\tclearTimeout(config.timeout);\n \t\t\tconfig.timeout = setTimeout(function () {\n \t\t\t\tpushFailure(\"Test took longer than \" + timeoutDuration + \"ms; test timed out.\", sourceFromStacktrace(2));\n \t\t\t\tinternalRecover(test);\n \t\t\t}, timeoutDuration);\n \t\t}\n \t}\n\n \tvar released = false;\n \treturn function resume() {\n \t\tif (released) {\n \t\t\treturn;\n \t\t}\n\n \t\treleased = true;\n \t\ttest.semaphore -= 1;\n \t\tinternalStart(test);\n \t};\n }\n\n // Forcefully release all processing holds.\n function internalRecover(test) {\n \ttest.semaphore = 0;\n \tinternalStart(test);\n }\n\n // Release a processing hold, scheduling a resumption attempt if no holds remain.\n function internalStart(test) {\n\n \t// If semaphore is non-numeric, throw error\n \tif (isNaN(test.semaphore)) {\n \t\ttest.semaphore = 0;\n\n \t\tpushFailure(\"Invalid value on test.semaphore\", sourceFromStacktrace(2));\n \t\treturn;\n \t}\n\n \t// Don't start until equal number of stop-calls\n \tif (test.semaphore > 0) {\n \t\treturn;\n \t}\n\n \t// Throw an Error if start is called more often than stop\n \tif (test.semaphore < 0) {\n \t\ttest.semaphore = 0;\n\n \t\tpushFailure(\"Tried to restart test while already started (test's semaphore was 0 already)\", sourceFromStacktrace(2));\n \t\treturn;\n \t}\n\n \t// Add a slight delay to allow more assertions etc.\n \tif (defined.setTimeout) {\n \t\tif (config.timeout) {\n \t\t\tclearTimeout(config.timeout);\n \t\t}\n \t\tconfig.timeout = setTimeout(function () {\n \t\t\tif (test.semaphore > 0) {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tif (config.timeout) {\n \t\t\t\tclearTimeout(config.timeout);\n \t\t\t}\n\n \t\t\tbegin();\n \t\t});\n \t} else {\n \t\tbegin();\n \t}\n }\n\n function collectTests(module) {\n \tvar tests = [].concat(module.tests);\n \tvar modules = [].concat(toConsumableArray(module.childModules));\n\n \t// Do a breadth-first traversal of the child modules\n \twhile (modules.length) {\n \t\tvar nextModule = modules.shift();\n \t\ttests.push.apply(tests, nextModule.tests);\n \t\tmodules.push.apply(modules, toConsumableArray(nextModule.childModules));\n \t}\n\n \treturn tests;\n }\n\n function numberOfTests(module) {\n \treturn collectTests(module).length;\n }\n\n function numberOfUnskippedTests(module) {\n \treturn collectTests(module).filter(function (test) {\n \t\treturn !test.skip;\n \t}).length;\n }\n\n function notifyTestsRan(module, skipped) {\n \tmodule.testsRun++;\n \tif (!skipped) {\n \t\tmodule.unskippedTestsRun++;\n \t}\n \twhile (module = module.parentModule) {\n \t\tmodule.testsRun++;\n \t\tif (!skipped) {\n \t\t\tmodule.unskippedTestsRun++;\n \t\t}\n \t}\n }\n\n /**\n * Returns a function that proxies to the given method name on the globals\n * console object. The proxy will also detect if the console doesn't exist and\n * will appropriately no-op. This allows support for IE9, which doesn't have a\n * console if the developer tools are not open.\n */\n function consoleProxy(method) {\n \treturn function () {\n \t\tif (console) {\n \t\t\tconsole[method].apply(console, arguments);\n \t\t}\n \t};\n }\n\n var Logger = {\n \twarn: consoleProxy(\"warn\")\n };\n\n var Assert = function () {\n \tfunction Assert(testContext) {\n \t\tclassCallCheck(this, Assert);\n\n \t\tthis.test = testContext;\n \t}\n\n \t// Assert helpers\n\n \tcreateClass(Assert, [{\n \t\tkey: \"timeout\",\n \t\tvalue: function timeout(duration) {\n \t\t\tif (typeof duration !== \"number\") {\n \t\t\t\tthrow new Error(\"You must pass a number as the duration to assert.timeout\");\n \t\t\t}\n\n \t\t\tthis.test.timeout = duration;\n \t\t}\n\n \t\t// Documents a \"step\", which is a string value, in a test as a passing assertion\n\n \t}, {\n \t\tkey: \"step\",\n \t\tvalue: function step(message) {\n \t\t\tvar result = !!message;\n\n \t\t\tthis.test.steps.push(message);\n\n \t\t\treturn this.pushResult({\n \t\t\t\tresult: result,\n \t\t\t\tmessage: message || \"You must provide a message to assert.step\"\n \t\t\t});\n \t\t}\n\n \t\t// Verifies the steps in a test match a given array of string values\n\n \t}, {\n \t\tkey: \"verifySteps\",\n \t\tvalue: function verifySteps(steps, message) {\n \t\t\tthis.deepEqual(this.test.steps, steps, message);\n \t\t\tthis.test.steps.length = 0;\n \t\t}\n\n \t\t// Specify the number of expected assertions to guarantee that failed test\n \t\t// (no assertions are run at all) don't slip through.\n\n \t}, {\n \t\tkey: \"expect\",\n \t\tvalue: function expect(asserts) {\n \t\t\tif (arguments.length === 1) {\n \t\t\t\tthis.test.expected = asserts;\n \t\t\t} else {\n \t\t\t\treturn this.test.expected;\n \t\t\t}\n \t\t}\n\n \t\t// Put a hold on processing and return a function that will release it a maximum of once.\n\n \t}, {\n \t\tkey: \"async\",\n \t\tvalue: function async(count) {\n \t\t\tvar test$$1 = this.test;\n\n \t\t\tvar popped = false,\n \t\t\t acceptCallCount = count;\n\n \t\t\tif (typeof acceptCallCount === \"undefined\") {\n \t\t\t\tacceptCallCount = 1;\n \t\t\t}\n\n \t\t\tvar resume = internalStop(test$$1);\n\n \t\t\treturn function done() {\n \t\t\t\tif (config.current !== test$$1) {\n \t\t\t\t\tthrow Error(\"assert.async callback called after test finished.\");\n \t\t\t\t}\n\n \t\t\t\tif (popped) {\n \t\t\t\t\ttest$$1.pushFailure(\"Too many calls to the `assert.async` callback\", sourceFromStacktrace(2));\n \t\t\t\t\treturn;\n \t\t\t\t}\n\n \t\t\t\tacceptCallCount -= 1;\n \t\t\t\tif (acceptCallCount > 0) {\n \t\t\t\t\treturn;\n \t\t\t\t}\n\n \t\t\t\tpopped = true;\n \t\t\t\tresume();\n \t\t\t};\n \t\t}\n\n \t\t// Exports test.push() to the user API\n \t\t// Alias of pushResult.\n\n \t}, {\n \t\tkey: \"push\",\n \t\tvalue: function push(result, actual, expected, message, negative) {\n \t\t\tLogger.warn(\"assert.push is deprecated and will be removed in QUnit 3.0.\" + \" Please use assert.pushResult instead (https://api.qunitjs.com/assert/pushResult).\");\n\n \t\t\tvar currentAssert = this instanceof Assert ? this : config.current.assert;\n \t\t\treturn currentAssert.pushResult({\n \t\t\t\tresult: result,\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message,\n \t\t\t\tnegative: negative\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"pushResult\",\n \t\tvalue: function pushResult(resultInfo) {\n\n \t\t\t// Destructure of resultInfo = { result, actual, expected, message, negative }\n \t\t\tvar assert = this;\n \t\t\tvar currentTest = assert instanceof Assert && assert.test || config.current;\n\n \t\t\t// Backwards compatibility fix.\n \t\t\t// Allows the direct use of global exported assertions and QUnit.assert.*\n \t\t\t// Although, it's use is not recommended as it can leak assertions\n \t\t\t// to other tests from async tests, because we only get a reference to the current test,\n \t\t\t// not exactly the test where assertion were intended to be called.\n \t\t\tif (!currentTest) {\n \t\t\t\tthrow new Error(\"assertion outside test context, in \" + sourceFromStacktrace(2));\n \t\t\t}\n\n \t\t\tif (!(assert instanceof Assert)) {\n \t\t\t\tassert = currentTest.assert;\n \t\t\t}\n\n \t\t\treturn assert.test.pushResult(resultInfo);\n \t\t}\n \t}, {\n \t\tkey: \"ok\",\n \t\tvalue: function ok(result, message) {\n \t\t\tif (!message) {\n \t\t\t\tmessage = result ? \"okay\" : \"failed, expected argument to be truthy, was: \" + dump.parse(result);\n \t\t\t}\n\n \t\t\tthis.pushResult({\n \t\t\t\tresult: !!result,\n \t\t\t\tactual: result,\n \t\t\t\texpected: true,\n \t\t\t\tmessage: message\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"notOk\",\n \t\tvalue: function notOk(result, message) {\n \t\t\tif (!message) {\n \t\t\t\tmessage = !result ? \"okay\" : \"failed, expected argument to be falsy, was: \" + dump.parse(result);\n \t\t\t}\n\n \t\t\tthis.pushResult({\n \t\t\t\tresult: !result,\n \t\t\t\tactual: result,\n \t\t\t\texpected: false,\n \t\t\t\tmessage: message\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"equal\",\n \t\tvalue: function equal(actual, expected, message) {\n\n \t\t\t// eslint-disable-next-line eqeqeq\n \t\t\tvar result = expected == actual;\n\n \t\t\tthis.pushResult({\n \t\t\t\tresult: result,\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"notEqual\",\n \t\tvalue: function notEqual(actual, expected, message) {\n\n \t\t\t// eslint-disable-next-line eqeqeq\n \t\t\tvar result = expected != actual;\n\n \t\t\tthis.pushResult({\n \t\t\t\tresult: result,\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message,\n \t\t\t\tnegative: true\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"propEqual\",\n \t\tvalue: function propEqual(actual, expected, message) {\n \t\t\tactual = objectValues(actual);\n \t\t\texpected = objectValues(expected);\n\n \t\t\tthis.pushResult({\n \t\t\t\tresult: equiv(actual, expected),\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"notPropEqual\",\n \t\tvalue: function notPropEqual(actual, expected, message) {\n \t\t\tactual = objectValues(actual);\n \t\t\texpected = objectValues(expected);\n\n \t\t\tthis.pushResult({\n \t\t\t\tresult: !equiv(actual, expected),\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message,\n \t\t\t\tnegative: true\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"deepEqual\",\n \t\tvalue: function deepEqual(actual, expected, message) {\n \t\t\tthis.pushResult({\n \t\t\t\tresult: equiv(actual, expected),\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"notDeepEqual\",\n \t\tvalue: function notDeepEqual(actual, expected, message) {\n \t\t\tthis.pushResult({\n \t\t\t\tresult: !equiv(actual, expected),\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message,\n \t\t\t\tnegative: true\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"strictEqual\",\n \t\tvalue: function strictEqual(actual, expected, message) {\n \t\t\tthis.pushResult({\n \t\t\t\tresult: expected === actual,\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"notStrictEqual\",\n \t\tvalue: function notStrictEqual(actual, expected, message) {\n \t\t\tthis.pushResult({\n \t\t\t\tresult: expected !== actual,\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message,\n \t\t\t\tnegative: true\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"throws\",\n \t\tvalue: function throws(block, expected, message) {\n \t\t\tvar actual = void 0,\n \t\t\t result = false;\n\n \t\t\tvar currentTest = this instanceof Assert && this.test || config.current;\n\n \t\t\t// 'expected' is optional unless doing string comparison\n \t\t\tif (objectType(expected) === \"string\") {\n \t\t\t\tif (message == null) {\n \t\t\t\t\tmessage = expected;\n \t\t\t\t\texpected = null;\n \t\t\t\t} else {\n \t\t\t\t\tthrow new Error(\"throws/raises does not accept a string value for the expected argument.\\n\" + \"Use a non-string object value (e.g. regExp) instead if it's necessary.\");\n \t\t\t\t}\n \t\t\t}\n\n \t\t\tcurrentTest.ignoreGlobalErrors = true;\n \t\t\ttry {\n \t\t\t\tblock.call(currentTest.testEnvironment);\n \t\t\t} catch (e) {\n \t\t\t\tactual = e;\n \t\t\t}\n \t\t\tcurrentTest.ignoreGlobalErrors = false;\n\n \t\t\tif (actual) {\n \t\t\t\tvar expectedType = objectType(expected);\n\n \t\t\t\t// We don't want to validate thrown error\n \t\t\t\tif (!expected) {\n \t\t\t\t\tresult = true;\n \t\t\t\t\texpected = null;\n\n \t\t\t\t\t// Expected is a regexp\n \t\t\t\t} else if (expectedType === \"regexp\") {\n \t\t\t\t\tresult = expected.test(errorString(actual));\n\n \t\t\t\t\t// Expected is a constructor, maybe an Error constructor\n \t\t\t\t} else if (expectedType === \"function\" && actual instanceof expected) {\n \t\t\t\t\tresult = true;\n\n \t\t\t\t\t// Expected is an Error object\n \t\t\t\t} else if (expectedType === \"object\") {\n \t\t\t\t\tresult = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message;\n\n \t\t\t\t\t// Expected is a validation function which returns true if validation passed\n \t\t\t\t} else if (expectedType === \"function\" && expected.call({}, actual) === true) {\n \t\t\t\t\texpected = null;\n \t\t\t\t\tresult = true;\n \t\t\t\t}\n \t\t\t}\n\n \t\t\tcurrentTest.assert.pushResult({\n \t\t\t\tresult: result,\n \t\t\t\tactual: actual,\n \t\t\t\texpected: expected,\n \t\t\t\tmessage: message\n \t\t\t});\n \t\t}\n \t}, {\n \t\tkey: \"rejects\",\n \t\tvalue: function rejects(promise, expected, message) {\n \t\t\tvar result = false;\n\n \t\t\tvar currentTest = this instanceof Assert && this.test || config.current;\n\n \t\t\t// 'expected' is optional unless doing string comparison\n \t\t\tif (objectType(expected) === \"string\") {\n \t\t\t\tif (message === undefined) {\n \t\t\t\t\tmessage = expected;\n \t\t\t\t\texpected = undefined;\n \t\t\t\t} else {\n \t\t\t\t\tmessage = \"assert.rejects does not accept a string value for the expected \" + \"argument.\\nUse a non-string object value (e.g. validator function) instead \" + \"if necessary.\";\n\n \t\t\t\t\tcurrentTest.assert.pushResult({\n \t\t\t\t\t\tresult: false,\n \t\t\t\t\t\tmessage: message\n \t\t\t\t\t});\n\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t}\n\n \t\t\tvar then = promise && promise.then;\n \t\t\tif (objectType(then) !== \"function\") {\n \t\t\t\tvar _message = \"The value provided to `assert.rejects` in \" + \"\\\"\" + currentTest.testName + \"\\\" was not a promise.\";\n\n \t\t\t\tcurrentTest.assert.pushResult({\n \t\t\t\t\tresult: false,\n \t\t\t\t\tmessage: _message,\n \t\t\t\t\tactual: promise\n \t\t\t\t});\n\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tvar done = this.async();\n\n \t\t\treturn then.call(promise, function handleFulfillment() {\n \t\t\t\tvar message = \"The promise returned by the `assert.rejects` callback in \" + \"\\\"\" + currentTest.testName + \"\\\" did not reject.\";\n\n \t\t\t\tcurrentTest.assert.pushResult({\n \t\t\t\t\tresult: false,\n \t\t\t\t\tmessage: message,\n \t\t\t\t\tactual: promise\n \t\t\t\t});\n\n \t\t\t\tdone();\n \t\t\t}, function handleRejection(actual) {\n \t\t\t\tif (actual) {\n \t\t\t\t\tvar expectedType = objectType(expected);\n\n \t\t\t\t\t// We don't want to validate\n \t\t\t\t\tif (expected === undefined) {\n \t\t\t\t\t\tresult = true;\n \t\t\t\t\t\texpected = null;\n\n \t\t\t\t\t\t// Expected is a regexp\n \t\t\t\t\t} else if (expectedType === \"regexp\") {\n \t\t\t\t\t\tresult = expected.test(errorString(actual));\n\n \t\t\t\t\t\t// Expected is a constructor, maybe an Error constructor\n \t\t\t\t\t} else if (expectedType === \"function\" && actual instanceof expected) {\n \t\t\t\t\t\tresult = true;\n\n \t\t\t\t\t\t// Expected is an Error object\n \t\t\t\t\t} else if (expectedType === \"object\") {\n \t\t\t\t\t\tresult = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message;\n\n \t\t\t\t\t\t// Expected is a validation function which returns true if validation passed\n \t\t\t\t\t} else {\n \t\t\t\t\t\tif (expectedType === \"function\") {\n \t\t\t\t\t\t\tresult = expected.call({}, actual) === true;\n \t\t\t\t\t\t\texpected = null;\n\n \t\t\t\t\t\t\t// Expected is some other invalid type\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tresult = false;\n \t\t\t\t\t\t\tmessage = \"invalid expected value provided to `assert.rejects` \" + \"callback in \\\"\" + currentTest.testName + \"\\\": \" + expectedType + \".\";\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n\n \t\t\t\tcurrentTest.assert.pushResult({\n \t\t\t\t\tresult: result,\n \t\t\t\t\tactual: actual,\n \t\t\t\t\texpected: expected,\n \t\t\t\t\tmessage: message\n \t\t\t\t});\n\n \t\t\t\tdone();\n \t\t\t});\n \t\t}\n \t}]);\n \treturn Assert;\n }();\n\n // Provide an alternative to assert.throws(), for environments that consider throws a reserved word\n // Known to us are: Closure Compiler, Narwhal\n // eslint-disable-next-line dot-notation\n\n\n Assert.prototype.raises = Assert.prototype[\"throws\"];\n\n /**\n * Converts an error into a simple string for comparisons.\n *\n * @param {Error} error\n * @return {String}\n */\n function errorString(error) {\n \tvar resultErrorString = error.toString();\n\n \tif (resultErrorString.substring(0, 7) === \"[object\") {\n \t\tvar name = error.name ? error.name.toString() : \"Error\";\n \t\tvar message = error.message ? error.message.toString() : \"\";\n\n \t\tif (name && message) {\n \t\t\treturn name + \": \" + message;\n \t\t} else if (name) {\n \t\t\treturn name;\n \t\t} else if (message) {\n \t\t\treturn message;\n \t\t} else {\n \t\t\treturn \"Error\";\n \t\t}\n \t} else {\n \t\treturn resultErrorString;\n \t}\n }\n\n /* global module, exports, define */\n function exportQUnit(QUnit) {\n\n \tif (defined.document) {\n\n \t\t// QUnit may be defined when it is preconfigured but then only QUnit and QUnit.config may be defined.\n \t\tif (window.QUnit && window.QUnit.version) {\n \t\t\tthrow new Error(\"QUnit has already been defined.\");\n \t\t}\n\n \t\twindow.QUnit = QUnit;\n \t}\n\n \t// For nodejs\n \tif (typeof module !== \"undefined\" && module && module.exports) {\n \t\tmodule.exports = QUnit;\n\n \t\t// For consistency with CommonJS environments' exports\n \t\tmodule.exports.QUnit = QUnit;\n \t}\n\n \t// For CommonJS with exports, but without module.exports, like Rhino\n \tif (typeof exports !== \"undefined\" && exports) {\n \t\texports.QUnit = QUnit;\n \t}\n\n \tif (typeof define === \"function\" && define.amd) {\n \t\tdefine(function () {\n \t\t\treturn QUnit;\n \t\t});\n \t\tQUnit.config.autostart = false;\n \t}\n\n \t// For Web/Service Workers\n \tif (self$1 && self$1.WorkerGlobalScope && self$1 instanceof self$1.WorkerGlobalScope) {\n \t\tself$1.QUnit = QUnit;\n \t}\n }\n\n var SuiteReport = function () {\n \tfunction SuiteReport(name, parentSuite) {\n \t\tclassCallCheck(this, SuiteReport);\n\n \t\tthis.name = name;\n \t\tthis.fullName = parentSuite ? parentSuite.fullName.concat(name) : [];\n\n \t\tthis.tests = [];\n \t\tthis.childSuites = [];\n\n \t\tif (parentSuite) {\n \t\t\tparentSuite.pushChildSuite(this);\n \t\t}\n \t}\n\n \tcreateClass(SuiteReport, [{\n \t\tkey: \"start\",\n \t\tvalue: function start(recordTime) {\n \t\t\tif (recordTime) {\n \t\t\t\tthis._startTime = Date.now();\n \t\t\t}\n\n \t\t\treturn {\n \t\t\t\tname: this.name,\n \t\t\t\tfullName: this.fullName.slice(),\n \t\t\t\ttests: this.tests.map(function (test) {\n \t\t\t\t\treturn test.start();\n \t\t\t\t}),\n \t\t\t\tchildSuites: this.childSuites.map(function (suite) {\n \t\t\t\t\treturn suite.start();\n \t\t\t\t}),\n \t\t\t\ttestCounts: {\n \t\t\t\t\ttotal: this.getTestCounts().total\n \t\t\t\t}\n \t\t\t};\n \t\t}\n \t}, {\n \t\tkey: \"end\",\n \t\tvalue: function end(recordTime) {\n \t\t\tif (recordTime) {\n \t\t\t\tthis._endTime = Date.now();\n \t\t\t}\n\n \t\t\treturn {\n \t\t\t\tname: this.name,\n \t\t\t\tfullName: this.fullName.slice(),\n \t\t\t\ttests: this.tests.map(function (test) {\n \t\t\t\t\treturn test.end();\n \t\t\t\t}),\n \t\t\t\tchildSuites: this.childSuites.map(function (suite) {\n \t\t\t\t\treturn suite.end();\n \t\t\t\t}),\n \t\t\t\ttestCounts: this.getTestCounts(),\n \t\t\t\truntime: this.getRuntime(),\n \t\t\t\tstatus: this.getStatus()\n \t\t\t};\n \t\t}\n \t}, {\n \t\tkey: \"pushChildSuite\",\n \t\tvalue: function pushChildSuite(suite) {\n \t\t\tthis.childSuites.push(suite);\n \t\t}\n \t}, {\n \t\tkey: \"pushTest\",\n \t\tvalue: function pushTest(test) {\n \t\t\tthis.tests.push(test);\n \t\t}\n \t}, {\n \t\tkey: \"getRuntime\",\n \t\tvalue: function getRuntime() {\n \t\t\treturn this._endTime - this._startTime;\n \t\t}\n \t}, {\n \t\tkey: \"getTestCounts\",\n \t\tvalue: function getTestCounts() {\n \t\t\tvar counts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { passed: 0, failed: 0, skipped: 0, todo: 0, total: 0 };\n\n \t\t\tcounts = this.tests.reduce(function (counts, test) {\n \t\t\t\tif (test.valid) {\n \t\t\t\t\tcounts[test.getStatus()]++;\n \t\t\t\t\tcounts.total++;\n \t\t\t\t}\n\n \t\t\t\treturn counts;\n \t\t\t}, counts);\n\n \t\t\treturn this.childSuites.reduce(function (counts, suite) {\n \t\t\t\treturn suite.getTestCounts(counts);\n \t\t\t}, counts);\n \t\t}\n \t}, {\n \t\tkey: \"getStatus\",\n \t\tvalue: function getStatus() {\n \t\t\tvar _getTestCounts = this.getTestCounts(),\n \t\t\t total = _getTestCounts.total,\n \t\t\t failed = _getTestCounts.failed,\n \t\t\t skipped = _getTestCounts.skipped,\n \t\t\t todo = _getTestCounts.todo;\n\n \t\t\tif (failed) {\n \t\t\t\treturn \"failed\";\n \t\t\t} else {\n \t\t\t\tif (skipped === total) {\n \t\t\t\t\treturn \"skipped\";\n \t\t\t\t} else if (todo === total) {\n \t\t\t\t\treturn \"todo\";\n \t\t\t\t} else {\n \t\t\t\t\treturn \"passed\";\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}]);\n \treturn SuiteReport;\n }();\n\n // Handle an unhandled exception. By convention, returns true if further\n // error handling should be suppressed and false otherwise.\n // In this case, we will only suppress further error handling if the\n // \"ignoreGlobalErrors\" configuration option is enabled.\n function onError(error) {\n \tfor (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n \t\targs[_key - 1] = arguments[_key];\n \t}\n\n \tif (config.current) {\n \t\tif (config.current.ignoreGlobalErrors) {\n \t\t\treturn true;\n \t\t}\n \t\tpushFailure.apply(undefined, [error.message, error.fileName + \":\" + error.lineNumber].concat(args));\n \t} else {\n \t\ttest(\"global failure\", extend(function () {\n \t\t\tpushFailure.apply(undefined, [error.message, error.fileName + \":\" + error.lineNumber].concat(args));\n \t\t}, { validTest: true }));\n \t}\n\n \treturn false;\n }\n\n // Handle an unhandled rejection\n function onUnhandledRejection(reason) {\n \tvar resultInfo = {\n \t\tresult: false,\n \t\tmessage: reason.message || \"error\",\n \t\tactual: reason,\n \t\tsource: reason.stack || sourceFromStacktrace(3)\n \t};\n\n \tvar currentTest = config.current;\n \tif (currentTest) {\n \t\tcurrentTest.assert.pushResult(resultInfo);\n \t} else {\n \t\ttest(\"global failure\", extend(function (assert) {\n \t\t\tassert.pushResult(resultInfo);\n \t\t}, { validTest: true }));\n \t}\n }\n\n var focused = false;\n var QUnit = {};\n var globalSuite = new SuiteReport();\n\n // The initial \"currentModule\" represents the global (or top-level) module that\n // is not explicitly defined by the user, therefore we add the \"globalSuite\" to\n // it since each module has a suiteReport associated with it.\n config.currentModule.suiteReport = globalSuite;\n\n var moduleStack = [];\n var globalStartCalled = false;\n var runStarted = false;\n\n // Figure out if we're running the tests from a server or not\n QUnit.isLocal = !(defined.document && window.location.protocol !== \"file:\");\n\n // Expose the current QUnit version\n QUnit.version = \"2.5.1\";\n\n function createModule(name, testEnvironment, modifiers) {\n \tvar parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null;\n \tvar moduleName = parentModule !== null ? [parentModule.name, name].join(\" > \") : name;\n \tvar parentSuite = parentModule ? parentModule.suiteReport : globalSuite;\n\n \tvar skip$$1 = parentModule !== null && parentModule.skip || modifiers.skip;\n \tvar todo$$1 = parentModule !== null && parentModule.todo || modifiers.todo;\n\n \tvar module = {\n \t\tname: moduleName,\n \t\tparentModule: parentModule,\n \t\ttests: [],\n \t\tmoduleId: generateHash(moduleName),\n \t\ttestsRun: 0,\n \t\tunskippedTestsRun: 0,\n \t\tchildModules: [],\n \t\tsuiteReport: new SuiteReport(name, parentSuite),\n\n \t\t// Pass along `skip` and `todo` properties from parent module, in case\n \t\t// there is one, to childs. And use own otherwise.\n \t\t// This property will be used to mark own tests and tests of child suites\n \t\t// as either `skipped` or `todo`.\n \t\tskip: skip$$1,\n \t\ttodo: skip$$1 ? false : todo$$1\n \t};\n\n \tvar env = {};\n \tif (parentModule) {\n \t\tparentModule.childModules.push(module);\n \t\textend(env, parentModule.testEnvironment);\n \t}\n \textend(env, testEnvironment);\n \tmodule.testEnvironment = env;\n\n \tconfig.modules.push(module);\n \treturn module;\n }\n\n function processModule(name, options, executeNow) {\n \tvar modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n \tvar module = createModule(name, options, modifiers);\n\n \t// Move any hooks to a 'hooks' object\n \tvar testEnvironment = module.testEnvironment;\n \tvar hooks = module.hooks = {};\n\n \tsetHookFromEnvironment(hooks, testEnvironment, \"before\");\n \tsetHookFromEnvironment(hooks, testEnvironment, \"beforeEach\");\n \tsetHookFromEnvironment(hooks, testEnvironment, \"afterEach\");\n \tsetHookFromEnvironment(hooks, testEnvironment, \"after\");\n\n \tfunction setHookFromEnvironment(hooks, environment, name) {\n \t\tvar potentialHook = environment[name];\n \t\thooks[name] = typeof potentialHook === \"function\" ? [potentialHook] : [];\n \t\tdelete environment[name];\n \t}\n\n \tvar moduleFns = {\n \t\tbefore: setHookFunction(module, \"before\"),\n \t\tbeforeEach: setHookFunction(module, \"beforeEach\"),\n \t\tafterEach: setHookFunction(module, \"afterEach\"),\n \t\tafter: setHookFunction(module, \"after\")\n \t};\n\n \tvar currentModule = config.currentModule;\n \tif (objectType(executeNow) === \"function\") {\n \t\tmoduleStack.push(module);\n \t\tconfig.currentModule = module;\n \t\texecuteNow.call(module.testEnvironment, moduleFns);\n \t\tmoduleStack.pop();\n \t\tmodule = module.parentModule || currentModule;\n \t}\n\n \tconfig.currentModule = module;\n }\n\n // TODO: extract this to a new file alongside its related functions\n function module$1(name, options, executeNow) {\n \tif (focused) {\n \t\treturn;\n \t}\n\n \tif (arguments.length === 2) {\n \t\tif (objectType(options) === \"function\") {\n \t\t\texecuteNow = options;\n \t\t\toptions = undefined;\n \t\t}\n \t}\n\n \tprocessModule(name, options, executeNow);\n }\n\n module$1.only = function () {\n \tif (focused) {\n \t\treturn;\n \t}\n\n \tconfig.modules.length = 0;\n \tconfig.queue.length = 0;\n\n \tmodule$1.apply(undefined, arguments);\n\n \tfocused = true;\n };\n\n module$1.skip = function (name, options, executeNow) {\n \tif (focused) {\n \t\treturn;\n \t}\n\n \tif (arguments.length === 2) {\n \t\tif (objectType(options) === \"function\") {\n \t\t\texecuteNow = options;\n \t\t\toptions = undefined;\n \t\t}\n \t}\n\n \tprocessModule(name, options, executeNow, { skip: true });\n };\n\n module$1.todo = function (name, options, executeNow) {\n \tif (focused) {\n \t\treturn;\n \t}\n\n \tif (arguments.length === 2) {\n \t\tif (objectType(options) === \"function\") {\n \t\t\texecuteNow = options;\n \t\t\toptions = undefined;\n \t\t}\n \t}\n\n \tprocessModule(name, options, executeNow, { todo: true });\n };\n\n extend(QUnit, {\n \ton: on,\n\n \tmodule: module$1,\n\n \ttest: test,\n\n \ttodo: todo,\n\n \tskip: skip,\n\n \tonly: only,\n\n \tstart: function start(count) {\n \t\tvar globalStartAlreadyCalled = globalStartCalled;\n\n \t\tif (!config.current) {\n \t\t\tglobalStartCalled = true;\n\n \t\t\tif (runStarted) {\n \t\t\t\tthrow new Error(\"Called start() while test already started running\");\n \t\t\t} else if (globalStartAlreadyCalled || count > 1) {\n \t\t\t\tthrow new Error(\"Called start() outside of a test context too many times\");\n \t\t\t} else if (config.autostart) {\n \t\t\t\tthrow new Error(\"Called start() outside of a test context when \" + \"QUnit.config.autostart was true\");\n \t\t\t} else if (!config.pageLoaded) {\n\n \t\t\t\t// The page isn't completely loaded yet, so we set autostart and then\n \t\t\t\t// load if we're in Node or wait for the browser's load event.\n \t\t\t\tconfig.autostart = true;\n\n \t\t\t\t// Starts from Node even if .load was not previously called. We still return\n \t\t\t\t// early otherwise we'll wind up \"beginning\" twice.\n \t\t\t\tif (!defined.document) {\n \t\t\t\t\tQUnit.load();\n \t\t\t\t}\n\n \t\t\t\treturn;\n \t\t\t}\n \t\t} else {\n \t\t\tthrow new Error(\"QUnit.start cannot be called inside a test context.\");\n \t\t}\n\n \t\tscheduleBegin();\n \t},\n\n \tconfig: config,\n\n \tis: is,\n\n \tobjectType: objectType,\n\n \textend: extend,\n\n \tload: function load() {\n \t\tconfig.pageLoaded = true;\n\n \t\t// Initialize the configuration options\n \t\textend(config, {\n \t\t\tstats: { all: 0, bad: 0 },\n \t\t\tstarted: 0,\n \t\t\tupdateRate: 1000,\n \t\t\tautostart: true,\n \t\t\tfilter: \"\"\n \t\t}, true);\n\n \t\tif (!runStarted) {\n \t\t\tconfig.blocking = false;\n\n \t\t\tif (config.autostart) {\n \t\t\t\tscheduleBegin();\n \t\t\t}\n \t\t}\n \t},\n\n \tstack: function stack(offset) {\n \t\toffset = (offset || 0) + 2;\n \t\treturn sourceFromStacktrace(offset);\n \t},\n\n \tonError: onError,\n\n \tonUnhandledRejection: onUnhandledRejection\n });\n\n QUnit.pushFailure = pushFailure;\n QUnit.assert = Assert.prototype;\n QUnit.equiv = equiv;\n QUnit.dump = dump;\n\n registerLoggingCallbacks(QUnit);\n\n function scheduleBegin() {\n\n \trunStarted = true;\n\n \t// Add a slight delay to allow definition of more modules and tests.\n \tif (defined.setTimeout) {\n \t\tsetTimeout(function () {\n \t\t\tbegin();\n \t\t});\n \t} else {\n \t\tbegin();\n \t}\n }\n\n function begin() {\n \tvar i,\n \t l,\n \t modulesLog = [];\n\n \t// If the test run hasn't officially begun yet\n \tif (!config.started) {\n\n \t\t// Record the time of the test run's beginning\n \t\tconfig.started = now();\n\n \t\t// Delete the loose unnamed module if unused.\n \t\tif (config.modules[0].name === \"\" && config.modules[0].tests.length === 0) {\n \t\t\tconfig.modules.shift();\n \t\t}\n\n \t\t// Avoid unnecessary information by not logging modules' test environments\n \t\tfor (i = 0, l = config.modules.length; i < l; i++) {\n \t\t\tmodulesLog.push({\n \t\t\t\tname: config.modules[i].name,\n \t\t\t\ttests: config.modules[i].tests\n \t\t\t});\n \t\t}\n\n \t\t// The test run is officially beginning now\n \t\temit(\"runStart\", globalSuite.start(true));\n \t\trunLoggingCallbacks(\"begin\", {\n \t\t\ttotalTests: Test.count,\n \t\t\tmodules: modulesLog\n \t\t});\n \t}\n\n \tconfig.blocking = false;\n \tProcessingQueue.advance();\n }\n\n function setHookFunction(module, hookName) {\n \treturn function setHook(callback) {\n \t\tmodule.hooks[hookName].push(callback);\n \t};\n }\n\n exportQUnit(QUnit);\n\n (function () {\n\n \tif (typeof window === \"undefined\" || typeof document === \"undefined\") {\n \t\treturn;\n \t}\n\n \tvar config = QUnit.config,\n \t hasOwn = Object.prototype.hasOwnProperty;\n\n \t// Stores fixture HTML for resetting later\n \tfunction storeFixture() {\n\n \t\t// Avoid overwriting user-defined values\n \t\tif (hasOwn.call(config, \"fixture\")) {\n \t\t\treturn;\n \t\t}\n\n \t\tvar fixture = document.getElementById(\"qunit-fixture\");\n \t\tif (fixture) {\n \t\t\tconfig.fixture = fixture.cloneNode(true);\n \t\t}\n \t}\n\n \tQUnit.begin(storeFixture);\n\n \t// Resets the fixture DOM element if available.\n \tfunction resetFixture() {\n \t\tif (config.fixture == null) {\n \t\t\treturn;\n \t\t}\n\n \t\tvar fixture = document.getElementById(\"qunit-fixture\");\n \t\tvar resetFixtureType = _typeof(config.fixture);\n \t\tif (resetFixtureType === \"string\") {\n\n \t\t\t// support user defined values for `config.fixture`\n \t\t\tvar newFixture = document.createElement(\"div\");\n \t\t\tnewFixture.setAttribute(\"id\", \"qunit-fixture\");\n \t\t\tnewFixture.innerHTML = config.fixture;\n \t\t\tfixture.parentNode.replaceChild(newFixture, fixture);\n \t\t} else {\n \t\t\tvar clonedFixture = config.fixture.cloneNode(true);\n \t\t\tfixture.parentNode.replaceChild(clonedFixture, fixture);\n \t\t}\n \t}\n\n \tQUnit.testStart(resetFixture);\n })();\n\n (function () {\n\n \t// Only interact with URLs via window.location\n \tvar location = typeof window !== \"undefined\" && window.location;\n \tif (!location) {\n \t\treturn;\n \t}\n\n \tvar urlParams = getUrlParams();\n\n \tQUnit.urlParams = urlParams;\n\n \t// Match module/test by inclusion in an array\n \tQUnit.config.moduleId = [].concat(urlParams.moduleId || []);\n \tQUnit.config.testId = [].concat(urlParams.testId || []);\n\n \t// Exact case-insensitive match of the module name\n \tQUnit.config.module = urlParams.module;\n\n \t// Regular expression or case-insenstive substring match against \"moduleName: testName\"\n \tQUnit.config.filter = urlParams.filter;\n\n \t// Test order randomization\n \tif (urlParams.seed === true) {\n\n \t\t// Generate a random seed if the option is specified without a value\n \t\tQUnit.config.seed = Math.random().toString(36).slice(2);\n \t} else if (urlParams.seed) {\n \t\tQUnit.config.seed = urlParams.seed;\n \t}\n\n \t// Add URL-parameter-mapped config values with UI form rendering data\n \tQUnit.config.urlConfig.push({\n \t\tid: \"hidepassed\",\n \t\tlabel: \"Hide passed tests\",\n \t\ttooltip: \"Only show tests and assertions that fail. Stored as query-strings.\"\n \t}, {\n \t\tid: \"noglobals\",\n \t\tlabel: \"Check for Globals\",\n \t\ttooltip: \"Enabling this will test if any test introduces new properties on the \" + \"global object (`window` in Browsers). Stored as query-strings.\"\n \t}, {\n \t\tid: \"notrycatch\",\n \t\tlabel: \"No try-catch\",\n \t\ttooltip: \"Enabling this will run tests outside of a try-catch block. Makes debugging \" + \"exceptions in IE reasonable. Stored as query-strings.\"\n \t});\n\n \tQUnit.begin(function () {\n \t\tvar i,\n \t\t option,\n \t\t urlConfig = QUnit.config.urlConfig;\n\n \t\tfor (i = 0; i < urlConfig.length; i++) {\n\n \t\t\t// Options can be either strings or objects with nonempty \"id\" properties\n \t\t\toption = QUnit.config.urlConfig[i];\n \t\t\tif (typeof option !== \"string\") {\n \t\t\t\toption = option.id;\n \t\t\t}\n\n \t\t\tif (QUnit.config[option] === undefined) {\n \t\t\t\tQUnit.config[option] = urlParams[option];\n \t\t\t}\n \t\t}\n \t});\n\n \tfunction getUrlParams() {\n \t\tvar i, param, name, value;\n \t\tvar urlParams = Object.create(null);\n \t\tvar params = location.search.slice(1).split(\"&\");\n \t\tvar length = params.length;\n\n \t\tfor (i = 0; i < length; i++) {\n \t\t\tif (params[i]) {\n \t\t\t\tparam = params[i].split(\"=\");\n \t\t\t\tname = decodeQueryParam(param[0]);\n\n \t\t\t\t// Allow just a key to turn on a flag, e.g., test.html?noglobals\n \t\t\t\tvalue = param.length === 1 || decodeQueryParam(param.slice(1).join(\"=\"));\n \t\t\t\tif (name in urlParams) {\n \t\t\t\t\turlParams[name] = [].concat(urlParams[name], value);\n \t\t\t\t} else {\n \t\t\t\t\turlParams[name] = value;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\treturn urlParams;\n \t}\n\n \tfunction decodeQueryParam(param) {\n \t\treturn decodeURIComponent(param.replace(/\\+/g, \"%20\"));\n \t}\n })();\n\n var stats = {\n \tpassedTests: 0,\n \tfailedTests: 0,\n \tskippedTests: 0,\n \ttodoTests: 0\n };\n\n // Escape text for attribute or text content.\n function escapeText(s) {\n \tif (!s) {\n \t\treturn \"\";\n \t}\n \ts = s + \"\";\n\n \t// Both single quotes and double quotes (for attributes)\n \treturn s.replace(/['\"<>&]/g, function (s) {\n \t\tswitch (s) {\n \t\t\tcase \"'\":\n \t\t\t\treturn \"'\";\n \t\t\tcase \"\\\"\":\n \t\t\t\treturn \""\";\n \t\t\tcase \"<\":\n \t\t\t\treturn \"<\";\n \t\t\tcase \">\":\n \t\t\t\treturn \">\";\n \t\t\tcase \"&\":\n \t\t\t\treturn \"&\";\n \t\t}\n \t});\n }\n\n (function () {\n\n \t// Don't load the HTML Reporter on non-browser environments\n \tif (typeof window === \"undefined\" || !window.document) {\n \t\treturn;\n \t}\n\n \tvar config = QUnit.config,\n \t document$$1 = window.document,\n \t collapseNext = false,\n \t hasOwn = Object.prototype.hasOwnProperty,\n \t unfilteredUrl = setUrl({ filter: undefined, module: undefined,\n \t\tmoduleId: undefined, testId: undefined }),\n \t modulesList = [];\n\n \tfunction addEvent(elem, type, fn) {\n \t\telem.addEventListener(type, fn, false);\n \t}\n\n \tfunction removeEvent(elem, type, fn) {\n \t\telem.removeEventListener(type, fn, false);\n \t}\n\n \tfunction addEvents(elems, type, fn) {\n \t\tvar i = elems.length;\n \t\twhile (i--) {\n \t\t\taddEvent(elems[i], type, fn);\n \t\t}\n \t}\n\n \tfunction hasClass(elem, name) {\n \t\treturn (\" \" + elem.className + \" \").indexOf(\" \" + name + \" \") >= 0;\n \t}\n\n \tfunction addClass(elem, name) {\n \t\tif (!hasClass(elem, name)) {\n \t\t\telem.className += (elem.className ? \" \" : \"\") + name;\n \t\t}\n \t}\n\n \tfunction toggleClass(elem, name, force) {\n \t\tif (force || typeof force === \"undefined\" && !hasClass(elem, name)) {\n \t\t\taddClass(elem, name);\n \t\t} else {\n \t\t\tremoveClass(elem, name);\n \t\t}\n \t}\n\n \tfunction removeClass(elem, name) {\n \t\tvar set = \" \" + elem.className + \" \";\n\n \t\t// Class name may appear multiple times\n \t\twhile (set.indexOf(\" \" + name + \" \") >= 0) {\n \t\t\tset = set.replace(\" \" + name + \" \", \" \");\n \t\t}\n\n \t\t// Trim for prettiness\n \t\telem.className = typeof set.trim === \"function\" ? set.trim() : set.replace(/^\\s+|\\s+$/g, \"\");\n \t}\n\n \tfunction id(name) {\n \t\treturn document$$1.getElementById && document$$1.getElementById(name);\n \t}\n\n \tfunction abortTests() {\n \t\tvar abortButton = id(\"qunit-abort-tests-button\");\n \t\tif (abortButton) {\n \t\t\tabortButton.disabled = true;\n \t\t\tabortButton.innerHTML = \"Aborting...\";\n \t\t}\n \t\tQUnit.config.queue.length = 0;\n \t\treturn false;\n \t}\n\n \tfunction interceptNavigation(ev) {\n \t\tapplyUrlParams();\n\n \t\tif (ev && ev.preventDefault) {\n \t\t\tev.preventDefault();\n \t\t}\n\n \t\treturn false;\n \t}\n\n \tfunction getUrlConfigHtml() {\n \t\tvar i,\n \t\t j,\n \t\t val,\n \t\t escaped,\n \t\t escapedTooltip,\n \t\t selection = false,\n \t\t urlConfig = config.urlConfig,\n \t\t urlConfigHtml = \"\";\n\n \t\tfor (i = 0; i < urlConfig.length; i++) {\n\n \t\t\t// Options can be either strings or objects with nonempty \"id\" properties\n \t\t\tval = config.urlConfig[i];\n \t\t\tif (typeof val === \"string\") {\n \t\t\t\tval = {\n \t\t\t\t\tid: val,\n \t\t\t\t\tlabel: val\n \t\t\t\t};\n \t\t\t}\n\n \t\t\tescaped = escapeText(val.id);\n \t\t\tescapedTooltip = escapeText(val.tooltip);\n\n \t\t\tif (!val.value || typeof val.value === \"string\") {\n \t\t\t\turlConfigHtml += \"\";\n \t\t\t} else {\n \t\t\t\turlConfigHtml += \"\";\n \t\t\t}\n \t\t}\n\n \t\treturn urlConfigHtml;\n \t}\n\n \t// Handle \"click\" events on toolbar checkboxes and \"change\" for select menus.\n \t// Updates the URL with the new state of `config.urlConfig` values.\n \tfunction toolbarChanged() {\n \t\tvar updatedUrl,\n \t\t value,\n \t\t tests,\n \t\t field = this,\n \t\t params = {};\n\n \t\t// Detect if field is a select menu or a checkbox\n \t\tif (\"selectedIndex\" in field) {\n \t\t\tvalue = field.options[field.selectedIndex].value || undefined;\n \t\t} else {\n \t\t\tvalue = field.checked ? field.defaultValue || true : undefined;\n \t\t}\n\n \t\tparams[field.name] = value;\n \t\tupdatedUrl = setUrl(params);\n\n \t\t// Check if we can apply the change without a page refresh\n \t\tif (\"hidepassed\" === field.name && \"replaceState\" in window.history) {\n \t\t\tQUnit.urlParams[field.name] = value;\n \t\t\tconfig[field.name] = value || false;\n \t\t\ttests = id(\"qunit-tests\");\n \t\t\tif (tests) {\n \t\t\t\ttoggleClass(tests, \"hidepass\", value || false);\n \t\t\t}\n \t\t\twindow.history.replaceState(null, \"\", updatedUrl);\n \t\t} else {\n \t\t\twindow.location = updatedUrl;\n \t\t}\n \t}\n\n \tfunction setUrl(params) {\n \t\tvar key,\n \t\t arrValue,\n \t\t i,\n \t\t querystring = \"?\",\n \t\t location = window.location;\n\n \t\tparams = QUnit.extend(QUnit.extend({}, QUnit.urlParams), params);\n\n \t\tfor (key in params) {\n\n \t\t\t// Skip inherited or undefined properties\n \t\t\tif (hasOwn.call(params, key) && params[key] !== undefined) {\n\n \t\t\t\t// Output a parameter for each value of this key\n \t\t\t\t// (but usually just one)\n \t\t\t\tarrValue = [].concat(params[key]);\n \t\t\t\tfor (i = 0; i < arrValue.length; i++) {\n \t\t\t\t\tquerystring += encodeURIComponent(key);\n \t\t\t\t\tif (arrValue[i] !== true) {\n \t\t\t\t\t\tquerystring += \"=\" + encodeURIComponent(arrValue[i]);\n \t\t\t\t\t}\n \t\t\t\t\tquerystring += \"&\";\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn location.protocol + \"//\" + location.host + location.pathname + querystring.slice(0, -1);\n \t}\n\n \tfunction applyUrlParams() {\n \t\tvar i,\n \t\t selectedModules = [],\n \t\t modulesList = id(\"qunit-modulefilter-dropdown-list\").getElementsByTagName(\"input\"),\n \t\t filter = id(\"qunit-filter-input\").value;\n\n \t\tfor (i = 0; i < modulesList.length; i++) {\n \t\t\tif (modulesList[i].checked) {\n \t\t\t\tselectedModules.push(modulesList[i].value);\n \t\t\t}\n \t\t}\n\n \t\twindow.location = setUrl({\n \t\t\tfilter: filter === \"\" ? undefined : filter,\n \t\t\tmoduleId: selectedModules.length === 0 ? undefined : selectedModules,\n\n \t\t\t// Remove module and testId filter\n \t\t\tmodule: undefined,\n \t\t\ttestId: undefined\n \t\t});\n \t}\n\n \tfunction toolbarUrlConfigContainer() {\n \t\tvar urlConfigContainer = document$$1.createElement(\"span\");\n\n \t\turlConfigContainer.innerHTML = getUrlConfigHtml();\n \t\taddClass(urlConfigContainer, \"qunit-url-config\");\n\n \t\taddEvents(urlConfigContainer.getElementsByTagName(\"input\"), \"change\", toolbarChanged);\n \t\taddEvents(urlConfigContainer.getElementsByTagName(\"select\"), \"change\", toolbarChanged);\n\n \t\treturn urlConfigContainer;\n \t}\n\n \tfunction abortTestsButton() {\n \t\tvar button = document$$1.createElement(\"button\");\n \t\tbutton.id = \"qunit-abort-tests-button\";\n \t\tbutton.innerHTML = \"Abort\";\n \t\taddEvent(button, \"click\", abortTests);\n \t\treturn button;\n \t}\n\n \tfunction toolbarLooseFilter() {\n \t\tvar filter = document$$1.createElement(\"form\"),\n \t\t label = document$$1.createElement(\"label\"),\n \t\t input = document$$1.createElement(\"input\"),\n \t\t button = document$$1.createElement(\"button\");\n\n \t\taddClass(filter, \"qunit-filter\");\n\n \t\tlabel.innerHTML = \"Filter: \";\n\n \t\tinput.type = \"text\";\n \t\tinput.value = config.filter || \"\";\n \t\tinput.name = \"filter\";\n \t\tinput.id = \"qunit-filter-input\";\n\n \t\tbutton.innerHTML = \"Go\";\n\n \t\tlabel.appendChild(input);\n\n \t\tfilter.appendChild(label);\n \t\tfilter.appendChild(document$$1.createTextNode(\" \"));\n \t\tfilter.appendChild(button);\n \t\taddEvent(filter, \"submit\", interceptNavigation);\n\n \t\treturn filter;\n \t}\n\n \tfunction moduleListHtml() {\n \t\tvar i,\n \t\t checked,\n \t\t html = \"\";\n\n \t\tfor (i = 0; i < config.modules.length; i++) {\n \t\t\tif (config.modules[i].name !== \"\") {\n \t\t\t\tchecked = config.moduleId.indexOf(config.modules[i].moduleId) > -1;\n \t\t\t\thtml += \"
    1. \";\n \t\t\t}\n \t\t}\n\n \t\treturn html;\n \t}\n\n \tfunction toolbarModuleFilter() {\n \t\tvar allCheckbox,\n \t\t commit,\n \t\t reset,\n \t\t moduleFilter = document$$1.createElement(\"form\"),\n \t\t label = document$$1.createElement(\"label\"),\n \t\t moduleSearch = document$$1.createElement(\"input\"),\n \t\t dropDown = document$$1.createElement(\"div\"),\n \t\t actions = document$$1.createElement(\"span\"),\n \t\t dropDownList = document$$1.createElement(\"ul\"),\n \t\t dirty = false;\n\n \t\tmoduleSearch.id = \"qunit-modulefilter-search\";\n \t\taddEvent(moduleSearch, \"input\", searchInput);\n \t\taddEvent(moduleSearch, \"input\", searchFocus);\n \t\taddEvent(moduleSearch, \"focus\", searchFocus);\n \t\taddEvent(moduleSearch, \"click\", searchFocus);\n\n \t\tlabel.id = \"qunit-modulefilter-search-container\";\n \t\tlabel.innerHTML = \"Module: \";\n \t\tlabel.appendChild(moduleSearch);\n\n \t\tactions.id = \"qunit-modulefilter-actions\";\n \t\tactions.innerHTML = \"\" + \"\" + \"\";\n \t\tallCheckbox = actions.lastChild.firstChild;\n \t\tcommit = actions.firstChild;\n \t\treset = commit.nextSibling;\n \t\taddEvent(commit, \"click\", applyUrlParams);\n\n \t\tdropDownList.id = \"qunit-modulefilter-dropdown-list\";\n \t\tdropDownList.innerHTML = moduleListHtml();\n\n \t\tdropDown.id = \"qunit-modulefilter-dropdown\";\n \t\tdropDown.style.display = \"none\";\n \t\tdropDown.appendChild(actions);\n \t\tdropDown.appendChild(dropDownList);\n \t\taddEvent(dropDown, \"change\", selectionChange);\n \t\tselectionChange();\n\n \t\tmoduleFilter.id = \"qunit-modulefilter\";\n \t\tmoduleFilter.appendChild(label);\n \t\tmoduleFilter.appendChild(dropDown);\n \t\taddEvent(moduleFilter, \"submit\", interceptNavigation);\n \t\taddEvent(moduleFilter, \"reset\", function () {\n\n \t\t\t// Let the reset happen, then update styles\n \t\t\twindow.setTimeout(selectionChange);\n \t\t});\n\n \t\t// Enables show/hide for the dropdown\n \t\tfunction searchFocus() {\n \t\t\tif (dropDown.style.display !== \"none\") {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tdropDown.style.display = \"block\";\n \t\t\taddEvent(document$$1, \"click\", hideHandler);\n \t\t\taddEvent(document$$1, \"keydown\", hideHandler);\n\n \t\t\t// Hide on Escape keydown or outside-container click\n \t\t\tfunction hideHandler(e) {\n \t\t\t\tvar inContainer = moduleFilter.contains(e.target);\n\n \t\t\t\tif (e.keyCode === 27 || !inContainer) {\n \t\t\t\t\tif (e.keyCode === 27 && inContainer) {\n \t\t\t\t\t\tmoduleSearch.focus();\n \t\t\t\t\t}\n \t\t\t\t\tdropDown.style.display = \"none\";\n \t\t\t\t\tremoveEvent(document$$1, \"click\", hideHandler);\n \t\t\t\t\tremoveEvent(document$$1, \"keydown\", hideHandler);\n \t\t\t\t\tmoduleSearch.value = \"\";\n \t\t\t\t\tsearchInput();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\t// Processes module search box input\n \t\tfunction searchInput() {\n \t\t\tvar i,\n \t\t\t item,\n \t\t\t searchText = moduleSearch.value.toLowerCase(),\n \t\t\t listItems = dropDownList.children;\n\n \t\t\tfor (i = 0; i < listItems.length; i++) {\n \t\t\t\titem = listItems[i];\n \t\t\t\tif (!searchText || item.textContent.toLowerCase().indexOf(searchText) > -1) {\n \t\t\t\t\titem.style.display = \"\";\n \t\t\t\t} else {\n \t\t\t\t\titem.style.display = \"none\";\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\t// Processes selection changes\n \t\tfunction selectionChange(evt) {\n \t\t\tvar i,\n \t\t\t item,\n \t\t\t checkbox = evt && evt.target || allCheckbox,\n \t\t\t modulesList = dropDownList.getElementsByTagName(\"input\"),\n \t\t\t selectedNames = [];\n\n \t\t\ttoggleClass(checkbox.parentNode, \"checked\", checkbox.checked);\n\n \t\t\tdirty = false;\n \t\t\tif (checkbox.checked && checkbox !== allCheckbox) {\n \t\t\t\tallCheckbox.checked = false;\n \t\t\t\tremoveClass(allCheckbox.parentNode, \"checked\");\n \t\t\t}\n \t\t\tfor (i = 0; i < modulesList.length; i++) {\n \t\t\t\titem = modulesList[i];\n \t\t\t\tif (!evt) {\n \t\t\t\t\ttoggleClass(item.parentNode, \"checked\", item.checked);\n \t\t\t\t} else if (checkbox === allCheckbox && checkbox.checked) {\n \t\t\t\t\titem.checked = false;\n \t\t\t\t\tremoveClass(item.parentNode, \"checked\");\n \t\t\t\t}\n \t\t\t\tdirty = dirty || item.checked !== item.defaultChecked;\n \t\t\t\tif (item.checked) {\n \t\t\t\t\tselectedNames.push(item.parentNode.textContent);\n \t\t\t\t}\n \t\t\t}\n\n \t\t\tcommit.style.display = reset.style.display = dirty ? \"\" : \"none\";\n \t\t\tmoduleSearch.placeholder = selectedNames.join(\", \") || allCheckbox.parentNode.textContent;\n \t\t\tmoduleSearch.title = \"Type to filter list. Current selection:\\n\" + (selectedNames.join(\"\\n\") || allCheckbox.parentNode.textContent);\n \t\t}\n\n \t\treturn moduleFilter;\n \t}\n\n \tfunction appendToolbar() {\n \t\tvar toolbar = id(\"qunit-testrunner-toolbar\");\n\n \t\tif (toolbar) {\n \t\t\ttoolbar.appendChild(toolbarUrlConfigContainer());\n \t\t\ttoolbar.appendChild(toolbarModuleFilter());\n \t\t\ttoolbar.appendChild(toolbarLooseFilter());\n \t\t\ttoolbar.appendChild(document$$1.createElement(\"div\")).className = \"clearfix\";\n \t\t}\n \t}\n\n \tfunction appendHeader() {\n \t\tvar header = id(\"qunit-header\");\n\n \t\tif (header) {\n \t\t\theader.innerHTML = \"\" + header.innerHTML + \" \";\n \t\t}\n \t}\n\n \tfunction appendBanner() {\n \t\tvar banner = id(\"qunit-banner\");\n\n \t\tif (banner) {\n \t\t\tbanner.className = \"\";\n \t\t}\n \t}\n\n \tfunction appendTestResults() {\n \t\tvar tests = id(\"qunit-tests\"),\n \t\t result = id(\"qunit-testresult\"),\n \t\t controls;\n\n \t\tif (result) {\n \t\t\tresult.parentNode.removeChild(result);\n \t\t}\n\n \t\tif (tests) {\n \t\t\ttests.innerHTML = \"\";\n \t\t\tresult = document$$1.createElement(\"p\");\n \t\t\tresult.id = \"qunit-testresult\";\n \t\t\tresult.className = \"result\";\n \t\t\ttests.parentNode.insertBefore(result, tests);\n \t\t\tresult.innerHTML = \"
      Running...
       
      \" + \"
      \" + \"
      \";\n \t\t\tcontrols = id(\"qunit-testresult-controls\");\n \t\t}\n\n \t\tif (controls) {\n \t\t\tcontrols.appendChild(abortTestsButton());\n \t\t}\n \t}\n\n \tfunction appendFilteredTest() {\n \t\tvar testId = QUnit.config.testId;\n \t\tif (!testId || testId.length <= 0) {\n \t\t\treturn \"\";\n \t\t}\n \t\treturn \"
      Rerunning selected tests: \" + escapeText(testId.join(\", \")) + \" Run all tests
      \";\n \t}\n\n \tfunction appendUserAgent() {\n \t\tvar userAgent = id(\"qunit-userAgent\");\n\n \t\tif (userAgent) {\n \t\t\tuserAgent.innerHTML = \"\";\n \t\t\tuserAgent.appendChild(document$$1.createTextNode(\"QUnit \" + QUnit.version + \"; \" + navigator.userAgent));\n \t\t}\n \t}\n\n \tfunction appendInterface() {\n \t\tvar qunit = id(\"qunit\");\n\n \t\tif (qunit) {\n \t\t\tqunit.innerHTML = \"

      \" + escapeText(document$$1.title) + \"

      \" + \"

      \" + \"
      \" + appendFilteredTest() + \"

      \" + \"
        \";\n \t\t}\n\n \t\tappendHeader();\n \t\tappendBanner();\n \t\tappendTestResults();\n \t\tappendUserAgent();\n \t\tappendToolbar();\n \t}\n\n \tfunction appendTestsList(modules) {\n \t\tvar i, l, x, z, test, moduleObj;\n\n \t\tfor (i = 0, l = modules.length; i < l; i++) {\n \t\t\tmoduleObj = modules[i];\n\n \t\t\tfor (x = 0, z = moduleObj.tests.length; x < z; x++) {\n \t\t\t\ttest = moduleObj.tests[x];\n\n \t\t\t\tappendTest(test.name, test.testId, moduleObj.name);\n \t\t\t}\n \t\t}\n \t}\n\n \tfunction appendTest(name, testId, moduleName) {\n \t\tvar title,\n \t\t rerunTrigger,\n \t\t testBlock,\n \t\t assertList,\n \t\t tests = id(\"qunit-tests\");\n\n \t\tif (!tests) {\n \t\t\treturn;\n \t\t}\n\n \t\ttitle = document$$1.createElement(\"strong\");\n \t\ttitle.innerHTML = getNameHtml(name, moduleName);\n\n \t\trerunTrigger = document$$1.createElement(\"a\");\n \t\trerunTrigger.innerHTML = \"Rerun\";\n \t\trerunTrigger.href = setUrl({ testId: testId });\n\n \t\ttestBlock = document$$1.createElement(\"li\");\n \t\ttestBlock.appendChild(title);\n \t\ttestBlock.appendChild(rerunTrigger);\n \t\ttestBlock.id = \"qunit-test-output-\" + testId;\n\n \t\tassertList = document$$1.createElement(\"ol\");\n \t\tassertList.className = \"qunit-assert-list\";\n\n \t\ttestBlock.appendChild(assertList);\n\n \t\ttests.appendChild(testBlock);\n \t}\n\n \t// HTML Reporter initialization and load\n \tQUnit.begin(function (details) {\n \t\tvar i, moduleObj, tests;\n\n \t\t// Sort modules by name for the picker\n \t\tfor (i = 0; i < details.modules.length; i++) {\n \t\t\tmoduleObj = details.modules[i];\n \t\t\tif (moduleObj.name) {\n \t\t\t\tmodulesList.push(moduleObj.name);\n \t\t\t}\n \t\t}\n \t\tmodulesList.sort(function (a, b) {\n \t\t\treturn a.localeCompare(b);\n \t\t});\n\n \t\t// Initialize QUnit elements\n \t\tappendInterface();\n \t\tappendTestsList(details.modules);\n \t\ttests = id(\"qunit-tests\");\n \t\tif (tests && config.hidepassed) {\n \t\t\taddClass(tests, \"hidepass\");\n \t\t}\n \t});\n\n \tQUnit.done(function (details) {\n \t\tvar banner = id(\"qunit-banner\"),\n \t\t tests = id(\"qunit-tests\"),\n \t\t abortButton = id(\"qunit-abort-tests-button\"),\n \t\t totalTests = stats.passedTests + stats.skippedTests + stats.todoTests + stats.failedTests,\n \t\t html = [totalTests, \" tests completed in \", details.runtime, \" milliseconds, with \", stats.failedTests, \" failed, \", stats.skippedTests, \" skipped, and \", stats.todoTests, \" todo.
        \", \"\", details.passed, \" assertions of \", details.total, \" passed, \", details.failed, \" failed.\"].join(\"\"),\n \t\t test,\n \t\t assertLi,\n \t\t assertList;\n\n \t\t// Update remaing tests to aborted\n \t\tif (abortButton && abortButton.disabled) {\n \t\t\thtml = \"Tests aborted after \" + details.runtime + \" milliseconds.\";\n\n \t\t\tfor (var i = 0; i < tests.children.length; i++) {\n \t\t\t\ttest = tests.children[i];\n \t\t\t\tif (test.className === \"\" || test.className === \"running\") {\n \t\t\t\t\ttest.className = \"aborted\";\n \t\t\t\t\tassertList = test.getElementsByTagName(\"ol\")[0];\n \t\t\t\t\tassertLi = document$$1.createElement(\"li\");\n \t\t\t\t\tassertLi.className = \"fail\";\n \t\t\t\t\tassertLi.innerHTML = \"Test aborted.\";\n \t\t\t\t\tassertList.appendChild(assertLi);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\tif (banner && (!abortButton || abortButton.disabled === false)) {\n \t\t\tbanner.className = stats.failedTests ? \"qunit-fail\" : \"qunit-pass\";\n \t\t}\n\n \t\tif (abortButton) {\n \t\t\tabortButton.parentNode.removeChild(abortButton);\n \t\t}\n\n \t\tif (tests) {\n \t\t\tid(\"qunit-testresult-display\").innerHTML = html;\n \t\t}\n\n \t\tif (config.altertitle && document$$1.title) {\n\n \t\t\t// Show ✖ for good, ✔ for bad suite result in title\n \t\t\t// use escape sequences in case file gets loaded with non-utf-8\n \t\t\t// charset\n \t\t\tdocument$$1.title = [stats.failedTests ? \"\\u2716\" : \"\\u2714\", document$$1.title.replace(/^[\\u2714\\u2716] /i, \"\")].join(\" \");\n \t\t}\n\n \t\t// Scroll back to top to show results\n \t\tif (config.scrolltop && window.scrollTo) {\n \t\t\twindow.scrollTo(0, 0);\n \t\t}\n \t});\n\n \tfunction getNameHtml(name, module) {\n \t\tvar nameHtml = \"\";\n\n \t\tif (module) {\n \t\t\tnameHtml = \"\" + escapeText(module) + \": \";\n \t\t}\n\n \t\tnameHtml += \"\" + escapeText(name) + \"\";\n\n \t\treturn nameHtml;\n \t}\n\n \tQUnit.testStart(function (details) {\n \t\tvar running, testBlock, bad;\n\n \t\ttestBlock = id(\"qunit-test-output-\" + details.testId);\n \t\tif (testBlock) {\n \t\t\ttestBlock.className = \"running\";\n \t\t} else {\n\n \t\t\t// Report later registered tests\n \t\t\tappendTest(details.name, details.testId, details.module);\n \t\t}\n\n \t\trunning = id(\"qunit-testresult-display\");\n \t\tif (running) {\n \t\t\tbad = QUnit.config.reorder && details.previousFailure;\n\n \t\t\trunning.innerHTML = [bad ? \"Rerunning previously failed test:
        \" : \"Running:
        \", getNameHtml(details.name, details.module)].join(\"\");\n \t\t}\n \t});\n\n \tfunction stripHtml(string) {\n\n \t\t// Strip tags, html entity and whitespaces\n \t\treturn string.replace(/<\\/?[^>]+(>|$)/g, \"\").replace(/\\"/g, \"\").replace(/\\s+/g, \"\");\n \t}\n\n \tQUnit.log(function (details) {\n \t\tvar assertList,\n \t\t assertLi,\n \t\t message,\n \t\t expected,\n \t\t actual,\n \t\t diff,\n \t\t showDiff = false,\n \t\t testItem = id(\"qunit-test-output-\" + details.testId);\n\n \t\tif (!testItem) {\n \t\t\treturn;\n \t\t}\n\n \t\tmessage = escapeText(details.message) || (details.result ? \"okay\" : \"failed\");\n \t\tmessage = \"\" + message + \"\";\n \t\tmessage += \"@ \" + details.runtime + \" ms\";\n\n \t\t// The pushFailure doesn't provide details.expected\n \t\t// when it calls, it's implicit to also not show expected and diff stuff\n \t\t// Also, we need to check details.expected existence, as it can exist and be undefined\n \t\tif (!details.result && hasOwn.call(details, \"expected\")) {\n \t\t\tif (details.negative) {\n \t\t\t\texpected = \"NOT \" + QUnit.dump.parse(details.expected);\n \t\t\t} else {\n \t\t\t\texpected = QUnit.dump.parse(details.expected);\n \t\t\t}\n\n \t\t\tactual = QUnit.dump.parse(details.actual);\n \t\t\tmessage += \"\";\n\n \t\t\tif (actual !== expected) {\n\n \t\t\t\tmessage += \"\";\n\n \t\t\t\tif (typeof details.actual === \"number\" && typeof details.expected === \"number\") {\n \t\t\t\t\tif (!isNaN(details.actual) && !isNaN(details.expected)) {\n \t\t\t\t\t\tshowDiff = true;\n \t\t\t\t\t\tdiff = details.actual - details.expected;\n \t\t\t\t\t\tdiff = (diff > 0 ? \"+\" : \"\") + diff;\n \t\t\t\t\t}\n \t\t\t\t} else if (typeof details.actual !== \"boolean\" && typeof details.expected !== \"boolean\") {\n \t\t\t\t\tdiff = QUnit.diff(expected, actual);\n\n \t\t\t\t\t// don't show diff if there is zero overlap\n \t\t\t\t\tshowDiff = stripHtml(diff).length !== stripHtml(expected).length + stripHtml(actual).length;\n \t\t\t\t}\n\n \t\t\t\tif (showDiff) {\n \t\t\t\t\tmessage += \"\";\n \t\t\t\t}\n \t\t\t} else if (expected.indexOf(\"[object Array]\") !== -1 || expected.indexOf(\"[object Object]\") !== -1) {\n \t\t\t\tmessage += \"\";\n \t\t\t} else {\n \t\t\t\tmessage += \"\";\n \t\t\t}\n\n \t\t\tif (details.source) {\n \t\t\t\tmessage += \"\";\n \t\t\t}\n\n \t\t\tmessage += \"
        Expected:
        \" + escapeText(expected) + \"
        Result:
        \" + escapeText(actual) + \"
        Diff:
        \" + diff + \"
        Message: \" + \"Diff suppressed as the depth of object is more than current max depth (\" + QUnit.config.maxDepth + \").

        Hint: Use QUnit.dump.maxDepth to \" + \" run with a higher max depth or \" + \"Rerun without max depth.

        Message: \" + \"Diff suppressed as the expected and actual results have an equivalent\" + \" serialization
        Source:
        \" + escapeText(details.source) + \"
        \";\n\n \t\t\t// This occurs when pushFailure is set and we have an extracted stack trace\n \t\t} else if (!details.result && details.source) {\n \t\t\tmessage += \"\" + \"\" + \"
        Source:
        \" + escapeText(details.source) + \"
        \";\n \t\t}\n\n \t\tassertList = testItem.getElementsByTagName(\"ol\")[0];\n\n \t\tassertLi = document$$1.createElement(\"li\");\n \t\tassertLi.className = details.result ? \"pass\" : \"fail\";\n \t\tassertLi.innerHTML = message;\n \t\tassertList.appendChild(assertLi);\n \t});\n\n \tQUnit.testDone(function (details) {\n \t\tvar testTitle,\n \t\t time,\n \t\t testItem,\n \t\t assertList,\n \t\t good,\n \t\t bad,\n \t\t testCounts,\n \t\t skipped,\n \t\t sourceName,\n \t\t tests = id(\"qunit-tests\");\n\n \t\tif (!tests) {\n \t\t\treturn;\n \t\t}\n\n \t\ttestItem = id(\"qunit-test-output-\" + details.testId);\n\n \t\tassertList = testItem.getElementsByTagName(\"ol\")[0];\n\n \t\tgood = details.passed;\n \t\tbad = details.failed;\n\n \t\t// This test passed if it has no unexpected failed assertions\n \t\tvar testPassed = details.failed > 0 ? details.todo : !details.todo;\n\n \t\tif (testPassed) {\n\n \t\t\t// Collapse the passing tests\n \t\t\taddClass(assertList, \"qunit-collapsed\");\n \t\t} else if (config.collapse) {\n \t\t\tif (!collapseNext) {\n\n \t\t\t\t// Skip collapsing the first failing test\n \t\t\t\tcollapseNext = true;\n \t\t\t} else {\n\n \t\t\t\t// Collapse remaining tests\n \t\t\t\taddClass(assertList, \"qunit-collapsed\");\n \t\t\t}\n \t\t}\n\n \t\t// The testItem.firstChild is the test name\n \t\ttestTitle = testItem.firstChild;\n\n \t\ttestCounts = bad ? \"\" + bad + \", \" + \"\" + good + \", \" : \"\";\n\n \t\ttestTitle.innerHTML += \" (\" + testCounts + details.assertions.length + \")\";\n\n \t\tif (details.skipped) {\n \t\t\tstats.skippedTests++;\n\n \t\t\ttestItem.className = \"skipped\";\n \t\t\tskipped = document$$1.createElement(\"em\");\n \t\t\tskipped.className = \"qunit-skipped-label\";\n \t\t\tskipped.innerHTML = \"skipped\";\n \t\t\ttestItem.insertBefore(skipped, testTitle);\n \t\t} else {\n \t\t\taddEvent(testTitle, \"click\", function () {\n \t\t\t\ttoggleClass(assertList, \"qunit-collapsed\");\n \t\t\t});\n\n \t\t\ttestItem.className = testPassed ? \"pass\" : \"fail\";\n\n \t\t\tif (details.todo) {\n \t\t\t\tvar todoLabel = document$$1.createElement(\"em\");\n \t\t\t\ttodoLabel.className = \"qunit-todo-label\";\n \t\t\t\ttodoLabel.innerHTML = \"todo\";\n \t\t\t\ttestItem.className += \" todo\";\n \t\t\t\ttestItem.insertBefore(todoLabel, testTitle);\n \t\t\t}\n\n \t\t\ttime = document$$1.createElement(\"span\");\n \t\t\ttime.className = \"runtime\";\n \t\t\ttime.innerHTML = details.runtime + \" ms\";\n \t\t\ttestItem.insertBefore(time, assertList);\n\n \t\t\tif (!testPassed) {\n \t\t\t\tstats.failedTests++;\n \t\t\t} else if (details.todo) {\n \t\t\t\tstats.todoTests++;\n \t\t\t} else {\n \t\t\t\tstats.passedTests++;\n \t\t\t}\n \t\t}\n\n \t\t// Show the source of the test when showing assertions\n \t\tif (details.source) {\n \t\t\tsourceName = document$$1.createElement(\"p\");\n \t\t\tsourceName.innerHTML = \"Source: \" + details.source;\n \t\t\taddClass(sourceName, \"qunit-source\");\n \t\t\tif (testPassed) {\n \t\t\t\taddClass(sourceName, \"qunit-collapsed\");\n \t\t\t}\n \t\t\taddEvent(testTitle, \"click\", function () {\n \t\t\t\ttoggleClass(sourceName, \"qunit-collapsed\");\n \t\t\t});\n \t\t\ttestItem.appendChild(sourceName);\n \t\t}\n \t});\n\n \t// Avoid readyState issue with phantomjs\n \t// Ref: #818\n \tvar notPhantom = function (p) {\n \t\treturn !(p && p.version && p.version.major > 0);\n \t}(window.phantom);\n\n \tif (notPhantom && document$$1.readyState === \"complete\") {\n \t\tQUnit.load();\n \t} else {\n \t\taddEvent(window, \"load\", QUnit.load);\n \t}\n\n \t// Wrap window.onerror. We will call the original window.onerror to see if\n \t// the existing handler fully handles the error; if not, we will call the\n \t// QUnit.onError function.\n \tvar originalWindowOnError = window.onerror;\n\n \t// Cover uncaught exceptions\n \t// Returning true will suppress the default browser handler,\n \t// returning false will let it run.\n \twindow.onerror = function (message, fileName, lineNumber) {\n \t\tvar ret = false;\n \t\tif (originalWindowOnError) {\n \t\t\tfor (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n \t\t\t\targs[_key - 3] = arguments[_key];\n \t\t\t}\n\n \t\t\tret = originalWindowOnError.call.apply(originalWindowOnError, [this, message, fileName, lineNumber].concat(args));\n \t\t}\n\n \t\t// Treat return value as window.onerror itself does,\n \t\t// Only do our handling if not suppressed.\n \t\tif (ret !== true) {\n \t\t\tvar error = {\n \t\t\t\tmessage: message,\n \t\t\t\tfileName: fileName,\n \t\t\t\tlineNumber: lineNumber\n \t\t\t};\n\n \t\t\tret = QUnit.onError(error);\n \t\t}\n\n \t\treturn ret;\n \t};\n\n \t// Listen for unhandled rejections, and call QUnit.onUnhandledRejection\n \twindow.addEventListener(\"unhandledrejection\", function (event) {\n \t\tQUnit.onUnhandledRejection(event.reason);\n \t});\n })();\n\n /*\n * This file is a modified version of google-diff-match-patch's JavaScript implementation\n * (https://code.google.com/p/google-diff-match-patch/source/browse/trunk/javascript/diff_match_patch_uncompressed.js),\n * modifications are licensed as more fully set forth in LICENSE.txt.\n *\n * The original source of google-diff-match-patch is attributable and licensed as follows:\n *\n * Copyright 2006 Google Inc.\n * https://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * More Info:\n * https://code.google.com/p/google-diff-match-patch/\n *\n * Usage: QUnit.diff(expected, actual)\n *\n */\n QUnit.diff = function () {\n \tfunction DiffMatchPatch() {}\n\n \t// DIFF FUNCTIONS\n\n \t/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\n \tvar DIFF_DELETE = -1,\n \t DIFF_INSERT = 1,\n \t DIFF_EQUAL = 0;\n\n \t/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean=} optChecklines Optional speedup flag. If present and false,\n * then don't run a line-level diff first to identify the changed areas.\n * Defaults to true, which does a faster, slightly less optimal diff.\n * @return {!Array.} Array of diff tuples.\n */\n \tDiffMatchPatch.prototype.DiffMain = function (text1, text2, optChecklines) {\n \t\tvar deadline, checklines, commonlength, commonprefix, commonsuffix, diffs;\n\n \t\t// The diff must be complete in up to 1 second.\n \t\tdeadline = new Date().getTime() + 1000;\n\n \t\t// Check for null inputs.\n \t\tif (text1 === null || text2 === null) {\n \t\t\tthrow new Error(\"Null input. (DiffMain)\");\n \t\t}\n\n \t\t// Check for equality (speedup).\n \t\tif (text1 === text2) {\n \t\t\tif (text1) {\n \t\t\t\treturn [[DIFF_EQUAL, text1]];\n \t\t\t}\n \t\t\treturn [];\n \t\t}\n\n \t\tif (typeof optChecklines === \"undefined\") {\n \t\t\toptChecklines = true;\n \t\t}\n\n \t\tchecklines = optChecklines;\n\n \t\t// Trim off common prefix (speedup).\n \t\tcommonlength = this.diffCommonPrefix(text1, text2);\n \t\tcommonprefix = text1.substring(0, commonlength);\n \t\ttext1 = text1.substring(commonlength);\n \t\ttext2 = text2.substring(commonlength);\n\n \t\t// Trim off common suffix (speedup).\n \t\tcommonlength = this.diffCommonSuffix(text1, text2);\n \t\tcommonsuffix = text1.substring(text1.length - commonlength);\n \t\ttext1 = text1.substring(0, text1.length - commonlength);\n \t\ttext2 = text2.substring(0, text2.length - commonlength);\n\n \t\t// Compute the diff on the middle block.\n \t\tdiffs = this.diffCompute(text1, text2, checklines, deadline);\n\n \t\t// Restore the prefix and suffix.\n \t\tif (commonprefix) {\n \t\t\tdiffs.unshift([DIFF_EQUAL, commonprefix]);\n \t\t}\n \t\tif (commonsuffix) {\n \t\t\tdiffs.push([DIFF_EQUAL, commonsuffix]);\n \t\t}\n \t\tthis.diffCleanupMerge(diffs);\n \t\treturn diffs;\n \t};\n\n \t/**\n * Reduce the number of edits by eliminating operationally trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\n \tDiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) {\n \t\tvar changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel;\n \t\tchanges = false;\n \t\tequalities = []; // Stack of indices where equalities are found.\n \t\tequalitiesLength = 0; // Keeping our own length var is faster in JS.\n \t\t/** @type {?string} */\n \t\tlastequality = null;\n\n \t\t// Always equal to diffs[equalities[equalitiesLength - 1]][1]\n \t\tpointer = 0; // Index of current position.\n\n \t\t// Is there an insertion operation before the last equality.\n \t\tpreIns = false;\n\n \t\t// Is there a deletion operation before the last equality.\n \t\tpreDel = false;\n\n \t\t// Is there an insertion operation after the last equality.\n \t\tpostIns = false;\n\n \t\t// Is there a deletion operation after the last equality.\n \t\tpostDel = false;\n \t\twhile (pointer < diffs.length) {\n\n \t\t\t// Equality found.\n \t\t\tif (diffs[pointer][0] === DIFF_EQUAL) {\n \t\t\t\tif (diffs[pointer][1].length < 4 && (postIns || postDel)) {\n\n \t\t\t\t\t// Candidate found.\n \t\t\t\t\tequalities[equalitiesLength++] = pointer;\n \t\t\t\t\tpreIns = postIns;\n \t\t\t\t\tpreDel = postDel;\n \t\t\t\t\tlastequality = diffs[pointer][1];\n \t\t\t\t} else {\n\n \t\t\t\t\t// Not a candidate, and can never become one.\n \t\t\t\t\tequalitiesLength = 0;\n \t\t\t\t\tlastequality = null;\n \t\t\t\t}\n \t\t\t\tpostIns = postDel = false;\n\n \t\t\t\t// An insertion or deletion.\n \t\t\t} else {\n\n \t\t\t\tif (diffs[pointer][0] === DIFF_DELETE) {\n \t\t\t\t\tpostDel = true;\n \t\t\t\t} else {\n \t\t\t\t\tpostIns = true;\n \t\t\t\t}\n\n \t\t\t\t/*\n * Five types to be split:\n * ABXYCD\n * AXCD\n * ABXC\n * AXCD\n * ABXC\n */\n \t\t\t\tif (lastequality && (preIns && preDel && postIns && postDel || lastequality.length < 2 && preIns + preDel + postIns + postDel === 3)) {\n\n \t\t\t\t\t// Duplicate record.\n \t\t\t\t\tdiffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]);\n\n \t\t\t\t\t// Change second copy to insert.\n \t\t\t\t\tdiffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n \t\t\t\t\tequalitiesLength--; // Throw away the equality we just deleted;\n \t\t\t\t\tlastequality = null;\n \t\t\t\t\tif (preIns && preDel) {\n\n \t\t\t\t\t\t// No changes made which could affect previous entry, keep going.\n \t\t\t\t\t\tpostIns = postDel = true;\n \t\t\t\t\t\tequalitiesLength = 0;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tequalitiesLength--; // Throw away the previous equality.\n \t\t\t\t\t\tpointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n \t\t\t\t\t\tpostIns = postDel = false;\n \t\t\t\t\t}\n \t\t\t\t\tchanges = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tpointer++;\n \t\t}\n\n \t\tif (changes) {\n \t\t\tthis.diffCleanupMerge(diffs);\n \t\t}\n \t};\n\n \t/**\n * Convert a diff array into a pretty HTML report.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {integer} string to be beautified.\n * @return {string} HTML representation.\n */\n \tDiffMatchPatch.prototype.diffPrettyHtml = function (diffs) {\n \t\tvar op,\n \t\t data,\n \t\t x,\n \t\t html = [];\n \t\tfor (x = 0; x < diffs.length; x++) {\n \t\t\top = diffs[x][0]; // Operation (insert, delete, equal)\n \t\t\tdata = diffs[x][1]; // Text of change.\n \t\t\tswitch (op) {\n \t\t\t\tcase DIFF_INSERT:\n \t\t\t\t\thtml[x] = \"\" + escapeText(data) + \"\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase DIFF_DELETE:\n \t\t\t\t\thtml[x] = \"\" + escapeText(data) + \"\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase DIFF_EQUAL:\n \t\t\t\t\thtml[x] = \"\" + escapeText(data) + \"\";\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\treturn html.join(\"\");\n \t};\n\n \t/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\n \tDiffMatchPatch.prototype.diffCommonPrefix = function (text1, text2) {\n \t\tvar pointermid, pointermax, pointermin, pointerstart;\n\n \t\t// Quick check for common null cases.\n \t\tif (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n \t\t\treturn 0;\n \t\t}\n\n \t\t// Binary search.\n \t\t// Performance analysis: https://neil.fraser.name/news/2007/10/09/\n \t\tpointermin = 0;\n \t\tpointermax = Math.min(text1.length, text2.length);\n \t\tpointermid = pointermax;\n \t\tpointerstart = 0;\n \t\twhile (pointermin < pointermid) {\n \t\t\tif (text1.substring(pointerstart, pointermid) === text2.substring(pointerstart, pointermid)) {\n \t\t\t\tpointermin = pointermid;\n \t\t\t\tpointerstart = pointermin;\n \t\t\t} else {\n \t\t\t\tpointermax = pointermid;\n \t\t\t}\n \t\t\tpointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n \t\t}\n \t\treturn pointermid;\n \t};\n\n \t/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\n \tDiffMatchPatch.prototype.diffCommonSuffix = function (text1, text2) {\n \t\tvar pointermid, pointermax, pointermin, pointerend;\n\n \t\t// Quick check for common null cases.\n \t\tif (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) {\n \t\t\treturn 0;\n \t\t}\n\n \t\t// Binary search.\n \t\t// Performance analysis: https://neil.fraser.name/news/2007/10/09/\n \t\tpointermin = 0;\n \t\tpointermax = Math.min(text1.length, text2.length);\n \t\tpointermid = pointermax;\n \t\tpointerend = 0;\n \t\twhile (pointermin < pointermid) {\n \t\t\tif (text1.substring(text1.length - pointermid, text1.length - pointerend) === text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n \t\t\t\tpointermin = pointermid;\n \t\t\t\tpointerend = pointermin;\n \t\t\t} else {\n \t\t\t\tpointermax = pointermid;\n \t\t\t}\n \t\t\tpointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n \t\t}\n \t\treturn pointermid;\n \t};\n\n \t/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean} checklines Speedup flag. If false, then don't run a\n * line-level diff first to identify the changed areas.\n * If true, then run a faster, slightly less optimal diff.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\n \tDiffMatchPatch.prototype.diffCompute = function (text1, text2, checklines, deadline) {\n \t\tvar diffs, longtext, shorttext, i, hm, text1A, text2A, text1B, text2B, midCommon, diffsA, diffsB;\n\n \t\tif (!text1) {\n\n \t\t\t// Just add some text (speedup).\n \t\t\treturn [[DIFF_INSERT, text2]];\n \t\t}\n\n \t\tif (!text2) {\n\n \t\t\t// Just delete some text (speedup).\n \t\t\treturn [[DIFF_DELETE, text1]];\n \t\t}\n\n \t\tlongtext = text1.length > text2.length ? text1 : text2;\n \t\tshorttext = text1.length > text2.length ? text2 : text1;\n \t\ti = longtext.indexOf(shorttext);\n \t\tif (i !== -1) {\n\n \t\t\t// Shorter text is inside the longer text (speedup).\n \t\t\tdiffs = [[DIFF_INSERT, longtext.substring(0, i)], [DIFF_EQUAL, shorttext], [DIFF_INSERT, longtext.substring(i + shorttext.length)]];\n\n \t\t\t// Swap insertions for deletions if diff is reversed.\n \t\t\tif (text1.length > text2.length) {\n \t\t\t\tdiffs[0][0] = diffs[2][0] = DIFF_DELETE;\n \t\t\t}\n \t\t\treturn diffs;\n \t\t}\n\n \t\tif (shorttext.length === 1) {\n\n \t\t\t// Single character string.\n \t\t\t// After the previous speedup, the character can't be an equality.\n \t\t\treturn [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n \t\t}\n\n \t\t// Check to see if the problem can be split in two.\n \t\thm = this.diffHalfMatch(text1, text2);\n \t\tif (hm) {\n\n \t\t\t// A half-match was found, sort out the return data.\n \t\t\ttext1A = hm[0];\n \t\t\ttext1B = hm[1];\n \t\t\ttext2A = hm[2];\n \t\t\ttext2B = hm[3];\n \t\t\tmidCommon = hm[4];\n\n \t\t\t// Send both pairs off for separate processing.\n \t\t\tdiffsA = this.DiffMain(text1A, text2A, checklines, deadline);\n \t\t\tdiffsB = this.DiffMain(text1B, text2B, checklines, deadline);\n\n \t\t\t// Merge the results.\n \t\t\treturn diffsA.concat([[DIFF_EQUAL, midCommon]], diffsB);\n \t\t}\n\n \t\tif (checklines && text1.length > 100 && text2.length > 100) {\n \t\t\treturn this.diffLineMode(text1, text2, deadline);\n \t\t}\n\n \t\treturn this.diffBisect(text1, text2, deadline);\n \t};\n\n \t/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n * @private\n */\n \tDiffMatchPatch.prototype.diffHalfMatch = function (text1, text2) {\n \t\tvar longtext, shorttext, dmp, text1A, text2B, text2A, text1B, midCommon, hm1, hm2, hm;\n\n \t\tlongtext = text1.length > text2.length ? text1 : text2;\n \t\tshorttext = text1.length > text2.length ? text2 : text1;\n \t\tif (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n \t\t\treturn null; // Pointless.\n \t\t}\n \t\tdmp = this; // 'this' becomes 'window' in a closure.\n\n \t\t/**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n \t\tfunction diffHalfMatchI(longtext, shorttext, i) {\n \t\t\tvar seed, j, bestCommon, prefixLength, suffixLength, bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB;\n\n \t\t\t// Start with a 1/4 length substring at position i as a seed.\n \t\t\tseed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n \t\t\tj = -1;\n \t\t\tbestCommon = \"\";\n \t\t\twhile ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n \t\t\t\tprefixLength = dmp.diffCommonPrefix(longtext.substring(i), shorttext.substring(j));\n \t\t\t\tsuffixLength = dmp.diffCommonSuffix(longtext.substring(0, i), shorttext.substring(0, j));\n \t\t\t\tif (bestCommon.length < suffixLength + prefixLength) {\n \t\t\t\t\tbestCommon = shorttext.substring(j - suffixLength, j) + shorttext.substring(j, j + prefixLength);\n \t\t\t\t\tbestLongtextA = longtext.substring(0, i - suffixLength);\n \t\t\t\t\tbestLongtextB = longtext.substring(i + prefixLength);\n \t\t\t\t\tbestShorttextA = shorttext.substring(0, j - suffixLength);\n \t\t\t\t\tbestShorttextB = shorttext.substring(j + prefixLength);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (bestCommon.length * 2 >= longtext.length) {\n \t\t\t\treturn [bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB, bestCommon];\n \t\t\t} else {\n \t\t\t\treturn null;\n \t\t\t}\n \t\t}\n\n \t\t// First check if the second quarter is the seed for a half-match.\n \t\thm1 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 4));\n\n \t\t// Check again based on the third quarter.\n \t\thm2 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 2));\n \t\tif (!hm1 && !hm2) {\n \t\t\treturn null;\n \t\t} else if (!hm2) {\n \t\t\thm = hm1;\n \t\t} else if (!hm1) {\n \t\t\thm = hm2;\n \t\t} else {\n\n \t\t\t// Both matched. Select the longest.\n \t\t\thm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n \t\t}\n\n \t\t// A half-match was found, sort out the return data.\n \t\tif (text1.length > text2.length) {\n \t\t\ttext1A = hm[0];\n \t\t\ttext1B = hm[1];\n \t\t\ttext2A = hm[2];\n \t\t\ttext2B = hm[3];\n \t\t} else {\n \t\t\ttext2A = hm[0];\n \t\t\ttext2B = hm[1];\n \t\t\ttext1A = hm[2];\n \t\t\ttext1B = hm[3];\n \t\t}\n \t\tmidCommon = hm[4];\n \t\treturn [text1A, text1B, text2A, text2B, midCommon];\n \t};\n\n \t/**\n * Do a quick line-level diff on both strings, then rediff the parts for\n * greater accuracy.\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\n \tDiffMatchPatch.prototype.diffLineMode = function (text1, text2, deadline) {\n \t\tvar a, diffs, linearray, pointer, countInsert, countDelete, textInsert, textDelete, j;\n\n \t\t// Scan the text on a line-by-line basis first.\n \t\ta = this.diffLinesToChars(text1, text2);\n \t\ttext1 = a.chars1;\n \t\ttext2 = a.chars2;\n \t\tlinearray = a.lineArray;\n\n \t\tdiffs = this.DiffMain(text1, text2, false, deadline);\n\n \t\t// Convert the diff back to original text.\n \t\tthis.diffCharsToLines(diffs, linearray);\n\n \t\t// Eliminate freak matches (e.g. blank lines)\n \t\tthis.diffCleanupSemantic(diffs);\n\n \t\t// Rediff any replacement blocks, this time character-by-character.\n \t\t// Add a dummy entry at the end.\n \t\tdiffs.push([DIFF_EQUAL, \"\"]);\n \t\tpointer = 0;\n \t\tcountDelete = 0;\n \t\tcountInsert = 0;\n \t\ttextDelete = \"\";\n \t\ttextInsert = \"\";\n \t\twhile (pointer < diffs.length) {\n \t\t\tswitch (diffs[pointer][0]) {\n \t\t\t\tcase DIFF_INSERT:\n \t\t\t\t\tcountInsert++;\n \t\t\t\t\ttextInsert += diffs[pointer][1];\n \t\t\t\t\tbreak;\n \t\t\t\tcase DIFF_DELETE:\n \t\t\t\t\tcountDelete++;\n \t\t\t\t\ttextDelete += diffs[pointer][1];\n \t\t\t\t\tbreak;\n \t\t\t\tcase DIFF_EQUAL:\n\n \t\t\t\t\t// Upon reaching an equality, check for prior redundancies.\n \t\t\t\t\tif (countDelete >= 1 && countInsert >= 1) {\n\n \t\t\t\t\t\t// Delete the offending records and add the merged ones.\n \t\t\t\t\t\tdiffs.splice(pointer - countDelete - countInsert, countDelete + countInsert);\n \t\t\t\t\t\tpointer = pointer - countDelete - countInsert;\n \t\t\t\t\t\ta = this.DiffMain(textDelete, textInsert, false, deadline);\n \t\t\t\t\t\tfor (j = a.length - 1; j >= 0; j--) {\n \t\t\t\t\t\t\tdiffs.splice(pointer, 0, a[j]);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tpointer = pointer + a.length;\n \t\t\t\t\t}\n \t\t\t\t\tcountInsert = 0;\n \t\t\t\t\tcountDelete = 0;\n \t\t\t\t\ttextDelete = \"\";\n \t\t\t\t\ttextInsert = \"\";\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t\tpointer++;\n \t\t}\n \t\tdiffs.pop(); // Remove the dummy entry at the end.\n\n \t\treturn diffs;\n \t};\n\n \t/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\n \tDiffMatchPatch.prototype.diffBisect = function (text1, text2, deadline) {\n \t\tvar text1Length, text2Length, maxD, vOffset, vLength, v1, v2, x, delta, front, k1start, k1end, k2start, k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2;\n\n \t\t// Cache the text lengths to prevent multiple calls.\n \t\ttext1Length = text1.length;\n \t\ttext2Length = text2.length;\n \t\tmaxD = Math.ceil((text1Length + text2Length) / 2);\n \t\tvOffset = maxD;\n \t\tvLength = 2 * maxD;\n \t\tv1 = new Array(vLength);\n \t\tv2 = new Array(vLength);\n\n \t\t// Setting all elements to -1 is faster in Chrome & Firefox than mixing\n \t\t// integers and undefined.\n \t\tfor (x = 0; x < vLength; x++) {\n \t\t\tv1[x] = -1;\n \t\t\tv2[x] = -1;\n \t\t}\n \t\tv1[vOffset + 1] = 0;\n \t\tv2[vOffset + 1] = 0;\n \t\tdelta = text1Length - text2Length;\n\n \t\t// If the total number of characters is odd, then the front path will collide\n \t\t// with the reverse path.\n \t\tfront = delta % 2 !== 0;\n\n \t\t// Offsets for start and end of k loop.\n \t\t// Prevents mapping of space beyond the grid.\n \t\tk1start = 0;\n \t\tk1end = 0;\n \t\tk2start = 0;\n \t\tk2end = 0;\n \t\tfor (d = 0; d < maxD; d++) {\n\n \t\t\t// Bail out if deadline is reached.\n \t\t\tif (new Date().getTime() > deadline) {\n \t\t\t\tbreak;\n \t\t\t}\n\n \t\t\t// Walk the front path one step.\n \t\t\tfor (k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n \t\t\t\tk1Offset = vOffset + k1;\n \t\t\t\tif (k1 === -d || k1 !== d && v1[k1Offset - 1] < v1[k1Offset + 1]) {\n \t\t\t\t\tx1 = v1[k1Offset + 1];\n \t\t\t\t} else {\n \t\t\t\t\tx1 = v1[k1Offset - 1] + 1;\n \t\t\t\t}\n \t\t\t\ty1 = x1 - k1;\n \t\t\t\twhile (x1 < text1Length && y1 < text2Length && text1.charAt(x1) === text2.charAt(y1)) {\n \t\t\t\t\tx1++;\n \t\t\t\t\ty1++;\n \t\t\t\t}\n \t\t\t\tv1[k1Offset] = x1;\n \t\t\t\tif (x1 > text1Length) {\n\n \t\t\t\t\t// Ran off the right of the graph.\n \t\t\t\t\tk1end += 2;\n \t\t\t\t} else if (y1 > text2Length) {\n\n \t\t\t\t\t// Ran off the bottom of the graph.\n \t\t\t\t\tk1start += 2;\n \t\t\t\t} else if (front) {\n \t\t\t\t\tk2Offset = vOffset + delta - k1;\n \t\t\t\t\tif (k2Offset >= 0 && k2Offset < vLength && v2[k2Offset] !== -1) {\n\n \t\t\t\t\t\t// Mirror x2 onto top-left coordinate system.\n \t\t\t\t\t\tx2 = text1Length - v2[k2Offset];\n \t\t\t\t\t\tif (x1 >= x2) {\n\n \t\t\t\t\t\t\t// Overlap detected.\n \t\t\t\t\t\t\treturn this.diffBisectSplit(text1, text2, x1, y1, deadline);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n\n \t\t\t// Walk the reverse path one step.\n \t\t\tfor (k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n \t\t\t\tk2Offset = vOffset + k2;\n \t\t\t\tif (k2 === -d || k2 !== d && v2[k2Offset - 1] < v2[k2Offset + 1]) {\n \t\t\t\t\tx2 = v2[k2Offset + 1];\n \t\t\t\t} else {\n \t\t\t\t\tx2 = v2[k2Offset - 1] + 1;\n \t\t\t\t}\n \t\t\t\ty2 = x2 - k2;\n \t\t\t\twhile (x2 < text1Length && y2 < text2Length && text1.charAt(text1Length - x2 - 1) === text2.charAt(text2Length - y2 - 1)) {\n \t\t\t\t\tx2++;\n \t\t\t\t\ty2++;\n \t\t\t\t}\n \t\t\t\tv2[k2Offset] = x2;\n \t\t\t\tif (x2 > text1Length) {\n\n \t\t\t\t\t// Ran off the left of the graph.\n \t\t\t\t\tk2end += 2;\n \t\t\t\t} else if (y2 > text2Length) {\n\n \t\t\t\t\t// Ran off the top of the graph.\n \t\t\t\t\tk2start += 2;\n \t\t\t\t} else if (!front) {\n \t\t\t\t\tk1Offset = vOffset + delta - k2;\n \t\t\t\t\tif (k1Offset >= 0 && k1Offset < vLength && v1[k1Offset] !== -1) {\n \t\t\t\t\t\tx1 = v1[k1Offset];\n \t\t\t\t\t\ty1 = vOffset + x1 - k1Offset;\n\n \t\t\t\t\t\t// Mirror x2 onto top-left coordinate system.\n \t\t\t\t\t\tx2 = text1Length - x2;\n \t\t\t\t\t\tif (x1 >= x2) {\n\n \t\t\t\t\t\t\t// Overlap detected.\n \t\t\t\t\t\t\treturn this.diffBisectSplit(text1, text2, x1, y1, deadline);\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// Diff took too long and hit the deadline or\n \t\t// number of diffs equals number of characters, no commonality at all.\n \t\treturn [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n \t};\n\n \t/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\n \tDiffMatchPatch.prototype.diffBisectSplit = function (text1, text2, x, y, deadline) {\n \t\tvar text1a, text1b, text2a, text2b, diffs, diffsb;\n \t\ttext1a = text1.substring(0, x);\n \t\ttext2a = text2.substring(0, y);\n \t\ttext1b = text1.substring(x);\n \t\ttext2b = text2.substring(y);\n\n \t\t// Compute both diffs serially.\n \t\tdiffs = this.DiffMain(text1a, text2a, false, deadline);\n \t\tdiffsb = this.DiffMain(text1b, text2b, false, deadline);\n\n \t\treturn diffs.concat(diffsb);\n \t};\n\n \t/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\n \tDiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) {\n \t\tvar changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;\n \t\tchanges = false;\n \t\tequalities = []; // Stack of indices where equalities are found.\n \t\tequalitiesLength = 0; // Keeping our own length var is faster in JS.\n \t\t/** @type {?string} */\n \t\tlastequality = null;\n\n \t\t// Always equal to diffs[equalities[equalitiesLength - 1]][1]\n \t\tpointer = 0; // Index of current position.\n\n \t\t// Number of characters that changed prior to the equality.\n \t\tlengthInsertions1 = 0;\n \t\tlengthDeletions1 = 0;\n\n \t\t// Number of characters that changed after the equality.\n \t\tlengthInsertions2 = 0;\n \t\tlengthDeletions2 = 0;\n \t\twhile (pointer < diffs.length) {\n \t\t\tif (diffs[pointer][0] === DIFF_EQUAL) {\n \t\t\t\t// Equality found.\n \t\t\t\tequalities[equalitiesLength++] = pointer;\n \t\t\t\tlengthInsertions1 = lengthInsertions2;\n \t\t\t\tlengthDeletions1 = lengthDeletions2;\n \t\t\t\tlengthInsertions2 = 0;\n \t\t\t\tlengthDeletions2 = 0;\n \t\t\t\tlastequality = diffs[pointer][1];\n \t\t\t} else {\n \t\t\t\t// An insertion or deletion.\n \t\t\t\tif (diffs[pointer][0] === DIFF_INSERT) {\n \t\t\t\t\tlengthInsertions2 += diffs[pointer][1].length;\n \t\t\t\t} else {\n \t\t\t\t\tlengthDeletions2 += diffs[pointer][1].length;\n \t\t\t\t}\n\n \t\t\t\t// Eliminate an equality that is smaller or equal to the edits on both\n \t\t\t\t// sides of it.\n \t\t\t\tif (lastequality && lastequality.length <= Math.max(lengthInsertions1, lengthDeletions1) && lastequality.length <= Math.max(lengthInsertions2, lengthDeletions2)) {\n\n \t\t\t\t\t// Duplicate record.\n \t\t\t\t\tdiffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]);\n\n \t\t\t\t\t// Change second copy to insert.\n \t\t\t\t\tdiffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n\n \t\t\t\t\t// Throw away the equality we just deleted.\n \t\t\t\t\tequalitiesLength--;\n\n \t\t\t\t\t// Throw away the previous equality (it needs to be reevaluated).\n \t\t\t\t\tequalitiesLength--;\n \t\t\t\t\tpointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n\n \t\t\t\t\t// Reset the counters.\n \t\t\t\t\tlengthInsertions1 = 0;\n \t\t\t\t\tlengthDeletions1 = 0;\n \t\t\t\t\tlengthInsertions2 = 0;\n \t\t\t\t\tlengthDeletions2 = 0;\n \t\t\t\t\tlastequality = null;\n \t\t\t\t\tchanges = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tpointer++;\n \t\t}\n\n \t\t// Normalize the diff.\n \t\tif (changes) {\n \t\t\tthis.diffCleanupMerge(diffs);\n \t\t}\n\n \t\t// Find any overlaps between deletions and insertions.\n \t\t// e.g: abcxxxxxxdef\n \t\t// -> abcxxxdef\n \t\t// e.g: xxxabcdefxxx\n \t\t// -> defxxxabc\n \t\t// Only extract an overlap if it is as big as the edit ahead or behind it.\n \t\tpointer = 1;\n \t\twhile (pointer < diffs.length) {\n \t\t\tif (diffs[pointer - 1][0] === DIFF_DELETE && diffs[pointer][0] === DIFF_INSERT) {\n \t\t\t\tdeletion = diffs[pointer - 1][1];\n \t\t\t\tinsertion = diffs[pointer][1];\n \t\t\t\toverlapLength1 = this.diffCommonOverlap(deletion, insertion);\n \t\t\t\toverlapLength2 = this.diffCommonOverlap(insertion, deletion);\n \t\t\t\tif (overlapLength1 >= overlapLength2) {\n \t\t\t\t\tif (overlapLength1 >= deletion.length / 2 || overlapLength1 >= insertion.length / 2) {\n\n \t\t\t\t\t\t// Overlap found. Insert an equality and trim the surrounding edits.\n \t\t\t\t\t\tdiffs.splice(pointer, 0, [DIFF_EQUAL, insertion.substring(0, overlapLength1)]);\n \t\t\t\t\t\tdiffs[pointer - 1][1] = deletion.substring(0, deletion.length - overlapLength1);\n \t\t\t\t\t\tdiffs[pointer + 1][1] = insertion.substring(overlapLength1);\n \t\t\t\t\t\tpointer++;\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\tif (overlapLength2 >= deletion.length / 2 || overlapLength2 >= insertion.length / 2) {\n\n \t\t\t\t\t\t// Reverse overlap found.\n \t\t\t\t\t\t// Insert an equality and swap and trim the surrounding edits.\n \t\t\t\t\t\tdiffs.splice(pointer, 0, [DIFF_EQUAL, deletion.substring(0, overlapLength2)]);\n\n \t\t\t\t\t\tdiffs[pointer - 1][0] = DIFF_INSERT;\n \t\t\t\t\t\tdiffs[pointer - 1][1] = insertion.substring(0, insertion.length - overlapLength2);\n \t\t\t\t\t\tdiffs[pointer + 1][0] = DIFF_DELETE;\n \t\t\t\t\t\tdiffs[pointer + 1][1] = deletion.substring(overlapLength2);\n \t\t\t\t\t\tpointer++;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tpointer++;\n \t\t\t}\n \t\t\tpointer++;\n \t\t}\n \t};\n\n \t/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\n \tDiffMatchPatch.prototype.diffCommonOverlap = function (text1, text2) {\n \t\tvar text1Length, text2Length, textLength, best, length, pattern, found;\n\n \t\t// Cache the text lengths to prevent multiple calls.\n \t\ttext1Length = text1.length;\n \t\ttext2Length = text2.length;\n\n \t\t// Eliminate the null case.\n \t\tif (text1Length === 0 || text2Length === 0) {\n \t\t\treturn 0;\n \t\t}\n\n \t\t// Truncate the longer string.\n \t\tif (text1Length > text2Length) {\n \t\t\ttext1 = text1.substring(text1Length - text2Length);\n \t\t} else if (text1Length < text2Length) {\n \t\t\ttext2 = text2.substring(0, text1Length);\n \t\t}\n \t\ttextLength = Math.min(text1Length, text2Length);\n\n \t\t// Quick check for the worst case.\n \t\tif (text1 === text2) {\n \t\t\treturn textLength;\n \t\t}\n\n \t\t// Start by looking for a single character match\n \t\t// and increase length until no match is found.\n \t\t// Performance analysis: https://neil.fraser.name/news/2010/11/04/\n \t\tbest = 0;\n \t\tlength = 1;\n \t\twhile (true) {\n \t\t\tpattern = text1.substring(textLength - length);\n \t\t\tfound = text2.indexOf(pattern);\n \t\t\tif (found === -1) {\n \t\t\t\treturn best;\n \t\t\t}\n \t\t\tlength += found;\n \t\t\tif (found === 0 || text1.substring(textLength - length) === text2.substring(0, length)) {\n \t\t\t\tbest = length;\n \t\t\t\tlength++;\n \t\t\t}\n \t\t}\n \t};\n\n \t/**\n * Split two texts into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n * An object containing the encoded text1, the encoded text2 and\n * the array of unique strings.\n * The zeroth element of the array of unique strings is intentionally blank.\n * @private\n */\n \tDiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) {\n \t\tvar lineArray, lineHash, chars1, chars2;\n \t\tlineArray = []; // E.g. lineArray[4] === 'Hello\\n'\n \t\tlineHash = {}; // E.g. lineHash['Hello\\n'] === 4\n\n \t\t// '\\x00' is a valid character, but various debuggers don't like it.\n \t\t// So we'll insert a junk entry to avoid generating a null character.\n \t\tlineArray[0] = \"\";\n\n \t\t/**\n * Split a text into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * Modifies linearray and linehash through being a closure.\n * @param {string} text String to encode.\n * @return {string} Encoded string.\n * @private\n */\n \t\tfunction diffLinesToCharsMunge(text) {\n \t\t\tvar chars, lineStart, lineEnd, lineArrayLength, line;\n \t\t\tchars = \"\";\n\n \t\t\t// Walk the text, pulling out a substring for each line.\n \t\t\t// text.split('\\n') would would temporarily double our memory footprint.\n \t\t\t// Modifying text would create many large strings to garbage collect.\n \t\t\tlineStart = 0;\n \t\t\tlineEnd = -1;\n\n \t\t\t// Keeping our own length variable is faster than looking it up.\n \t\t\tlineArrayLength = lineArray.length;\n \t\t\twhile (lineEnd < text.length - 1) {\n \t\t\t\tlineEnd = text.indexOf(\"\\n\", lineStart);\n \t\t\t\tif (lineEnd === -1) {\n \t\t\t\t\tlineEnd = text.length - 1;\n \t\t\t\t}\n \t\t\t\tline = text.substring(lineStart, lineEnd + 1);\n \t\t\t\tlineStart = lineEnd + 1;\n\n \t\t\t\tvar lineHashExists = lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) : lineHash[line] !== undefined;\n\n \t\t\t\tif (lineHashExists) {\n \t\t\t\t\tchars += String.fromCharCode(lineHash[line]);\n \t\t\t\t} else {\n \t\t\t\t\tchars += String.fromCharCode(lineArrayLength);\n \t\t\t\t\tlineHash[line] = lineArrayLength;\n \t\t\t\t\tlineArray[lineArrayLength++] = line;\n \t\t\t\t}\n \t\t\t}\n \t\t\treturn chars;\n \t\t}\n\n \t\tchars1 = diffLinesToCharsMunge(text1);\n \t\tchars2 = diffLinesToCharsMunge(text2);\n \t\treturn {\n \t\t\tchars1: chars1,\n \t\t\tchars2: chars2,\n \t\t\tlineArray: lineArray\n \t\t};\n \t};\n\n \t/**\n * Rehydrate the text in a diff from a string of line hashes to real lines of\n * text.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {!Array.} lineArray Array of unique strings.\n * @private\n */\n \tDiffMatchPatch.prototype.diffCharsToLines = function (diffs, lineArray) {\n \t\tvar x, chars, text, y;\n \t\tfor (x = 0; x < diffs.length; x++) {\n \t\t\tchars = diffs[x][1];\n \t\t\ttext = [];\n \t\t\tfor (y = 0; y < chars.length; y++) {\n \t\t\t\ttext[y] = lineArray[chars.charCodeAt(y)];\n \t\t\t}\n \t\t\tdiffs[x][1] = text.join(\"\");\n \t\t}\n \t};\n\n \t/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.} diffs Array of diff tuples.\n */\n \tDiffMatchPatch.prototype.diffCleanupMerge = function (diffs) {\n \t\tvar pointer, countDelete, countInsert, textInsert, textDelete, commonlength, changes, diffPointer, position;\n \t\tdiffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n \t\tpointer = 0;\n \t\tcountDelete = 0;\n \t\tcountInsert = 0;\n \t\ttextDelete = \"\";\n \t\ttextInsert = \"\";\n\n \t\twhile (pointer < diffs.length) {\n \t\t\tswitch (diffs[pointer][0]) {\n \t\t\t\tcase DIFF_INSERT:\n \t\t\t\t\tcountInsert++;\n \t\t\t\t\ttextInsert += diffs[pointer][1];\n \t\t\t\t\tpointer++;\n \t\t\t\t\tbreak;\n \t\t\t\tcase DIFF_DELETE:\n \t\t\t\t\tcountDelete++;\n \t\t\t\t\ttextDelete += diffs[pointer][1];\n \t\t\t\t\tpointer++;\n \t\t\t\t\tbreak;\n \t\t\t\tcase DIFF_EQUAL:\n\n \t\t\t\t\t// Upon reaching an equality, check for prior redundancies.\n \t\t\t\t\tif (countDelete + countInsert > 1) {\n \t\t\t\t\t\tif (countDelete !== 0 && countInsert !== 0) {\n\n \t\t\t\t\t\t\t// Factor out any common prefixes.\n \t\t\t\t\t\t\tcommonlength = this.diffCommonPrefix(textInsert, textDelete);\n \t\t\t\t\t\t\tif (commonlength !== 0) {\n \t\t\t\t\t\t\t\tif (pointer - countDelete - countInsert > 0 && diffs[pointer - countDelete - countInsert - 1][0] === DIFF_EQUAL) {\n \t\t\t\t\t\t\t\t\tdiffs[pointer - countDelete - countInsert - 1][1] += textInsert.substring(0, commonlength);\n \t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t\tdiffs.splice(0, 0, [DIFF_EQUAL, textInsert.substring(0, commonlength)]);\n \t\t\t\t\t\t\t\t\tpointer++;\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\ttextInsert = textInsert.substring(commonlength);\n \t\t\t\t\t\t\t\ttextDelete = textDelete.substring(commonlength);\n \t\t\t\t\t\t\t}\n\n \t\t\t\t\t\t\t// Factor out any common suffixies.\n \t\t\t\t\t\t\tcommonlength = this.diffCommonSuffix(textInsert, textDelete);\n \t\t\t\t\t\t\tif (commonlength !== 0) {\n \t\t\t\t\t\t\t\tdiffs[pointer][1] = textInsert.substring(textInsert.length - commonlength) + diffs[pointer][1];\n \t\t\t\t\t\t\t\ttextInsert = textInsert.substring(0, textInsert.length - commonlength);\n \t\t\t\t\t\t\t\ttextDelete = textDelete.substring(0, textDelete.length - commonlength);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n\n \t\t\t\t\t\t// Delete the offending records and add the merged ones.\n \t\t\t\t\t\tif (countDelete === 0) {\n \t\t\t\t\t\t\tdiffs.splice(pointer - countInsert, countDelete + countInsert, [DIFF_INSERT, textInsert]);\n \t\t\t\t\t\t} else if (countInsert === 0) {\n \t\t\t\t\t\t\tdiffs.splice(pointer - countDelete, countDelete + countInsert, [DIFF_DELETE, textDelete]);\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tdiffs.splice(pointer - countDelete - countInsert, countDelete + countInsert, [DIFF_DELETE, textDelete], [DIFF_INSERT, textInsert]);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tpointer = pointer - countDelete - countInsert + (countDelete ? 1 : 0) + (countInsert ? 1 : 0) + 1;\n \t\t\t\t\t} else if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n\n \t\t\t\t\t\t// Merge this equality with the previous one.\n \t\t\t\t\t\tdiffs[pointer - 1][1] += diffs[pointer][1];\n \t\t\t\t\t\tdiffs.splice(pointer, 1);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tpointer++;\n \t\t\t\t\t}\n \t\t\t\t\tcountInsert = 0;\n \t\t\t\t\tcountDelete = 0;\n \t\t\t\t\ttextDelete = \"\";\n \t\t\t\t\ttextInsert = \"\";\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\tif (diffs[diffs.length - 1][1] === \"\") {\n \t\t\tdiffs.pop(); // Remove the dummy entry at the end.\n \t\t}\n\n \t\t// Second pass: look for single edits surrounded on both sides by equalities\n \t\t// which can be shifted sideways to eliminate an equality.\n \t\t// e.g: ABAC -> ABAC\n \t\tchanges = false;\n \t\tpointer = 1;\n\n \t\t// Intentionally ignore the first and last element (don't need checking).\n \t\twhile (pointer < diffs.length - 1) {\n \t\t\tif (diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) {\n\n \t\t\t\tdiffPointer = diffs[pointer][1];\n \t\t\t\tposition = diffPointer.substring(diffPointer.length - diffs[pointer - 1][1].length);\n\n \t\t\t\t// This is a single edit surrounded by equalities.\n \t\t\t\tif (position === diffs[pointer - 1][1]) {\n\n \t\t\t\t\t// Shift the edit over the previous equality.\n \t\t\t\t\tdiffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring(0, diffs[pointer][1].length - diffs[pointer - 1][1].length);\n \t\t\t\t\tdiffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n \t\t\t\t\tdiffs.splice(pointer - 1, 1);\n \t\t\t\t\tchanges = true;\n \t\t\t\t} else if (diffPointer.substring(0, diffs[pointer + 1][1].length) === diffs[pointer + 1][1]) {\n\n \t\t\t\t\t// Shift the edit over the next equality.\n \t\t\t\t\tdiffs[pointer - 1][1] += diffs[pointer + 1][1];\n \t\t\t\t\tdiffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1];\n \t\t\t\t\tdiffs.splice(pointer + 1, 1);\n \t\t\t\t\tchanges = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tpointer++;\n \t\t}\n\n \t\t// If shifts were made, the diff needs reordering and another shift sweep.\n \t\tif (changes) {\n \t\t\tthis.diffCleanupMerge(diffs);\n \t\t}\n \t};\n\n \treturn function (o, n) {\n \t\tvar diff, output, text;\n \t\tdiff = new DiffMatchPatch();\n \t\toutput = diff.DiffMain(o, n);\n \t\tdiff.diffCleanupEfficiency(output);\n \t\ttext = diff.diffPrettyHtml(output);\n\n \t\treturn text;\n \t};\n }();\n\n}((function() { return this; }())));\n","/* globals QUnit */\n\n(function() {\n QUnit.config.autostart = false;\n QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container' });\n QUnit.config.urlConfig.push({ id: 'nolint', label: 'Disable Linting' });\n QUnit.config.urlConfig.push({ id: 'dockcontainer', label: 'Dock container' });\n QUnit.config.urlConfig.push({ id: 'devmode', label: 'Development mode' });\n\n QUnit.config.testTimeout = QUnit.urlParams.devmode ? null : 60000; //Default Test Timeout 60 Seconds\n})();\n","define('@ember/test-helpers/-utils', ['exports'], function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.nextTickPromise = nextTickPromise;\n exports.runDestroyablesFor = runDestroyablesFor;\n const nextTick = exports.nextTick = setTimeout;\n const futureTick = exports.futureTick = setTimeout;\n\n /**\n @private\n @returns {Promise} promise which resolves on the next turn of the event loop\n */\n function nextTickPromise() {\n return new Ember.RSVP.Promise(resolve => {\n nextTick(resolve);\n });\n }\n\n /**\n Retrieves an array of destroyables from the specified property on the object\n provided, iterates that array invoking each function, then deleting the\n property (clearing the array).\n \n @private\n @param {Object} object an object to search for the destroyable array within\n @param {string} property the property on the object that contains the destroyable array\n */\n function runDestroyablesFor(object, property) {\n let destroyables = object[property];\n\n if (!destroyables) {\n return;\n }\n\n for (let i = 0; i < destroyables.length; i++) {\n destroyables[i]();\n }\n\n delete object[property];\n }\n});","define('@ember/test-helpers/application', ['exports', '@ember/test-helpers/resolver'], function (exports, _resolver) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.setApplication = setApplication;\n exports.getApplication = getApplication;\n\n\n var __application__;\n\n /**\n Stores the provided application instance so that tests being ran will be aware of the application under test.\n \n - Required by `setupApplicationContext` method.\n - Used by `setupContext` and `setupRenderingContext` when present.\n \n @public\n @param {Ember.Application} application the application that will be tested\n */\n function setApplication(application) {\n __application__ = application;\n\n if (!(0, _resolver.getResolver)()) {\n let Resolver = application.Resolver;\n let resolver = Resolver.create({ namespace: application });\n\n (0, _resolver.setResolver)(resolver);\n }\n }\n\n /**\n Retrieve the application instance stored by `setApplication`.\n \n @public\n @returns {Ember.Application} the previously stored application instance under test\n */\n function getApplication() {\n return __application__;\n }\n});","define('@ember/test-helpers/build-owner', ['exports', 'ember-test-helpers/legacy-0-6-x/build-registry'], function (exports, _buildRegistry) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = buildOwner;\n\n\n /**\n Creates an \"owner\" (an object that either _is_ or duck-types like an\n `Ember.ApplicationInstance`) from the provided options.\n \n If `options.application` is present (e.g. setup by an earlier call to\n `setApplication`) an `Ember.ApplicationInstance` is built via\n `application.buildInstance()`.\n \n If `options.application` is not present, we fall back to using\n `options.resolver` instead (setup via `setResolver`). This creates a mock\n \"owner\" by using a custom created combination of `Ember.Registry`,\n `Ember.Container`, `Ember._ContainerProxyMixin`, and\n `Ember._RegistryProxyMixin`.\n \n @private\n @param {Ember.Application} [application] the Ember.Application to build an instance from\n @param {Ember.Resolver} [resolver] the resolver to use to back a \"mock owner\"\n @returns {Promise} a promise resolving to the generated \"owner\"\n */\n function buildOwner(application, resolver) {\n if (application) {\n return application.boot().then(app => app.buildInstance().boot());\n }\n\n if (!resolver) {\n throw new Error('You must set up the ember-test-helpers environment with either `setResolver` or `setApplication` before running any tests.');\n }\n\n let { owner } = (0, _buildRegistry.default)(resolver);\n return Ember.RSVP.Promise.resolve(owner);\n }\n});","define('@ember/test-helpers/dom/-get-element', ['exports', '@ember/test-helpers/dom/get-root-element'], function (exports, _getRootElement) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = getElement;\n\n\n /**\n Used internally by the DOM interaction helpers to find one element.\n \n @private\n @param {string|Element} target the element or selector to retrieve\n @returns {Element} the target or selector\n */\n function getElement(target) {\n if (target.nodeType === Node.ELEMENT_NODE || target.nodeType === Node.DOCUMENT_NODE || target instanceof Window) {\n return target;\n } else if (typeof target === 'string') {\n let rootElement = (0, _getRootElement.default)();\n\n return rootElement.querySelector(target);\n } else {\n throw new Error('Must use an element or a selector string');\n }\n }\n});","define('@ember/test-helpers/dom/-get-elements', ['exports', '@ember/test-helpers/dom/get-root-element'], function (exports, _getRootElement) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = getElements;\n\n\n /**\n Used internally by the DOM interaction helpers to find multiple elements.\n \n @private\n @param {string} target the selector to retrieve\n @returns {NodeList} the matched elements\n */\n function getElements(target) {\n if (typeof target === 'string') {\n let rootElement = (0, _getRootElement.default)();\n\n return rootElement.querySelectorAll(target);\n } else {\n throw new Error('Must use a selector string');\n }\n }\n});","define('@ember/test-helpers/dom/-is-focusable', ['exports', '@ember/test-helpers/dom/-is-form-control'], function (exports, _isFormControl) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = isFocusable;\n\n\n const FOCUSABLE_TAGS = ['A'];\n\n /**\n @private\n @param {Element} element the element to check\n @returns {boolean} `true` when the element is focusable, `false` otherwise\n */\n function isFocusable(element) {\n if ((0, _isFormControl.default)(element) || element.isContentEditable || FOCUSABLE_TAGS.indexOf(element.tagName) > -1) {\n return true;\n }\n\n return element.hasAttribute('tabindex');\n }\n});","define('@ember/test-helpers/dom/-is-form-control', ['exports'], function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = isFormControl;\n const FORM_CONTROL_TAGS = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'];\n\n /**\n @private\n @param {Element} element the element to check\n @returns {boolean} `true` when the element is a form control, `false` otherwise\n */\n function isFormControl(element) {\n let { tagName, type } = element;\n\n if (type === 'hidden') {\n return false;\n }\n\n return FORM_CONTROL_TAGS.indexOf(tagName) > -1;\n }\n});","define(\"@ember/test-helpers/dom/-to-array\", [\"exports\"], function (exports) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = toArray;\n /**\n @private\n @param {NodeList} nodelist the nodelist to convert to an array\n @returns {Array} an array\n */\n function toArray(nodelist) {\n let array = new Array(nodelist.length);\n for (let i = 0; i < nodelist.length; i++) {\n array[i] = nodelist[i];\n }\n\n return array;\n }\n});","define('@ember/test-helpers/dom/blur', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/dom/-is-focusable', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.__blur__ = __blur__;\n exports.default = blur;\n\n\n /**\n @private\n @param {Element} element the element to trigger events on\n */\n function __blur__(element) {\n let browserIsNotFocused = document.hasFocus && !document.hasFocus();\n\n // makes `document.activeElement` be `body`.\n // If the browser is focused, it also fires a blur event\n element.blur();\n\n // Chrome/Firefox does not trigger the `blur` event if the window\n // does not have focus. If the document does not have focus then\n // fire `blur` event via native event.\n if (browserIsNotFocused) {\n (0, _fireEvent.default)(element, 'blur', { bubbles: false });\n (0, _fireEvent.default)(element, 'focusout');\n }\n }\n\n /**\n Unfocus the specified target.\n \n Sends a number of events intending to simulate a \"real\" user unfocusing an\n element.\n \n The following events are triggered (in order):\n \n - `blur`\n - `focusout`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle unfocusing a given element.\n \n @public\n @param {string|Element} [target=document.activeElement] the element or selector to unfocus\n @return {Promise} resolves when settled\n */\n function blur(target = document.activeElement) {\n return (0, _utils.nextTickPromise)().then(() => {\n let element = (0, _getElement.default)(target);\n if (!element) {\n throw new Error(`Element not found when calling \\`blur('${target}')\\`.`);\n }\n\n if (!(0, _isFocusable.default)(element)) {\n throw new Error(`${target} is not focusable`);\n }\n\n __blur__(element);\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/dom/click', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/dom/focus', '@ember/test-helpers/settled', '@ember/test-helpers/dom/-is-focusable', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _focus, _settled, _isFocusable, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.__click__ = __click__;\n exports.default = click;\n\n\n /**\n @private\n @param {Element} element the element to click on\n */\n function __click__(element) {\n (0, _fireEvent.default)(element, 'mousedown');\n\n if ((0, _isFocusable.default)(element)) {\n (0, _focus.__focus__)(element);\n }\n\n (0, _fireEvent.default)(element, 'mouseup');\n (0, _fireEvent.default)(element, 'click');\n }\n\n /**\n Clicks on the specified target.\n \n Sends a number of events intending to simulate a \"real\" user clicking on an\n element.\n \n For non-focusable elements the following events are triggered (in order):\n \n - `mousedown`\n - `mouseup`\n - `click`\n \n For focusable (e.g. form control) elements the following events are triggered\n (in order):\n \n - `mousedown`\n - `focus`\n - `focusin`\n - `mouseup`\n - `click`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle clicking a given element.\n \n @public\n @param {string|Element} target the element or selector to click on\n @return {Promise} resolves when settled\n */\n function click(target) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `click`.');\n }\n\n let element = (0, _getElement.default)(target);\n if (!element) {\n throw new Error(`Element not found when calling \\`click('${target}')\\`.`);\n }\n\n __click__(element);\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/dom/fill-in', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/-is-form-control', '@ember/test-helpers/dom/focus', '@ember/test-helpers/settled', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/-utils'], function (exports, _getElement, _isFormControl, _focus, _settled, _fireEvent, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = fillIn;\n\n\n /**\n Fill the provided text into the `value` property (or set `.innerHTML` when\n the target is a content editable element) then trigger `change` and `input`\n events on the specified target.\n \n @public\n @param {string|Element} target the element or selector to enter text into\n @param {string} text the text to fill into the target element\n @return {Promise} resolves when the application is settled\n */\n function fillIn(target, text) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `fillIn`.');\n }\n\n let element = (0, _getElement.default)(target);\n if (!element) {\n throw new Error(`Element not found when calling \\`fillIn('${target}')\\`.`);\n }\n let isControl = (0, _isFormControl.default)(element);\n if (!isControl && !element.isContentEditable) {\n throw new Error('`fillIn` is only usable on form controls or contenteditable elements.');\n }\n\n if (typeof text === 'undefined' || text === null) {\n throw new Error('Must provide `text` when calling `fillIn`.');\n }\n\n (0, _focus.__focus__)(element);\n\n if (isControl) {\n element.value = text;\n } else {\n element.innerHTML = text;\n }\n\n (0, _fireEvent.default)(element, 'input');\n (0, _fireEvent.default)(element, 'change');\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/dom/find-all', ['exports', '@ember/test-helpers/dom/-get-elements', '@ember/test-helpers/dom/-to-array'], function (exports, _getElements, _toArray) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = find;\n\n\n /**\n Find all elements matched by the given selector. Equivalent to calling\n `querySelectorAll()` on the test root element.\n \n @public\n @param {string} selector the selector to search for\n @return {Array} array of matched elements\n */\n function find(selector) {\n if (!selector) {\n throw new Error('Must pass a selector to `findAll`.');\n }\n\n return (0, _toArray.default)((0, _getElements.default)(selector));\n }\n});","define('@ember/test-helpers/dom/find', ['exports', '@ember/test-helpers/dom/-get-element'], function (exports, _getElement) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = find;\n\n\n /**\n Find the first element matched by the given selector. Equivalent to calling\n `querySelector()` on the test root element.\n \n @public\n @param {string} selector the selector to search for\n @return {Element} matched element or null\n */\n function find(selector) {\n if (!selector) {\n throw new Error('Must pass a selector to `find`.');\n }\n\n return (0, _getElement.default)(selector);\n }\n});","define('@ember/test-helpers/dom/fire-event', ['exports'], function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = fireEvent;\n\n\n const DEFAULT_EVENT_OPTIONS = { bubbles: true, cancelable: true };\n const KEYBOARD_EVENT_TYPES = exports.KEYBOARD_EVENT_TYPES = Object.freeze(['keydown', 'keypress', 'keyup']);\n const MOUSE_EVENT_TYPES = ['click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover'];\n const FILE_SELECTION_EVENT_TYPES = ['change'];\n\n /**\n Internal helper used to build and dispatch events throughout the other DOM helpers.\n \n @private\n @param {Element} element the element to dispatch the event to\n @param {string} eventType the type of event\n @param {Object} [options] additional properties to be set on the event\n @returns {Event} the event that was dispatched\n */\n function fireEvent(element, eventType, options = {}) {\n if (!element) {\n throw new Error('Must pass an element to `fireEvent`');\n }\n\n let event;\n if (KEYBOARD_EVENT_TYPES.indexOf(eventType) > -1) {\n event = buildKeyboardEvent(eventType, options);\n } else if (MOUSE_EVENT_TYPES.indexOf(eventType) > -1) {\n let rect;\n if (element instanceof Window) {\n rect = element.document.documentElement.getBoundingClientRect();\n } else if (element.nodeType === Node.DOCUMENT_NODE) {\n rect = element.documentElement.getBoundingClientRect();\n } else if (element.nodeType === Node.ELEMENT_NODE) {\n rect = element.getBoundingClientRect();\n } else {\n return;\n }\n\n let x = rect.left + 1;\n let y = rect.top + 1;\n let simulatedCoordinates = {\n screenX: x + 5, // Those numbers don't really mean anything.\n screenY: y + 95, // They're just to make the screenX/Y be different of clientX/Y..\n clientX: x,\n clientY: y\n };\n\n event = buildMouseEvent(eventType, Ember.merge(simulatedCoordinates, options));\n } else if (FILE_SELECTION_EVENT_TYPES.indexOf(eventType) > -1 && element.files) {\n event = buildFileEvent(eventType, element, options);\n } else {\n event = buildBasicEvent(eventType, options);\n }\n\n element.dispatchEvent(event);\n return event;\n }\n\n // eslint-disable-next-line require-jsdoc\n function buildBasicEvent(type, options = {}) {\n let event = document.createEvent('Events');\n\n let bubbles = options.bubbles !== undefined ? options.bubbles : true;\n let cancelable = options.cancelable !== undefined ? options.cancelable : true;\n\n delete options.bubbles;\n delete options.cancelable;\n\n // bubbles and cancelable are readonly, so they can be\n // set when initializing event\n event.initEvent(type, bubbles, cancelable);\n Ember.merge(event, options);\n return event;\n }\n\n // eslint-disable-next-line require-jsdoc\n function buildMouseEvent(type, options = {}) {\n let event;\n try {\n event = document.createEvent('MouseEvents');\n let eventOpts = Ember.merge(Ember.merge({}, DEFAULT_EVENT_OPTIONS), options);\n event.initMouseEvent(type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget);\n } catch (e) {\n event = buildBasicEvent(type, options);\n }\n return event;\n }\n\n // eslint-disable-next-line require-jsdoc\n function buildKeyboardEvent(type, options = {}) {\n let eventOpts = Ember.merge(Ember.merge({}, DEFAULT_EVENT_OPTIONS), options);\n let event, eventMethodName;\n\n try {\n event = new KeyboardEvent(type, eventOpts);\n\n // Property definitions are required for B/C for keyboard event usage\n // If this properties are not defined, when listening for key events\n // keyCode/which will be 0. Also, keyCode and which now are string\n // and if app compare it with === with integer key definitions,\n // there will be a fail.\n //\n // https://w3c.github.io/uievents/#interface-keyboardevent\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent\n Object.defineProperty(event, 'keyCode', {\n get() {\n return parseInt(this.key);\n }\n });\n\n Object.defineProperty(event, 'which', {\n get() {\n return parseInt(this.key);\n }\n });\n\n return event;\n } catch (e) {\n // left intentionally blank\n }\n\n try {\n event = document.createEvent('KeyboardEvents');\n eventMethodName = 'initKeyboardEvent';\n } catch (e) {\n // left intentionally blank\n }\n\n if (!event) {\n try {\n event = document.createEvent('KeyEvents');\n eventMethodName = 'initKeyEvent';\n } catch (e) {\n // left intentionally blank\n }\n }\n\n if (event) {\n event[eventMethodName](type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode);\n } else {\n event = buildBasicEvent(type, options);\n }\n\n return event;\n }\n\n // eslint-disable-next-line require-jsdoc\n function buildFileEvent(type, element, files = []) {\n let event = buildBasicEvent(type);\n\n if (files.length > 0) {\n Object.defineProperty(files, 'item', {\n value(index) {\n return typeof index === 'number' ? this[index] : null;\n }\n });\n Object.defineProperty(element, 'files', {\n value: files,\n configurable: true\n });\n }\n\n Object.defineProperty(event, 'target', {\n value: element\n });\n\n return event;\n }\n});","define('@ember/test-helpers/dom/focus', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/dom/-is-focusable', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.__focus__ = __focus__;\n exports.default = focus;\n\n\n /**\n @private\n @param {Element} element the element to trigger events on\n */\n function __focus__(element) {\n let browserIsNotFocused = document.hasFocus && !document.hasFocus();\n\n // makes `document.activeElement` be `element`. If the browser is focused, it also fires a focus event\n element.focus();\n\n // Firefox does not trigger the `focusin` event if the window\n // does not have focus. If the document does not have focus then\n // fire `focusin` event as well.\n if (browserIsNotFocused) {\n // if the browser is not focused the previous `el.focus()` didn't fire an event, so we simulate it\n (0, _fireEvent.default)(element, 'focus', {\n bubbles: false\n });\n\n (0, _fireEvent.default)(element, 'focusin');\n }\n }\n\n /**\n Focus the specified target.\n \n Sends a number of events intending to simulate a \"real\" user focusing an\n element.\n \n The following events are triggered (in order):\n \n - `focus`\n - `focusin`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle focusing a given element.\n \n @public\n @param {string|Element} target the element or selector to focus\n @return {Promise} resolves when the application is settled\n */\n function focus(target) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `focus`.');\n }\n\n let element = (0, _getElement.default)(target);\n if (!element) {\n throw new Error(`Element not found when calling \\`focus('${target}')\\`.`);\n }\n\n if (!(0, _isFocusable.default)(element)) {\n throw new Error(`${target} is not focusable`);\n }\n\n __focus__(element);\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/dom/get-root-element', ['exports', '@ember/test-helpers/setup-context'], function (exports, _setupContext) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = getRootElement;\n\n\n /**\n Get the root element of the application under test (usually `#ember-testing`)\n \n @public\n @returns {Element} the root element\n */\n function getRootElement() {\n let context = (0, _setupContext.getContext)();\n let owner = context && context.owner;\n\n if (!owner) {\n throw new Error('Must setup rendering context before attempting to interact with elements.');\n }\n\n let rootElementSelector;\n // When the host app uses `setApplication` (instead of `setResolver`) the owner has\n // a `rootElement` set on it with the element id to be used\n if (owner && owner._emberTestHelpersMockOwner === undefined) {\n rootElementSelector = owner.rootElement;\n } else {\n rootElementSelector = '#ember-testing';\n }\n\n let rootElement = document.querySelector(rootElementSelector);\n\n return rootElement;\n }\n});","define('@ember/test-helpers/dom/tap', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/dom/click', '@ember/test-helpers/settled', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _click, _settled, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = tap;\n\n\n /**\n Taps on the specified target.\n \n Sends a number of events intending to simulate a \"real\" user tapping on an\n element.\n \n For non-focusable elements the following events are triggered (in order):\n \n - `touchstart`\n - `touchend`\n - `mousedown`\n - `mouseup`\n - `click`\n \n For focusable (e.g. form control) elements the following events are triggered\n (in order):\n \n - `touchstart`\n - `touchend`\n - `mousedown`\n - `focus`\n - `focusin`\n - `mouseup`\n - `click`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle tapping on a given element.\n \n @public\n @param {string|Element} target the element or selector to tap on\n @param {Object} options the options to be provided to the touch events\n @return {Promise} resolves when settled\n */\n function tap(target, options = {}) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `tap`.');\n }\n\n let element = (0, _getElement.default)(target);\n if (!element) {\n throw new Error(`Element not found when calling \\`tap('${target}')\\`.`);\n }\n\n let touchstartEv = (0, _fireEvent.default)(element, 'touchstart', options);\n let touchendEv = (0, _fireEvent.default)(element, 'touchend', options);\n\n if (!touchstartEv.defaultPrevented && !touchendEv.defaultPrevented) {\n (0, _click.__click__)(element);\n }\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/dom/trigger-event', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = triggerEvent;\n\n\n /**\n Triggers an event on the specified target.\n \n @public\n @param {string|Element} target the element or selector to trigger the event on\n @param {string} eventType the type of event to trigger\n @param {Object} options additional properties to be set on the event\n @return {Promise} resolves when the application is settled\n */\n function triggerEvent(target, eventType, options) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `triggerEvent`.');\n }\n\n let element = (0, _getElement.default)(target);\n if (!element) {\n throw new Error(`Element not found when calling \\`triggerEvent('${target}', ...)\\`.`);\n }\n\n if (!eventType) {\n throw new Error(`Must provide an \\`eventType\\` to \\`triggerEvent\\``);\n }\n\n (0, _fireEvent.default)(element, eventType, options);\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/dom/trigger-key-event', ['exports', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/fire-event', '@ember/test-helpers/settled', '@ember/test-helpers/-utils'], function (exports, _getElement, _fireEvent, _settled, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = triggerKeyEvent;\n\n\n const DEFAULT_MODIFIERS = Object.freeze({\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false\n });\n\n /**\n Triggers a keyboard event on the specified target.\n \n @public\n @param {string|Element} target the element or selector to trigger the event on\n @param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger\n @param {string} keyCode the keyCode of the event being triggered\n @param {Object} [modifiers] the state of various modifier keys\n @param {boolean} [modifiers.ctrlKey=false] if true the generated event will indicate the control key was pressed during the key event\n @param {boolean} [modifiers.altKey=false] if true the generated event will indicate the alt key was pressed during the key event\n @param {boolean} [modifiers.shiftKey=false] if true the generated event will indicate the shift key was pressed during the key event\n @param {boolean} [modifiers.metaKey=false] if true the generated event will indicate the meta key was pressed during the key event\n @return {Promise} resolves when the application is settled\n */\n function triggerKeyEvent(target, eventType, keyCode, modifiers = DEFAULT_MODIFIERS) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `triggerKeyEvent`.');\n }\n\n let element = (0, _getElement.default)(target);\n if (!element) {\n throw new Error(`Element not found when calling \\`triggerKeyEvent('${target}', ...)\\`.`);\n }\n\n if (!eventType) {\n throw new Error(`Must provide an \\`eventType\\` to \\`triggerKeyEvent\\``);\n }\n\n if (_fireEvent.KEYBOARD_EVENT_TYPES.indexOf(eventType) === -1) {\n let validEventTypes = _fireEvent.KEYBOARD_EVENT_TYPES.join(', ');\n throw new Error(`Must provide an \\`eventType\\` of ${validEventTypes} to \\`triggerKeyEvent\\` but you passed \\`${eventType}\\`.`);\n }\n\n if (!keyCode) {\n throw new Error(`Must provide a \\`keyCode\\` to \\`triggerKeyEvent\\``);\n }\n\n let options = Ember.merge({ keyCode, which: keyCode, key: keyCode }, modifiers);\n\n (0, _fireEvent.default)(element, eventType, options);\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/dom/wait-for', ['exports', '@ember/test-helpers/wait-until', '@ember/test-helpers/dom/-get-element', '@ember/test-helpers/dom/-get-elements', '@ember/test-helpers/dom/-to-array', '@ember/test-helpers/-utils'], function (exports, _waitUntil, _getElement, _getElements, _toArray, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = waitFor;\n\n\n /**\n Used to wait for a particular selector to appear in the DOM. Due to the fact\n that it does not wait for general settledness, this is quite useful for testing\n interim DOM states (e.g. loading states, pending promises, etc).\n \n @param {string} selector the selector to wait for\n @param {Object} [options] the options to be used\n @param {number} [options.timeout=1000] the time to wait (in ms) for a match\n @param {number} [options.count=1] the number of elements that should match the provided selector\n @returns {Element|Array} the element (or array of elements) that were being waited upon\n */\n function waitFor(selector, { timeout = 1000, count = null } = {}) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!selector) {\n throw new Error('Must pass a selector to `waitFor`.');\n }\n\n let callback;\n if (count !== null) {\n callback = () => {\n let elements = (0, _getElements.default)(selector);\n if (elements.length === count) {\n return (0, _toArray.default)(elements);\n }\n };\n } else {\n callback = () => (0, _getElement.default)(selector);\n }\n return (0, _waitUntil.default)(callback, { timeout });\n });\n }\n});","define('@ember/test-helpers/global', ['exports'], function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n exports.default = (() => {\n if (typeof self !== 'undefined') {\n return self;\n } else if (typeof window !== 'undefined') {\n return window;\n } else if (typeof global !== 'undefined') {\n return global;\n } else {\n return Function('return this')();\n }\n })();\n});","define('@ember/test-helpers/has-ember-version', ['exports'], function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = hasEmberVersion;\n\n\n /**\n Checks if the currently running Ember version is greater than or equal to the\n specified major and minor version numbers.\n \n @private\n @param {number} major the major version number to compare\n @param {number} minor the minor version number to compare\n @returns {boolean} true if the Ember version is >= MAJOR.MINOR specified, false otherwise\n */\n function hasEmberVersion(major, minor) {\n var numbers = Ember.VERSION.split('-')[0].split('.');\n var actualMajor = parseInt(numbers[0], 10);\n var actualMinor = parseInt(numbers[1], 10);\n return actualMajor > major || actualMajor === major && actualMinor >= minor;\n }\n});","define('@ember/test-helpers/index', ['exports', '@ember/test-helpers/resolver', '@ember/test-helpers/application', '@ember/test-helpers/setup-context', '@ember/test-helpers/teardown-context', '@ember/test-helpers/setup-rendering-context', '@ember/test-helpers/teardown-rendering-context', '@ember/test-helpers/setup-application-context', '@ember/test-helpers/teardown-application-context', '@ember/test-helpers/settled', '@ember/test-helpers/wait-until', '@ember/test-helpers/validate-error-handler', '@ember/test-helpers/dom/click', '@ember/test-helpers/dom/tap', '@ember/test-helpers/dom/focus', '@ember/test-helpers/dom/blur', '@ember/test-helpers/dom/trigger-event', '@ember/test-helpers/dom/trigger-key-event', '@ember/test-helpers/dom/fill-in', '@ember/test-helpers/dom/wait-for', '@ember/test-helpers/dom/get-root-element', '@ember/test-helpers/dom/find', '@ember/test-helpers/dom/find-all'], function (exports, _resolver, _application, _setupContext, _teardownContext, _setupRenderingContext, _teardownRenderingContext, _setupApplicationContext, _teardownApplicationContext, _settled, _waitUntil, _validateErrorHandler, _click, _tap, _focus, _blur, _triggerEvent, _triggerKeyEvent, _fillIn, _waitFor, _getRootElement, _find, _findAll) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(exports, 'setResolver', {\n enumerable: true,\n get: function () {\n return _resolver.setResolver;\n }\n });\n Object.defineProperty(exports, 'getResolver', {\n enumerable: true,\n get: function () {\n return _resolver.getResolver;\n }\n });\n Object.defineProperty(exports, 'getApplication', {\n enumerable: true,\n get: function () {\n return _application.getApplication;\n }\n });\n Object.defineProperty(exports, 'setApplication', {\n enumerable: true,\n get: function () {\n return _application.setApplication;\n }\n });\n Object.defineProperty(exports, 'setupContext', {\n enumerable: true,\n get: function () {\n return _setupContext.default;\n }\n });\n Object.defineProperty(exports, 'getContext', {\n enumerable: true,\n get: function () {\n return _setupContext.getContext;\n }\n });\n Object.defineProperty(exports, 'setContext', {\n enumerable: true,\n get: function () {\n return _setupContext.setContext;\n }\n });\n Object.defineProperty(exports, 'unsetContext', {\n enumerable: true,\n get: function () {\n return _setupContext.unsetContext;\n }\n });\n Object.defineProperty(exports, 'pauseTest', {\n enumerable: true,\n get: function () {\n return _setupContext.pauseTest;\n }\n });\n Object.defineProperty(exports, 'resumeTest', {\n enumerable: true,\n get: function () {\n return _setupContext.resumeTest;\n }\n });\n Object.defineProperty(exports, 'teardownContext', {\n enumerable: true,\n get: function () {\n return _teardownContext.default;\n }\n });\n Object.defineProperty(exports, 'setupRenderingContext', {\n enumerable: true,\n get: function () {\n return _setupRenderingContext.default;\n }\n });\n Object.defineProperty(exports, 'render', {\n enumerable: true,\n get: function () {\n return _setupRenderingContext.render;\n }\n });\n Object.defineProperty(exports, 'clearRender', {\n enumerable: true,\n get: function () {\n return _setupRenderingContext.clearRender;\n }\n });\n Object.defineProperty(exports, 'teardownRenderingContext', {\n enumerable: true,\n get: function () {\n return _teardownRenderingContext.default;\n }\n });\n Object.defineProperty(exports, 'setupApplicationContext', {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.default;\n }\n });\n Object.defineProperty(exports, 'visit', {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.visit;\n }\n });\n Object.defineProperty(exports, 'currentRouteName', {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.currentRouteName;\n }\n });\n Object.defineProperty(exports, 'currentURL', {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.currentURL;\n }\n });\n Object.defineProperty(exports, 'teardownApplicationContext', {\n enumerable: true,\n get: function () {\n return _teardownApplicationContext.default;\n }\n });\n Object.defineProperty(exports, 'settled', {\n enumerable: true,\n get: function () {\n return _settled.default;\n }\n });\n Object.defineProperty(exports, 'isSettled', {\n enumerable: true,\n get: function () {\n return _settled.isSettled;\n }\n });\n Object.defineProperty(exports, 'getSettledState', {\n enumerable: true,\n get: function () {\n return _settled.getSettledState;\n }\n });\n Object.defineProperty(exports, 'waitUntil', {\n enumerable: true,\n get: function () {\n return _waitUntil.default;\n }\n });\n Object.defineProperty(exports, 'validateErrorHandler', {\n enumerable: true,\n get: function () {\n return _validateErrorHandler.default;\n }\n });\n Object.defineProperty(exports, 'click', {\n enumerable: true,\n get: function () {\n return _click.default;\n }\n });\n Object.defineProperty(exports, 'tap', {\n enumerable: true,\n get: function () {\n return _tap.default;\n }\n });\n Object.defineProperty(exports, 'focus', {\n enumerable: true,\n get: function () {\n return _focus.default;\n }\n });\n Object.defineProperty(exports, 'blur', {\n enumerable: true,\n get: function () {\n return _blur.default;\n }\n });\n Object.defineProperty(exports, 'triggerEvent', {\n enumerable: true,\n get: function () {\n return _triggerEvent.default;\n }\n });\n Object.defineProperty(exports, 'triggerKeyEvent', {\n enumerable: true,\n get: function () {\n return _triggerKeyEvent.default;\n }\n });\n Object.defineProperty(exports, 'fillIn', {\n enumerable: true,\n get: function () {\n return _fillIn.default;\n }\n });\n Object.defineProperty(exports, 'waitFor', {\n enumerable: true,\n get: function () {\n return _waitFor.default;\n }\n });\n Object.defineProperty(exports, 'getRootElement', {\n enumerable: true,\n get: function () {\n return _getRootElement.default;\n }\n });\n Object.defineProperty(exports, 'find', {\n enumerable: true,\n get: function () {\n return _find.default;\n }\n });\n Object.defineProperty(exports, 'findAll', {\n enumerable: true,\n get: function () {\n return _findAll.default;\n }\n });\n});","define(\"@ember/test-helpers/resolver\", [\"exports\"], function (exports) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.setResolver = setResolver;\n exports.getResolver = getResolver;\n var __resolver__;\n\n /**\n Stores the provided resolver instance so that tests being ran can resolve\n objects in the same way as a normal application.\n \n Used by `setupContext` and `setupRenderingContext` as a fallback when `setApplication` was _not_ used.\n \n @public\n @param {Ember.Resolver} resolver the resolver to be used for testing\n */\n function setResolver(resolver) {\n __resolver__ = resolver;\n }\n\n /**\n Retrieve the resolver instance stored by `setResolver`.\n \n @public\n @returns {Ember.Resolver} the previously stored resolver\n */\n function getResolver() {\n return __resolver__;\n }\n});","define('@ember/test-helpers/settled', ['exports', '@ember/test-helpers/-utils', '@ember/test-helpers/wait-until'], function (exports, _utils, _waitUntil) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports._teardownAJAXHooks = _teardownAJAXHooks;\n exports._setupAJAXHooks = _setupAJAXHooks;\n exports.getSettledState = getSettledState;\n exports.isSettled = isSettled;\n exports.default = settled;\n\n\n // Ember internally tracks AJAX requests in the same way that we do here for\n // legacy style \"acceptance\" tests using the `ember-testing.js` asset provided\n // by emberjs/ember.js itself. When `@ember/test-helpers`'s `settled` utility\n // is used in a legacy acceptance test context any pending AJAX requests are\n // not properly considered during the `isSettled` check below.\n //\n // This utilizes a local utility method present in Ember since around 2.8.0 to\n // properly consider pending AJAX requests done within legacy acceptance tests.\n const _internalPendingRequests = (() => {\n if (Ember.__loader.registry['ember-testing/test/pending_requests']) {\n return Ember.__loader.require('ember-testing/test/pending_requests').pendingRequests;\n }\n\n return () => 0;\n })();\n\n let requests;\n\n /**\n @private\n @returns {number} the count of pending requests\n */\n function pendingRequests() {\n let localRequestsPending = requests !== undefined ? requests.length : 0;\n let internalRequestsPending = _internalPendingRequests();\n\n return localRequestsPending + internalRequestsPending;\n }\n\n /**\n @private\n @param {Event} event (unused)\n @param {XMLHTTPRequest} xhr the XHR that has initiated a request\n */\n function incrementAjaxPendingRequests(event, xhr) {\n requests.push(xhr);\n }\n\n /**\n @private\n @param {Event} event (unused)\n @param {XMLHTTPRequest} xhr the XHR that has initiated a request\n */\n function decrementAjaxPendingRequests(event, xhr) {\n // In most Ember versions to date (current version is 2.16) RSVP promises are\n // configured to flush in the actions queue of the Ember run loop, however it\n // is possible that in the future this changes to use \"true\" micro-task\n // queues.\n //\n // The entire point here, is that _whenever_ promises are resolved will be\n // before the next run of the JS event loop. Then in the next event loop this\n // counter will decrement. In the specific case of AJAX, this means that any\n // promises chained off of `$.ajax` will properly have their `.then` called\n // _before_ this is decremented (and testing continues)\n (0, _utils.nextTick)(() => {\n for (let i = 0; i < requests.length; i++) {\n if (xhr === requests[i]) {\n requests.splice(i, 1);\n }\n }\n }, 0);\n }\n\n /**\n Clears listeners that were previously setup for `ajaxSend` and `ajaxComplete`.\n \n @private\n */\n function _teardownAJAXHooks() {\n if (!Ember.$) {\n return;\n }\n\n Ember.$(document).off('ajaxSend', incrementAjaxPendingRequests);\n Ember.$(document).off('ajaxComplete', decrementAjaxPendingRequests);\n }\n\n /**\n Sets up listeners for `ajaxSend` and `ajaxComplete`.\n \n @private\n */\n function _setupAJAXHooks() {\n requests = [];\n\n if (!Ember.$) {\n return;\n }\n\n Ember.$(document).on('ajaxSend', incrementAjaxPendingRequests);\n Ember.$(document).on('ajaxComplete', decrementAjaxPendingRequests);\n }\n\n let _internalCheckWaiters;\n if (Ember.__loader.registry['ember-testing/test/waiters']) {\n _internalCheckWaiters = Ember.__loader.require('ember-testing/test/waiters').checkWaiters;\n }\n\n /**\n @private\n @returns {boolean} true if waiters are still pending\n */\n function checkWaiters() {\n if (_internalCheckWaiters) {\n return _internalCheckWaiters();\n } else if (Ember.Test.waiters) {\n if (Ember.Test.waiters.any(([context, callback]) => !callback.call(context))) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n Check various settledness metrics, and return an object with the following properties:\n \n * `hasRunLoop` - Checks if a run-loop has been started. If it has, this will\n be `true` otherwise it will be `false`.\n * `hasPendingTimers` - Checks if there are scheduled timers in the run-loop.\n These pending timers are primarily registered by `Ember.run.schedule`. If\n there are pending timers, this will be `true`, otherwise `false`.\n * `hasPendingWaiters` - Checks if any registered test waiters are still\n pending (e.g. the waiter returns `true`). If there are pending waiters,\n this will be `true`, otherwise `false`.\n * `hasPendingRequests` - Checks if there are pending AJAX requests (based on\n `ajaxSend` / `ajaxComplete` events triggered by `jQuery.ajax`). If there\n are pending requests, this will be `true`, otherwise `false`.\n * `pendingRequestCount` - The count of pending AJAX requests.\n \n @public\n @returns {Object} object with properties for each of the metrics used to determine settledness\n */\n function getSettledState() {\n let pendingRequestCount = pendingRequests();\n\n return {\n hasPendingTimers: Boolean(Ember.run.hasScheduledTimers()),\n hasRunLoop: Boolean(Ember.run.currentRunLoop),\n hasPendingWaiters: checkWaiters(),\n hasPendingRequests: pendingRequestCount > 0,\n pendingRequestCount\n };\n }\n\n /**\n Checks various settledness metrics (via `getSettledState()`) to determine if things are settled or not.\n \n Settled generally means that there are no pending timers, no pending waiters,\n no pending AJAX requests, and no current run loop. However, new settledness\n metrics may be added and used as they become available.\n \n @public\n @returns {boolean} `true` if settled, `false` otherwise\n */\n function isSettled() {\n let { hasPendingTimers, hasRunLoop, hasPendingRequests, hasPendingWaiters } = getSettledState();\n\n if (hasPendingTimers || hasRunLoop || hasPendingRequests || hasPendingWaiters) {\n return false;\n }\n\n return true;\n }\n\n /**\n Returns a promise that resolves when in a settled state (see `isSettled` for\n a definition of \"settled state\").\n \n @public\n @returns {Promise} resolves when settled\n */\n function settled() {\n return (0, _waitUntil.default)(isSettled, { timeout: Infinity });\n }\n});","define('@ember/test-helpers/setup-application-context', ['exports', '@ember/test-helpers/-utils', '@ember/test-helpers/setup-context', '@ember/test-helpers/has-ember-version', '@ember/test-helpers/settled'], function (exports, _utils, _setupContext, _hasEmberVersion, _settled) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.visit = visit;\n exports.currentRouteName = currentRouteName;\n exports.currentURL = currentURL;\n exports.default = setupApplicationContext;\n\n\n /**\n Navigate the application to the provided URL.\n \n @public\n @returns {Promise} resolves when settled\n */\n function visit() {\n let context = (0, _setupContext.getContext)();\n let { owner } = context;\n\n return (0, _utils.nextTickPromise)().then(() => {\n return owner.visit(...arguments);\n }).then(() => {\n if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) {\n context.element = document.querySelector('#ember-testing > .ember-view');\n } else {\n context.element = document.querySelector('#ember-testing');\n }\n }).then(_settled.default);\n }\n\n /**\n @public\n @returns {string} the currently active route name\n */\n /* globals EmberENV */\n function currentRouteName() {\n let { owner } = (0, _setupContext.getContext)();\n let router = owner.lookup('router:main');\n return Ember.get(router, 'currentRouteName');\n }\n\n const HAS_CURRENT_URL_ON_ROUTER = (0, _hasEmberVersion.default)(2, 13);\n\n /**\n @public\n @returns {string} the applications current url\n */\n function currentURL() {\n let { owner } = (0, _setupContext.getContext)();\n let router = owner.lookup('router:main');\n\n if (HAS_CURRENT_URL_ON_ROUTER) {\n return Ember.get(router, 'currentURL');\n } else {\n return Ember.get(router, 'location').getURL();\n }\n }\n\n /**\n Used by test framework addons to setup the provided context for working with\n an application (e.g. routing).\n \n `setupContext` must have been ran on the provided context prior to calling\n `setupApplicatinContext`.\n \n Sets up the basic framework used by application tests.\n \n @public\n @param {Object} context the context to setup\n @returns {Promise} resolves with the context that was setup\n */\n function setupApplicationContext() {\n return (0, _utils.nextTickPromise)();\n }\n});","define('@ember/test-helpers/setup-context', ['exports', '@ember/test-helpers/build-owner', '@ember/test-helpers/settled', '@ember/test-helpers/global', '@ember/test-helpers/resolver', '@ember/test-helpers/application', '@ember/test-helpers/-utils'], function (exports, _buildOwner, _settled, _global, _resolver, _application, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.CLEANUP = undefined;\n exports.setContext = setContext;\n exports.getContext = getContext;\n exports.unsetContext = unsetContext;\n exports.pauseTest = pauseTest;\n exports.resumeTest = resumeTest;\n\n exports.default = function (context, options = {}) {\n Ember.testing = true;\n setContext(context);\n\n let contextGuid = Ember.guidFor(context);\n CLEANUP[contextGuid] = [];\n\n return (0, _utils.nextTickPromise)().then(() => {\n let application = (0, _application.getApplication)();\n if (application) {\n return application.boot();\n }\n }).then(() => {\n let testElementContainer = document.getElementById('ember-testing-container');\n let fixtureResetValue = testElementContainer.innerHTML;\n\n // push this into the final cleanup bucket, to be ran _after_ the owner\n // is destroyed and settled (e.g. flushed run loops, etc)\n CLEANUP[contextGuid].push(() => {\n testElementContainer.innerHTML = fixtureResetValue;\n });\n\n let { resolver } = options;\n\n // This handles precendence, specifying a specific option of\n // resolver always trumps whatever is auto-detected, then we fallback to\n // the suite-wide registrations\n //\n // At some later time this can be extended to support specifying a custom\n // engine or application...\n if (resolver) {\n return (0, _buildOwner.default)(null, resolver);\n }\n\n return (0, _buildOwner.default)((0, _application.getApplication)(), (0, _resolver.getResolver)());\n }).then(owner => {\n context.owner = owner;\n\n context.set = function (key, value) {\n let ret = Ember.run(function () {\n return Ember.set(context, key, value);\n });\n\n return ret;\n };\n\n context.setProperties = function (hash) {\n let ret = Ember.run(function () {\n return Ember.setProperties(context, hash);\n });\n\n return ret;\n };\n\n context.get = function (key) {\n return Ember.get(context, key);\n };\n\n context.getProperties = function (...args) {\n return Ember.getProperties(context, args);\n };\n\n let resume;\n context.resumeTest = function resumeTest() {\n (true && !(resume) && Ember.assert('Testing has not been paused. There is nothing to resume.', resume));\n\n resume();\n _global.default.resumeTest = resume = undefined;\n };\n\n context.pauseTest = function pauseTest() {\n console.info('Testing paused. Use `resumeTest()` to continue.'); // eslint-disable-line no-console\n\n return new Ember.RSVP.Promise(resolve => {\n resume = resolve;\n _global.default.resumeTest = resumeTest;\n }, 'TestAdapter paused promise');\n };\n\n (0, _settled._setupAJAXHooks)();\n\n return context;\n });\n };\n\n let __test_context__;\n\n /**\n Stores the provided context as the \"global testing context\".\n \n Generally setup automatically by `setupContext`.\n \n @public\n @param {Object} context the context to use\n */\n function setContext(context) {\n __test_context__ = context;\n }\n\n /**\n Retrive the \"global testing context\" as stored by `setContext`.\n \n @public\n @returns {Object} the previously stored testing context\n */\n function getContext() {\n return __test_context__;\n }\n\n /**\n Clear the \"global testing context\".\n \n Generally invoked from `teardownContext`.\n \n @public\n */\n function unsetContext() {\n __test_context__ = undefined;\n }\n\n /**\n * Returns a promise to be used to pauses the current test (due to being\n * returned from the test itself). This is useful for debugging while testing\n * or for test-driving. It allows you to inspect the state of your application\n * at any point.\n *\n * The test framework wrapper (e.g. `ember-qunit` or `ember-mocha`) should\n * ensure that when `pauseTest()` is used, any framework specific test timeouts\n * are disabled.\n *\n * @public\n * @returns {Promise} resolves _only_ when `resumeTest()` is invoked\n * @example Usage via ember-qunit\n *\n * import { setupRenderingTest } from 'ember-qunit';\n * import { render, click, pauseTest } from '@ember/test-helpers';\n *\n *\n * module('awesome-sauce', function(hooks) {\n * setupRenderingTest(hooks);\n *\n * test('does something awesome', async function(assert) {\n * await render(hbs`{{awesome-sauce}}`);\n *\n * // added here to visualize / interact with the DOM prior\n * // to the interaction below\n * await pauseTest();\n *\n * click('.some-selector');\n *\n * assert.equal(this.element.textContent, 'this sauce is awesome!');\n * });\n * });\n */\n function pauseTest() {\n let context = getContext();\n\n if (!context || typeof context.pauseTest !== 'function') {\n throw new Error('Cannot call `pauseTest` without having first called `setupTest` or `setupRenderingTest`.');\n }\n\n return context.pauseTest();\n }\n\n /**\n Resumes a test previously paused by `await pauseTest()`.\n \n @public\n */\n function resumeTest() {\n let context = getContext();\n\n if (!context || typeof context.resumeTest !== 'function') {\n throw new Error('Cannot call `resumeTest` without having first called `setupTest` or `setupRenderingTest`.');\n }\n\n context.resumeTest();\n }\n\n const CLEANUP = exports.CLEANUP = Object.create(null);\n\n /**\n Used by test framework addons to setup the provided context for testing.\n \n Responsible for:\n \n - sets the \"global testing context\" to the provided context (`setContext`)\n - create an owner object and set it on the provided context (e.g. `this.owner`)\n - setup `this.set`, `this.setProperties`, `this.get`, and `this.getProperties` to the provided context\n - setting up AJAX listeners\n - setting up `pauseTest` (also available as `this.pauseTest()`) and `resumeTest` helpers\n \n @public\n @param {Object} context the context to setup\n @param {Object} [options] options used to override defaults\n @param {Resolver} [options.resolver] a resolver to use for customizing normal resolution\n @returns {Promise} resolves with the context that was setup\n */\n});","define('@ember/test-helpers/setup-rendering-context', ['exports', '@ember/test-helpers/global', '@ember/test-helpers/setup-context', '@ember/test-helpers/-utils', '@ember/test-helpers/settled', '@ember/test-helpers/dom/get-root-element'], function (exports, _global, _setupContext, _utils, _settled, _getRootElement) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.RENDERING_CLEANUP = undefined;\n exports.render = render;\n exports.clearRender = clearRender;\n exports.default = setupRenderingContext;\n /* globals EmberENV */\n const RENDERING_CLEANUP = exports.RENDERING_CLEANUP = Object.create(null);\n const OUTLET_TEMPLATE = Ember.HTMLBars.template({\n \"id\": \"gc40spmP\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[1,[18,\\\"outlet\\\"],false]],\\\"hasEval\\\":false}\",\n \"meta\": {}\n });\n const EMPTY_TEMPLATE = Ember.HTMLBars.template({\n \"id\": \"xOcW61lH\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[],\\\"hasEval\\\":false}\",\n \"meta\": {}\n });\n\n /**\n @private\n @param {Ember.ApplicationInstance} owner the current owner instance\n @returns {Template} a template representing {{outlet}}\n */\n function lookupOutletTemplate(owner) {\n let OutletTemplate = owner.lookup('template:-outlet');\n if (!OutletTemplate) {\n owner.register('template:-outlet', OUTLET_TEMPLATE);\n OutletTemplate = owner.lookup('template:-outlet');\n }\n\n return OutletTemplate;\n }\n\n /**\n @private\n @param {string} [selector] the selector to search for relative to element\n @returns {jQuery} a jQuery object representing the selector (or element itself if no selector)\n */\n function jQuerySelector(selector) {\n let { element } = (0, _setupContext.getContext)();\n\n // emulates Ember internal behavor of `this.$` in a component\n // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18\n return selector ? _global.default.jQuery(selector, element) : _global.default.jQuery(element);\n }\n\n let templateId = 0;\n /**\n Renders the provided template and appends it to the DOM.\n \n @public\n @param {CompiledTemplate} template the template to render\n @returns {Promise} resolves when settled\n */\n function render(template) {\n let context = (0, _setupContext.getContext)();\n\n if (!template) {\n throw new Error('you must pass a template to `render()`');\n }\n\n return (0, _utils.nextTickPromise)().then(() => {\n let { owner } = context;\n\n let toplevelView = owner.lookup('-top-level-view:main');\n let OutletTemplate = lookupOutletTemplate(owner);\n templateId += 1;\n let templateFullName = `template:-undertest-${templateId}`;\n owner.register(templateFullName, template);\n\n let outletState = {\n render: {\n owner,\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: undefined,\n ViewClass: undefined,\n template: OutletTemplate\n },\n\n outlets: {\n main: {\n render: {\n owner,\n into: undefined,\n outlet: 'main',\n name: 'index',\n controller: context,\n ViewClass: undefined,\n template: owner.lookup(templateFullName),\n outlets: {}\n },\n outlets: {}\n }\n }\n };\n toplevelView.setOutletState(outletState);\n\n // returning settled here because the actual rendering does not happen until\n // the renderer detects it is dirty (which happens on backburner's end\n // hook), see the following implementation details:\n //\n // * [view:outlet](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/views/outlet.js#L129-L145) manually dirties its own tag upon `setOutletState`\n // * [backburner's custom end hook](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/renderer.js#L145-L159) detects that the current revision of the root is no longer the latest, and triggers a new rendering transaction\n return (0, _settled.default)();\n });\n }\n\n /**\n Clears any templates previously rendered. This is commonly used for\n confirming behavior that is triggered by teardown (e.g.\n `willDestroyElement`).\n \n @public\n @returns {Promise} resolves when settled\n */\n function clearRender() {\n let context = (0, _setupContext.getContext)();\n\n if (!context || typeof context.clearRender !== 'function') {\n throw new Error('Cannot call `clearRender` without having first called `setupRenderingContext`.');\n }\n\n return render(EMPTY_TEMPLATE);\n }\n\n /**\n Used by test framework addons to setup the provided context for rendering.\n \n `setupContext` must have been ran on the provided context\n prior to calling `setupRenderingContext`.\n \n Responsible for:\n \n - Setup the basic framework used for rendering by the\n `render` helper.\n - Ensuring the event dispatcher is properly setup.\n - Setting `this.element` to the root element of the testing\n container (things rendered via `render` will go _into_ this\n element).\n \n @public\n @param {Object} context the context to setup for rendering\n @returns {Promise} resolves with the context that was setup\n */\n function setupRenderingContext(context) {\n let contextGuid = Ember.guidFor(context);\n RENDERING_CLEANUP[contextGuid] = [];\n\n return (0, _utils.nextTickPromise)().then(() => {\n let { owner } = context;\n\n // these methods being placed on the context itself will be deprecated in\n // a future version (no giant rush) to remove some confusion about which\n // is the \"right\" way to things...\n context.render = render;\n context.clearRender = clearRender;\n\n if (_global.default.jQuery) {\n context.$ = jQuerySelector;\n }\n\n // When the host app uses `setApplication` (instead of `setResolver`) the event dispatcher has\n // already been setup via `applicationInstance.boot()` in `./build-owner`. If using\n // `setResolver` (instead of `setApplication`) a \"mock owner\" is created by extending\n // `Ember._ContainerProxyMixin` and `Ember._RegistryProxyMixin` in this scenario we need to\n // manually start the event dispatcher.\n if (owner._emberTestHelpersMockOwner) {\n let dispatcher = owner.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n dispatcher.setup({}, '#ember-testing');\n }\n\n let OutletView = owner.factoryFor ? owner.factoryFor('view:-outlet') : owner._lookupFactory('view:-outlet');\n let toplevelView = OutletView.create();\n\n owner.register('-top-level-view:main', {\n create() {\n return toplevelView;\n }\n });\n\n // initially render a simple empty template\n return render(EMPTY_TEMPLATE).then(() => {\n Ember.run(toplevelView, 'appendTo', (0, _getRootElement.default)());\n\n return (0, _settled.default)();\n });\n }).then(() => {\n // ensure the element is based on the wrapping toplevel view\n // Ember still wraps the main application template with a\n // normal tagged view\n //\n // In older Ember versions (2.4) the element itself is not stable,\n // and therefore we cannot update the `this.element` until after the\n // rendering is completed\n if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) {\n context.element = (0, _getRootElement.default)().querySelector('.ember-view');\n } else {\n context.element = (0, _getRootElement.default)();\n }\n\n return context;\n });\n }\n});","define('@ember/test-helpers/teardown-application-context', ['exports', '@ember/test-helpers/settled'], function (exports, _settled) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n exports.default = function () {\n return (0, _settled.default)();\n };\n});","define('@ember/test-helpers/teardown-context', ['exports', '@ember/test-helpers/settled', '@ember/test-helpers/setup-context', '@ember/test-helpers/-utils'], function (exports, _settled, _setupContext, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = teardownContext;\n\n\n /**\n Used by test framework addons to tear down the provided context after testing is completed.\n \n Responsible for:\n \n - un-setting the \"global testing context\" (`unsetContext`)\n - destroy the contexts owner object\n - remove AJAX listeners\n \n @public\n @param {Object} context the context to setup\n @returns {Promise} resolves when settled\n */\n function teardownContext(context) {\n return (0, _utils.nextTickPromise)().then(() => {\n let { owner } = context;\n\n (0, _settled._teardownAJAXHooks)();\n\n Ember.run(owner, 'destroy');\n Ember.testing = false;\n\n (0, _setupContext.unsetContext)();\n\n return (0, _settled.default)();\n }).finally(() => {\n let contextGuid = Ember.guidFor(context);\n\n (0, _utils.runDestroyablesFor)(_setupContext.CLEANUP, contextGuid);\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/teardown-rendering-context', ['exports', '@ember/test-helpers/setup-rendering-context', '@ember/test-helpers/-utils', '@ember/test-helpers/settled'], function (exports, _setupRenderingContext, _utils, _settled) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = teardownRenderingContext;\n\n\n /**\n Used by test framework addons to tear down the provided context after testing is completed.\n \n Responsible for:\n \n - resetting the `ember-testing-container` to its original state (the value\n when `setupRenderingContext` was called).\n \n @public\n @param {Object} context the context to setup\n @returns {Promise} resolves when settled\n */\n function teardownRenderingContext(context) {\n return (0, _utils.nextTickPromise)().then(() => {\n let contextGuid = Ember.guidFor(context);\n\n (0, _utils.runDestroyablesFor)(_setupRenderingContext.RENDERING_CLEANUP, contextGuid);\n\n return (0, _settled.default)();\n });\n }\n});","define('@ember/test-helpers/validate-error-handler', ['exports'], function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = validateErrorHandler;\n\n const VALID = Object.freeze({ isValid: true, message: null });\n const INVALID = Object.freeze({\n isValid: false,\n message: 'error handler should have re-thrown the provided error'\n });\n\n /**\n * Validate the provided error handler to confirm that it properly re-throws\n * errors when `Ember.testing` is true.\n *\n * This is intended to be used by test framework hosts (or other libraries) to\n * ensure that `Ember.onerror` is properly configured. Without a check like\n * this, `Ember.onerror` could _easily_ swallow all errors and make it _seem_\n * like everything is just fine (and have green tests) when in reality\n * everything is on fire...\n *\n * @public\n * @param {Function} [callback=Ember.onerror] the callback to validate\n * @returns {Object} object with `isValid` and `message`\n *\n * @example Example implementation for `ember-qunit`\n *\n * import { validateErrorHandler } from '@ember/test-helpers';\n *\n * test('Ember.onerror is functioning properly', function(assert) {\n * let result = validateErrorHandler();\n * assert.ok(result.isValid, result.message);\n * });\n */\n function validateErrorHandler(callback = Ember.onerror) {\n if (callback === undefined || callback === null) {\n return VALID;\n }\n\n let error = new Error('Error handler validation error!');\n\n let originalEmberTesting = Ember.testing;\n Ember.testing = true;\n try {\n callback(error);\n } catch (e) {\n if (e === error) {\n return VALID;\n }\n } finally {\n Ember.testing = originalEmberTesting;\n }\n\n return INVALID;\n }\n});","define('@ember/test-helpers/wait-until', ['exports', '@ember/test-helpers/-utils'], function (exports, _utils) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = waitUntil;\n\n\n const TIMEOUTS = [0, 1, 2, 5, 7];\n const MAX_TIMEOUT = 10;\n\n /**\n Wait for the provided callback to return a truthy value.\n \n This does not leverage `settled()`, and as such can be used to manage async\n while _not_ settled (e.g. \"loading\" or \"pending\" states).\n \n @public\n @param {Function} callback the callback to use for testing when waiting should stop\n @param {Object} [options] options used to override defaults\n @param {number} [options.timeout=1000] the maximum amount of time to wait\n @returns {Promise} resolves with the callback value when it returns a truthy value\n */\n function waitUntil(callback, options = {}) {\n let timeout = 'timeout' in options ? options.timeout : 1000;\n\n // creating this error eagerly so it has the proper invocation stack\n let waitUntilTimedOut = new Error('waitUntil timed out');\n\n return new Ember.RSVP.Promise(function (resolve, reject) {\n let time = 0;\n\n // eslint-disable-next-line require-jsdoc\n function scheduleCheck(timeoutsIndex) {\n let interval = TIMEOUTS[timeoutsIndex];\n if (interval === undefined) {\n interval = MAX_TIMEOUT;\n }\n\n (0, _utils.futureTick)(function () {\n time += interval;\n\n let value;\n try {\n value = callback();\n } catch (error) {\n reject(error);\n }\n\n if (value) {\n resolve(value);\n } else if (time < timeout) {\n scheduleCheck(timeoutsIndex + 1);\n } else {\n reject(waitUntilTimedOut);\n }\n }, interval);\n }\n\n scheduleCheck(0);\n });\n }\n});","define('ember-cli-qunit', ['exports', 'ember-qunit'], function (exports, _emberQunit) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(exports, 'TestLoader', {\n enumerable: true,\n get: function () {\n return _emberQunit.TestLoader;\n }\n });\n Object.defineProperty(exports, 'setupTestContainer', {\n enumerable: true,\n get: function () {\n return _emberQunit.setupTestContainer;\n }\n });\n Object.defineProperty(exports, 'loadTests', {\n enumerable: true,\n get: function () {\n return _emberQunit.loadTests;\n }\n });\n Object.defineProperty(exports, 'startTests', {\n enumerable: true,\n get: function () {\n return _emberQunit.startTests;\n }\n });\n Object.defineProperty(exports, 'setupTestAdapter', {\n enumerable: true,\n get: function () {\n return _emberQunit.setupTestAdapter;\n }\n });\n Object.defineProperty(exports, 'start', {\n enumerable: true,\n get: function () {\n return _emberQunit.start;\n }\n });\n});","define('ember-cli-test-loader/test-support/index', ['exports'], function (exports) {\n /* globals requirejs, require */\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.addModuleIncludeMatcher = addModuleIncludeMatcher;\n exports.addModuleExcludeMatcher = addModuleExcludeMatcher;\n let moduleIncludeMatchers = [];\n let moduleExcludeMatchers = [];\n\n function addModuleIncludeMatcher(fn) {\n moduleIncludeMatchers.push(fn);\n }\n\n function addModuleExcludeMatcher(fn) {\n moduleExcludeMatchers.push(fn);\n }\n\n function checkMatchers(matchers, moduleName) {\n return matchers.some(matcher => matcher(moduleName));\n }\n\n class TestLoader {\n static load() {\n new TestLoader().loadModules();\n }\n\n constructor() {\n this._didLogMissingUnsee = false;\n }\n\n shouldLoadModule(moduleName) {\n return moduleName.match(/[-_]test$/);\n }\n\n listModules() {\n return Object.keys(requirejs.entries);\n }\n\n listTestModules() {\n let moduleNames = this.listModules();\n let testModules = [];\n let moduleName;\n\n for (let i = 0; i < moduleNames.length; i++) {\n moduleName = moduleNames[i];\n\n if (checkMatchers(moduleExcludeMatchers, moduleName)) {\n continue;\n }\n\n if (checkMatchers(moduleIncludeMatchers, moduleName) || this.shouldLoadModule(moduleName)) {\n testModules.push(moduleName);\n }\n }\n\n return testModules;\n }\n\n loadModules() {\n let testModules = this.listTestModules();\n let testModule;\n\n for (let i = 0; i < testModules.length; i++) {\n testModule = testModules[i];\n this.require(testModule);\n this.unsee(testModule);\n }\n }\n\n require(moduleName) {\n try {\n require(moduleName);\n } catch (e) {\n this.moduleLoadFailure(moduleName, e);\n }\n }\n\n unsee(moduleName) {\n if (typeof require.unsee === 'function') {\n require.unsee(moduleName);\n } else if (!this._didLogMissingUnsee) {\n this._didLogMissingUnsee = true;\n if (typeof console !== 'undefined') {\n console.warn('unable to require.unsee, please upgrade loader.js to >= v3.3.0');\n }\n }\n }\n\n moduleLoadFailure(moduleName, error) {\n console.error('Error loading: ' + moduleName, error.stack);\n }\n }exports.default = TestLoader;\n ;\n});","define('ember-qunit/adapter', ['exports', 'qunit', '@ember/test-helpers/has-ember-version'], function (exports, _qunit, _hasEmberVersion) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n\n function unhandledRejectionAssertion(current, error) {\n let message, source;\n\n if (typeof error === 'object' && error !== null) {\n message = error.message;\n source = error.stack;\n } else if (typeof error === 'string') {\n message = error;\n source = 'unknown source';\n } else {\n message = 'unhandledRejection occured, but it had no message';\n source = 'unknown source';\n }\n\n current.assert.pushResult({\n result: false,\n actual: false,\n expected: true,\n message: message,\n source: source\n });\n }\n\n let Adapter = Ember.Test.Adapter.extend({\n init() {\n this.doneCallbacks = [];\n },\n\n asyncStart() {\n this.doneCallbacks.push(_qunit.default.config.current ? _qunit.default.config.current.assert.async() : null);\n },\n\n asyncEnd() {\n let done = this.doneCallbacks.pop();\n // This can be null if asyncStart() was called outside of a test\n if (done) {\n done();\n }\n },\n\n // clobber default implementation of `exception` will be added back for Ember\n // < 2.17 just below...\n exception: null\n });\n\n // Ember 2.17 and higher do not require the test adapter to have an `exception`\n // method When `exception` is not present, the unhandled rejection is\n // automatically re-thrown and will therefore hit QUnit's own global error\n // handler (therefore appropriately causing test failure)\n if (!(0, _hasEmberVersion.default)(2, 17)) {\n Adapter = Adapter.extend({\n exception(error) {\n unhandledRejectionAssertion(_qunit.default.config.current, error);\n }\n });\n }\n\n exports.default = Adapter;\n});","define('ember-qunit/index', ['exports', 'ember-qunit/legacy-2-x/module-for', 'ember-qunit/legacy-2-x/module-for-component', 'ember-qunit/legacy-2-x/module-for-model', 'ember-qunit/adapter', 'qunit', 'ember-qunit/test-loader', '@ember/test-helpers'], function (exports, _moduleFor, _moduleForComponent, _moduleForModel, _adapter, _qunit, _testLoader, _testHelpers) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.loadTests = exports.todo = exports.only = exports.skip = exports.test = exports.module = exports.QUnitAdapter = exports.moduleForModel = exports.moduleForComponent = exports.moduleFor = undefined;\n Object.defineProperty(exports, 'moduleFor', {\n enumerable: true,\n get: function () {\n return _moduleFor.default;\n }\n });\n Object.defineProperty(exports, 'moduleForComponent', {\n enumerable: true,\n get: function () {\n return _moduleForComponent.default;\n }\n });\n Object.defineProperty(exports, 'moduleForModel', {\n enumerable: true,\n get: function () {\n return _moduleForModel.default;\n }\n });\n Object.defineProperty(exports, 'QUnitAdapter', {\n enumerable: true,\n get: function () {\n return _adapter.default;\n }\n });\n Object.defineProperty(exports, 'module', {\n enumerable: true,\n get: function () {\n return _qunit.module;\n }\n });\n Object.defineProperty(exports, 'test', {\n enumerable: true,\n get: function () {\n return _qunit.test;\n }\n });\n Object.defineProperty(exports, 'skip', {\n enumerable: true,\n get: function () {\n return _qunit.skip;\n }\n });\n Object.defineProperty(exports, 'only', {\n enumerable: true,\n get: function () {\n return _qunit.only;\n }\n });\n Object.defineProperty(exports, 'todo', {\n enumerable: true,\n get: function () {\n return _qunit.todo;\n }\n });\n Object.defineProperty(exports, 'loadTests', {\n enumerable: true,\n get: function () {\n return _testLoader.loadTests;\n }\n });\n exports.setResolver = setResolver;\n exports.render = render;\n exports.clearRender = clearRender;\n exports.settled = settled;\n exports.pauseTest = pauseTest;\n exports.resumeTest = resumeTest;\n exports.setupTest = setupTest;\n exports.setupRenderingTest = setupRenderingTest;\n exports.setupApplicationTest = setupApplicationTest;\n exports.setupTestContainer = setupTestContainer;\n exports.startTests = startTests;\n exports.setupTestAdapter = setupTestAdapter;\n exports.setupEmberTesting = setupEmberTesting;\n exports.setupEmberOnerrorValidation = setupEmberOnerrorValidation;\n exports.start = start;\n function setResolver() {\n (true && !(false) && Ember.deprecate('`setResolver` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, {\n id: 'ember-qunit.deprecated-reexports.setResolver',\n until: '4.0.0'\n }));\n\n\n return (0, _testHelpers.setResolver)(...arguments);\n }\n\n function render() {\n (true && !(false) && Ember.deprecate('`render` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, {\n id: 'ember-qunit.deprecated-reexports.render',\n until: '4.0.0'\n }));\n\n\n return (0, _testHelpers.render)(...arguments);\n }\n\n function clearRender() {\n (true && !(false) && Ember.deprecate('`clearRender` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, {\n id: 'ember-qunit.deprecated-reexports.clearRender',\n until: '4.0.0'\n }));\n\n\n return (0, _testHelpers.clearRender)(...arguments);\n }\n\n function settled() {\n (true && !(false) && Ember.deprecate('`settled` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, {\n id: 'ember-qunit.deprecated-reexports.settled',\n until: '4.0.0'\n }));\n\n\n return (0, _testHelpers.settled)(...arguments);\n }\n\n function pauseTest() {\n (true && !(false) && Ember.deprecate('`pauseTest` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, {\n id: 'ember-qunit.deprecated-reexports.pauseTest',\n until: '4.0.0'\n }));\n\n\n return (0, _testHelpers.pauseTest)(...arguments);\n }\n\n function resumeTest() {\n (true && !(false) && Ember.deprecate('`resumeTest` should be imported from `@ember/test-helpers`, but was imported from `ember-qunit`', false, {\n id: 'ember-qunit.deprecated-reexports.resumeTest',\n until: '4.0.0'\n }));\n\n\n return (0, _testHelpers.resumeTest)(...arguments);\n }\n\n function setupTest(hooks, options) {\n hooks.beforeEach(function (assert) {\n return (0, _testHelpers.setupContext)(this, options).then(() => {\n let originalPauseTest = this.pauseTest;\n this.pauseTest = function QUnit_pauseTest() {\n assert.timeout(-1); // prevent the test from timing out\n\n return originalPauseTest.call(this);\n };\n });\n });\n\n hooks.afterEach(function () {\n return (0, _testHelpers.teardownContext)(this);\n });\n }\n\n function setupRenderingTest(hooks, options) {\n setupTest(hooks, options);\n\n hooks.beforeEach(function () {\n return (0, _testHelpers.setupRenderingContext)(this);\n });\n\n hooks.afterEach(function () {\n return (0, _testHelpers.teardownRenderingContext)(this);\n });\n }\n\n function setupApplicationTest(hooks, options) {\n setupTest(hooks, options);\n\n hooks.beforeEach(function () {\n return (0, _testHelpers.setupApplicationContext)(this);\n });\n\n hooks.afterEach(function () {\n return (0, _testHelpers.teardownApplicationContext)(this);\n });\n }\n\n /**\n Uses current URL configuration to setup the test container.\n \n * If `?nocontainer` is set, the test container will be hidden.\n * If `?dockcontainer` or `?devmode` are set the test container will be\n absolutely positioned.\n * If `?devmode` is set, the test container will be made full screen.\n \n @method setupTestContainer\n */\n function setupTestContainer() {\n let testContainer = document.getElementById('ember-testing-container');\n if (!testContainer) {\n return;\n }\n\n let params = _qunit.default.urlParams;\n\n let containerVisibility = params.nocontainer ? 'hidden' : 'visible';\n let containerPosition = params.dockcontainer || params.devmode ? 'fixed' : 'relative';\n\n if (params.devmode) {\n testContainer.className = ' full-screen';\n }\n\n testContainer.style.visibility = containerVisibility;\n testContainer.style.position = containerPosition;\n\n let qunitContainer = document.getElementById('qunit');\n if (params.dockcontainer) {\n qunitContainer.style.marginBottom = window.getComputedStyle(testContainer).height;\n }\n }\n\n /**\n Instruct QUnit to start the tests.\n @method startTests\n */\n function startTests() {\n _qunit.default.start();\n }\n\n /**\n Sets up the `Ember.Test` adapter for usage with QUnit 2.x.\n \n @method setupTestAdapter\n */\n function setupTestAdapter() {\n Ember.Test.adapter = _adapter.default.create();\n }\n\n /**\n Ensures that `Ember.testing` is set to `true` before each test begins\n (including `before` / `beforeEach`), and reset to `false` after each test is\n completed. This is done via `QUnit.testStart` and `QUnit.testDone`.\n \n */\n function setupEmberTesting() {\n _qunit.default.testStart(() => {\n Ember.testing = true;\n });\n\n _qunit.default.testDone(() => {\n Ember.testing = false;\n });\n }\n\n /**\n Ensures that `Ember.onerror` (if present) is properly configured to re-throw\n errors that occur while `Ember.testing` is `true`.\n */\n function setupEmberOnerrorValidation() {\n _qunit.default.module('ember-qunit: Ember.onerror validation', function () {\n _qunit.default.test('Ember.onerror is functioning properly', function (assert) {\n assert.expect(1);\n let result = (0, _testHelpers.validateErrorHandler)();\n assert.ok(result.isValid, `Ember.onerror handler with invalid testing behavior detected. An Ember.onerror handler _must_ rethrow exceptions when \\`Ember.testing\\` is \\`true\\` or the test suite is unreliable. See https://git.io/vbine for more details.`);\n });\n });\n }\n\n /**\n @method start\n @param {Object} [options] Options to be used for enabling/disabling behaviors\n @param {Boolean} [options.loadTests] If `false` tests will not be loaded automatically.\n @param {Boolean} [options.setupTestContainer] If `false` the test container will not\n be setup based on `devmode`, `dockcontainer`, or `nocontainer` URL params.\n @param {Boolean} [options.startTests] If `false` tests will not be automatically started\n (you must run `QUnit.start()` to kick them off).\n @param {Boolean} [options.setupTestAdapter] If `false` the default Ember.Test adapter will\n not be updated.\n @param {Boolean} [options.setupEmberTesting] `false` opts out of the\n default behavior of setting `Ember.testing` to `true` before all tests and\n back to `false` after each test will.\n @param {Boolean} [options.setupEmberOnerrorValidation] If `false` validation\n of `Ember.onerror` will be disabled.\n */\n function start(options = {}) {\n if (options.loadTests !== false) {\n (0, _testLoader.loadTests)();\n }\n\n if (options.setupTestContainer !== false) {\n setupTestContainer();\n }\n\n if (options.setupTestAdapter !== false) {\n setupTestAdapter();\n }\n\n if (options.setupEmberTesting !== false) {\n setupEmberTesting();\n }\n\n if (options.setupEmberOnerrorValidation !== false) {\n setupEmberOnerrorValidation();\n }\n\n if (options.startTests !== false) {\n startTests();\n }\n }\n});","define('ember-qunit/legacy-2-x/module-for-component', ['exports', 'ember-qunit/legacy-2-x/qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = moduleForComponent;\n function moduleForComponent(name, description, callbacks) {\n (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForComponent, name, description, callbacks);\n }\n});","define('ember-qunit/legacy-2-x/module-for-model', ['exports', 'ember-qunit/legacy-2-x/qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = moduleForModel;\n function moduleForModel(name, description, callbacks) {\n (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForModel, name, description, callbacks);\n }\n});","define('ember-qunit/legacy-2-x/module-for', ['exports', 'ember-qunit/legacy-2-x/qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = moduleFor;\n function moduleFor(name, description, callbacks) {\n (0, _qunitModule.createModule)(_emberTestHelpers.TestModule, name, description, callbacks);\n }\n});","define('ember-qunit/legacy-2-x/qunit-module', ['exports', 'qunit'], function (exports, _qunit) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.createModule = createModule;\n\n\n function noop() {}\n\n function callbackFor(name, callbacks) {\n if (typeof callbacks !== 'object') {\n return noop;\n }\n if (!callbacks) {\n return noop;\n }\n\n var callback = noop;\n\n if (callbacks[name]) {\n callback = callbacks[name];\n delete callbacks[name];\n }\n\n return callback;\n }\n\n function createModule(Constructor, name, description, callbacks) {\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = name;\n }\n\n var before = callbackFor('before', callbacks);\n var beforeEach = callbackFor('beforeEach', callbacks);\n var afterEach = callbackFor('afterEach', callbacks);\n var after = callbackFor('after', callbacks);\n\n var module;\n var moduleName = typeof description === 'string' ? description : name;\n\n (0, _qunit.module)(moduleName, {\n before() {\n // storing this in closure scope to avoid exposing these\n // private internals to the test context\n module = new Constructor(name, description, callbacks);\n return before.apply(this, arguments);\n },\n\n beforeEach() {\n // provide the test context to the underlying module\n module.setContext(this);\n\n return module.setup(...arguments).then(() => {\n return beforeEach.apply(this, arguments);\n });\n },\n\n afterEach() {\n let result = afterEach.apply(this, arguments);\n return Ember.RSVP.resolve(result).then(() => module.teardown(...arguments));\n },\n\n after() {\n try {\n return after.apply(this, arguments);\n } finally {\n after = afterEach = before = beforeEach = callbacks = module = null;\n }\n }\n });\n }\n});","define('ember-qunit/test-loader', ['exports', 'qunit', 'ember-cli-test-loader/test-support/index'], function (exports, _qunit, _index) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.TestLoader = undefined;\n exports.loadTests = loadTests;\n\n\n (0, _index.addModuleExcludeMatcher)(function (moduleName) {\n return _qunit.default.urlParams.nolint && moduleName.match(/\\.(jshint|lint-test)$/);\n });\n\n (0, _index.addModuleIncludeMatcher)(function (moduleName) {\n return moduleName.match(/\\.jshint$/);\n });\n\n let moduleLoadFailures = [];\n\n _qunit.default.done(function () {\n if (moduleLoadFailures.length) {\n throw new Error('\\n' + moduleLoadFailures.join('\\n'));\n }\n });\n\n class TestLoader extends _index.default {\n moduleLoadFailure(moduleName, error) {\n moduleLoadFailures.push(error);\n\n _qunit.default.module('TestLoader Failures');\n _qunit.default.test(moduleName + ': could not be loaded', function () {\n throw error;\n });\n }\n }\n\n exports.TestLoader = TestLoader;\n /**\n Load tests following the default patterns:\n \n * The module name ends with `-test`\n * The module name ends with `.jshint`\n \n Excludes tests that match the following\n patterns when `?nolint` URL param is set:\n \n * The module name ends with `.jshint`\n * The module name ends with `-lint-test`\n \n @method loadTests\n */\n function loadTests() {\n new TestLoader().loadModules();\n }\n});","define('ember-test-helpers/has-ember-version', ['exports', '@ember/test-helpers/has-ember-version'], function (exports, _hasEmberVersion) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(exports, 'default', {\n enumerable: true,\n get: function () {\n return _hasEmberVersion.default;\n }\n });\n});","define('ember-test-helpers/index', ['exports', '@ember/test-helpers', 'ember-test-helpers/legacy-0-6-x/test-module', 'ember-test-helpers/legacy-0-6-x/test-module-for-acceptance', 'ember-test-helpers/legacy-0-6-x/test-module-for-component', 'ember-test-helpers/legacy-0-6-x/test-module-for-model'], function (exports, _testHelpers, _testModule, _testModuleForAcceptance, _testModuleForComponent, _testModuleForModel) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n Object.keys(_testHelpers).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _testHelpers[key];\n }\n });\n });\n Object.defineProperty(exports, 'TestModule', {\n enumerable: true,\n get: function () {\n return _testModule.default;\n }\n });\n Object.defineProperty(exports, 'TestModuleForAcceptance', {\n enumerable: true,\n get: function () {\n return _testModuleForAcceptance.default;\n }\n });\n Object.defineProperty(exports, 'TestModuleForComponent', {\n enumerable: true,\n get: function () {\n return _testModuleForComponent.default;\n }\n });\n Object.defineProperty(exports, 'TestModuleForModel', {\n enumerable: true,\n get: function () {\n return _testModuleForModel.default;\n }\n });\n});","define('ember-test-helpers/legacy-0-6-x/-legacy-overrides', ['exports', 'ember-test-helpers/has-ember-version'], function (exports, _hasEmberVersion) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.preGlimmerSetupIntegrationForComponent = preGlimmerSetupIntegrationForComponent;\n function preGlimmerSetupIntegrationForComponent() {\n var module = this;\n var context = this.context;\n\n this.actionHooks = {};\n\n context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n context.actions = module.actionHooks;\n\n (this.registry || this.container).register('component:-test-holder', Ember.Component.extend());\n\n context.render = function (template) {\n // in case `this.render` is called twice, make sure to teardown the first invocation\n module.teardownComponent();\n\n if (!template) {\n throw new Error('in a component integration test you must pass a template to `render()`');\n }\n if (Ember.isArray(template)) {\n template = template.join('');\n }\n if (typeof template === 'string') {\n template = Ember.Handlebars.compile(template);\n }\n module.component = module.container.lookupFactory('component:-test-holder').create({\n layout: template\n });\n\n module.component.set('context', context);\n module.component.set('controller', context);\n\n Ember.run(function () {\n module.component.appendTo('#ember-testing');\n });\n\n context._element = module.component.element;\n };\n\n context.$ = function () {\n return module.component.$.apply(module.component, arguments);\n };\n\n context.set = function (key, value) {\n var ret = Ember.run(function () {\n return Ember.set(context, key, value);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.setProperties = function (hash) {\n var ret = Ember.run(function () {\n return Ember.setProperties(context, hash);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.get = function (key) {\n return Ember.get(context, key);\n };\n\n context.getProperties = function () {\n var args = Array.prototype.slice.call(arguments);\n return Ember.getProperties(context, args);\n };\n\n context.on = function (actionName, handler) {\n module.actionHooks[actionName] = handler;\n };\n\n context.send = function (actionName) {\n var hook = module.actionHooks[actionName];\n if (!hook) {\n throw new Error('integration testing template received unexpected action ' + actionName);\n }\n hook.apply(module, Array.prototype.slice.call(arguments, 1));\n };\n\n context.clearRender = function () {\n module.teardownComponent();\n };\n }\n});","define('ember-test-helpers/legacy-0-6-x/abstract-test-module', ['exports', 'ember-test-helpers/legacy-0-6-x/ext/rsvp', '@ember/test-helpers/settled', '@ember/test-helpers'], function (exports, _rsvp, _settled, _testHelpers) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n\n // calling this `merge` here because we cannot\n // actually assume it is like `Object.assign`\n // with > 2 args\n const merge = Ember.assign || Ember.merge;\n\n exports.default = class {\n constructor(name, options) {\n this.context = undefined;\n this.name = name;\n this.callbacks = options || {};\n\n this.initSetupSteps();\n this.initTeardownSteps();\n }\n\n setup(assert) {\n Ember.testing = true;\n return this.invokeSteps(this.setupSteps, this, assert).then(() => {\n this.contextualizeCallbacks();\n return this.invokeSteps(this.contextualizedSetupSteps, this.context, assert);\n });\n }\n\n teardown(assert) {\n return this.invokeSteps(this.contextualizedTeardownSteps, this.context, assert).then(() => {\n return this.invokeSteps(this.teardownSteps, this, assert);\n }).then(() => {\n this.cache = null;\n this.cachedCalls = null;\n }).finally(function () {\n Ember.testing = false;\n });\n }\n\n initSetupSteps() {\n this.setupSteps = [];\n this.contextualizedSetupSteps = [];\n\n if (this.callbacks.beforeSetup) {\n this.setupSteps.push(this.callbacks.beforeSetup);\n delete this.callbacks.beforeSetup;\n }\n\n this.setupSteps.push(this.setupContext);\n this.setupSteps.push(this.setupTestElements);\n this.setupSteps.push(this.setupAJAXListeners);\n this.setupSteps.push(this.setupPromiseListeners);\n\n if (this.callbacks.setup) {\n this.contextualizedSetupSteps.push(this.callbacks.setup);\n delete this.callbacks.setup;\n }\n }\n\n invokeSteps(steps, context, assert) {\n steps = steps.slice();\n\n function nextStep() {\n var step = steps.shift();\n if (step) {\n // guard against exceptions, for example missing components referenced from needs.\n return new Ember.RSVP.Promise(resolve => {\n resolve(step.call(context, assert));\n }).then(nextStep);\n } else {\n return Ember.RSVP.resolve();\n }\n }\n return nextStep();\n }\n\n contextualizeCallbacks() {}\n\n initTeardownSteps() {\n this.teardownSteps = [];\n this.contextualizedTeardownSteps = [];\n\n if (this.callbacks.teardown) {\n this.contextualizedTeardownSteps.push(this.callbacks.teardown);\n delete this.callbacks.teardown;\n }\n\n this.teardownSteps.push(this.teardownContext);\n this.teardownSteps.push(this.teardownTestElements);\n this.teardownSteps.push(this.teardownAJAXListeners);\n this.teardownSteps.push(this.teardownPromiseListeners);\n\n if (this.callbacks.afterTeardown) {\n this.teardownSteps.push(this.callbacks.afterTeardown);\n delete this.callbacks.afterTeardown;\n }\n }\n\n setupTestElements() {\n let testElementContainer = document.querySelector('#ember-testing-container');\n if (!testElementContainer) {\n testElementContainer = document.createElement('div');\n testElementContainer.setAttribute('id', 'ember-testing-container');\n document.body.appendChild(testElementContainer);\n }\n\n let testEl = document.querySelector('#ember-testing');\n if (!testEl) {\n let element = document.createElement('div');\n element.setAttribute('id', 'ember-testing');\n\n testElementContainer.appendChild(element);\n this.fixtureResetValue = '';\n } else {\n this.fixtureResetValue = testElementContainer.innerHTML;\n }\n }\n\n setupContext(options) {\n let context = this.getContext();\n\n merge(context, {\n dispatcher: null,\n inject: {}\n });\n merge(context, options);\n\n this.setToString();\n (0, _testHelpers.setContext)(context);\n this.context = context;\n }\n\n setContext(context) {\n this.context = context;\n }\n\n getContext() {\n if (this.context) {\n return this.context;\n }\n\n return this.context = (0, _testHelpers.getContext)() || {};\n }\n\n setToString() {\n this.context.toString = () => {\n if (this.subjectName) {\n return `test context for: ${this.subjectName}`;\n }\n\n if (this.name) {\n return `test context for: ${this.name}`;\n }\n };\n }\n\n setupAJAXListeners() {\n (0, _settled._setupAJAXHooks)();\n }\n\n teardownAJAXListeners() {\n (0, _settled._teardownAJAXHooks)();\n }\n\n setupPromiseListeners() {\n (0, _rsvp._setupPromiseListeners)();\n }\n\n teardownPromiseListeners() {\n (0, _rsvp._teardownPromiseListeners)();\n }\n\n teardownTestElements() {\n document.getElementById('ember-testing-container').innerHTML = this.fixtureResetValue;\n\n // Ember 2.0.0 removed Ember.View as public API, so only do this when\n // Ember.View is present\n if (Ember.View && Ember.View.views) {\n Ember.View.views = {};\n }\n }\n\n teardownContext() {\n var context = this.context;\n this.context = undefined;\n (0, _testHelpers.unsetContext)();\n\n if (context && context.dispatcher && !context.dispatcher.isDestroyed) {\n Ember.run(function () {\n context.dispatcher.destroy();\n });\n }\n }\n };\n});","define('ember-test-helpers/legacy-0-6-x/build-registry', ['exports', 'require'], function (exports, _require2) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n exports.default = function (resolver) {\n var fallbackRegistry, registry, container;\n var namespace = Ember.Object.create({\n Resolver: {\n create() {\n return resolver;\n }\n }\n });\n\n function register(name, factory) {\n var thingToRegisterWith = registry || container;\n\n if (!(container.factoryFor ? container.factoryFor(name) : container.lookupFactory(name))) {\n thingToRegisterWith.register(name, factory);\n }\n }\n\n if (Ember.Application.buildRegistry) {\n fallbackRegistry = Ember.Application.buildRegistry(namespace);\n fallbackRegistry.register('component-lookup:main', Ember.ComponentLookup);\n\n registry = new Ember.Registry({\n fallback: fallbackRegistry\n });\n\n if (Ember.ApplicationInstance && Ember.ApplicationInstance.setupRegistry) {\n Ember.ApplicationInstance.setupRegistry(registry);\n }\n\n // these properties are set on the fallback registry by `buildRegistry`\n // and on the primary registry within the ApplicationInstance constructor\n // but we need to manually recreate them since ApplicationInstance's are not\n // exposed externally\n registry.normalizeFullName = fallbackRegistry.normalizeFullName;\n registry.makeToString = fallbackRegistry.makeToString;\n registry.describe = fallbackRegistry.describe;\n\n var owner = Owner.create({\n __registry__: registry,\n __container__: null\n });\n\n container = registry.container({ owner: owner });\n owner.__container__ = container;\n\n exposeRegistryMethodsWithoutDeprecations(container);\n } else {\n container = Ember.Application.buildContainer(namespace);\n container.register('component-lookup:main', Ember.ComponentLookup);\n }\n\n // Ember 1.10.0 did not properly add `view:toplevel` or `view:default`\n // to the registry in Ember.Application.buildRegistry :(\n //\n // Ember 2.0.0 removed Ember.View as public API, so only do this when\n // Ember.View is present\n if (Ember.View) {\n register('view:toplevel', Ember.View.extend());\n }\n\n // Ember 2.0.0 removed Ember._MetamorphView from the Ember global, so only\n // do this when present\n if (Ember._MetamorphView) {\n register('view:default', Ember._MetamorphView);\n }\n\n var globalContext = typeof global === 'object' && global || self;\n if (requirejs.entries['ember-data/setup-container']) {\n // ember-data is a proper ember-cli addon since 2.3; if no 'import\n // 'ember-data'' is present somewhere in the tests, there is also no `DS`\n // available on the globalContext and hence ember-data wouldn't be setup\n // correctly for the tests; that's why we import and call setupContainer\n // here; also see https://github.com/emberjs/data/issues/4071 for context\n var setupContainer = (0, _require2.default)('ember-data/setup-container')['default'];\n setupContainer(registry || container);\n } else if (globalContext.DS) {\n var DS = globalContext.DS;\n if (DS._setupContainer) {\n DS._setupContainer(registry || container);\n } else {\n register('transform:boolean', DS.BooleanTransform);\n register('transform:date', DS.DateTransform);\n register('transform:number', DS.NumberTransform);\n register('transform:string', DS.StringTransform);\n register('serializer:-default', DS.JSONSerializer);\n register('serializer:-rest', DS.RESTSerializer);\n register('adapter:-rest', DS.RESTAdapter);\n }\n }\n\n return {\n registry,\n container,\n owner\n };\n };\n\n /* globals global, self, requirejs */\n\n function exposeRegistryMethodsWithoutDeprecations(container) {\n var methods = ['register', 'unregister', 'resolve', 'normalize', 'typeInjection', 'injection', 'factoryInjection', 'factoryTypeInjection', 'has', 'options', 'optionsForType'];\n\n function exposeRegistryMethod(container, method) {\n if (method in container) {\n container[method] = function () {\n return container._registry[method].apply(container._registry, arguments);\n };\n }\n }\n\n for (var i = 0, l = methods.length; i < l; i++) {\n exposeRegistryMethod(container, methods[i]);\n }\n }\n\n var Owner = function () {\n if (Ember._RegistryProxyMixin && Ember._ContainerProxyMixin) {\n return Ember.Object.extend(Ember._RegistryProxyMixin, Ember._ContainerProxyMixin, {\n _emberTestHelpersMockOwner: true\n });\n }\n\n return Ember.Object.extend({\n _emberTestHelpersMockOwner: true\n });\n }();\n});","define('ember-test-helpers/legacy-0-6-x/ext/rsvp', ['exports'], function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports._setupPromiseListeners = _setupPromiseListeners;\n exports._teardownPromiseListeners = _teardownPromiseListeners;\n\n\n let originalAsync;\n\n /**\n Configures `RSVP` to resolve promises on the run-loop's action queue. This is\n done by Ember internally since Ember 1.7 and it is only needed to\n provide a consistent testing experience for users of Ember < 1.7.\n \n @private\n */\n function _setupPromiseListeners() {\n originalAsync = Ember.RSVP.configure('async');\n\n Ember.RSVP.configure('async', function (callback, promise) {\n Ember.run.backburner.schedule('actions', () => {\n callback(promise);\n });\n });\n }\n\n /**\n Resets `RSVP`'s `async` to its prior value.\n \n @private\n */\n function _teardownPromiseListeners() {\n Ember.RSVP.configure('async', originalAsync);\n }\n});","define('ember-test-helpers/legacy-0-6-x/test-module-for-acceptance', ['exports', 'ember-test-helpers/legacy-0-6-x/abstract-test-module', '@ember/test-helpers'], function (exports, _abstractTestModule, _testHelpers) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = class extends _abstractTestModule.default {\n setupContext() {\n super.setupContext({ application: this.createApplication() });\n }\n\n teardownContext() {\n Ember.run(() => {\n (0, _testHelpers.getContext)().application.destroy();\n });\n\n super.teardownContext();\n }\n\n createApplication() {\n let { Application, config } = this.callbacks;\n let application;\n\n Ember.run(() => {\n application = Application.create(config);\n application.setupForTesting();\n application.injectTestHelpers();\n });\n\n return application;\n }\n };\n});","define('ember-test-helpers/legacy-0-6-x/test-module-for-component', ['exports', 'ember-test-helpers/legacy-0-6-x/test-module', 'ember-test-helpers/has-ember-version', 'ember-test-helpers/legacy-0-6-x/-legacy-overrides'], function (exports, _testModule, _hasEmberVersion, _legacyOverrides) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.setupComponentIntegrationTest = setupComponentIntegrationTest;\n /* globals EmberENV */\n let ACTION_KEY;\n if ((0, _hasEmberVersion.default)(2, 0)) {\n ACTION_KEY = 'actions';\n } else {\n ACTION_KEY = '_actions';\n }\n\n const isPreGlimmer = !(0, _hasEmberVersion.default)(1, 13);\n\n exports.default = class extends _testModule.default {\n constructor(componentName, description, callbacks) {\n // Allow `description` to be omitted\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = null;\n } else if (!callbacks) {\n callbacks = {};\n }\n\n let integrationOption = callbacks.integration;\n let hasNeeds = Array.isArray(callbacks.needs);\n\n super('component:' + componentName, description, callbacks);\n\n this.componentName = componentName;\n\n if (hasNeeds || callbacks.unit || integrationOption === false) {\n this.isUnitTest = true;\n } else if (integrationOption) {\n this.isUnitTest = false;\n } else {\n Ember.deprecate('the component:' + componentName + ' test module is implicitly running in unit test mode, ' + 'which will change to integration test mode by default in an upcoming version of ' + 'ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit ' + 'test mode.', false, {\n id: 'ember-test-helpers.test-module-for-component.test-type',\n until: '0.6.0'\n });\n this.isUnitTest = true;\n }\n\n if (!this.isUnitTest && !this.isLegacy) {\n callbacks.integration = true;\n }\n\n if (this.isUnitTest || this.isLegacy) {\n this.setupSteps.push(this.setupComponentUnitTest);\n } else {\n this.callbacks.subject = function () {\n throw new Error(\"component integration tests do not support `subject()`. Instead, render the component as if it were HTML: `this.render('');`. For more information, read: http://guides.emberjs.com/v2.2.0/testing/testing-components/\");\n };\n this.setupSteps.push(this.setupComponentIntegrationTest);\n this.teardownSteps.unshift(this.teardownComponent);\n }\n\n if (Ember.View && Ember.View.views) {\n this.setupSteps.push(this._aliasViewRegistry);\n this.teardownSteps.unshift(this._resetViewRegistry);\n }\n }\n\n initIntegration(options) {\n this.isLegacy = options.integration === 'legacy';\n this.isIntegration = options.integration !== 'legacy';\n }\n\n _aliasViewRegistry() {\n this._originalGlobalViewRegistry = Ember.View.views;\n var viewRegistry = this.container.lookup('-view-registry:main');\n\n if (viewRegistry) {\n Ember.View.views = viewRegistry;\n }\n }\n\n _resetViewRegistry() {\n Ember.View.views = this._originalGlobalViewRegistry;\n }\n\n setupComponentUnitTest() {\n var _this = this;\n var resolver = this.resolver;\n var context = this.context;\n\n var layoutName = 'template:components/' + this.componentName;\n\n var layout = resolver.resolve(layoutName);\n\n var thingToRegisterWith = this.registry || this.container;\n if (layout) {\n thingToRegisterWith.register(layoutName, layout);\n thingToRegisterWith.injection(this.subjectName, 'layout', layoutName);\n }\n var eventDispatcher = resolver.resolve('event_dispatcher:main');\n if (eventDispatcher) {\n thingToRegisterWith.register('event_dispatcher:main', eventDispatcher);\n }\n\n context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n\n context._element = null;\n\n this.callbacks.render = function () {\n var subject;\n\n Ember.run(function () {\n subject = context.subject();\n subject.appendTo('#ember-testing');\n });\n\n context._element = subject.element;\n\n _this.teardownSteps.unshift(function () {\n Ember.run(function () {\n Ember.tryInvoke(subject, 'destroy');\n });\n });\n };\n\n this.callbacks.append = function () {\n Ember.deprecate('this.append() is deprecated. Please use this.render() or this.$() instead.', false, {\n id: 'ember-test-helpers.test-module-for-component.append',\n until: '0.6.0'\n });\n return context.$();\n };\n\n context.$ = function () {\n this.render();\n var subject = this.subject();\n\n return subject.$.apply(subject, arguments);\n };\n }\n\n setupComponentIntegrationTest() {\n if (isPreGlimmer) {\n return _legacyOverrides.preGlimmerSetupIntegrationForComponent.apply(this, arguments);\n } else {\n return setupComponentIntegrationTest.apply(this, arguments);\n }\n }\n\n setupContext() {\n super.setupContext();\n\n // only setup the injection if we are running against a version\n // of Ember that has `-view-registry:main` (Ember >= 1.12)\n if (this.container.factoryFor ? this.container.factoryFor('-view-registry:main') : this.container.lookupFactory('-view-registry:main')) {\n (this.registry || this.container).injection('component', '_viewRegistry', '-view-registry:main');\n }\n\n if (!this.isUnitTest && !this.isLegacy) {\n this.context.factory = function () {};\n }\n }\n\n teardownComponent() {\n var component = this.component;\n if (component) {\n Ember.run(component, 'destroy');\n this.component = null;\n }\n }\n };\n function setupComponentIntegrationTest() {\n var module = this;\n var context = this.context;\n\n this.actionHooks = context[ACTION_KEY] = {};\n context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n\n var hasRendered = false;\n var OutletView = module.container.factoryFor ? module.container.factoryFor('view:-outlet') : module.container.lookupFactory('view:-outlet');\n var OutletTemplate = module.container.lookup('template:-outlet');\n var toplevelView = module.component = OutletView.create();\n var hasOutletTemplate = !!OutletTemplate;\n var outletState = {\n render: {\n owner: Ember.getOwner ? Ember.getOwner(module.container) : undefined,\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: module.context,\n ViewClass: undefined,\n template: OutletTemplate\n },\n\n outlets: {}\n };\n\n var element = document.getElementById('ember-testing');\n var templateId = 0;\n\n if (hasOutletTemplate) {\n Ember.run(() => {\n toplevelView.setOutletState(outletState);\n });\n }\n\n context.render = function (template) {\n if (!template) {\n throw new Error('in a component integration test you must pass a template to `render()`');\n }\n if (Ember.isArray(template)) {\n template = template.join('');\n }\n if (typeof template === 'string') {\n template = Ember.Handlebars.compile(template);\n }\n\n var templateFullName = 'template:-undertest-' + ++templateId;\n this.registry.register(templateFullName, template);\n var stateToRender = {\n owner: Ember.getOwner ? Ember.getOwner(module.container) : undefined,\n into: undefined,\n outlet: 'main',\n name: 'index',\n controller: module.context,\n ViewClass: undefined,\n template: module.container.lookup(templateFullName),\n outlets: {}\n };\n\n if (hasOutletTemplate) {\n stateToRender.name = 'index';\n outletState.outlets.main = { render: stateToRender, outlets: {} };\n } else {\n stateToRender.name = 'application';\n outletState = { render: stateToRender, outlets: {} };\n }\n\n Ember.run(() => {\n toplevelView.setOutletState(outletState);\n });\n\n if (!hasRendered) {\n Ember.run(module.component, 'appendTo', '#ember-testing');\n hasRendered = true;\n }\n\n if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) {\n // ensure the element is based on the wrapping toplevel view\n // Ember still wraps the main application template with a\n // normal tagged view\n context._element = element = document.querySelector('#ember-testing > .ember-view');\n } else {\n context._element = element = document.querySelector('#ember-testing');\n }\n };\n\n context.$ = function (selector) {\n // emulates Ember internal behavor of `this.$` in a component\n // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18\n return selector ? Ember.$(selector, element) : Ember.$(element);\n };\n\n context.set = function (key, value) {\n var ret = Ember.run(function () {\n return Ember.set(context, key, value);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.setProperties = function (hash) {\n var ret = Ember.run(function () {\n return Ember.setProperties(context, hash);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.get = function (key) {\n return Ember.get(context, key);\n };\n\n context.getProperties = function () {\n var args = Array.prototype.slice.call(arguments);\n return Ember.getProperties(context, args);\n };\n\n context.on = function (actionName, handler) {\n module.actionHooks[actionName] = handler;\n };\n\n context.send = function (actionName) {\n var hook = module.actionHooks[actionName];\n if (!hook) {\n throw new Error('integration testing template received unexpected action ' + actionName);\n }\n hook.apply(module.context, Array.prototype.slice.call(arguments, 1));\n };\n\n context.clearRender = function () {\n Ember.run(function () {\n toplevelView.setOutletState({\n render: {\n owner: module.container,\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: module.context,\n ViewClass: undefined,\n template: undefined\n },\n outlets: {}\n });\n });\n };\n }\n});","define('ember-test-helpers/legacy-0-6-x/test-module-for-model', ['exports', 'require', 'ember-test-helpers/legacy-0-6-x/test-module'], function (exports, _require2, _testModule) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = class extends _testModule.default {\n constructor(modelName, description, callbacks) {\n super('model:' + modelName, description, callbacks);\n\n this.modelName = modelName;\n\n this.setupSteps.push(this.setupModel);\n }\n\n setupModel() {\n var container = this.container;\n var defaultSubject = this.defaultSubject;\n var callbacks = this.callbacks;\n var modelName = this.modelName;\n\n var adapterFactory = container.factoryFor ? container.factoryFor('adapter:application') : container.lookupFactory('adapter:application');\n if (!adapterFactory) {\n if (requirejs.entries['ember-data/adapters/json-api']) {\n adapterFactory = (0, _require2.default)('ember-data/adapters/json-api')['default'];\n }\n\n // when ember-data/adapters/json-api is provided via ember-cli shims\n // using Ember Data 1.x the actual JSONAPIAdapter isn't found, but the\n // above require statement returns a bizzaro object with only a `default`\n // property (circular reference actually)\n if (!adapterFactory || !adapterFactory.create) {\n adapterFactory = DS.JSONAPIAdapter || DS.FixtureAdapter;\n }\n\n var thingToRegisterWith = this.registry || this.container;\n thingToRegisterWith.register('adapter:application', adapterFactory);\n }\n\n callbacks.store = function () {\n var container = this.container;\n return container.lookup('service:store') || container.lookup('store:main');\n };\n\n if (callbacks.subject === defaultSubject) {\n callbacks.subject = function (options) {\n var container = this.container;\n\n return Ember.run(function () {\n var store = container.lookup('service:store') || container.lookup('store:main');\n return store.createRecord(modelName, options);\n });\n };\n }\n }\n };\n});","define('ember-test-helpers/legacy-0-6-x/test-module', ['exports', 'ember-test-helpers/legacy-0-6-x/abstract-test-module', '@ember/test-helpers', 'ember-test-helpers/legacy-0-6-x/build-registry', '@ember/test-helpers/has-ember-version'], function (exports, _abstractTestModule, _testHelpers, _buildRegistry, _hasEmberVersion) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = class extends _abstractTestModule.default {\n constructor(subjectName, description, callbacks) {\n // Allow `description` to be omitted, in which case it should\n // default to `subjectName`\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = subjectName;\n }\n\n super(description || subjectName, callbacks);\n\n this.subjectName = subjectName;\n this.description = description || subjectName;\n this.resolver = this.callbacks.resolver || (0, _testHelpers.getResolver)();\n\n if (this.callbacks.integration && this.callbacks.needs) {\n throw new Error(\"cannot declare 'integration: true' and 'needs' in the same module\");\n }\n\n if (this.callbacks.integration) {\n this.initIntegration(callbacks);\n delete callbacks.integration;\n }\n\n this.initSubject();\n this.initNeeds();\n }\n\n initIntegration(options) {\n if (options.integration === 'legacy') {\n throw new Error(\"`integration: 'legacy'` is only valid for component tests.\");\n }\n this.isIntegration = true;\n }\n\n initSubject() {\n this.callbacks.subject = this.callbacks.subject || this.defaultSubject;\n }\n\n initNeeds() {\n this.needs = [this.subjectName];\n if (this.callbacks.needs) {\n this.needs = this.needs.concat(this.callbacks.needs);\n delete this.callbacks.needs;\n }\n }\n\n initSetupSteps() {\n this.setupSteps = [];\n this.contextualizedSetupSteps = [];\n\n if (this.callbacks.beforeSetup) {\n this.setupSteps.push(this.callbacks.beforeSetup);\n delete this.callbacks.beforeSetup;\n }\n\n this.setupSteps.push(this.setupContainer);\n this.setupSteps.push(this.setupContext);\n this.setupSteps.push(this.setupTestElements);\n this.setupSteps.push(this.setupAJAXListeners);\n this.setupSteps.push(this.setupPromiseListeners);\n\n if (this.callbacks.setup) {\n this.contextualizedSetupSteps.push(this.callbacks.setup);\n delete this.callbacks.setup;\n }\n }\n\n initTeardownSteps() {\n this.teardownSteps = [];\n this.contextualizedTeardownSteps = [];\n\n if (this.callbacks.teardown) {\n this.contextualizedTeardownSteps.push(this.callbacks.teardown);\n delete this.callbacks.teardown;\n }\n\n this.teardownSteps.push(this.teardownSubject);\n this.teardownSteps.push(this.teardownContainer);\n this.teardownSteps.push(this.teardownContext);\n this.teardownSteps.push(this.teardownTestElements);\n this.teardownSteps.push(this.teardownAJAXListeners);\n this.teardownSteps.push(this.teardownPromiseListeners);\n\n if (this.callbacks.afterTeardown) {\n this.teardownSteps.push(this.callbacks.afterTeardown);\n delete this.callbacks.afterTeardown;\n }\n }\n\n setupContainer() {\n if (this.isIntegration || this.isLegacy) {\n this._setupIntegratedContainer();\n } else {\n this._setupIsolatedContainer();\n }\n }\n\n setupContext() {\n var subjectName = this.subjectName;\n var container = this.container;\n\n var factory = function () {\n return container.factoryFor ? container.factoryFor(subjectName) : container.lookupFactory(subjectName);\n };\n\n super.setupContext({\n container: this.container,\n registry: this.registry,\n factory: factory,\n register() {\n var target = this.registry || this.container;\n return target.register.apply(target, arguments);\n }\n });\n\n if (Ember.setOwner) {\n Ember.setOwner(this.context, this.container.owner);\n }\n\n this.setupInject();\n }\n\n setupInject() {\n var module = this;\n var context = this.context;\n\n if (Ember.inject) {\n var keys = (Object.keys || keys)(Ember.inject);\n\n keys.forEach(function (typeName) {\n context.inject[typeName] = function (name, opts) {\n var alias = opts && opts.as || name;\n Ember.run(function () {\n Ember.set(context, alias, module.container.lookup(typeName + ':' + name));\n });\n };\n });\n }\n }\n\n teardownSubject() {\n var subject = this.cache.subject;\n\n if (subject) {\n Ember.run(function () {\n Ember.tryInvoke(subject, 'destroy');\n });\n }\n }\n\n teardownContainer() {\n var container = this.container;\n Ember.run(function () {\n container.destroy();\n });\n }\n\n defaultSubject(options, factory) {\n return factory.create(options);\n }\n\n // allow arbitrary named factories, like rspec let\n contextualizeCallbacks() {\n var callbacks = this.callbacks;\n var context = this.context;\n\n this.cache = this.cache || {};\n this.cachedCalls = this.cachedCalls || {};\n\n var keys = (Object.keys || keys)(callbacks);\n var keysLength = keys.length;\n\n if (keysLength) {\n var deprecatedContext = this._buildDeprecatedContext(this, context);\n for (var i = 0; i < keysLength; i++) {\n this._contextualizeCallback(context, keys[i], deprecatedContext);\n }\n }\n }\n\n _contextualizeCallback(context, key, callbackContext) {\n var _this = this;\n var callbacks = this.callbacks;\n var factory = context.factory;\n\n context[key] = function (options) {\n if (_this.cachedCalls[key]) {\n return _this.cache[key];\n }\n\n var result = callbacks[key].call(callbackContext, options, factory());\n\n _this.cache[key] = result;\n _this.cachedCalls[key] = true;\n\n return result;\n };\n }\n\n /*\n Builds a version of the passed in context that contains deprecation warnings\n for accessing properties that exist on the module.\n */\n _buildDeprecatedContext(module, context) {\n var deprecatedContext = Object.create(context);\n\n var keysForDeprecation = Object.keys(module);\n\n for (var i = 0, l = keysForDeprecation.length; i < l; i++) {\n this._proxyDeprecation(module, deprecatedContext, keysForDeprecation[i]);\n }\n\n return deprecatedContext;\n }\n\n /*\n Defines a key on an object to act as a proxy for deprecating the original.\n */\n _proxyDeprecation(obj, proxy, key) {\n if (typeof proxy[key] === 'undefined') {\n Object.defineProperty(proxy, key, {\n get() {\n Ember.deprecate('Accessing the test module property \"' + key + '\" from a callback is deprecated.', false, {\n id: 'ember-test-helpers.test-module.callback-context',\n until: '0.6.0'\n });\n return obj[key];\n }\n });\n }\n }\n\n _setupContainer(isolated) {\n var resolver = this.resolver;\n\n var items = (0, _buildRegistry.default)(!isolated ? resolver : Object.create(resolver, {\n resolve: {\n value() {}\n }\n }));\n\n this.container = items.container;\n this.registry = items.registry;\n\n if ((0, _hasEmberVersion.default)(1, 13)) {\n var thingToRegisterWith = this.registry || this.container;\n var router = resolver.resolve('router:main');\n router = router || Ember.Router.extend();\n thingToRegisterWith.register('router:main', router);\n }\n }\n\n _setupIsolatedContainer() {\n var resolver = this.resolver;\n this._setupContainer(true);\n\n var thingToRegisterWith = this.registry || this.container;\n\n for (var i = this.needs.length; i > 0; i--) {\n var fullName = this.needs[i - 1];\n var normalizedFullName = resolver.normalize(fullName);\n thingToRegisterWith.register(fullName, resolver.resolve(normalizedFullName));\n }\n\n if (!this.registry) {\n this.container.resolver = function () {};\n }\n }\n\n _setupIntegratedContainer() {\n this._setupContainer();\n }\n };\n});","define('ember-test-helpers/wait', ['exports', '@ember/test-helpers/settled', '@ember/test-helpers'], function (exports, _settled, _testHelpers) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports._teardownPromiseListeners = exports._teardownAJAXHooks = exports._setupPromiseListeners = exports._setupAJAXHooks = undefined;\n Object.defineProperty(exports, '_setupAJAXHooks', {\n enumerable: true,\n get: function () {\n return _settled._setupAJAXHooks;\n }\n });\n Object.defineProperty(exports, '_setupPromiseListeners', {\n enumerable: true,\n get: function () {\n return _settled._setupPromiseListeners;\n }\n });\n Object.defineProperty(exports, '_teardownAJAXHooks', {\n enumerable: true,\n get: function () {\n return _settled._teardownAJAXHooks;\n }\n });\n Object.defineProperty(exports, '_teardownPromiseListeners', {\n enumerable: true,\n get: function () {\n return _settled._teardownPromiseListeners;\n }\n });\n exports.default = wait;\n\n\n /**\n Returns a promise that resolves when in a settled state (see `isSettled` for\n a definition of \"settled state\").\n \n @private\n @deprecated\n @param {Object} [options={}] the options to be used for waiting\n @param {boolean} [options.waitForTimers=true] should timers be waited upon\n @param {boolean} [options.waitForAjax=true] should $.ajax requests be waited upon\n @param {boolean} [options.waitForWaiters=true] should test waiters be waited upon\n @returns {Promise} resolves when settled\n */\n function wait(options = {}) {\n if (typeof options !== 'object' || options === null) {\n options = {};\n }\n\n return (0, _testHelpers.waitUntil)(() => {\n let waitForTimers = 'waitForTimers' in options ? options.waitForTimers : true;\n let waitForAJAX = 'waitForAJAX' in options ? options.waitForAJAX : true;\n let waitForWaiters = 'waitForWaiters' in options ? options.waitForWaiters : true;\n\n let {\n hasPendingTimers,\n hasRunLoop,\n hasPendingRequests,\n hasPendingWaiters\n } = (0, _testHelpers.getSettledState)();\n\n if (waitForTimers && (hasPendingTimers || hasRunLoop)) {\n return false;\n }\n\n if (waitForAJAX && hasPendingRequests) {\n return false;\n }\n\n if (waitForWaiters && hasPendingWaiters) {\n return false;\n }\n\n return true;\n }, { timeout: Infinity });\n }\n});","define(\"qunit/index\", [\"exports\"], function (exports) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n /* globals QUnit */\n\n var _module = QUnit.module;\n exports.module = _module;\n var test = exports.test = QUnit.test;\n var skip = exports.skip = QUnit.skip;\n var only = exports.only = QUnit.only;\n var todo = exports.todo = QUnit.todo;\n\n exports.default = QUnit;\n});","runningTests = true;\n\nif (window.Testem) {\n window.Testem.hookIntoTestFramework();\n}\n\n\n"],"names":[],"mappings":"AAAA;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACllKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"test-support.js"} \ No newline at end of file diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.js b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.js new file mode 100644 index 0000000000..3843eebfa8 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.js @@ -0,0 +1,62 @@ +'use strict'; + +define('quickstart/tests/app.lint-test', [], function () { + 'use strict'; + + QUnit.module('ESLint | app'); + + QUnit.test('app.js', function (assert) { + assert.expect(1); + assert.ok(true, 'app.js should pass ESLint\n\n'); + }); + + QUnit.test('resolver.js', function (assert) { + assert.expect(1); + assert.ok(true, 'resolver.js should pass ESLint\n\n'); + }); + + QUnit.test('router.js', function (assert) { + assert.expect(1); + assert.ok(true, 'router.js should pass ESLint\n\n'); + }); +}); +define('quickstart/tests/test-helper', ['quickstart/app', 'quickstart/config/environment', '@ember/test-helpers', 'ember-qunit'], function (_app, _environment, _testHelpers, _emberQunit) { + 'use strict'; + + (0, _testHelpers.setApplication)(_app.default.create(_environment.default.APP)); + + (0, _emberQunit.start)(); +}); + +define('quickstart/tests/tests.lint-test', [], function () { + 'use strict'; + + QUnit.module('ESLint | tests'); + + QUnit.test('test-helper.js', function (assert) { + assert.expect(1); + assert.ok(true, 'test-helper.js should pass ESLint\n\n'); + }); +}); +define('quickstart/config/environment', [], function() { + var prefix = 'quickstart'; +try { + var metaName = prefix + '/config/environment'; + var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content'); + var config = JSON.parse(unescape(rawConfig)); + + var exports = { 'default': config }; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; +} +catch(err) { + throw new Error('Could not read config from meta tag with name "' + metaName + '".'); +} + +}); + +require('quickstart/tests/test-helper'); +EmberENV.TESTS_FILE_LOADED = true; +//# sourceMappingURL=tests.map diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.map b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.map new file mode 100644 index 0000000000..dbfe1e9fc2 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/tests.map @@ -0,0 +1 @@ +{"version":3,"sources":["vendor/ember-cli/tests-prefix.js","quickstart/tests/app.lint-test.js","quickstart/tests/test-helper.js","quickstart/tests/tests.lint-test.js","vendor/ember-cli/app-config.js","vendor/ember-cli/tests-suffix.js"],"sourcesContent":["'use strict';\n","define('quickstart/tests/app.lint-test', [], function () {\n 'use strict';\n\n QUnit.module('ESLint | app');\n\n QUnit.test('app.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'app.js should pass ESLint\\n\\n');\n });\n\n QUnit.test('resolver.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'resolver.js should pass ESLint\\n\\n');\n });\n\n QUnit.test('router.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'router.js should pass ESLint\\n\\n');\n });\n});","import Application from '../app';\nimport config from '../config/environment';\nimport { setApplication } from '@ember/test-helpers';\nimport { start } from 'ember-qunit';\n\nsetApplication(Application.create(config.APP));\n\nstart();\n","define('quickstart/tests/tests.lint-test', [], function () {\n 'use strict';\n\n QUnit.module('ESLint | tests');\n\n QUnit.test('test-helper.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'test-helper.js should pass ESLint\\n\\n');\n });\n});","define('quickstart/config/environment', [], function() {\n var prefix = 'quickstart';\ntry {\n var metaName = prefix + '/config/environment';\n var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n var config = JSON.parse(unescape(rawConfig));\n\n var exports = { 'default': config };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n}\ncatch(err) {\n throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n});\n","require('quickstart/tests/test-helper');\nEmberENV.TESTS_FILE_LOADED = true;\n"],"names":["create","APP"],"mappings":"AAAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACbA,mCAAe,aAAYA,MAAZ,CAAmB,qBAAOC,GAA1B,CAAf;;AAEA;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;","file":"tests.js"} \ No newline at end of file diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css new file mode 100644 index 0000000000..abac03bcdd --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css @@ -0,0 +1,97 @@ +#ember-welcome-page-id-selector { + padding: 2em; + box-shadow: 0 0 0px 10px #FFFBF5; + font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; + font-size: 16px; + line-height: 1.35em; + background: #FFFBF5; + color: #865931; + height: 100vh; +} +#ember-welcome-page-id-selector img { + max-width: 100%; +} +#ember-welcome-page-id-selector p { + margin: 0 0 .75em; +} +#ember-welcome-page-id-selector h2 { + color: #dd6a58; + margin-top: 1em; + font-size: 1.75em; + line-height: 1.2 +} +#ember-welcome-page-id-selector a:link, +#ember-welcome-page-id-selector a:visited { + color: #dd6a58; + text-decoration: none; +} +#ember-welcome-page-id-selector a:hover, +#ember-welcome-page-id-selector a:active { + color: #c13c27; +} +#ember-welcome-page-id-selector .tomster { + flex: 2; +} +#ember-welcome-page-id-selector .welcome { + flex: 3; +} +#ember-welcome-page-id-selector .columns { + display: flex; + max-width: 960px; + margin: 0 auto; +} +#ember-welcome-page-id-selector .welcome ol { + list-style: disc; + padding-left: 2em; + margin-bottom: .75em; +} +#ember-welcome-page-id-selector .welcome > ol > li { + padding-bottom: .5em; +} +#ember-welcome-page-id-selector .postscript { + clear: both; + text-align: center; + padding-top: 3em; + font-size: 14px; + color: #888; + font-style: italic; + line-height: 2; +} +#ember-welcome-page-id-selector .postscript code { + background-color: #F8E7CF; + border-radius: 3px; + font-family: Menlo, Courier, monospace; + font-size: 0.9em; + padding: 0.2em 0.5em; + margin: 0 0.1em; +} +@media (max-width: 700px) { + #ember-welcome-page-id-selector { + padding: 1em; + } + #ember-welcome-page-id-selector .columns { + flex-direction: column; + } + #ember-welcome-page-id-selector .welcome, + #ember-welcome-page-id-selector .tomster { + } + #ember-welcome-page-id-selector .tomster img { + width: 50%; + margin: auto; + display: block; + } + #ember-welcome-page-id-selector h2 { + text-align: center; + } +} +@media (max-width: 400px) { + #ember-welcome-page-id-selector .tomster img { + width: 60%; + } + #ember-welcome-page-id-selector .welcome, + #ember-welcome-page-id-selector .tomster { + width: 100%; + float: none; + margin: auto; + } +} diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js new file mode 100644 index 0000000000..59c9988960 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js @@ -0,0 +1,86407 @@ +window.EmberENV = {"FEATURES":{},"EXTEND_PROTOTYPES":{"Date":false}}; +var runningTests = false; + + + +;var loader, define, requireModule, require, requirejs; + +(function (global) { + 'use strict'; + + function dict() { + var obj = Object.create(null); + obj['__'] = undefined; + delete obj['__']; + return obj; + } + + // Save off the original values of these globals, so we can restore them if someone asks us to + var oldGlobals = { + loader: loader, + define: define, + requireModule: requireModule, + require: require, + requirejs: requirejs + }; + + requirejs = require = requireModule = function (id) { + var pending = []; + var mod = findModule(id, '(require)', pending); + + for (var i = pending.length - 1; i >= 0; i--) { + pending[i].exports(); + } + + return mod.module.exports; + }; + + loader = { + noConflict: function (aliases) { + var oldName, newName; + + for (oldName in aliases) { + if (aliases.hasOwnProperty(oldName)) { + if (oldGlobals.hasOwnProperty(oldName)) { + newName = aliases[oldName]; + + global[newName] = global[oldName]; + global[oldName] = oldGlobals[oldName]; + } + } + } + }, + // Option to enable or disable the generation of default exports + makeDefaultExport: true + }; + + var registry = dict(); + var seen = dict(); + + var uuid = 0; + + function unsupportedModule(length) { + throw new Error('an unsupported module was defined, expected `define(id, deps, module)` instead got: `' + length + '` arguments to define`'); + } + + var defaultDeps = ['require', 'exports', 'module']; + + function Module(id, deps, callback, alias) { + this.uuid = uuid++; + this.id = id; + this.deps = !deps.length && callback.length ? defaultDeps : deps; + this.module = { exports: {} }; + this.callback = callback; + this.hasExportsAsDep = false; + this.isAlias = alias; + this.reified = new Array(deps.length); + + /* + Each module normally passes through these states, in order: + new : initial state + pending : this module is scheduled to be executed + reifying : this module's dependencies are being executed + reified : this module's dependencies finished executing successfully + errored : this module's dependencies failed to execute + finalized : this module executed successfully + */ + this.state = 'new'; + } + + Module.prototype.makeDefaultExport = function () { + var exports = this.module.exports; + if (exports !== null && (typeof exports === 'object' || typeof exports === 'function') && exports['default'] === undefined && Object.isExtensible(exports)) { + exports['default'] = exports; + } + }; + + Module.prototype.exports = function () { + // if finalized, there is no work to do. If reifying, there is a + // circular dependency so we must return our (partial) exports. + if (this.state === 'finalized' || this.state === 'reifying') { + return this.module.exports; + } + + + if (loader.wrapModules) { + this.callback = loader.wrapModules(this.id, this.callback); + } + + this.reify(); + + var result = this.callback.apply(this, this.reified); + this.reified.length = 0; + this.state = 'finalized'; + + if (!(this.hasExportsAsDep && result === undefined)) { + this.module.exports = result; + } + if (loader.makeDefaultExport) { + this.makeDefaultExport(); + } + return this.module.exports; + }; + + Module.prototype.unsee = function () { + this.state = 'new'; + this.module = { exports: {} }; + }; + + Module.prototype.reify = function () { + if (this.state === 'reified') { + return; + } + this.state = 'reifying'; + try { + this.reified = this._reify(); + this.state = 'reified'; + } finally { + if (this.state === 'reifying') { + this.state = 'errored'; + } + } + }; + + Module.prototype._reify = function () { + var reified = this.reified.slice(); + for (var i = 0; i < reified.length; i++) { + var mod = reified[i]; + reified[i] = mod.exports ? mod.exports : mod.module.exports(); + } + return reified; + }; + + Module.prototype.findDeps = function (pending) { + if (this.state !== 'new') { + return; + } + + this.state = 'pending'; + + var deps = this.deps; + + for (var i = 0; i < deps.length; i++) { + var dep = deps[i]; + var entry = this.reified[i] = { exports: undefined, module: undefined }; + if (dep === 'exports') { + this.hasExportsAsDep = true; + entry.exports = this.module.exports; + } else if (dep === 'require') { + entry.exports = this.makeRequire(); + } else if (dep === 'module') { + entry.exports = this.module; + } else { + entry.module = findModule(resolve(dep, this.id), this.id, pending); + } + } + }; + + Module.prototype.makeRequire = function () { + var id = this.id; + var r = function (dep) { + return require(resolve(dep, id)); + }; + r['default'] = r; + r.moduleId = id; + r.has = function (dep) { + return has(resolve(dep, id)); + }; + return r; + }; + + define = function (id, deps, callback) { + var module = registry[id]; + + // If a module for this id has already been defined and is in any state + // other than `new` (meaning it has been or is currently being required), + // then we return early to avoid redefinition. + if (module && module.state !== 'new') { + return; + } + + if (arguments.length < 2) { + unsupportedModule(arguments.length); + } + + if (!Array.isArray(deps)) { + callback = deps; + deps = []; + } + + if (callback instanceof Alias) { + registry[id] = new Module(callback.id, deps, callback, true); + } else { + registry[id] = new Module(id, deps, callback, false); + } + }; + + define.exports = function (name, defaultExport) { + var module = registry[name]; + + // If a module for this name has already been defined and is in any state + // other than `new` (meaning it has been or is currently being required), + // then we return early to avoid redefinition. + if (module && module.state !== 'new') { + return; + } + + module = new Module(name, [], noop, null); + module.module.exports = defaultExport; + module.state = 'finalized'; + registry[name] = module; + + return module; + }; + + function noop() {} + // we don't support all of AMD + // define.amd = {}; + + function Alias(id) { + this.id = id; + } + + define.alias = function (id, target) { + if (arguments.length === 2) { + return define(target, new Alias(id)); + } + + return new Alias(id); + }; + + function missingModule(id, referrer) { + throw new Error('Could not find module `' + id + '` imported from `' + referrer + '`'); + } + + function findModule(id, referrer, pending) { + var mod = registry[id] || registry[id + '/index']; + + while (mod && mod.isAlias) { + mod = registry[mod.id]; + } + + if (!mod) { + missingModule(id, referrer); + } + + if (pending && mod.state !== 'pending' && mod.state !== 'finalized') { + mod.findDeps(pending); + pending.push(mod); + } + return mod; + } + + function resolve(child, id) { + if (child.charAt(0) !== '.') { + return child; + } + + + var parts = child.split('/'); + var nameParts = id.split('/'); + var parentBase = nameParts.slice(0, -1); + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i]; + + if (part === '..') { + if (parentBase.length === 0) { + throw new Error('Cannot access parent module of root'); + } + parentBase.pop(); + } else if (part === '.') { + continue; + } else { + parentBase.push(part); + } + } + + return parentBase.join('/'); + } + + function has(id) { + return !!(registry[id] || registry[id + '/index']); + } + + requirejs.entries = requirejs._eak_seen = registry; + requirejs.has = has; + requirejs.unsee = function (id) { + findModule(id, '(unsee)', false).unsee(); + }; + + requirejs.clear = function () { + requirejs.entries = requirejs._eak_seen = registry = dict(); + seen = dict(); + }; + + // This code primes the JS engine for good performance by warming the + // JIT compiler for these functions. + define('foo', function () {}); + define('foo/bar', [], function () {}); + define('foo/asdf', ['module', 'exports', 'require'], function (module, exports, require) { + if (require.has('foo/bar')) { + require('foo/bar'); + } + }); + define('foo/baz', [], define.alias('foo')); + define('foo/quz', define.alias('foo')); + define.alias('foo', 'foo/qux'); + define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function () {}); + define('foo/main', ['foo/bar'], function () {}); + define.exports('foo/exports', {}); + + require('foo/exports'); + require('foo/main'); + require.unsee('foo/bar'); + + requirejs.clear(); + + if (typeof exports === 'object' && typeof module === 'object' && module.exports) { + module.exports = { require: require, define: define }; + } +})(this); +;/*! + * jQuery JavaScript Library v3.3.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2018-01-20T17:24Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var document = window.document; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var concat = arr.concat; + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + + + + var preservedScriptAttributes = { + type: true, + src: true, + noModule: true + }; + + function DOMEval( code, doc, node ) { + doc = doc || document; + + var i, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + if ( node[ i ] ) { + script[ i ] = node[ i ]; + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.3.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android <=4.0 only + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + + if ( copyIsArray ) { + copyIsArray = false; + clone = src && Array.isArray( src ) ? src : []; + + } else { + clone = src && jQuery.isPlainObject( src ) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + + /* eslint-disable no-unused-vars */ + // See https://github.com/eslint/eslint/issues/6125 + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a global context + globalEval: function( code ) { + DOMEval( code ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // Support: Android <=4.0 only + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.3 + * https://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-08-08 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + disabledAncestor = addCombinator( + function( elem ) { + return elem.disabled === true && ("form" in elem || "label" in elem); + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[i] = "#" + nid + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement("fieldset"); + + try { + return !!fn( el ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + disabledAncestor( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( preferredDoc !== document && + (subWindow = document.defaultView) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( el ) { + el.className = "i"; + return !el.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( el ) { + el.appendChild( document.createComment("") ); + return !el.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + }); + + // ID filter and find + if ( support.getById ) { + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( (elem = elems[i++]) ) { + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( el ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement("input"); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll(":enabled").length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll(":disabled").length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( el ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === document ? -1 : + b === document ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + !compilerCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return (sel + "").replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( (oldCache = uniqueCache[ key ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context === document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, xml) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( el ) { + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( el ) { + return el.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +}; +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( nodeName( elem, "iframe" ) ) { + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the master Deferred + master = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + master.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( master.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return master.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + } + + return master.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + jQuery.contains( elem.ownerDocument, elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + +var swap = function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // Support: IE <=9 only + option: [ 1, "" ], + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
        " ], + col: [ 2, "", "
        " ], + tr: [ 2, "", "
        " ], + td: [ 3, "", "
        " ], + + _default: [ 0, "", "" ] +}; + +// Support: IE <=9 only +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +} )(); +var documentElement = document.documentElement; + + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 only +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + // Make a writable jQuery.Event from the native event object + var event = jQuery.event.fix( nativeEvent ); + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + /* eslint-disable max-len */ + + // See https://github.com/eslint/eslint/issues/3229 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + + /* eslint-enable */ + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.access( src ); + pdataCur = dataPriv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + div.style.position = "absolute"; + scrollboxSizeVal = div.offsetWidth === 36 || "absolute"; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }, + + cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style; + +// Return a css property mapped to a potentially vendor prefixed property +function vendorPropName( name ) { + + // Shortcut for names that are not vendor prefixed + if ( name in emptyStyle ) { + return name; + } + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a property mapped along what jQuery.cssProps suggests or to +// a vendor prefixed property. +function finalPropName( name ) { + var ret = jQuery.cssProps[ name ]; + if ( !ret ) { + ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; + } + return ret; +} + +function setPositiveNumber( elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + ) ); + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + val = curCSS( elem, dimension, styles ), + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox; + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + // Check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = valueIsBorderBox && + ( support.boxSizingReliable() || val === elem.style[ dimension ] ); + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + if ( val === "auto" || + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) { + + val = elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ]; + + // offsetWidth/offsetHeight provide border-box values + valueIsBorderBox = true; + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + if ( type === "number" ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra && boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ); + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && support.scrollboxSize() === styles.position ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && + ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || + jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = Date.now(); + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + + +jQuery._evalUrl = function( url ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + "throws": true + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + + + + + diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/robots.txt b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/robots.txt new file mode 100644 index 0000000000..f5916452e5 --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/robots.txt @@ -0,0 +1,3 @@ +# http://www.robotstxt.org +User-agent: * +Disallow: diff --git a/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/testem.js b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/testem.js new file mode 100644 index 0000000000..cb666df67c --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/testem.js @@ -0,0 +1,19 @@ +/* + * This is dummy file that exists for the sole purpose + * of allowing tests to run directly in the browser as + * well as by Testem. + * + * Testem is configured to run tests directly against + * the test build of index.html, which requires a + * snippet to load the testem.js file: + * + * This has to go before the qunit framework and app + * tests are loaded. + * + * Testem internally supplies this file. However, if you + * run the tests directly in the browser (localhost:8000/tests), + * this file does not exist. + * + * Hence the purpose of this fake file. This file is served + * directly from the express server to satisify the script load. + */ -- cgit v1.2.3