iqvoc 4.8.1 → 4.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +1 -3
- data/Gemfile.lock +9 -15
- data/app/assets/javascripts/framework.js +10 -10
- data/app/assets/javascripts/iqvoc/iqvoc.js +3 -3
- data/app/assets/javascripts/iqvoc/langselect.js +1 -1
- data/app/assets/stylesheets/_framework.scss +4 -4
- data/app/assets/stylesheets/iqvoc/components/_components.scss +6 -4
- data/app/assets/stylesheets/iqvoc/components/_entity_select.scss +1 -1
- data/app/assets/stylesheets/iqvoc/components/_notes.scss +1 -1
- data/app/assets/stylesheets/iqvoc/mixins/_mixins.scss +6 -2
- data/app/assets/stylesheets/iqvoc/settings/_bootstrap.scss +6 -7
- data/app/models/ability.rb +11 -2
- data/app/models/user.rb +4 -0
- data/app/views/collections/show_unpublished.html.erb +17 -14
- data/app/views/concepts/show_unpublished.html.erb +14 -11
- data/app/views/dashboard/index.html.erb +3 -3
- data/app/views/layouts/_controls.html.erb +3 -1
- data/app/views/layouts/application.html.erb +1 -1
- data/app/views/search_results/sections/_datasets.html.erb +1 -1
- data/app/views/search_results/sections/_languages.html.erb +1 -1
- data/config/initializers/assets.rb +2 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/en.yml +2 -1
- data/lib/iqvoc/configuration/core.rb +1 -4
- data/lib/iqvoc/version.rb +1 -1
- data/public/export/151644452539207638297695765208032122293.nt +28 -0
- data/public/export/213987519797093111958174693910375706600.nt +28 -0
- data/public/export/220598335291843294191166072463233833628.nt +28 -0
- data/public/export/242910803893093872189091525372405462985.nt +28 -0
- data/public/export/25981.nt +28 -0
- data/public/export/3199.nt +28 -0
- data/public/export/50650725356216411444149011685563244498.nt +28 -0
- data/public/export/801.nt +28 -0
- data/public/uploads/import/596c40774bb5979c8de5ce6daa58de35.nt +259 -0
- data/public/uploads/import/77ea050ae3a00aedd2a6e4158454a54d.nt +259 -0
- data/public/uploads/import/7cc9feb5e9180d29865b9d4e81694921.nt +259 -0
- data/public/uploads/import/8e0bf83a2ca503753efaa29bff6f84f6.nt +259 -0
- data/public/uploads/import/a712bf10adc7546d5c567194d7a13603.nt +259 -0
- data/public/uploads/import/a7e315db905ac7808126b600dd1f6203.nt +259 -0
- data/public/uploads/import/d038a0416528900076cdb4a28211a84c.nt +259 -0
- data/public/uploads/import/d250e9b7a2819d62a43d5270031eaa6d.nt +259 -0
- data/public/uploads/tmp/1422290833-38334-3392/hobbies.nt +259 -0
- data/public/uploads/tmp/1422292996-38701-6635/hobbies.nt +259 -0
- data/public/uploads/tmp/1422293183-38751-2662/hobbies.nt +259 -0
- data/public/uploads/tmp/1422293478-38811-6215/hobbies.nt +259 -0
- data/public/uploads/tmp/1422300870-38980-1343/hobbies.nt +259 -0
- data/public/uploads/tmp/1422372626-67843-5956/hobbies.nt +259 -0
- data/public/uploads/tmp/1422374262-68176-3483/hobbies.nt +259 -0
- data/public/uploads/tmp/1422374611-68319-4455/hobbies.nt +259 -0
- data/test/integration/authentication_test.rb +2 -2
- data/vendor/assets/bower_components/URIjs/LICENSE.txt +21 -0
- data/vendor/assets/bower_components/URIjs/README.md +496 -0
- data/vendor/assets/bower_components/URIjs/bower.json +29 -0
- data/vendor/assets/bower_components/URIjs/contributing.md +19 -0
- data/vendor/assets/bower_components/URIjs/src/IPv6.js +188 -0
- data/vendor/assets/bower_components/URIjs/src/SecondLevelDomains.js +241 -0
- data/vendor/assets/bower_components/URIjs/src/URI.fragmentQuery.js +104 -0
- data/vendor/assets/bower_components/URIjs/src/URI.fragmentURI.js +97 -0
- data/vendor/assets/{javascripts → bower_components/URIjs/src}/URI.js +45 -49
- data/vendor/assets/bower_components/URIjs/src/URI.min.js +84 -0
- data/vendor/assets/bower_components/URIjs/src/URITemplate.js +499 -0
- data/vendor/assets/bower_components/URIjs/src/jquery.URI.js +235 -0
- data/vendor/assets/bower_components/URIjs/src/jquery.URI.min.js +7 -0
- data/vendor/assets/bower_components/URIjs/src/punycode.js +508 -0
- data/vendor/assets/bower_components/bootstrap-sass/CHANGELOG.md +183 -0
- data/vendor/assets/bower_components/bootstrap-sass/CONTRIBUTING.md +86 -0
- data/vendor/assets/bower_components/bootstrap-sass/LICENSE +21 -0
- data/vendor/assets/bower_components/bootstrap-sass/README.md +330 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap-sprockets.js +12 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap.js +2306 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap.min.js +7 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/affix.js +162 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/alert.js +94 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/button.js +116 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/carousel.js +237 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/collapse.js +211 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/dropdown.js +161 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/modal.js +324 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/popover.js +113 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/scrollspy.js +175 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/tab.js +153 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/tooltip.js +472 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/javascripts/bootstrap/transition.js +59 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/_bootstrap.scss +50 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_badges.scss +67 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_button-groups.scss +243 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_buttons.scss +160 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_carousel.scss +269 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_close.scss +36 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_code.scss +69 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_dropdowns.scss +214 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_forms.scss +570 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_glyphicons.scss +301 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_grid.scss +84 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_input-groups.scss +166 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_jumbotron.scss +50 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_list-group.scss +124 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_media.scss +61 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_mixins.scss +39 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_modals.scss +148 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_navbar.scss +663 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_navs.scss +244 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_normalize.scss +427 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_pager.scss +54 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_pagination.scss +88 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss +265 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_popovers.scss +135 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_print.scss +107 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_responsive-utilities.scss +177 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_scaffolding.scss +150 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss +234 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_theme.scss +273 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tooltip.scss +103 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_type.scss +298 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_utilities.scss +56 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss +862 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_background-variant.scss +11 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_buttons.scss +52 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_list-group.scss +31 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_pagination.scss +23 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +11 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/vendor/assets/bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/vendor/assets/bower_components/bootstrap-sass/bower.json +40 -0
- data/vendor/assets/bower_components/bootstrap-sass/composer.json +35 -0
- data/vendor/assets/bower_components/bootstrap-sass/package.json +30 -0
- data/vendor/assets/bower_components/bootstrap-sass/sache.json +5 -0
- data/vendor/assets/bower_components/html5shiv/Gruntfile.js +61 -0
- data/vendor/assets/bower_components/html5shiv/bower.json +15 -0
- data/vendor/assets/bower_components/html5shiv/dist/html5shiv-printshiv.js +520 -0
- data/vendor/assets/bower_components/html5shiv/dist/html5shiv-printshiv.min.js +4 -0
- data/vendor/assets/bower_components/html5shiv/dist/html5shiv.js +322 -0
- data/vendor/assets/bower_components/html5shiv/dist/html5shiv.min.js +4 -0
- data/vendor/assets/bower_components/html5shiv/package.json +16 -0
- data/vendor/assets/bower_components/html5shiv/readme.md +152 -0
- data/vendor/assets/bower_components/jqtree/LICENSE +202 -0
- data/vendor/assets/bower_components/jqtree/README.md +24 -0
- data/vendor/assets/bower_components/jqtree/_config.yml +18 -0
- data/vendor/assets/bower_components/jqtree/_entries/01_general.md +7 -0
- data/vendor/assets/bower_components/jqtree/_entries/02_introduction.md +9 -0
- data/vendor/assets/bower_components/jqtree/_entries/03_features.md +15 -0
- data/vendor/assets/bower_components/jqtree/_entries/04_demo.html +34 -0
- data/vendor/assets/bower_components/jqtree/_entries/05_requirements.md +6 -0
- data/vendor/assets/bower_components/jqtree/_entries/06_downloads.md +9 -0
- data/vendor/assets/bower_components/jqtree/_entries/07_tutorial.md +77 -0
- data/vendor/assets/bower_components/jqtree/_entries/08_examples.md +8 -0
- data/vendor/assets/bower_components/jqtree/_entries/09_changelog.md +179 -0
- data/vendor/assets/bower_components/jqtree/_entries/10_options.md +6 -0
- data/vendor/assets/bower_components/jqtree/_entries/11_autoescape.md +6 -0
- data/vendor/assets/bower_components/jqtree/_entries/12_autoopen.md +28 -0
- data/vendor/assets/bower_components/jqtree/_entries/13_closedicon.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/14_data.md +41 -0
- data/vendor/assets/bower_components/jqtree/_entries/15_datafilter.md +17 -0
- data/vendor/assets/bower_components/jqtree/_entries/16_data-url.md +21 -0
- data/vendor/assets/bower_components/jqtree/_entries/17_draganddrop.md +18 -0
- data/vendor/assets/bower_components/jqtree/_entries/18_keyboardsupport.md +14 -0
- data/vendor/assets/bower_components/jqtree/_entries/19_oncanmove.md +22 -0
- data/vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md +22 -0
- data/vendor/assets/bower_components/jqtree/_entries/21_oncanselectnode.md +26 -0
- data/vendor/assets/bower_components/jqtree/_entries/22_oncreateli.md +16 -0
- data/vendor/assets/bower_components/jqtree/_entries/23_onismovehandle.md +17 -0
- data/vendor/assets/bower_components/jqtree/_entries/24_onloadfailed.md +15 -0
- data/vendor/assets/bower_components/jqtree/_entries/25_openedicon.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/26_openfolderdelay.md +13 -0
- data/vendor/assets/bower_components/jqtree/_entries/27_savestate.md +42 -0
- data/vendor/assets/bower_components/jqtree/_entries/28_selectable.md +18 -0
- data/vendor/assets/bower_components/jqtree/_entries/29_slide.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/30_usecontextmenu.md +14 -0
- data/vendor/assets/bower_components/jqtree/_entries/31_functions.md +6 -0
- data/vendor/assets/bower_components/jqtree/_entries/32_addnodeafter.md +20 -0
- data/vendor/assets/bower_components/jqtree/_entries/33_addnodebefore.md +8 -0
- data/vendor/assets/bower_components/jqtree/_entries/34_appendnode.md +33 -0
- data/vendor/assets/bower_components/jqtree/_entries/35_closenode.md +23 -0
- data/vendor/assets/bower_components/jqtree/_entries/36_getnodebyid.md +21 -0
- data/vendor/assets/bower_components/jqtree/_entries/37_getselectednode.md +10 -0
- data/vendor/assets/bower_components/jqtree/_entries/38_getstate.md +19 -0
- data/vendor/assets/bower_components/jqtree/_entries/39_gettree.md +8 -0
- data/vendor/assets/bower_components/jqtree/_entries/40_loaddata.md +46 -0
- data/vendor/assets/bower_components/jqtree/_entries/41_loaddatafromurl.md +55 -0
- data/vendor/assets/bower_components/jqtree/_entries/42_movedown.md +8 -0
- data/vendor/assets/bower_components/jqtree/_entries/43_movenode.md +15 -0
- data/vendor/assets/bower_components/jqtree/_entries/44_moveup.md +8 -0
- data/vendor/assets/bower_components/jqtree/_entries/45_opennode.md +29 -0
- data/vendor/assets/bower_components/jqtree/_entries/46_addparentnode.md +20 -0
- data/vendor/assets/bower_components/jqtree/_entries/47_reload.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/48_removenode.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/49_selectnode.md +24 -0
- data/vendor/assets/bower_components/jqtree/_entries/50_scrolltonode.md +13 -0
- data/vendor/assets/bower_components/jqtree/_entries/51_setoption.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/52_setstate.md +8 -0
- data/vendor/assets/bower_components/jqtree/_entries/53_toggle.md +8 -0
- data/vendor/assets/bower_components/jqtree/_entries/54_tojson.md +13 -0
- data/vendor/assets/bower_components/jqtree/_entries/55_updatenode.md +33 -0
- data/vendor/assets/bower_components/jqtree/_entries/56_events.md +6 -0
- data/vendor/assets/bower_components/jqtree/_entries/57_tree-click.md +37 -0
- data/vendor/assets/bower_components/jqtree/_entries/58_tree-close.md +15 -0
- data/vendor/assets/bower_components/jqtree/_entries/59_tree-contextmenu.md +21 -0
- data/vendor/assets/bower_components/jqtree/_entries/60_tree-dblclick.md +19 -0
- data/vendor/assets/bower_components/jqtree/_entries/61_tree-init.md +15 -0
- data/vendor/assets/bower_components/jqtree/_entries/62_tree-move.md +71 -0
- data/vendor/assets/bower_components/jqtree/_entries/63_tree-open.md +15 -0
- data/vendor/assets/bower_components/jqtree/_entries/64_tree-select.md +28 -0
- data/vendor/assets/bower_components/jqtree/_entries/65_multiple-selection.md +9 -0
- data/vendor/assets/bower_components/jqtree/_entries/66_add-to-selection.md +11 -0
- data/vendor/assets/bower_components/jqtree/_entries/67_get-selected-nodes.md +10 -0
- data/vendor/assets/bower_components/jqtree/_entries/68_is-node-selected.md +11 -0
- data/vendor/assets/bower_components/jqtree/_entries/69_remove-from-selection.md +11 -0
- data/vendor/assets/bower_components/jqtree/_entries/70_node-functions.md +13 -0
- data/vendor/assets/bower_components/jqtree/_entries/71_children.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/72_getdata.md +10 -0
- data/vendor/assets/bower_components/jqtree/_entries/73_getlevel.md +13 -0
- data/vendor/assets/bower_components/jqtree/_entries/74_getnextnode.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/75_getnextsibling.md +10 -0
- data/vendor/assets/bower_components/jqtree/_entries/76_getpreviousnode.md +12 -0
- data/vendor/assets/bower_components/jqtree/_entries/77_getprevioussibling.md +10 -0
- data/vendor/assets/bower_components/jqtree/_entries/78_parent.md +10 -0
- data/vendor/assets/bower_components/jqtree/_examples/01_load_json_data.html +47 -0
- data/vendor/assets/bower_components/jqtree/_examples/02_load_json_data_from_server.html +31 -0
- data/vendor/assets/bower_components/jqtree/_examples/03_drag_and_drop.html +45 -0
- data/vendor/assets/bower_components/jqtree/_examples/04_save_state.html +52 -0
- data/vendor/assets/bower_components/jqtree/_examples/05_load_on_demand.html +70 -0
- data/vendor/assets/bower_components/jqtree/_examples/06_autoescape.html +47 -0
- data/vendor/assets/bower_components/jqtree/_examples/07_autoscroll.html +23 -0
- data/vendor/assets/bower_components/jqtree/_examples/08_multiple_select.html +72 -0
- data/vendor/assets/bower_components/jqtree/_examples/09_custom_html.html +68 -0
- data/vendor/assets/bower_components/jqtree/_examples/10_icon_buttons.html +27 -0
- data/vendor/assets/bower_components/jqtree/_layouts/base.html +48 -0
- data/vendor/assets/bower_components/jqtree/_layouts/frontpage.html +20 -0
- data/vendor/assets/bower_components/jqtree/_layouts/page.html +7 -0
- data/vendor/assets/bower_components/jqtree/bower.json +12 -0
- data/vendor/assets/bower_components/jqtree/gulpfile.coffee +30 -0
- data/vendor/assets/bower_components/jqtree/gulpfile.js +2 -0
- data/vendor/assets/bower_components/jqtree/index.html +48 -0
- data/vendor/assets/bower_components/jqtree/jqtree-circle.png +0 -0
- data/vendor/assets/bower_components/jqtree/jqtree.css +143 -0
- data/vendor/assets/bower_components/jqtree/jqtree.jquery.json +23 -0
- data/vendor/assets/bower_components/jqtree/package.json +23 -0
- data/vendor/assets/bower_components/jqtree/phantomjs/runner.js +193 -0
- data/vendor/assets/bower_components/jqtree/phantomjs/server.js +14 -0
- data/vendor/assets/bower_components/jqtree/screenshot.png +0 -0
- data/vendor/assets/bower_components/jqtree/sitemap.txt +11 -0
- data/vendor/assets/bower_components/jqtree/src/drag_and_drop_handler.coffee +466 -0
- data/vendor/assets/bower_components/jqtree/src/elements_renderer.coffee +198 -0
- data/vendor/assets/bower_components/jqtree/src/key_handler.coffee +92 -0
- data/vendor/assets/bower_components/jqtree/src/mouse.widget.coffee +181 -0
- data/vendor/assets/bower_components/jqtree/src/node.coffee +431 -0
- data/vendor/assets/bower_components/jqtree/src/node_element.coffee +144 -0
- data/vendor/assets/bower_components/jqtree/src/save_state_handler.coffee +191 -0
- data/vendor/assets/bower_components/jqtree/src/scroll_handler.coffee +100 -0
- data/vendor/assets/bower_components/jqtree/src/select_node_handler.coffee +76 -0
- data/vendor/assets/bower_components/jqtree/src/simple.widget.coffee +102 -0
- data/vendor/assets/bower_components/jqtree/src/test.js +1945 -0
- data/vendor/assets/bower_components/jqtree/src/tree.jquery.coffee +772 -0
- data/vendor/assets/bower_components/jqtree/src/util.coffee +117 -0
- data/vendor/assets/bower_components/jqtree/src/version.coffee +1 -0
- data/vendor/assets/bower_components/jqtree/static/bower.json +13 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/blanket/dist/qunit/blanket.js +5430 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/bootstrap/dist/css/bootstrap-theme.min.css +5 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/bootstrap/dist/css/bootstrap.min.css +5 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/fontawesome/css/font-awesome.min.css +4 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/fontawesome/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/fontawesome/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/fontawesome/fonts/fontawesome-webfont.svg +520 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/fontawesome/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/fontawesome/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/jquery-cookie/jquery.cookie.js +117 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/jquery-mockjax/jquery.mockjax.js +692 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/jquery/dist/jquery.min.js +5 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/pygments/css/monokai.css +63 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/qunit/qunit/qunit.css +264 -0
- data/vendor/assets/bower_components/jqtree/static/bower_components/qunit/qunit/qunit.js +2819 -0
- data/vendor/assets/bower_components/jqtree/static/documentation.css +165 -0
- data/vendor/assets/bower_components/jqtree/static/documentation.js +51 -0
- data/vendor/assets/bower_components/jqtree/static/example.css +53 -0
- data/vendor/assets/bower_components/jqtree/static/example_data.js +128 -0
- data/vendor/assets/bower_components/jqtree/static/examples/autoescape.js +19 -0
- data/vendor/assets/bower_components/jqtree/static/examples/autoscroll.js +8 -0
- data/vendor/assets/bower_components/jqtree/static/examples/custom_html.js +32 -0
- data/vendor/assets/bower_components/jqtree/static/examples/drag_and_drop.js +15 -0
- data/vendor/assets/bower_components/jqtree/static/examples/icon_buttons.js +14 -0
- data/vendor/assets/bower_components/jqtree/static/examples/load_json_data.js +21 -0
- data/vendor/assets/bower_components/jqtree/static/examples/load_json_data_from_server.js +11 -0
- data/vendor/assets/bower_components/jqtree/static/examples/load_on_demand.js +20 -0
- data/vendor/assets/bower_components/jqtree/static/examples/multiple_select.js +27 -0
- data/vendor/assets/bower_components/jqtree/static/examples/save_state.js +13 -0
- data/vendor/assets/bower_components/jqtree/static/jquery-1.11.2.min.js +4 -0
- data/vendor/assets/bower_components/jqtree/static/spinner.gif +0 -0
- data/vendor/assets/bower_components/jqtree/test/test.html +23 -0
- data/vendor/assets/bower_components/jqtree/test/test.js +2604 -0
- data/vendor/assets/{javascripts → bower_components/jqtree}/tree.jquery.js +2274 -1932
- data/vendor/assets/bower_components/jquery-ujs/CHANGELOG.md +24 -0
- data/vendor/assets/bower_components/jquery-ujs/MIT-LICENSE.txt +20 -0
- data/vendor/assets/bower_components/jquery-ujs/README.md +72 -0
- data/vendor/assets/bower_components/jquery-ujs/bower.json +20 -0
- data/vendor/assets/bower_components/jquery-ujs/src/rails.js +469 -0
- data/vendor/assets/bower_components/jquery/MIT-LICENSE.txt +21 -0
- data/vendor/assets/bower_components/jquery/bower.json +27 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.js +9205 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.min.js +5 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/bower_components/jquery/src/ajax.js +786 -0
- data/vendor/assets/bower_components/jquery/src/ajax/jsonp.js +89 -0
- data/vendor/assets/bower_components/jquery/src/ajax/load.js +75 -0
- data/vendor/assets/bower_components/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/bower_components/jquery/src/ajax/parseXML.js +28 -0
- data/vendor/assets/bower_components/jquery/src/ajax/script.js +64 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/bower_components/jquery/src/ajax/xhr.js +136 -0
- data/vendor/assets/bower_components/jquery/src/attributes.js +11 -0
- data/vendor/assets/bower_components/jquery/src/attributes/attr.js +141 -0
- data/vendor/assets/bower_components/jquery/src/attributes/classes.js +158 -0
- data/vendor/assets/bower_components/jquery/src/attributes/prop.js +94 -0
- data/vendor/assets/bower_components/jquery/src/attributes/support.js +35 -0
- data/vendor/assets/bower_components/jquery/src/attributes/val.js +161 -0
- data/vendor/assets/bower_components/jquery/src/callbacks.js +205 -0
- data/vendor/assets/bower_components/jquery/src/core.js +497 -0
- data/vendor/assets/bower_components/jquery/src/core/access.js +60 -0
- data/vendor/assets/bower_components/jquery/src/core/init.js +123 -0
- data/vendor/assets/bower_components/jquery/src/core/parseHTML.js +39 -0
- data/vendor/assets/bower_components/jquery/src/core/ready.js +97 -0
- data/vendor/assets/bower_components/jquery/src/core/var/rsingleTag.js +4 -0
- data/vendor/assets/bower_components/jquery/src/css.js +450 -0
- data/vendor/assets/bower_components/jquery/src/css/addGetHookIf.js +22 -0
- data/vendor/assets/bower_components/jquery/src/css/curCSS.js +57 -0
- data/vendor/assets/bower_components/jquery/src/css/defaultDisplay.js +70 -0
- data/vendor/assets/bower_components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/vendor/assets/bower_components/jquery/src/css/support.js +96 -0
- data/vendor/assets/bower_components/jquery/src/css/swap.js +28 -0
- data/vendor/assets/bower_components/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/bower_components/jquery/src/css/var/getStyles.js +12 -0
- data/vendor/assets/bower_components/jquery/src/css/var/isHidden.js +13 -0
- data/vendor/assets/bower_components/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/bower_components/jquery/src/data.js +178 -0
- data/vendor/assets/bower_components/jquery/src/data/Data.js +181 -0
- data/vendor/assets/bower_components/jquery/src/data/accepts.js +20 -0
- data/vendor/assets/bower_components/jquery/src/data/var/data_priv.js +5 -0
- data/vendor/assets/bower_components/jquery/src/data/var/data_user.js +5 -0
- data/vendor/assets/bower_components/jquery/src/deferred.js +149 -0
- data/vendor/assets/bower_components/jquery/src/deprecated.js +13 -0
- data/vendor/assets/bower_components/jquery/src/dimensions.js +50 -0
- data/vendor/assets/bower_components/jquery/src/effects.js +648 -0
- data/vendor/assets/bower_components/jquery/src/effects/Tween.js +114 -0
- data/vendor/assets/bower_components/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/bower_components/jquery/src/event.js +868 -0
- data/vendor/assets/bower_components/jquery/src/event/ajax.js +13 -0
- data/vendor/assets/bower_components/jquery/src/event/alias.js +39 -0
- data/vendor/assets/bower_components/jquery/src/event/support.js +9 -0
- data/vendor/assets/bower_components/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/bower_components/jquery/src/exports/global.js +32 -0
- data/vendor/assets/bower_components/jquery/src/intro.js +44 -0
- data/vendor/assets/bower_components/jquery/src/jquery.js +37 -0
- data/vendor/assets/bower_components/jquery/src/manipulation.js +580 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/_evalUrl.js +18 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/support.js +32 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/bower_components/jquery/src/offset.js +207 -0
- data/vendor/assets/bower_components/jquery/src/outro.js +1 -0
- data/vendor/assets/bower_components/jquery/src/queue.js +142 -0
- data/vendor/assets/bower_components/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/bower_components/jquery/src/selector-native.js +172 -0
- data/vendor/assets/bower_components/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/bower_components/jquery/src/selector.js +1 -0
- data/vendor/assets/bower_components/jquery/src/serialize.js +111 -0
- data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/assets/bower_components/jquery/src/traversing.js +199 -0
- data/vendor/assets/bower_components/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/bower_components/jquery/src/var/arr.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/class2type.js +4 -0
- data/vendor/assets/bower_components/jquery/src/var/concat.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/push.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/slice.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/strundefined.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/support.js +4 -0
- data/vendor/assets/bower_components/jquery/src/var/toString.js +5 -0
- data/vendor/assets/bower_components/jquery/src/wrap.js +79 -0
- data/vendor/assets/bower_components/pickadate/Gruntfile.js +275 -0
- data/vendor/assets/bower_components/pickadate/bower.json +63 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/legacy.js +10 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/picker.date.js +5 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/picker.js +7 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/picker.time.js +5 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/themes/classic.css +4 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/themes/classic.date.css +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/themes/classic.time.css +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/themes/default.css +4 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/themes/default.date.css +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/themes/default.time.css +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/themes/rtl.css +3 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/ar.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/bg_BG.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/bs_BA.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/ca_ES.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/cs_CZ.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/da_DK.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/de_DE.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/el_GR.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/es_ES.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/et_EE.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/eu_ES.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/fi_FI.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/fr_FR.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/gl_ES.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/he_IL.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/hr_HR.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/hu_HU.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/id_ID.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/is_IS.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/it_IT.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/ja_JP.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/ko_KR.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/ne_NP.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/nl_NL.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/no_NO.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/pl_PL.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/pt_BR.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/pt_PT.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/ro_RO.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/ru_RU.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/sk_SK.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/sl_SI.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/sv_SE.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/th_TH.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/tr_TR.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/uk_UA.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/vi_VN.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/zh_CN.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/compressed/translations/zh_TW.js +1 -0
- data/vendor/assets/bower_components/pickadate/lib/legacy.js +133 -0
- data/vendor/assets/{javascripts/pickadate → bower_components/pickadate/lib}/picker.date.js +60 -28
- data/vendor/assets/{javascripts/pickadate → bower_components/pickadate/lib}/picker.js +41 -25
- data/vendor/assets/bower_components/pickadate/lib/picker.time.js +1014 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/_variables.less +208 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/base.date.less +333 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/base.less +55 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/base.time.less +119 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/classic.date.less +9 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/classic.less +119 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/classic.time.less +49 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/default.date.less +9 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/default.less +246 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/default.time.less +41 -0
- data/vendor/assets/bower_components/pickadate/lib/themes-source/rtl.less +38 -0
- data/vendor/assets/{stylesheets/pickadate/classic.scss → bower_components/pickadate/lib/themes/classic.css} +0 -0
- data/vendor/assets/{stylesheets/pickadate/classic.date.scss → bower_components/pickadate/lib/themes/classic.date.css} +33 -10
- data/vendor/assets/bower_components/pickadate/lib/themes/classic.time.css +132 -0
- data/vendor/assets/bower_components/pickadate/lib/themes/default.css +175 -0
- data/vendor/assets/bower_components/pickadate/lib/themes/default.date.css +301 -0
- data/vendor/assets/bower_components/pickadate/lib/themes/default.time.css +126 -0
- data/vendor/assets/bower_components/pickadate/lib/themes/rtl.css +29 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/ar.js +12 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/bg_BG.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/bs_BA.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/ca_ES.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/cs_CZ.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/da_DK.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/de_DE.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/el_GR.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/es_ES.js +14 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/et_EE.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/eu_ES.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/fi_FI.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/fr_FR.js +18 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/gl_ES.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/he_IL.js +12 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/hr_HR.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/hu_HU.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/id_ID.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/is_IS.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/it_IT.js +14 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/ja_JP.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/ko_KR.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/ne_NP.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/nl_NL.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/no_NO.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/pl_PL.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/pt_BR.js +12 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/pt_PT.js +12 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/ro_RO.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/ru_RU.js +14 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/sk_SK.js +14 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/sl_SI.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/sv_SE.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/th_TH.js +12 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/tr_TR.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/uk_UA.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/vi_VN.js +11 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/zh_CN.js +13 -0
- data/vendor/assets/bower_components/pickadate/lib/translations/zh_TW.js +13 -0
- data/vendor/assets/bower_components/pickadate/package.json +63 -0
- data/vendor/assets/bower_components/pickadate/pickadate.jquery.json +63 -0
- data/vendor/assets/bower_components/typeahead.js/CHANGELOG.md +222 -0
- data/vendor/assets/bower_components/typeahead.js/CONTRIBUTING.md +120 -0
- data/vendor/assets/bower_components/typeahead.js/Gruntfile.js +265 -0
- data/vendor/assets/bower_components/typeahead.js/LICENSE +19 -0
- data/vendor/assets/bower_components/typeahead.js/README.md +188 -0
- data/vendor/assets/bower_components/typeahead.js/bower.json +13 -0
- data/vendor/assets/bower_components/typeahead.js/composer.json +17 -0
- data/vendor/assets/bower_components/typeahead.js/dist/bloodhound.js +727 -0
- data/vendor/assets/bower_components/typeahead.js/dist/bloodhound.min.js +7 -0
- data/vendor/assets/bower_components/typeahead.js/dist/typeahead.bundle.js +1782 -0
- data/vendor/assets/bower_components/typeahead.js/dist/typeahead.bundle.min.js +7 -0
- data/vendor/assets/{javascripts → bower_components/typeahead.js/dist}/typeahead.jquery.js +0 -0
- data/vendor/assets/bower_components/typeahead.js/dist/typeahead.jquery.min.js +7 -0
- data/vendor/assets/bower_components/typeahead.js/doc/bloodhound.md +279 -0
- data/vendor/assets/bower_components/typeahead.js/doc/jquery_typeahead.md +383 -0
- data/vendor/assets/bower_components/typeahead.js/doc/migration/0.10.0.md +234 -0
- data/vendor/assets/bower_components/typeahead.js/karma.conf.js +98 -0
- data/vendor/assets/bower_components/typeahead.js/package.json +57 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/bloodhound.js +234 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/lru_cache.js +99 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/options_parser.js +89 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/persistent_storage.js +131 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/search_index.js +169 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/tokenizers.js +44 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/transport.js +152 -0
- data/vendor/assets/bower_components/typeahead.js/src/bloodhound/version.js +7 -0
- data/vendor/assets/bower_components/typeahead.js/src/common/utils.js +152 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/css.js +77 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/dataset.js +210 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/dropdown.js +245 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js +38 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/event_emitter.js +119 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/highlight.js +84 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/html.js +15 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/input.js +311 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/plugin.js +129 -0
- data/vendor/assets/bower_components/typeahead.js/src/typeahead/typeahead.js +391 -0
- data/vendor/assets/bower_components/typeahead.js/test/bloodhound_spec.js +592 -0
- data/vendor/assets/bower_components/typeahead.js/test/ci +12 -0
- data/vendor/assets/bower_components/typeahead.js/test/dataset_view_spec.js +222 -0
- data/vendor/assets/bower_components/typeahead.js/test/dropdown_view_spec.js +353 -0
- data/vendor/assets/bower_components/typeahead.js/test/event_emitter_spec.js +111 -0
- data/vendor/assets/bower_components/typeahead.js/test/fixtures/ajax_responses.js +19 -0
- data/vendor/assets/bower_components/typeahead.js/test/fixtures/data.js +116 -0
- data/vendor/assets/bower_components/typeahead.js/test/fixtures/html.js +17 -0
- data/vendor/assets/bower_components/typeahead.js/test/helpers/typeahead_mocks.js +71 -0
- data/vendor/assets/bower_components/typeahead.js/test/highlight_spec.js +117 -0
- data/vendor/assets/bower_components/typeahead.js/test/input_view_spec.js +449 -0
- data/vendor/assets/bower_components/typeahead.js/test/integration/test.html +112 -0
- data/vendor/assets/bower_components/typeahead.js/test/integration/test.js +397 -0
- data/vendor/assets/bower_components/typeahead.js/test/lru_cache_spec.js +42 -0
- data/vendor/assets/bower_components/typeahead.js/test/persistent_storage_spec.js +131 -0
- data/vendor/assets/bower_components/typeahead.js/test/playground.html +347 -0
- data/vendor/assets/bower_components/typeahead.js/test/search_index_spec.js +60 -0
- data/vendor/assets/bower_components/typeahead.js/test/tokenizers_spec.js +60 -0
- data/vendor/assets/bower_components/typeahead.js/test/transport_spec.js +197 -0
- data/vendor/assets/bower_components/typeahead.js/test/typeahead_view_spec.js +570 -0
- data/vendor/assets/bower_components/typeahead.js/typeahead.js.jquery.json +40 -0
- metadata +576 -12
- data/vendor/assets/javascripts/html5.js +0 -3
- data/vendor/assets/javascripts/jquery-1.7.1.js +0 -9266
- data/vendor/assets/javascripts/rails.js +0 -373
@@ -0,0 +1,5 @@
|
|
1
|
+
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2
|
+
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
|
3
|
+
},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
|
4
|
+
},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fc=[],Gc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hc)return Hc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ic=a.document.documentElement;function Jc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ic;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ic})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kc=a.jQuery,Lc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lc),b&&a.jQuery===n&&(a.jQuery=Kc),n},typeof b===U&&(a.jQuery=a.$=n),n});
|
5
|
+
//# sourceMappingURL=jquery.min.map
|
@@ -0,0 +1,63 @@
|
|
1
|
+
.hll { background-color: #49483e }
|
2
|
+
.c { color: #75715e } /* Comment */
|
3
|
+
.err { color: #960050; background-color: #1e0010 } /* Error */
|
4
|
+
.k { color: #66d9ef } /* Keyword */
|
5
|
+
.l { color: #ae81ff } /* Literal */
|
6
|
+
.n { color: #f8f8f2 } /* Name */
|
7
|
+
.o { color: #f92672 } /* Operator */
|
8
|
+
.p { color: #f8f8f2 } /* Punctuation */
|
9
|
+
.cm { color: #75715e } /* Comment.Multiline */
|
10
|
+
.cp { color: #75715e } /* Comment.Preproc */
|
11
|
+
.c1 { color: #75715e } /* Comment.Single */
|
12
|
+
.cs { color: #75715e } /* Comment.Special */
|
13
|
+
.gd { color: #f92672 } /* Generic.Deleted */
|
14
|
+
.ge { font-style: italic } /* Generic.Emph */
|
15
|
+
.gi { color: #a6e22e } /* Generic.Inserted */
|
16
|
+
.gs { font-weight: bold } /* Generic.Strong */
|
17
|
+
.gu { color: #75715e } /* Generic.Subheading */
|
18
|
+
.kc { color: #66d9ef } /* Keyword.Constant */
|
19
|
+
.kd { color: #66d9ef } /* Keyword.Declaration */
|
20
|
+
.kn { color: #f92672 } /* Keyword.Namespace */
|
21
|
+
.kp { color: #66d9ef } /* Keyword.Pseudo */
|
22
|
+
.kr { color: #66d9ef } /* Keyword.Reserved */
|
23
|
+
.kt { color: #66d9ef } /* Keyword.Type */
|
24
|
+
.ld { color: #e6db74 } /* Literal.Date */
|
25
|
+
.m { color: #ae81ff } /* Literal.Number */
|
26
|
+
.s { color: #e6db74 } /* Literal.String */
|
27
|
+
.na { color: #a6e22e } /* Name.Attribute */
|
28
|
+
.nb { color: #f8f8f2 } /* Name.Builtin */
|
29
|
+
.nc { color: #a6e22e } /* Name.Class */
|
30
|
+
.no { color: #66d9ef } /* Name.Constant */
|
31
|
+
.nd { color: #a6e22e } /* Name.Decorator */
|
32
|
+
.ni { color: #f8f8f2 } /* Name.Entity */
|
33
|
+
.ne { color: #a6e22e } /* Name.Exception */
|
34
|
+
.nf { color: #a6e22e } /* Name.Function */
|
35
|
+
.nl { color: #f8f8f2 } /* Name.Label */
|
36
|
+
.nn { color: #f8f8f2 } /* Name.Namespace */
|
37
|
+
.nx { color: #a6e22e } /* Name.Other */
|
38
|
+
.py { color: #f8f8f2 } /* Name.Property */
|
39
|
+
.nt { color: #f92672 } /* Name.Tag */
|
40
|
+
.nv { color: #f8f8f2 } /* Name.Variable */
|
41
|
+
.ow { color: #f92672 } /* Operator.Word */
|
42
|
+
.w { color: #f8f8f2 } /* Text.Whitespace */
|
43
|
+
.mb { color: #ae81ff } /* Literal.Number.Bin */
|
44
|
+
.mf { color: #ae81ff } /* Literal.Number.Float */
|
45
|
+
.mh { color: #ae81ff } /* Literal.Number.Hex */
|
46
|
+
.mi { color: #ae81ff } /* Literal.Number.Integer */
|
47
|
+
.mo { color: #ae81ff } /* Literal.Number.Oct */
|
48
|
+
.sb { color: #e6db74 } /* Literal.String.Backtick */
|
49
|
+
.sc { color: #e6db74 } /* Literal.String.Char */
|
50
|
+
.sd { color: #e6db74 } /* Literal.String.Doc */
|
51
|
+
.s2 { color: #e6db74 } /* Literal.String.Double */
|
52
|
+
.se { color: #ae81ff } /* Literal.String.Escape */
|
53
|
+
.sh { color: #e6db74 } /* Literal.String.Heredoc */
|
54
|
+
.si { color: #e6db74 } /* Literal.String.Interpol */
|
55
|
+
.sx { color: #e6db74 } /* Literal.String.Other */
|
56
|
+
.sr { color: #e6db74 } /* Literal.String.Regex */
|
57
|
+
.s1 { color: #e6db74 } /* Literal.String.Single */
|
58
|
+
.ss { color: #e6db74 } /* Literal.String.Symbol */
|
59
|
+
.bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
|
60
|
+
.vc { color: #f8f8f2 } /* Name.Variable.Class */
|
61
|
+
.vg { color: #f8f8f2 } /* Name.Variable.Global */
|
62
|
+
.vi { color: #f8f8f2 } /* Name.Variable.Instance */
|
63
|
+
.il { color: #ae81ff } /* Literal.Number.Integer.Long */
|
@@ -0,0 +1,264 @@
|
|
1
|
+
/*!
|
2
|
+
* QUnit 1.16.0
|
3
|
+
* http://qunitjs.com/
|
4
|
+
*
|
5
|
+
* Copyright 2006, 2014 jQuery Foundation and other contributors
|
6
|
+
* Released under the MIT license
|
7
|
+
* http://jquery.org/license
|
8
|
+
*
|
9
|
+
* Date: 2014-12-03T16:32Z
|
10
|
+
*/
|
11
|
+
|
12
|
+
/** Font Family and Sizes */
|
13
|
+
|
14
|
+
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
15
|
+
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
16
|
+
}
|
17
|
+
|
18
|
+
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
19
|
+
#qunit-tests { font-size: smaller; }
|
20
|
+
|
21
|
+
|
22
|
+
/** Resets */
|
23
|
+
|
24
|
+
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
25
|
+
margin: 0;
|
26
|
+
padding: 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
/** Header */
|
31
|
+
|
32
|
+
#qunit-header {
|
33
|
+
padding: 0.5em 0 0.5em 1em;
|
34
|
+
|
35
|
+
color: #8699A4;
|
36
|
+
background-color: #0D3349;
|
37
|
+
|
38
|
+
font-size: 1.5em;
|
39
|
+
line-height: 1em;
|
40
|
+
font-weight: 400;
|
41
|
+
|
42
|
+
border-radius: 5px 5px 0 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
#qunit-header a {
|
46
|
+
text-decoration: none;
|
47
|
+
color: #C2CCD1;
|
48
|
+
}
|
49
|
+
|
50
|
+
#qunit-header a:hover,
|
51
|
+
#qunit-header a:focus {
|
52
|
+
color: #FFF;
|
53
|
+
}
|
54
|
+
|
55
|
+
#qunit-testrunner-toolbar label {
|
56
|
+
display: inline-block;
|
57
|
+
padding: 0 0.5em 0 0.1em;
|
58
|
+
}
|
59
|
+
|
60
|
+
#qunit-banner {
|
61
|
+
height: 5px;
|
62
|
+
}
|
63
|
+
|
64
|
+
#qunit-testrunner-toolbar {
|
65
|
+
padding: 0.5em 1em 0.5em 1em;
|
66
|
+
color: #5E740B;
|
67
|
+
background-color: #EEE;
|
68
|
+
overflow: hidden;
|
69
|
+
}
|
70
|
+
|
71
|
+
#qunit-userAgent {
|
72
|
+
padding: 0.5em 1em 0.5em 1em;
|
73
|
+
background-color: #2B81AF;
|
74
|
+
color: #FFF;
|
75
|
+
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
76
|
+
}
|
77
|
+
|
78
|
+
#qunit-modulefilter-container {
|
79
|
+
float: right;
|
80
|
+
}
|
81
|
+
|
82
|
+
/** Tests: Pass/Fail */
|
83
|
+
|
84
|
+
#qunit-tests {
|
85
|
+
list-style-position: inside;
|
86
|
+
}
|
87
|
+
|
88
|
+
#qunit-tests li {
|
89
|
+
padding: 0.4em 1em 0.4em 1em;
|
90
|
+
border-bottom: 1px solid #FFF;
|
91
|
+
list-style-position: inside;
|
92
|
+
}
|
93
|
+
|
94
|
+
#qunit-tests > li {
|
95
|
+
display: none;
|
96
|
+
}
|
97
|
+
|
98
|
+
#qunit-tests li.pass, #qunit-tests li.running, #qunit-tests li.fail {
|
99
|
+
display: list-item;
|
100
|
+
}
|
101
|
+
|
102
|
+
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
103
|
+
display: none;
|
104
|
+
}
|
105
|
+
|
106
|
+
#qunit-tests li strong {
|
107
|
+
cursor: pointer;
|
108
|
+
}
|
109
|
+
|
110
|
+
#qunit-tests li.skipped strong {
|
111
|
+
cursor: default;
|
112
|
+
}
|
113
|
+
|
114
|
+
#qunit-tests li a {
|
115
|
+
padding: 0.5em;
|
116
|
+
color: #C2CCD1;
|
117
|
+
text-decoration: none;
|
118
|
+
}
|
119
|
+
#qunit-tests li a:hover,
|
120
|
+
#qunit-tests li a:focus {
|
121
|
+
color: #000;
|
122
|
+
}
|
123
|
+
|
124
|
+
#qunit-tests li .runtime {
|
125
|
+
float: right;
|
126
|
+
font-size: smaller;
|
127
|
+
}
|
128
|
+
|
129
|
+
.qunit-assert-list {
|
130
|
+
margin-top: 0.5em;
|
131
|
+
padding: 0.5em;
|
132
|
+
|
133
|
+
background-color: #FFF;
|
134
|
+
|
135
|
+
border-radius: 5px;
|
136
|
+
}
|
137
|
+
|
138
|
+
.qunit-collapsed {
|
139
|
+
display: none;
|
140
|
+
}
|
141
|
+
|
142
|
+
#qunit-tests table {
|
143
|
+
border-collapse: collapse;
|
144
|
+
margin-top: 0.2em;
|
145
|
+
}
|
146
|
+
|
147
|
+
#qunit-tests th {
|
148
|
+
text-align: right;
|
149
|
+
vertical-align: top;
|
150
|
+
padding: 0 0.5em 0 0;
|
151
|
+
}
|
152
|
+
|
153
|
+
#qunit-tests td {
|
154
|
+
vertical-align: top;
|
155
|
+
}
|
156
|
+
|
157
|
+
#qunit-tests pre {
|
158
|
+
margin: 0;
|
159
|
+
white-space: pre-wrap;
|
160
|
+
word-wrap: break-word;
|
161
|
+
}
|
162
|
+
|
163
|
+
#qunit-tests del {
|
164
|
+
background-color: #E0F2BE;
|
165
|
+
color: #374E0C;
|
166
|
+
text-decoration: none;
|
167
|
+
}
|
168
|
+
|
169
|
+
#qunit-tests ins {
|
170
|
+
background-color: #FFCACA;
|
171
|
+
color: #500;
|
172
|
+
text-decoration: none;
|
173
|
+
}
|
174
|
+
|
175
|
+
/*** Test Counts */
|
176
|
+
|
177
|
+
#qunit-tests b.counts { color: #000; }
|
178
|
+
#qunit-tests b.passed { color: #5E740B; }
|
179
|
+
#qunit-tests b.failed { color: #710909; }
|
180
|
+
|
181
|
+
#qunit-tests li li {
|
182
|
+
padding: 5px;
|
183
|
+
background-color: #FFF;
|
184
|
+
border-bottom: none;
|
185
|
+
list-style-position: inside;
|
186
|
+
}
|
187
|
+
|
188
|
+
/*** Passing Styles */
|
189
|
+
|
190
|
+
#qunit-tests li li.pass {
|
191
|
+
color: #3C510C;
|
192
|
+
background-color: #FFF;
|
193
|
+
border-left: 10px solid #C6E746;
|
194
|
+
}
|
195
|
+
|
196
|
+
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
197
|
+
#qunit-tests .pass .test-name { color: #366097; }
|
198
|
+
|
199
|
+
#qunit-tests .pass .test-actual,
|
200
|
+
#qunit-tests .pass .test-expected { color: #999; }
|
201
|
+
|
202
|
+
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
203
|
+
|
204
|
+
/*** Failing Styles */
|
205
|
+
|
206
|
+
#qunit-tests li li.fail {
|
207
|
+
color: #710909;
|
208
|
+
background-color: #FFF;
|
209
|
+
border-left: 10px solid #EE5757;
|
210
|
+
white-space: pre;
|
211
|
+
}
|
212
|
+
|
213
|
+
#qunit-tests > li:last-child {
|
214
|
+
border-radius: 0 0 5px 5px;
|
215
|
+
}
|
216
|
+
|
217
|
+
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
218
|
+
#qunit-tests .fail .test-name,
|
219
|
+
#qunit-tests .fail .module-name { color: #000; }
|
220
|
+
|
221
|
+
#qunit-tests .fail .test-actual { color: #EE5757; }
|
222
|
+
#qunit-tests .fail .test-expected { color: #008000; }
|
223
|
+
|
224
|
+
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
225
|
+
|
226
|
+
/*** Skipped tests */
|
227
|
+
|
228
|
+
#qunit-tests .skipped {
|
229
|
+
background-color: #EBECE9;
|
230
|
+
}
|
231
|
+
|
232
|
+
#qunit-tests .qunit-skipped-label {
|
233
|
+
background-color: #F4FF77;
|
234
|
+
display: inline-block;
|
235
|
+
font-style: normal;
|
236
|
+
color: #366097;
|
237
|
+
line-height: 1.8em;
|
238
|
+
padding: 0 0.5em;
|
239
|
+
margin: -0.4em 0.4em -0.4em 0;
|
240
|
+
}
|
241
|
+
|
242
|
+
/** Result */
|
243
|
+
|
244
|
+
#qunit-testresult {
|
245
|
+
padding: 0.5em 1em 0.5em 1em;
|
246
|
+
|
247
|
+
color: #2B81AF;
|
248
|
+
background-color: #D2E0E6;
|
249
|
+
|
250
|
+
border-bottom: 1px solid #FFF;
|
251
|
+
}
|
252
|
+
#qunit-testresult .module-name {
|
253
|
+
font-weight: 700;
|
254
|
+
}
|
255
|
+
|
256
|
+
/** Fixture */
|
257
|
+
|
258
|
+
#qunit-fixture {
|
259
|
+
position: absolute;
|
260
|
+
top: -10000px;
|
261
|
+
left: -10000px;
|
262
|
+
width: 1000px;
|
263
|
+
height: 1000px;
|
264
|
+
}
|
@@ -0,0 +1,2819 @@
|
|
1
|
+
/*!
|
2
|
+
* QUnit 1.16.0
|
3
|
+
* http://qunitjs.com/
|
4
|
+
*
|
5
|
+
* Copyright 2006, 2014 jQuery Foundation and other contributors
|
6
|
+
* Released under the MIT license
|
7
|
+
* http://jquery.org/license
|
8
|
+
*
|
9
|
+
* Date: 2014-12-03T16:32Z
|
10
|
+
*/
|
11
|
+
|
12
|
+
(function( window ) {
|
13
|
+
|
14
|
+
var QUnit,
|
15
|
+
config,
|
16
|
+
onErrorFnPrev,
|
17
|
+
loggingCallbacks = {},
|
18
|
+
fileName = ( sourceFromStacktrace( 0 ) || "" ).replace( /(:\d+)+\)?/, "" ).replace( /.+\//, "" ),
|
19
|
+
toString = Object.prototype.toString,
|
20
|
+
hasOwn = Object.prototype.hasOwnProperty,
|
21
|
+
// Keep a local reference to Date (GH-283)
|
22
|
+
Date = window.Date,
|
23
|
+
now = Date.now || function() {
|
24
|
+
return new Date().getTime();
|
25
|
+
},
|
26
|
+
globalStartCalled = false,
|
27
|
+
runStarted = false,
|
28
|
+
setTimeout = window.setTimeout,
|
29
|
+
clearTimeout = window.clearTimeout,
|
30
|
+
defined = {
|
31
|
+
document: window.document !== undefined,
|
32
|
+
setTimeout: window.setTimeout !== undefined,
|
33
|
+
sessionStorage: (function() {
|
34
|
+
var x = "qunit-test-string";
|
35
|
+
try {
|
36
|
+
sessionStorage.setItem( x, x );
|
37
|
+
sessionStorage.removeItem( x );
|
38
|
+
return true;
|
39
|
+
} catch ( e ) {
|
40
|
+
return false;
|
41
|
+
}
|
42
|
+
}())
|
43
|
+
},
|
44
|
+
/**
|
45
|
+
* Provides a normalized error string, correcting an issue
|
46
|
+
* with IE 7 (and prior) where Error.prototype.toString is
|
47
|
+
* not properly implemented
|
48
|
+
*
|
49
|
+
* Based on http://es5.github.com/#x15.11.4.4
|
50
|
+
*
|
51
|
+
* @param {String|Error} error
|
52
|
+
* @return {String} error message
|
53
|
+
*/
|
54
|
+
errorString = function( error ) {
|
55
|
+
var name, message,
|
56
|
+
errorString = error.toString();
|
57
|
+
if ( errorString.substring( 0, 7 ) === "[object" ) {
|
58
|
+
name = error.name ? error.name.toString() : "Error";
|
59
|
+
message = error.message ? error.message.toString() : "";
|
60
|
+
if ( name && message ) {
|
61
|
+
return name + ": " + message;
|
62
|
+
} else if ( name ) {
|
63
|
+
return name;
|
64
|
+
} else if ( message ) {
|
65
|
+
return message;
|
66
|
+
} else {
|
67
|
+
return "Error";
|
68
|
+
}
|
69
|
+
} else {
|
70
|
+
return errorString;
|
71
|
+
}
|
72
|
+
},
|
73
|
+
/**
|
74
|
+
* Makes a clone of an object using only Array or Object as base,
|
75
|
+
* and copies over the own enumerable properties.
|
76
|
+
*
|
77
|
+
* @param {Object} obj
|
78
|
+
* @return {Object} New object with only the own properties (recursively).
|
79
|
+
*/
|
80
|
+
objectValues = function( obj ) {
|
81
|
+
var key, val,
|
82
|
+
vals = QUnit.is( "array", obj ) ? [] : {};
|
83
|
+
for ( key in obj ) {
|
84
|
+
if ( hasOwn.call( obj, key ) ) {
|
85
|
+
val = obj[ key ];
|
86
|
+
vals[ key ] = val === Object( val ) ? objectValues( val ) : val;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
return vals;
|
90
|
+
};
|
91
|
+
|
92
|
+
QUnit = {};
|
93
|
+
|
94
|
+
/**
|
95
|
+
* Config object: Maintain internal state
|
96
|
+
* Later exposed as QUnit.config
|
97
|
+
* `config` initialized at top of scope
|
98
|
+
*/
|
99
|
+
config = {
|
100
|
+
// The queue of tests to run
|
101
|
+
queue: [],
|
102
|
+
|
103
|
+
// block until document ready
|
104
|
+
blocking: true,
|
105
|
+
|
106
|
+
// when enabled, show only failing tests
|
107
|
+
// gets persisted through sessionStorage and can be changed in UI via checkbox
|
108
|
+
hidepassed: false,
|
109
|
+
|
110
|
+
// by default, run previously failed tests first
|
111
|
+
// very useful in combination with "Hide passed tests" checked
|
112
|
+
reorder: true,
|
113
|
+
|
114
|
+
// by default, modify document.title when suite is done
|
115
|
+
altertitle: true,
|
116
|
+
|
117
|
+
// by default, scroll to top of the page when suite is done
|
118
|
+
scrolltop: true,
|
119
|
+
|
120
|
+
// when enabled, all tests must call expect()
|
121
|
+
requireExpects: false,
|
122
|
+
|
123
|
+
// add checkboxes that are persisted in the query-string
|
124
|
+
// when enabled, the id is set to `true` as a `QUnit.config` property
|
125
|
+
urlConfig: [
|
126
|
+
{
|
127
|
+
id: "hidepassed",
|
128
|
+
label: "Hide passed tests",
|
129
|
+
tooltip: "Only show tests and assertions that fail. Stored as query-strings."
|
130
|
+
},
|
131
|
+
{
|
132
|
+
id: "noglobals",
|
133
|
+
label: "Check for Globals",
|
134
|
+
tooltip: "Enabling this will test if any test introduces new properties on the " +
|
135
|
+
"`window` object. Stored as query-strings."
|
136
|
+
},
|
137
|
+
{
|
138
|
+
id: "notrycatch",
|
139
|
+
label: "No try-catch",
|
140
|
+
tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging " +
|
141
|
+
"exceptions in IE reasonable. Stored as query-strings."
|
142
|
+
}
|
143
|
+
],
|
144
|
+
|
145
|
+
// Set of all modules.
|
146
|
+
modules: [],
|
147
|
+
|
148
|
+
// The first unnamed module
|
149
|
+
currentModule: {
|
150
|
+
name: "",
|
151
|
+
tests: []
|
152
|
+
},
|
153
|
+
|
154
|
+
callbacks: {}
|
155
|
+
};
|
156
|
+
|
157
|
+
// Push a loose unnamed module to the modules collection
|
158
|
+
config.modules.push( config.currentModule );
|
159
|
+
|
160
|
+
// Initialize more QUnit.config and QUnit.urlParams
|
161
|
+
(function() {
|
162
|
+
var i, current,
|
163
|
+
location = window.location || { search: "", protocol: "file:" },
|
164
|
+
params = location.search.slice( 1 ).split( "&" ),
|
165
|
+
length = params.length,
|
166
|
+
urlParams = {};
|
167
|
+
|
168
|
+
if ( params[ 0 ] ) {
|
169
|
+
for ( i = 0; i < length; i++ ) {
|
170
|
+
current = params[ i ].split( "=" );
|
171
|
+
current[ 0 ] = decodeURIComponent( current[ 0 ] );
|
172
|
+
|
173
|
+
// allow just a key to turn on a flag, e.g., test.html?noglobals
|
174
|
+
current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
|
175
|
+
if ( urlParams[ current[ 0 ] ] ) {
|
176
|
+
urlParams[ current[ 0 ] ] = [].concat( urlParams[ current[ 0 ] ], current[ 1 ] );
|
177
|
+
} else {
|
178
|
+
urlParams[ current[ 0 ] ] = current[ 1 ];
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
QUnit.urlParams = urlParams;
|
184
|
+
|
185
|
+
// String search anywhere in moduleName+testName
|
186
|
+
config.filter = urlParams.filter;
|
187
|
+
|
188
|
+
config.testId = [];
|
189
|
+
if ( urlParams.testId ) {
|
190
|
+
|
191
|
+
// Ensure that urlParams.testId is an array
|
192
|
+
urlParams.testId = [].concat( urlParams.testId );
|
193
|
+
for ( i = 0; i < urlParams.testId.length; i++ ) {
|
194
|
+
config.testId.push( urlParams.testId[ i ] );
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
// Figure out if we're running the tests from a server or not
|
199
|
+
QUnit.isLocal = location.protocol === "file:";
|
200
|
+
}());
|
201
|
+
|
202
|
+
// Root QUnit object.
|
203
|
+
// `QUnit` initialized at top of scope
|
204
|
+
extend( QUnit, {
|
205
|
+
|
206
|
+
// call on start of module test to prepend name to all tests
|
207
|
+
module: function( name, testEnvironment ) {
|
208
|
+
var currentModule = {
|
209
|
+
name: name,
|
210
|
+
testEnvironment: testEnvironment,
|
211
|
+
tests: []
|
212
|
+
};
|
213
|
+
|
214
|
+
// DEPRECATED: handles setup/teardown functions,
|
215
|
+
// beforeEach and afterEach should be used instead
|
216
|
+
if ( testEnvironment && testEnvironment.setup ) {
|
217
|
+
testEnvironment.beforeEach = testEnvironment.setup;
|
218
|
+
delete testEnvironment.setup;
|
219
|
+
}
|
220
|
+
if ( testEnvironment && testEnvironment.teardown ) {
|
221
|
+
testEnvironment.afterEach = testEnvironment.teardown;
|
222
|
+
delete testEnvironment.teardown;
|
223
|
+
}
|
224
|
+
|
225
|
+
config.modules.push( currentModule );
|
226
|
+
config.currentModule = currentModule;
|
227
|
+
},
|
228
|
+
|
229
|
+
// DEPRECATED: QUnit.asyncTest() will be removed in QUnit 2.0.
|
230
|
+
asyncTest: function( testName, expected, callback ) {
|
231
|
+
if ( arguments.length === 2 ) {
|
232
|
+
callback = expected;
|
233
|
+
expected = null;
|
234
|
+
}
|
235
|
+
|
236
|
+
QUnit.test( testName, expected, callback, true );
|
237
|
+
},
|
238
|
+
|
239
|
+
test: function( testName, expected, callback, async ) {
|
240
|
+
var test;
|
241
|
+
|
242
|
+
if ( arguments.length === 2 ) {
|
243
|
+
callback = expected;
|
244
|
+
expected = null;
|
245
|
+
}
|
246
|
+
|
247
|
+
test = new Test({
|
248
|
+
testName: testName,
|
249
|
+
expected: expected,
|
250
|
+
async: async,
|
251
|
+
callback: callback
|
252
|
+
});
|
253
|
+
|
254
|
+
test.queue();
|
255
|
+
},
|
256
|
+
|
257
|
+
skip: function( testName ) {
|
258
|
+
var test = new Test({
|
259
|
+
testName: testName,
|
260
|
+
skip: true
|
261
|
+
});
|
262
|
+
|
263
|
+
test.queue();
|
264
|
+
},
|
265
|
+
|
266
|
+
// DEPRECATED: The functionality of QUnit.start() will be altered in QUnit 2.0.
|
267
|
+
// In QUnit 2.0, invoking it will ONLY affect the `QUnit.config.autostart` blocking behavior.
|
268
|
+
start: function( count ) {
|
269
|
+
var globalStartAlreadyCalled = globalStartCalled;
|
270
|
+
|
271
|
+
if ( !config.current ) {
|
272
|
+
globalStartCalled = true;
|
273
|
+
|
274
|
+
if ( runStarted ) {
|
275
|
+
throw new Error( "Called start() outside of a test context while already started" );
|
276
|
+
} else if ( globalStartAlreadyCalled || count > 1 ) {
|
277
|
+
throw new Error( "Called start() outside of a test context too many times" );
|
278
|
+
} else if ( config.autostart ) {
|
279
|
+
throw new Error( "Called start() outside of a test context when " +
|
280
|
+
"QUnit.config.autostart was true" );
|
281
|
+
} else if ( !config.pageLoaded ) {
|
282
|
+
|
283
|
+
// The page isn't completely loaded yet, so bail out and let `QUnit.load` handle it
|
284
|
+
config.autostart = true;
|
285
|
+
return;
|
286
|
+
}
|
287
|
+
} else {
|
288
|
+
|
289
|
+
// If a test is running, adjust its semaphore
|
290
|
+
config.current.semaphore -= count || 1;
|
291
|
+
|
292
|
+
// Don't start until equal number of stop-calls
|
293
|
+
if ( config.current.semaphore > 0 ) {
|
294
|
+
return;
|
295
|
+
}
|
296
|
+
|
297
|
+
// throw an Error if start is called more often than stop
|
298
|
+
if ( config.current.semaphore < 0 ) {
|
299
|
+
config.current.semaphore = 0;
|
300
|
+
|
301
|
+
QUnit.pushFailure(
|
302
|
+
"Called start() while already started (test's semaphore was 0 already)",
|
303
|
+
sourceFromStacktrace( 2 )
|
304
|
+
);
|
305
|
+
return;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
resumeProcessing();
|
310
|
+
},
|
311
|
+
|
312
|
+
// DEPRECATED: QUnit.stop() will be removed in QUnit 2.0.
|
313
|
+
stop: function( count ) {
|
314
|
+
|
315
|
+
// If there isn't a test running, don't allow QUnit.stop() to be called
|
316
|
+
if ( !config.current ) {
|
317
|
+
throw new Error( "Called stop() outside of a test context" );
|
318
|
+
}
|
319
|
+
|
320
|
+
// If a test is running, adjust its semaphore
|
321
|
+
config.current.semaphore += count || 1;
|
322
|
+
|
323
|
+
pauseProcessing();
|
324
|
+
},
|
325
|
+
|
326
|
+
config: config,
|
327
|
+
|
328
|
+
// Safe object type checking
|
329
|
+
is: function( type, obj ) {
|
330
|
+
return QUnit.objectType( obj ) === type;
|
331
|
+
},
|
332
|
+
|
333
|
+
objectType: function( obj ) {
|
334
|
+
if ( typeof obj === "undefined" ) {
|
335
|
+
return "undefined";
|
336
|
+
}
|
337
|
+
|
338
|
+
// Consider: typeof null === object
|
339
|
+
if ( obj === null ) {
|
340
|
+
return "null";
|
341
|
+
}
|
342
|
+
|
343
|
+
var match = toString.call( obj ).match( /^\[object\s(.*)\]$/ ),
|
344
|
+
type = match && match[ 1 ] || "";
|
345
|
+
|
346
|
+
switch ( type ) {
|
347
|
+
case "Number":
|
348
|
+
if ( isNaN( obj ) ) {
|
349
|
+
return "nan";
|
350
|
+
}
|
351
|
+
return "number";
|
352
|
+
case "String":
|
353
|
+
case "Boolean":
|
354
|
+
case "Array":
|
355
|
+
case "Date":
|
356
|
+
case "RegExp":
|
357
|
+
case "Function":
|
358
|
+
return type.toLowerCase();
|
359
|
+
}
|
360
|
+
if ( typeof obj === "object" ) {
|
361
|
+
return "object";
|
362
|
+
}
|
363
|
+
return undefined;
|
364
|
+
},
|
365
|
+
|
366
|
+
url: function( params ) {
|
367
|
+
params = extend( extend( {}, QUnit.urlParams ), params );
|
368
|
+
var key,
|
369
|
+
querystring = "?";
|
370
|
+
|
371
|
+
for ( key in params ) {
|
372
|
+
if ( hasOwn.call( params, key ) ) {
|
373
|
+
querystring += encodeURIComponent( key );
|
374
|
+
if ( params[ key ] !== true ) {
|
375
|
+
querystring += "=" + encodeURIComponent( params[ key ] );
|
376
|
+
}
|
377
|
+
querystring += "&";
|
378
|
+
}
|
379
|
+
}
|
380
|
+
return location.protocol + "//" + location.host +
|
381
|
+
location.pathname + querystring.slice( 0, -1 );
|
382
|
+
},
|
383
|
+
|
384
|
+
extend: extend,
|
385
|
+
|
386
|
+
load: function() {
|
387
|
+
config.pageLoaded = true;
|
388
|
+
|
389
|
+
// Initialize the configuration options
|
390
|
+
extend( config, {
|
391
|
+
stats: { all: 0, bad: 0 },
|
392
|
+
moduleStats: { all: 0, bad: 0 },
|
393
|
+
started: 0,
|
394
|
+
updateRate: 1000,
|
395
|
+
autostart: true,
|
396
|
+
filter: ""
|
397
|
+
}, true );
|
398
|
+
|
399
|
+
config.blocking = false;
|
400
|
+
|
401
|
+
if ( config.autostart ) {
|
402
|
+
resumeProcessing();
|
403
|
+
}
|
404
|
+
}
|
405
|
+
});
|
406
|
+
|
407
|
+
// Register logging callbacks
|
408
|
+
(function() {
|
409
|
+
var i, l, key,
|
410
|
+
callbacks = [ "begin", "done", "log", "testStart", "testDone",
|
411
|
+
"moduleStart", "moduleDone" ];
|
412
|
+
|
413
|
+
function registerLoggingCallback( key ) {
|
414
|
+
var loggingCallback = function( callback ) {
|
415
|
+
if ( QUnit.objectType( callback ) !== "function" ) {
|
416
|
+
throw new Error(
|
417
|
+
"QUnit logging methods require a callback function as their first parameters."
|
418
|
+
);
|
419
|
+
}
|
420
|
+
|
421
|
+
config.callbacks[ key ].push( callback );
|
422
|
+
};
|
423
|
+
|
424
|
+
// DEPRECATED: This will be removed on QUnit 2.0.0+
|
425
|
+
// Stores the registered functions allowing restoring
|
426
|
+
// at verifyLoggingCallbacks() if modified
|
427
|
+
loggingCallbacks[ key ] = loggingCallback;
|
428
|
+
|
429
|
+
return loggingCallback;
|
430
|
+
}
|
431
|
+
|
432
|
+
for ( i = 0, l = callbacks.length; i < l; i++ ) {
|
433
|
+
key = callbacks[ i ];
|
434
|
+
|
435
|
+
// Initialize key collection of logging callback
|
436
|
+
if ( QUnit.objectType( config.callbacks[ key ] ) === "undefined" ) {
|
437
|
+
config.callbacks[ key ] = [];
|
438
|
+
}
|
439
|
+
|
440
|
+
QUnit[ key ] = registerLoggingCallback( key );
|
441
|
+
}
|
442
|
+
})();
|
443
|
+
|
444
|
+
// `onErrorFnPrev` initialized at top of scope
|
445
|
+
// Preserve other handlers
|
446
|
+
onErrorFnPrev = window.onerror;
|
447
|
+
|
448
|
+
// Cover uncaught exceptions
|
449
|
+
// Returning true will suppress the default browser handler,
|
450
|
+
// returning false will let it run.
|
451
|
+
window.onerror = function( error, filePath, linerNr ) {
|
452
|
+
var ret = false;
|
453
|
+
if ( onErrorFnPrev ) {
|
454
|
+
ret = onErrorFnPrev( error, filePath, linerNr );
|
455
|
+
}
|
456
|
+
|
457
|
+
// Treat return value as window.onerror itself does,
|
458
|
+
// Only do our handling if not suppressed.
|
459
|
+
if ( ret !== true ) {
|
460
|
+
if ( QUnit.config.current ) {
|
461
|
+
if ( QUnit.config.current.ignoreGlobalErrors ) {
|
462
|
+
return true;
|
463
|
+
}
|
464
|
+
QUnit.pushFailure( error, filePath + ":" + linerNr );
|
465
|
+
} else {
|
466
|
+
QUnit.test( "global failure", extend(function() {
|
467
|
+
QUnit.pushFailure( error, filePath + ":" + linerNr );
|
468
|
+
}, { validTest: true } ) );
|
469
|
+
}
|
470
|
+
return false;
|
471
|
+
}
|
472
|
+
|
473
|
+
return ret;
|
474
|
+
};
|
475
|
+
|
476
|
+
function done() {
|
477
|
+
var runtime, passed;
|
478
|
+
|
479
|
+
config.autorun = true;
|
480
|
+
|
481
|
+
// Log the last module results
|
482
|
+
if ( config.previousModule ) {
|
483
|
+
runLoggingCallbacks( "moduleDone", {
|
484
|
+
name: config.previousModule.name,
|
485
|
+
tests: config.previousModule.tests,
|
486
|
+
failed: config.moduleStats.bad,
|
487
|
+
passed: config.moduleStats.all - config.moduleStats.bad,
|
488
|
+
total: config.moduleStats.all,
|
489
|
+
runtime: now() - config.moduleStats.started
|
490
|
+
});
|
491
|
+
}
|
492
|
+
delete config.previousModule;
|
493
|
+
|
494
|
+
runtime = now() - config.started;
|
495
|
+
passed = config.stats.all - config.stats.bad;
|
496
|
+
|
497
|
+
runLoggingCallbacks( "done", {
|
498
|
+
failed: config.stats.bad,
|
499
|
+
passed: passed,
|
500
|
+
total: config.stats.all,
|
501
|
+
runtime: runtime
|
502
|
+
});
|
503
|
+
}
|
504
|
+
|
505
|
+
// Doesn't support IE6 to IE9
|
506
|
+
// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
|
507
|
+
function extractStacktrace( e, offset ) {
|
508
|
+
offset = offset === undefined ? 4 : offset;
|
509
|
+
|
510
|
+
var stack, include, i;
|
511
|
+
|
512
|
+
if ( e.stacktrace ) {
|
513
|
+
|
514
|
+
// Opera 12.x
|
515
|
+
return e.stacktrace.split( "\n" )[ offset + 3 ];
|
516
|
+
} else if ( e.stack ) {
|
517
|
+
|
518
|
+
// Firefox, Chrome, Safari 6+, IE10+, PhantomJS and Node
|
519
|
+
stack = e.stack.split( "\n" );
|
520
|
+
if ( /^error$/i.test( stack[ 0 ] ) ) {
|
521
|
+
stack.shift();
|
522
|
+
}
|
523
|
+
if ( fileName ) {
|
524
|
+
include = [];
|
525
|
+
for ( i = offset; i < stack.length; i++ ) {
|
526
|
+
if ( stack[ i ].indexOf( fileName ) !== -1 ) {
|
527
|
+
break;
|
528
|
+
}
|
529
|
+
include.push( stack[ i ] );
|
530
|
+
}
|
531
|
+
if ( include.length ) {
|
532
|
+
return include.join( "\n" );
|
533
|
+
}
|
534
|
+
}
|
535
|
+
return stack[ offset ];
|
536
|
+
} else if ( e.sourceURL ) {
|
537
|
+
|
538
|
+
// Safari < 6
|
539
|
+
// exclude useless self-reference for generated Error objects
|
540
|
+
if ( /qunit.js$/.test( e.sourceURL ) ) {
|
541
|
+
return;
|
542
|
+
}
|
543
|
+
|
544
|
+
// for actual exceptions, this is useful
|
545
|
+
return e.sourceURL + ":" + e.line;
|
546
|
+
}
|
547
|
+
}
|
548
|
+
|
549
|
+
function sourceFromStacktrace( offset ) {
|
550
|
+
var e = new Error();
|
551
|
+
if ( !e.stack ) {
|
552
|
+
try {
|
553
|
+
throw e;
|
554
|
+
} catch ( err ) {
|
555
|
+
// This should already be true in most browsers
|
556
|
+
e = err;
|
557
|
+
}
|
558
|
+
}
|
559
|
+
return extractStacktrace( e, offset );
|
560
|
+
}
|
561
|
+
|
562
|
+
function synchronize( callback, last ) {
|
563
|
+
if ( QUnit.objectType( callback ) === "array" ) {
|
564
|
+
while ( callback.length ) {
|
565
|
+
synchronize( callback.shift() );
|
566
|
+
}
|
567
|
+
return;
|
568
|
+
}
|
569
|
+
config.queue.push( callback );
|
570
|
+
|
571
|
+
if ( config.autorun && !config.blocking ) {
|
572
|
+
process( last );
|
573
|
+
}
|
574
|
+
}
|
575
|
+
|
576
|
+
function process( last ) {
|
577
|
+
function next() {
|
578
|
+
process( last );
|
579
|
+
}
|
580
|
+
var start = now();
|
581
|
+
config.depth = config.depth ? config.depth + 1 : 1;
|
582
|
+
|
583
|
+
while ( config.queue.length && !config.blocking ) {
|
584
|
+
if ( !defined.setTimeout || config.updateRate <= 0 ||
|
585
|
+
( ( now() - start ) < config.updateRate ) ) {
|
586
|
+
if ( config.current ) {
|
587
|
+
|
588
|
+
// Reset async tracking for each phase of the Test lifecycle
|
589
|
+
config.current.usedAsync = false;
|
590
|
+
}
|
591
|
+
config.queue.shift()();
|
592
|
+
} else {
|
593
|
+
setTimeout( next, 13 );
|
594
|
+
break;
|
595
|
+
}
|
596
|
+
}
|
597
|
+
config.depth--;
|
598
|
+
if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
|
599
|
+
done();
|
600
|
+
}
|
601
|
+
}
|
602
|
+
|
603
|
+
function begin() {
|
604
|
+
var i, l,
|
605
|
+
modulesLog = [];
|
606
|
+
|
607
|
+
// If the test run hasn't officially begun yet
|
608
|
+
if ( !config.started ) {
|
609
|
+
|
610
|
+
// Record the time of the test run's beginning
|
611
|
+
config.started = now();
|
612
|
+
|
613
|
+
verifyLoggingCallbacks();
|
614
|
+
|
615
|
+
// Delete the loose unnamed module if unused.
|
616
|
+
if ( config.modules[ 0 ].name === "" && config.modules[ 0 ].tests.length === 0 ) {
|
617
|
+
config.modules.shift();
|
618
|
+
}
|
619
|
+
|
620
|
+
// Avoid unnecessary information by not logging modules' test environments
|
621
|
+
for ( i = 0, l = config.modules.length; i < l; i++ ) {
|
622
|
+
modulesLog.push({
|
623
|
+
name: config.modules[ i ].name,
|
624
|
+
tests: config.modules[ i ].tests
|
625
|
+
});
|
626
|
+
}
|
627
|
+
|
628
|
+
// The test run is officially beginning now
|
629
|
+
runLoggingCallbacks( "begin", {
|
630
|
+
totalTests: Test.count,
|
631
|
+
modules: modulesLog
|
632
|
+
});
|
633
|
+
}
|
634
|
+
|
635
|
+
config.blocking = false;
|
636
|
+
process( true );
|
637
|
+
}
|
638
|
+
|
639
|
+
function resumeProcessing() {
|
640
|
+
runStarted = true;
|
641
|
+
|
642
|
+
// A slight delay to allow this iteration of the event loop to finish (more assertions, etc.)
|
643
|
+
if ( defined.setTimeout ) {
|
644
|
+
setTimeout(function() {
|
645
|
+
if ( config.current && config.current.semaphore > 0 ) {
|
646
|
+
return;
|
647
|
+
}
|
648
|
+
if ( config.timeout ) {
|
649
|
+
clearTimeout( config.timeout );
|
650
|
+
}
|
651
|
+
|
652
|
+
begin();
|
653
|
+
}, 13 );
|
654
|
+
} else {
|
655
|
+
begin();
|
656
|
+
}
|
657
|
+
}
|
658
|
+
|
659
|
+
function pauseProcessing() {
|
660
|
+
config.blocking = true;
|
661
|
+
|
662
|
+
if ( config.testTimeout && defined.setTimeout ) {
|
663
|
+
clearTimeout( config.timeout );
|
664
|
+
config.timeout = setTimeout(function() {
|
665
|
+
if ( config.current ) {
|
666
|
+
config.current.semaphore = 0;
|
667
|
+
QUnit.pushFailure( "Test timed out", sourceFromStacktrace( 2 ) );
|
668
|
+
} else {
|
669
|
+
throw new Error( "Test timed out" );
|
670
|
+
}
|
671
|
+
resumeProcessing();
|
672
|
+
}, config.testTimeout );
|
673
|
+
}
|
674
|
+
}
|
675
|
+
|
676
|
+
function saveGlobal() {
|
677
|
+
config.pollution = [];
|
678
|
+
|
679
|
+
if ( config.noglobals ) {
|
680
|
+
for ( var key in window ) {
|
681
|
+
if ( hasOwn.call( window, key ) ) {
|
682
|
+
// in Opera sometimes DOM element ids show up here, ignore them
|
683
|
+
if ( /^qunit-test-output/.test( key ) ) {
|
684
|
+
continue;
|
685
|
+
}
|
686
|
+
config.pollution.push( key );
|
687
|
+
}
|
688
|
+
}
|
689
|
+
}
|
690
|
+
}
|
691
|
+
|
692
|
+
function checkPollution() {
|
693
|
+
var newGlobals,
|
694
|
+
deletedGlobals,
|
695
|
+
old = config.pollution;
|
696
|
+
|
697
|
+
saveGlobal();
|
698
|
+
|
699
|
+
newGlobals = diff( config.pollution, old );
|
700
|
+
if ( newGlobals.length > 0 ) {
|
701
|
+
QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join( ", " ) );
|
702
|
+
}
|
703
|
+
|
704
|
+
deletedGlobals = diff( old, config.pollution );
|
705
|
+
if ( deletedGlobals.length > 0 ) {
|
706
|
+
QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join( ", " ) );
|
707
|
+
}
|
708
|
+
}
|
709
|
+
|
710
|
+
// returns a new Array with the elements that are in a but not in b
|
711
|
+
function diff( a, b ) {
|
712
|
+
var i, j,
|
713
|
+
result = a.slice();
|
714
|
+
|
715
|
+
for ( i = 0; i < result.length; i++ ) {
|
716
|
+
for ( j = 0; j < b.length; j++ ) {
|
717
|
+
if ( result[ i ] === b[ j ] ) {
|
718
|
+
result.splice( i, 1 );
|
719
|
+
i--;
|
720
|
+
break;
|
721
|
+
}
|
722
|
+
}
|
723
|
+
}
|
724
|
+
return result;
|
725
|
+
}
|
726
|
+
|
727
|
+
function extend( a, b, undefOnly ) {
|
728
|
+
for ( var prop in b ) {
|
729
|
+
if ( hasOwn.call( b, prop ) ) {
|
730
|
+
|
731
|
+
// Avoid "Member not found" error in IE8 caused by messing with window.constructor
|
732
|
+
if ( !( prop === "constructor" && a === window ) ) {
|
733
|
+
if ( b[ prop ] === undefined ) {
|
734
|
+
delete a[ prop ];
|
735
|
+
} else if ( !( undefOnly && typeof a[ prop ] !== "undefined" ) ) {
|
736
|
+
a[ prop ] = b[ prop ];
|
737
|
+
}
|
738
|
+
}
|
739
|
+
}
|
740
|
+
}
|
741
|
+
|
742
|
+
return a;
|
743
|
+
}
|
744
|
+
|
745
|
+
function runLoggingCallbacks( key, args ) {
|
746
|
+
var i, l, callbacks;
|
747
|
+
|
748
|
+
callbacks = config.callbacks[ key ];
|
749
|
+
for ( i = 0, l = callbacks.length; i < l; i++ ) {
|
750
|
+
callbacks[ i ]( args );
|
751
|
+
}
|
752
|
+
}
|
753
|
+
|
754
|
+
// DEPRECATED: This will be removed on 2.0.0+
|
755
|
+
// This function verifies if the loggingCallbacks were modified by the user
|
756
|
+
// If so, it will restore it, assign the given callback and print a console warning
|
757
|
+
function verifyLoggingCallbacks() {
|
758
|
+
var loggingCallback, userCallback;
|
759
|
+
|
760
|
+
for ( loggingCallback in loggingCallbacks ) {
|
761
|
+
if ( QUnit[ loggingCallback ] !== loggingCallbacks[ loggingCallback ] ) {
|
762
|
+
|
763
|
+
userCallback = QUnit[ loggingCallback ];
|
764
|
+
|
765
|
+
// Restore the callback function
|
766
|
+
QUnit[ loggingCallback ] = loggingCallbacks[ loggingCallback ];
|
767
|
+
|
768
|
+
// Assign the deprecated given callback
|
769
|
+
QUnit[ loggingCallback ]( userCallback );
|
770
|
+
|
771
|
+
if ( window.console && window.console.warn ) {
|
772
|
+
window.console.warn(
|
773
|
+
"QUnit." + loggingCallback + " was replaced with a new value.\n" +
|
774
|
+
"Please, check out the documentation on how to apply logging callbacks.\n" +
|
775
|
+
"Reference: http://api.qunitjs.com/category/callbacks/"
|
776
|
+
);
|
777
|
+
}
|
778
|
+
}
|
779
|
+
}
|
780
|
+
}
|
781
|
+
|
782
|
+
// from jquery.js
|
783
|
+
function inArray( elem, array ) {
|
784
|
+
if ( array.indexOf ) {
|
785
|
+
return array.indexOf( elem );
|
786
|
+
}
|
787
|
+
|
788
|
+
for ( var i = 0, length = array.length; i < length; i++ ) {
|
789
|
+
if ( array[ i ] === elem ) {
|
790
|
+
return i;
|
791
|
+
}
|
792
|
+
}
|
793
|
+
|
794
|
+
return -1;
|
795
|
+
}
|
796
|
+
|
797
|
+
function Test( settings ) {
|
798
|
+
var i, l;
|
799
|
+
|
800
|
+
++Test.count;
|
801
|
+
|
802
|
+
extend( this, settings );
|
803
|
+
this.assertions = [];
|
804
|
+
this.semaphore = 0;
|
805
|
+
this.usedAsync = false;
|
806
|
+
this.module = config.currentModule;
|
807
|
+
this.stack = sourceFromStacktrace( 3 );
|
808
|
+
|
809
|
+
// Register unique strings
|
810
|
+
for ( i = 0, l = this.module.tests; i < l.length; i++ ) {
|
811
|
+
if ( this.module.tests[ i ].name === this.testName ) {
|
812
|
+
this.testName += " ";
|
813
|
+
}
|
814
|
+
}
|
815
|
+
|
816
|
+
this.testId = generateHash( this.module.name, this.testName );
|
817
|
+
|
818
|
+
this.module.tests.push({
|
819
|
+
name: this.testName,
|
820
|
+
testId: this.testId
|
821
|
+
});
|
822
|
+
|
823
|
+
if ( settings.skip ) {
|
824
|
+
|
825
|
+
// Skipped tests will fully ignore any sent callback
|
826
|
+
this.callback = function() {};
|
827
|
+
this.async = false;
|
828
|
+
this.expected = 0;
|
829
|
+
} else {
|
830
|
+
this.assert = new Assert( this );
|
831
|
+
}
|
832
|
+
}
|
833
|
+
|
834
|
+
Test.count = 0;
|
835
|
+
|
836
|
+
Test.prototype = {
|
837
|
+
before: function() {
|
838
|
+
if (
|
839
|
+
|
840
|
+
// Emit moduleStart when we're switching from one module to another
|
841
|
+
this.module !== config.previousModule ||
|
842
|
+
|
843
|
+
// They could be equal (both undefined) but if the previousModule property doesn't
|
844
|
+
// yet exist it means this is the first test in a suite that isn't wrapped in a
|
845
|
+
// module, in which case we'll just emit a moduleStart event for 'undefined'.
|
846
|
+
// Without this, reporters can get testStart before moduleStart which is a problem.
|
847
|
+
!hasOwn.call( config, "previousModule" )
|
848
|
+
) {
|
849
|
+
if ( hasOwn.call( config, "previousModule" ) ) {
|
850
|
+
runLoggingCallbacks( "moduleDone", {
|
851
|
+
name: config.previousModule.name,
|
852
|
+
tests: config.previousModule.tests,
|
853
|
+
failed: config.moduleStats.bad,
|
854
|
+
passed: config.moduleStats.all - config.moduleStats.bad,
|
855
|
+
total: config.moduleStats.all,
|
856
|
+
runtime: now() - config.moduleStats.started
|
857
|
+
});
|
858
|
+
}
|
859
|
+
config.previousModule = this.module;
|
860
|
+
config.moduleStats = { all: 0, bad: 0, started: now() };
|
861
|
+
runLoggingCallbacks( "moduleStart", {
|
862
|
+
name: this.module.name,
|
863
|
+
tests: this.module.tests
|
864
|
+
});
|
865
|
+
}
|
866
|
+
|
867
|
+
config.current = this;
|
868
|
+
|
869
|
+
this.testEnvironment = extend( {}, this.module.testEnvironment );
|
870
|
+
delete this.testEnvironment.beforeEach;
|
871
|
+
delete this.testEnvironment.afterEach;
|
872
|
+
|
873
|
+
this.started = now();
|
874
|
+
runLoggingCallbacks( "testStart", {
|
875
|
+
name: this.testName,
|
876
|
+
module: this.module.name,
|
877
|
+
testId: this.testId
|
878
|
+
});
|
879
|
+
|
880
|
+
if ( !config.pollution ) {
|
881
|
+
saveGlobal();
|
882
|
+
}
|
883
|
+
},
|
884
|
+
|
885
|
+
run: function() {
|
886
|
+
var promise;
|
887
|
+
|
888
|
+
config.current = this;
|
889
|
+
|
890
|
+
if ( this.async ) {
|
891
|
+
QUnit.stop();
|
892
|
+
}
|
893
|
+
|
894
|
+
this.callbackStarted = now();
|
895
|
+
|
896
|
+
if ( config.notrycatch ) {
|
897
|
+
promise = this.callback.call( this.testEnvironment, this.assert );
|
898
|
+
this.resolvePromise( promise );
|
899
|
+
return;
|
900
|
+
}
|
901
|
+
|
902
|
+
try {
|
903
|
+
promise = this.callback.call( this.testEnvironment, this.assert );
|
904
|
+
this.resolvePromise( promise );
|
905
|
+
} catch ( e ) {
|
906
|
+
this.pushFailure( "Died on test #" + ( this.assertions.length + 1 ) + " " +
|
907
|
+
this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
|
908
|
+
|
909
|
+
// else next test will carry the responsibility
|
910
|
+
saveGlobal();
|
911
|
+
|
912
|
+
// Restart the tests if they're blocking
|
913
|
+
if ( config.blocking ) {
|
914
|
+
QUnit.start();
|
915
|
+
}
|
916
|
+
}
|
917
|
+
},
|
918
|
+
|
919
|
+
after: function() {
|
920
|
+
checkPollution();
|
921
|
+
},
|
922
|
+
|
923
|
+
queueHook: function( hook, hookName ) {
|
924
|
+
var promise,
|
925
|
+
test = this;
|
926
|
+
return function runHook() {
|
927
|
+
config.current = test;
|
928
|
+
if ( config.notrycatch ) {
|
929
|
+
promise = hook.call( test.testEnvironment, test.assert );
|
930
|
+
test.resolvePromise( promise, hookName );
|
931
|
+
return;
|
932
|
+
}
|
933
|
+
try {
|
934
|
+
promise = hook.call( test.testEnvironment, test.assert );
|
935
|
+
test.resolvePromise( promise, hookName );
|
936
|
+
} catch ( error ) {
|
937
|
+
test.pushFailure( hookName + " failed on " + test.testName + ": " +
|
938
|
+
( error.message || error ), extractStacktrace( error, 0 ) );
|
939
|
+
}
|
940
|
+
};
|
941
|
+
},
|
942
|
+
|
943
|
+
// Currently only used for module level hooks, can be used to add global level ones
|
944
|
+
hooks: function( handler ) {
|
945
|
+
var hooks = [];
|
946
|
+
|
947
|
+
// Hooks are ignored on skipped tests
|
948
|
+
if ( this.skip ) {
|
949
|
+
return hooks;
|
950
|
+
}
|
951
|
+
|
952
|
+
if ( this.module.testEnvironment &&
|
953
|
+
QUnit.objectType( this.module.testEnvironment[ handler ] ) === "function" ) {
|
954
|
+
hooks.push( this.queueHook( this.module.testEnvironment[ handler ], handler ) );
|
955
|
+
}
|
956
|
+
|
957
|
+
return hooks;
|
958
|
+
},
|
959
|
+
|
960
|
+
finish: function() {
|
961
|
+
config.current = this;
|
962
|
+
if ( config.requireExpects && this.expected === null ) {
|
963
|
+
this.pushFailure( "Expected number of assertions to be defined, but expect() was " +
|
964
|
+
"not called.", this.stack );
|
965
|
+
} else if ( this.expected !== null && this.expected !== this.assertions.length ) {
|
966
|
+
this.pushFailure( "Expected " + this.expected + " assertions, but " +
|
967
|
+
this.assertions.length + " were run", this.stack );
|
968
|
+
} else if ( this.expected === null && !this.assertions.length ) {
|
969
|
+
this.pushFailure( "Expected at least one assertion, but none were run - call " +
|
970
|
+
"expect(0) to accept zero assertions.", this.stack );
|
971
|
+
}
|
972
|
+
|
973
|
+
var i,
|
974
|
+
bad = 0;
|
975
|
+
|
976
|
+
this.runtime = now() - this.started;
|
977
|
+
config.stats.all += this.assertions.length;
|
978
|
+
config.moduleStats.all += this.assertions.length;
|
979
|
+
|
980
|
+
for ( i = 0; i < this.assertions.length; i++ ) {
|
981
|
+
if ( !this.assertions[ i ].result ) {
|
982
|
+
bad++;
|
983
|
+
config.stats.bad++;
|
984
|
+
config.moduleStats.bad++;
|
985
|
+
}
|
986
|
+
}
|
987
|
+
|
988
|
+
runLoggingCallbacks( "testDone", {
|
989
|
+
name: this.testName,
|
990
|
+
module: this.module.name,
|
991
|
+
skipped: !!this.skip,
|
992
|
+
failed: bad,
|
993
|
+
passed: this.assertions.length - bad,
|
994
|
+
total: this.assertions.length,
|
995
|
+
runtime: this.runtime,
|
996
|
+
|
997
|
+
// HTML Reporter use
|
998
|
+
assertions: this.assertions,
|
999
|
+
testId: this.testId,
|
1000
|
+
|
1001
|
+
// DEPRECATED: this property will be removed in 2.0.0, use runtime instead
|
1002
|
+
duration: this.runtime
|
1003
|
+
});
|
1004
|
+
|
1005
|
+
// QUnit.reset() is deprecated and will be replaced for a new
|
1006
|
+
// fixture reset function on QUnit 2.0/2.1.
|
1007
|
+
// It's still called here for backwards compatibility handling
|
1008
|
+
QUnit.reset();
|
1009
|
+
|
1010
|
+
config.current = undefined;
|
1011
|
+
},
|
1012
|
+
|
1013
|
+
queue: function() {
|
1014
|
+
var bad,
|
1015
|
+
test = this;
|
1016
|
+
|
1017
|
+
if ( !this.valid() ) {
|
1018
|
+
return;
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
function run() {
|
1022
|
+
|
1023
|
+
// each of these can by async
|
1024
|
+
synchronize([
|
1025
|
+
function() {
|
1026
|
+
test.before();
|
1027
|
+
},
|
1028
|
+
|
1029
|
+
test.hooks( "beforeEach" ),
|
1030
|
+
|
1031
|
+
function() {
|
1032
|
+
test.run();
|
1033
|
+
},
|
1034
|
+
|
1035
|
+
test.hooks( "afterEach" ).reverse(),
|
1036
|
+
|
1037
|
+
function() {
|
1038
|
+
test.after();
|
1039
|
+
},
|
1040
|
+
function() {
|
1041
|
+
test.finish();
|
1042
|
+
}
|
1043
|
+
]);
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
// `bad` initialized at top of scope
|
1047
|
+
// defer when previous test run passed, if storage is available
|
1048
|
+
bad = QUnit.config.reorder && defined.sessionStorage &&
|
1049
|
+
+sessionStorage.getItem( "qunit-test-" + this.module.name + "-" + this.testName );
|
1050
|
+
|
1051
|
+
if ( bad ) {
|
1052
|
+
run();
|
1053
|
+
} else {
|
1054
|
+
synchronize( run, true );
|
1055
|
+
}
|
1056
|
+
},
|
1057
|
+
|
1058
|
+
push: function( result, actual, expected, message ) {
|
1059
|
+
var source,
|
1060
|
+
details = {
|
1061
|
+
module: this.module.name,
|
1062
|
+
name: this.testName,
|
1063
|
+
result: result,
|
1064
|
+
message: message,
|
1065
|
+
actual: actual,
|
1066
|
+
expected: expected,
|
1067
|
+
testId: this.testId,
|
1068
|
+
runtime: now() - this.started
|
1069
|
+
};
|
1070
|
+
|
1071
|
+
if ( !result ) {
|
1072
|
+
source = sourceFromStacktrace();
|
1073
|
+
|
1074
|
+
if ( source ) {
|
1075
|
+
details.source = source;
|
1076
|
+
}
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
runLoggingCallbacks( "log", details );
|
1080
|
+
|
1081
|
+
this.assertions.push({
|
1082
|
+
result: !!result,
|
1083
|
+
message: message
|
1084
|
+
});
|
1085
|
+
},
|
1086
|
+
|
1087
|
+
pushFailure: function( message, source, actual ) {
|
1088
|
+
if ( !this instanceof Test ) {
|
1089
|
+
throw new Error( "pushFailure() assertion outside test context, was " +
|
1090
|
+
sourceFromStacktrace( 2 ) );
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
var details = {
|
1094
|
+
module: this.module.name,
|
1095
|
+
name: this.testName,
|
1096
|
+
result: false,
|
1097
|
+
message: message || "error",
|
1098
|
+
actual: actual || null,
|
1099
|
+
testId: this.testId,
|
1100
|
+
runtime: now() - this.started
|
1101
|
+
};
|
1102
|
+
|
1103
|
+
if ( source ) {
|
1104
|
+
details.source = source;
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
runLoggingCallbacks( "log", details );
|
1108
|
+
|
1109
|
+
this.assertions.push({
|
1110
|
+
result: false,
|
1111
|
+
message: message
|
1112
|
+
});
|
1113
|
+
},
|
1114
|
+
|
1115
|
+
resolvePromise: function( promise, phase ) {
|
1116
|
+
var then, message,
|
1117
|
+
test = this;
|
1118
|
+
if ( promise != null ) {
|
1119
|
+
then = promise.then;
|
1120
|
+
if ( QUnit.objectType( then ) === "function" ) {
|
1121
|
+
QUnit.stop();
|
1122
|
+
then.call(
|
1123
|
+
promise,
|
1124
|
+
QUnit.start,
|
1125
|
+
function( error ) {
|
1126
|
+
message = "Promise rejected " +
|
1127
|
+
( !phase ? "during" : phase.replace( /Each$/, "" ) ) +
|
1128
|
+
" " + test.testName + ": " + ( error.message || error );
|
1129
|
+
test.pushFailure( message, extractStacktrace( error, 0 ) );
|
1130
|
+
|
1131
|
+
// else next test will carry the responsibility
|
1132
|
+
saveGlobal();
|
1133
|
+
|
1134
|
+
// Unblock
|
1135
|
+
QUnit.start();
|
1136
|
+
}
|
1137
|
+
);
|
1138
|
+
}
|
1139
|
+
}
|
1140
|
+
},
|
1141
|
+
|
1142
|
+
valid: function() {
|
1143
|
+
var include,
|
1144
|
+
filter = config.filter && config.filter.toLowerCase(),
|
1145
|
+
module = QUnit.urlParams.module && QUnit.urlParams.module.toLowerCase(),
|
1146
|
+
fullName = ( this.module.name + ": " + this.testName ).toLowerCase();
|
1147
|
+
|
1148
|
+
// Internally-generated tests are always valid
|
1149
|
+
if ( this.callback && this.callback.validTest ) {
|
1150
|
+
return true;
|
1151
|
+
}
|
1152
|
+
|
1153
|
+
if ( config.testId.length > 0 && inArray( this.testId, config.testId ) < 0 ) {
|
1154
|
+
return false;
|
1155
|
+
}
|
1156
|
+
|
1157
|
+
if ( module && ( !this.module.name || this.module.name.toLowerCase() !== module ) ) {
|
1158
|
+
return false;
|
1159
|
+
}
|
1160
|
+
|
1161
|
+
if ( !filter ) {
|
1162
|
+
return true;
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
include = filter.charAt( 0 ) !== "!";
|
1166
|
+
if ( !include ) {
|
1167
|
+
filter = filter.slice( 1 );
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
// If the filter matches, we need to honour include
|
1171
|
+
if ( fullName.indexOf( filter ) !== -1 ) {
|
1172
|
+
return include;
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
// Otherwise, do the opposite
|
1176
|
+
return !include;
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
};
|
1180
|
+
|
1181
|
+
// Resets the test setup. Useful for tests that modify the DOM.
|
1182
|
+
/*
|
1183
|
+
DEPRECATED: Use multiple tests instead of resetting inside a test.
|
1184
|
+
Use testStart or testDone for custom cleanup.
|
1185
|
+
This method will throw an error in 2.0, and will be removed in 2.1
|
1186
|
+
*/
|
1187
|
+
QUnit.reset = function() {
|
1188
|
+
|
1189
|
+
// Return on non-browser environments
|
1190
|
+
// This is necessary to not break on node tests
|
1191
|
+
if ( typeof window === "undefined" ) {
|
1192
|
+
return;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
var fixture = defined.document && document.getElementById &&
|
1196
|
+
document.getElementById( "qunit-fixture" );
|
1197
|
+
|
1198
|
+
if ( fixture ) {
|
1199
|
+
fixture.innerHTML = config.fixture;
|
1200
|
+
}
|
1201
|
+
};
|
1202
|
+
|
1203
|
+
QUnit.pushFailure = function() {
|
1204
|
+
if ( !QUnit.config.current ) {
|
1205
|
+
throw new Error( "pushFailure() assertion outside test context, in " +
|
1206
|
+
sourceFromStacktrace( 2 ) );
|
1207
|
+
}
|
1208
|
+
|
1209
|
+
// Gets current test obj
|
1210
|
+
var currentTest = QUnit.config.current;
|
1211
|
+
|
1212
|
+
return currentTest.pushFailure.apply( currentTest, arguments );
|
1213
|
+
};
|
1214
|
+
|
1215
|
+
// Based on Java's String.hashCode, a simple but not
|
1216
|
+
// rigorously collision resistant hashing function
|
1217
|
+
function generateHash( module, testName ) {
|
1218
|
+
var hex,
|
1219
|
+
i = 0,
|
1220
|
+
hash = 0,
|
1221
|
+
str = module + "\x1C" + testName,
|
1222
|
+
len = str.length;
|
1223
|
+
|
1224
|
+
for ( ; i < len; i++ ) {
|
1225
|
+
hash = ( ( hash << 5 ) - hash ) + str.charCodeAt( i );
|
1226
|
+
hash |= 0;
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
// Convert the possibly negative integer hash code into an 8 character hex string, which isn't
|
1230
|
+
// strictly necessary but increases user understanding that the id is a SHA-like hash
|
1231
|
+
hex = ( 0x100000000 + hash ).toString( 16 );
|
1232
|
+
if ( hex.length < 8 ) {
|
1233
|
+
hex = "0000000" + hex;
|
1234
|
+
}
|
1235
|
+
|
1236
|
+
return hex.slice( -8 );
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
function Assert( testContext ) {
|
1240
|
+
this.test = testContext;
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
// Assert helpers
|
1244
|
+
QUnit.assert = Assert.prototype = {
|
1245
|
+
|
1246
|
+
// Specify the number of expected assertions to guarantee that failed test
|
1247
|
+
// (no assertions are run at all) don't slip through.
|
1248
|
+
expect: function( asserts ) {
|
1249
|
+
if ( arguments.length === 1 ) {
|
1250
|
+
this.test.expected = asserts;
|
1251
|
+
} else {
|
1252
|
+
return this.test.expected;
|
1253
|
+
}
|
1254
|
+
},
|
1255
|
+
|
1256
|
+
// Increment this Test's semaphore counter, then return a single-use function that
|
1257
|
+
// decrements that counter a maximum of once.
|
1258
|
+
async: function() {
|
1259
|
+
var test = this.test,
|
1260
|
+
popped = false;
|
1261
|
+
|
1262
|
+
test.semaphore += 1;
|
1263
|
+
test.usedAsync = true;
|
1264
|
+
pauseProcessing();
|
1265
|
+
|
1266
|
+
return function done() {
|
1267
|
+
if ( !popped ) {
|
1268
|
+
test.semaphore -= 1;
|
1269
|
+
popped = true;
|
1270
|
+
resumeProcessing();
|
1271
|
+
} else {
|
1272
|
+
test.pushFailure( "Called the callback returned from `assert.async` more than once",
|
1273
|
+
sourceFromStacktrace( 2 ) );
|
1274
|
+
}
|
1275
|
+
};
|
1276
|
+
},
|
1277
|
+
|
1278
|
+
// Exports test.push() to the user API
|
1279
|
+
push: function( /* result, actual, expected, message */ ) {
|
1280
|
+
var assert = this,
|
1281
|
+
currentTest = ( assert instanceof Assert && assert.test ) || QUnit.config.current;
|
1282
|
+
|
1283
|
+
// Backwards compatibility fix.
|
1284
|
+
// Allows the direct use of global exported assertions and QUnit.assert.*
|
1285
|
+
// Although, it's use is not recommended as it can leak assertions
|
1286
|
+
// to other tests from async tests, because we only get a reference to the current test,
|
1287
|
+
// not exactly the test where assertion were intended to be called.
|
1288
|
+
if ( !currentTest ) {
|
1289
|
+
throw new Error( "assertion outside test context, in " + sourceFromStacktrace( 2 ) );
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
if ( currentTest.usedAsync === true && currentTest.semaphore === 0 ) {
|
1293
|
+
currentTest.pushFailure( "Assertion after the final `assert.async` was resolved",
|
1294
|
+
sourceFromStacktrace( 2 ) );
|
1295
|
+
|
1296
|
+
// Allow this assertion to continue running anyway...
|
1297
|
+
}
|
1298
|
+
|
1299
|
+
if ( !( assert instanceof Assert ) ) {
|
1300
|
+
assert = currentTest.assert;
|
1301
|
+
}
|
1302
|
+
return assert.test.push.apply( assert.test, arguments );
|
1303
|
+
},
|
1304
|
+
|
1305
|
+
/**
|
1306
|
+
* Asserts rough true-ish result.
|
1307
|
+
* @name ok
|
1308
|
+
* @function
|
1309
|
+
* @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
|
1310
|
+
*/
|
1311
|
+
ok: function( result, message ) {
|
1312
|
+
message = message || ( result ? "okay" : "failed, expected argument to be truthy, was: " +
|
1313
|
+
QUnit.dump.parse( result ) );
|
1314
|
+
this.push( !!result, result, true, message );
|
1315
|
+
},
|
1316
|
+
|
1317
|
+
/**
|
1318
|
+
* Assert that the first two arguments are equal, with an optional message.
|
1319
|
+
* Prints out both actual and expected values.
|
1320
|
+
* @name equal
|
1321
|
+
* @function
|
1322
|
+
* @example equal( format( "{0} bytes.", 2), "2 bytes.", "replaces {0} with next argument" );
|
1323
|
+
*/
|
1324
|
+
equal: function( actual, expected, message ) {
|
1325
|
+
/*jshint eqeqeq:false */
|
1326
|
+
this.push( expected == actual, actual, expected, message );
|
1327
|
+
},
|
1328
|
+
|
1329
|
+
/**
|
1330
|
+
* @name notEqual
|
1331
|
+
* @function
|
1332
|
+
*/
|
1333
|
+
notEqual: function( actual, expected, message ) {
|
1334
|
+
/*jshint eqeqeq:false */
|
1335
|
+
this.push( expected != actual, actual, expected, message );
|
1336
|
+
},
|
1337
|
+
|
1338
|
+
/**
|
1339
|
+
* @name propEqual
|
1340
|
+
* @function
|
1341
|
+
*/
|
1342
|
+
propEqual: function( actual, expected, message ) {
|
1343
|
+
actual = objectValues( actual );
|
1344
|
+
expected = objectValues( expected );
|
1345
|
+
this.push( QUnit.equiv( actual, expected ), actual, expected, message );
|
1346
|
+
},
|
1347
|
+
|
1348
|
+
/**
|
1349
|
+
* @name notPropEqual
|
1350
|
+
* @function
|
1351
|
+
*/
|
1352
|
+
notPropEqual: function( actual, expected, message ) {
|
1353
|
+
actual = objectValues( actual );
|
1354
|
+
expected = objectValues( expected );
|
1355
|
+
this.push( !QUnit.equiv( actual, expected ), actual, expected, message );
|
1356
|
+
},
|
1357
|
+
|
1358
|
+
/**
|
1359
|
+
* @name deepEqual
|
1360
|
+
* @function
|
1361
|
+
*/
|
1362
|
+
deepEqual: function( actual, expected, message ) {
|
1363
|
+
this.push( QUnit.equiv( actual, expected ), actual, expected, message );
|
1364
|
+
},
|
1365
|
+
|
1366
|
+
/**
|
1367
|
+
* @name notDeepEqual
|
1368
|
+
* @function
|
1369
|
+
*/
|
1370
|
+
notDeepEqual: function( actual, expected, message ) {
|
1371
|
+
this.push( !QUnit.equiv( actual, expected ), actual, expected, message );
|
1372
|
+
},
|
1373
|
+
|
1374
|
+
/**
|
1375
|
+
* @name strictEqual
|
1376
|
+
* @function
|
1377
|
+
*/
|
1378
|
+
strictEqual: function( actual, expected, message ) {
|
1379
|
+
this.push( expected === actual, actual, expected, message );
|
1380
|
+
},
|
1381
|
+
|
1382
|
+
/**
|
1383
|
+
* @name notStrictEqual
|
1384
|
+
* @function
|
1385
|
+
*/
|
1386
|
+
notStrictEqual: function( actual, expected, message ) {
|
1387
|
+
this.push( expected !== actual, actual, expected, message );
|
1388
|
+
},
|
1389
|
+
|
1390
|
+
"throws": function( block, expected, message ) {
|
1391
|
+
var actual, expectedType,
|
1392
|
+
expectedOutput = expected,
|
1393
|
+
ok = false;
|
1394
|
+
|
1395
|
+
// 'expected' is optional unless doing string comparison
|
1396
|
+
if ( message == null && typeof expected === "string" ) {
|
1397
|
+
message = expected;
|
1398
|
+
expected = null;
|
1399
|
+
}
|
1400
|
+
|
1401
|
+
this.test.ignoreGlobalErrors = true;
|
1402
|
+
try {
|
1403
|
+
block.call( this.test.testEnvironment );
|
1404
|
+
} catch (e) {
|
1405
|
+
actual = e;
|
1406
|
+
}
|
1407
|
+
this.test.ignoreGlobalErrors = false;
|
1408
|
+
|
1409
|
+
if ( actual ) {
|
1410
|
+
expectedType = QUnit.objectType( expected );
|
1411
|
+
|
1412
|
+
// we don't want to validate thrown error
|
1413
|
+
if ( !expected ) {
|
1414
|
+
ok = true;
|
1415
|
+
expectedOutput = null;
|
1416
|
+
|
1417
|
+
// expected is a regexp
|
1418
|
+
} else if ( expectedType === "regexp" ) {
|
1419
|
+
ok = expected.test( errorString( actual ) );
|
1420
|
+
|
1421
|
+
// expected is a string
|
1422
|
+
} else if ( expectedType === "string" ) {
|
1423
|
+
ok = expected === errorString( actual );
|
1424
|
+
|
1425
|
+
// expected is a constructor, maybe an Error constructor
|
1426
|
+
} else if ( expectedType === "function" && actual instanceof expected ) {
|
1427
|
+
ok = true;
|
1428
|
+
|
1429
|
+
// expected is an Error object
|
1430
|
+
} else if ( expectedType === "object" ) {
|
1431
|
+
ok = actual instanceof expected.constructor &&
|
1432
|
+
actual.name === expected.name &&
|
1433
|
+
actual.message === expected.message;
|
1434
|
+
|
1435
|
+
// expected is a validation function which returns true if validation passed
|
1436
|
+
} else if ( expectedType === "function" && expected.call( {}, actual ) === true ) {
|
1437
|
+
expectedOutput = null;
|
1438
|
+
ok = true;
|
1439
|
+
}
|
1440
|
+
|
1441
|
+
this.push( ok, actual, expectedOutput, message );
|
1442
|
+
} else {
|
1443
|
+
this.test.pushFailure( message, null, "No exception was thrown." );
|
1444
|
+
}
|
1445
|
+
}
|
1446
|
+
};
|
1447
|
+
|
1448
|
+
// Provide an alternative to assert.throws(), for enviroments that consider throws a reserved word
|
1449
|
+
// Known to us are: Closure Compiler, Narwhal
|
1450
|
+
(function() {
|
1451
|
+
/*jshint sub:true */
|
1452
|
+
Assert.prototype.raises = Assert.prototype[ "throws" ];
|
1453
|
+
}());
|
1454
|
+
|
1455
|
+
// Test for equality any JavaScript type.
|
1456
|
+
// Author: Philippe Rathé <prathe@gmail.com>
|
1457
|
+
QUnit.equiv = (function() {
|
1458
|
+
|
1459
|
+
// Call the o related callback with the given arguments.
|
1460
|
+
function bindCallbacks( o, callbacks, args ) {
|
1461
|
+
var prop = QUnit.objectType( o );
|
1462
|
+
if ( prop ) {
|
1463
|
+
if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
|
1464
|
+
return callbacks[ prop ].apply( callbacks, args );
|
1465
|
+
} else {
|
1466
|
+
return callbacks[ prop ]; // or undefined
|
1467
|
+
}
|
1468
|
+
}
|
1469
|
+
}
|
1470
|
+
|
1471
|
+
// the real equiv function
|
1472
|
+
var innerEquiv,
|
1473
|
+
|
1474
|
+
// stack to decide between skip/abort functions
|
1475
|
+
callers = [],
|
1476
|
+
|
1477
|
+
// stack to avoiding loops from circular referencing
|
1478
|
+
parents = [],
|
1479
|
+
parentsB = [],
|
1480
|
+
|
1481
|
+
getProto = Object.getPrototypeOf || function( obj ) {
|
1482
|
+
/* jshint camelcase: false, proto: true */
|
1483
|
+
return obj.__proto__;
|
1484
|
+
},
|
1485
|
+
callbacks = (function() {
|
1486
|
+
|
1487
|
+
// for string, boolean, number and null
|
1488
|
+
function useStrictEquality( b, a ) {
|
1489
|
+
|
1490
|
+
/*jshint eqeqeq:false */
|
1491
|
+
if ( b instanceof a.constructor || a instanceof b.constructor ) {
|
1492
|
+
|
1493
|
+
// to catch short annotation VS 'new' annotation of a
|
1494
|
+
// declaration
|
1495
|
+
// e.g. var i = 1;
|
1496
|
+
// var j = new Number(1);
|
1497
|
+
return a == b;
|
1498
|
+
} else {
|
1499
|
+
return a === b;
|
1500
|
+
}
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
return {
|
1504
|
+
"string": useStrictEquality,
|
1505
|
+
"boolean": useStrictEquality,
|
1506
|
+
"number": useStrictEquality,
|
1507
|
+
"null": useStrictEquality,
|
1508
|
+
"undefined": useStrictEquality,
|
1509
|
+
|
1510
|
+
"nan": function( b ) {
|
1511
|
+
return isNaN( b );
|
1512
|
+
},
|
1513
|
+
|
1514
|
+
"date": function( b, a ) {
|
1515
|
+
return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf();
|
1516
|
+
},
|
1517
|
+
|
1518
|
+
"regexp": function( b, a ) {
|
1519
|
+
return QUnit.objectType( b ) === "regexp" &&
|
1520
|
+
|
1521
|
+
// the regex itself
|
1522
|
+
a.source === b.source &&
|
1523
|
+
|
1524
|
+
// and its modifiers
|
1525
|
+
a.global === b.global &&
|
1526
|
+
|
1527
|
+
// (gmi) ...
|
1528
|
+
a.ignoreCase === b.ignoreCase &&
|
1529
|
+
a.multiline === b.multiline &&
|
1530
|
+
a.sticky === b.sticky;
|
1531
|
+
},
|
1532
|
+
|
1533
|
+
// - skip when the property is a method of an instance (OOP)
|
1534
|
+
// - abort otherwise,
|
1535
|
+
// initial === would have catch identical references anyway
|
1536
|
+
"function": function() {
|
1537
|
+
var caller = callers[ callers.length - 1 ];
|
1538
|
+
return caller !== Object && typeof caller !== "undefined";
|
1539
|
+
},
|
1540
|
+
|
1541
|
+
"array": function( b, a ) {
|
1542
|
+
var i, j, len, loop, aCircular, bCircular;
|
1543
|
+
|
1544
|
+
// b could be an object literal here
|
1545
|
+
if ( QUnit.objectType( b ) !== "array" ) {
|
1546
|
+
return false;
|
1547
|
+
}
|
1548
|
+
|
1549
|
+
len = a.length;
|
1550
|
+
if ( len !== b.length ) {
|
1551
|
+
// safe and faster
|
1552
|
+
return false;
|
1553
|
+
}
|
1554
|
+
|
1555
|
+
// track reference to avoid circular references
|
1556
|
+
parents.push( a );
|
1557
|
+
parentsB.push( b );
|
1558
|
+
for ( i = 0; i < len; i++ ) {
|
1559
|
+
loop = false;
|
1560
|
+
for ( j = 0; j < parents.length; j++ ) {
|
1561
|
+
aCircular = parents[ j ] === a[ i ];
|
1562
|
+
bCircular = parentsB[ j ] === b[ i ];
|
1563
|
+
if ( aCircular || bCircular ) {
|
1564
|
+
if ( a[ i ] === b[ i ] || aCircular && bCircular ) {
|
1565
|
+
loop = true;
|
1566
|
+
} else {
|
1567
|
+
parents.pop();
|
1568
|
+
parentsB.pop();
|
1569
|
+
return false;
|
1570
|
+
}
|
1571
|
+
}
|
1572
|
+
}
|
1573
|
+
if ( !loop && !innerEquiv( a[ i ], b[ i ] ) ) {
|
1574
|
+
parents.pop();
|
1575
|
+
parentsB.pop();
|
1576
|
+
return false;
|
1577
|
+
}
|
1578
|
+
}
|
1579
|
+
parents.pop();
|
1580
|
+
parentsB.pop();
|
1581
|
+
return true;
|
1582
|
+
},
|
1583
|
+
|
1584
|
+
"object": function( b, a ) {
|
1585
|
+
|
1586
|
+
/*jshint forin:false */
|
1587
|
+
var i, j, loop, aCircular, bCircular,
|
1588
|
+
// Default to true
|
1589
|
+
eq = true,
|
1590
|
+
aProperties = [],
|
1591
|
+
bProperties = [];
|
1592
|
+
|
1593
|
+
// comparing constructors is more strict than using
|
1594
|
+
// instanceof
|
1595
|
+
if ( a.constructor !== b.constructor ) {
|
1596
|
+
|
1597
|
+
// Allow objects with no prototype to be equivalent to
|
1598
|
+
// objects with Object as their constructor.
|
1599
|
+
if ( !( ( getProto( a ) === null && getProto( b ) === Object.prototype ) ||
|
1600
|
+
( getProto( b ) === null && getProto( a ) === Object.prototype ) ) ) {
|
1601
|
+
return false;
|
1602
|
+
}
|
1603
|
+
}
|
1604
|
+
|
1605
|
+
// stack constructor before traversing properties
|
1606
|
+
callers.push( a.constructor );
|
1607
|
+
|
1608
|
+
// track reference to avoid circular references
|
1609
|
+
parents.push( a );
|
1610
|
+
parentsB.push( b );
|
1611
|
+
|
1612
|
+
// be strict: don't ensure hasOwnProperty and go deep
|
1613
|
+
for ( i in a ) {
|
1614
|
+
loop = false;
|
1615
|
+
for ( j = 0; j < parents.length; j++ ) {
|
1616
|
+
aCircular = parents[ j ] === a[ i ];
|
1617
|
+
bCircular = parentsB[ j ] === b[ i ];
|
1618
|
+
if ( aCircular || bCircular ) {
|
1619
|
+
if ( a[ i ] === b[ i ] || aCircular && bCircular ) {
|
1620
|
+
loop = true;
|
1621
|
+
} else {
|
1622
|
+
eq = false;
|
1623
|
+
break;
|
1624
|
+
}
|
1625
|
+
}
|
1626
|
+
}
|
1627
|
+
aProperties.push( i );
|
1628
|
+
if ( !loop && !innerEquiv( a[ i ], b[ i ] ) ) {
|
1629
|
+
eq = false;
|
1630
|
+
break;
|
1631
|
+
}
|
1632
|
+
}
|
1633
|
+
|
1634
|
+
parents.pop();
|
1635
|
+
parentsB.pop();
|
1636
|
+
callers.pop(); // unstack, we are done
|
1637
|
+
|
1638
|
+
for ( i in b ) {
|
1639
|
+
bProperties.push( i ); // collect b's properties
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
// Ensures identical properties name
|
1643
|
+
return eq && innerEquiv( aProperties.sort(), bProperties.sort() );
|
1644
|
+
}
|
1645
|
+
};
|
1646
|
+
}());
|
1647
|
+
|
1648
|
+
innerEquiv = function() { // can take multiple arguments
|
1649
|
+
var args = [].slice.apply( arguments );
|
1650
|
+
if ( args.length < 2 ) {
|
1651
|
+
return true; // end transition
|
1652
|
+
}
|
1653
|
+
|
1654
|
+
return ( (function( a, b ) {
|
1655
|
+
if ( a === b ) {
|
1656
|
+
return true; // catch the most you can
|
1657
|
+
} else if ( a === null || b === null || typeof a === "undefined" ||
|
1658
|
+
typeof b === "undefined" ||
|
1659
|
+
QUnit.objectType( a ) !== QUnit.objectType( b ) ) {
|
1660
|
+
|
1661
|
+
// don't lose time with error prone cases
|
1662
|
+
return false;
|
1663
|
+
} else {
|
1664
|
+
return bindCallbacks( a, callbacks, [ b, a ] );
|
1665
|
+
}
|
1666
|
+
|
1667
|
+
// apply transition with (1..n) arguments
|
1668
|
+
}( args[ 0 ], args[ 1 ] ) ) &&
|
1669
|
+
innerEquiv.apply( this, args.splice( 1, args.length - 1 ) ) );
|
1670
|
+
};
|
1671
|
+
|
1672
|
+
return innerEquiv;
|
1673
|
+
}());
|
1674
|
+
|
1675
|
+
// Based on jsDump by Ariel Flesler
|
1676
|
+
// http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html
|
1677
|
+
QUnit.dump = (function() {
|
1678
|
+
function quote( str ) {
|
1679
|
+
return "\"" + str.toString().replace( /"/g, "\\\"" ) + "\"";
|
1680
|
+
}
|
1681
|
+
function literal( o ) {
|
1682
|
+
return o + "";
|
1683
|
+
}
|
1684
|
+
function join( pre, arr, post ) {
|
1685
|
+
var s = dump.separator(),
|
1686
|
+
base = dump.indent(),
|
1687
|
+
inner = dump.indent( 1 );
|
1688
|
+
if ( arr.join ) {
|
1689
|
+
arr = arr.join( "," + s + inner );
|
1690
|
+
}
|
1691
|
+
if ( !arr ) {
|
1692
|
+
return pre + post;
|
1693
|
+
}
|
1694
|
+
return [ pre, inner + arr, base + post ].join( s );
|
1695
|
+
}
|
1696
|
+
function array( arr, stack ) {
|
1697
|
+
var i = arr.length,
|
1698
|
+
ret = new Array( i );
|
1699
|
+
|
1700
|
+
if ( dump.maxDepth && dump.depth > dump.maxDepth ) {
|
1701
|
+
return "[object Array]";
|
1702
|
+
}
|
1703
|
+
|
1704
|
+
this.up();
|
1705
|
+
while ( i-- ) {
|
1706
|
+
ret[ i ] = this.parse( arr[ i ], undefined, stack );
|
1707
|
+
}
|
1708
|
+
this.down();
|
1709
|
+
return join( "[", ret, "]" );
|
1710
|
+
}
|
1711
|
+
|
1712
|
+
var reName = /^function (\w+)/,
|
1713
|
+
dump = {
|
1714
|
+
|
1715
|
+
// objType is used mostly internally, you can fix a (custom) type in advance
|
1716
|
+
parse: function( obj, objType, stack ) {
|
1717
|
+
stack = stack || [];
|
1718
|
+
var res, parser, parserType,
|
1719
|
+
inStack = inArray( obj, stack );
|
1720
|
+
|
1721
|
+
if ( inStack !== -1 ) {
|
1722
|
+
return "recursion(" + ( inStack - stack.length ) + ")";
|
1723
|
+
}
|
1724
|
+
|
1725
|
+
objType = objType || this.typeOf( obj );
|
1726
|
+
parser = this.parsers[ objType ];
|
1727
|
+
parserType = typeof parser;
|
1728
|
+
|
1729
|
+
if ( parserType === "function" ) {
|
1730
|
+
stack.push( obj );
|
1731
|
+
res = parser.call( this, obj, stack );
|
1732
|
+
stack.pop();
|
1733
|
+
return res;
|
1734
|
+
}
|
1735
|
+
return ( parserType === "string" ) ? parser : this.parsers.error;
|
1736
|
+
},
|
1737
|
+
typeOf: function( obj ) {
|
1738
|
+
var type;
|
1739
|
+
if ( obj === null ) {
|
1740
|
+
type = "null";
|
1741
|
+
} else if ( typeof obj === "undefined" ) {
|
1742
|
+
type = "undefined";
|
1743
|
+
} else if ( QUnit.is( "regexp", obj ) ) {
|
1744
|
+
type = "regexp";
|
1745
|
+
} else if ( QUnit.is( "date", obj ) ) {
|
1746
|
+
type = "date";
|
1747
|
+
} else if ( QUnit.is( "function", obj ) ) {
|
1748
|
+
type = "function";
|
1749
|
+
} else if ( obj.setInterval !== undefined &&
|
1750
|
+
obj.document !== undefined &&
|
1751
|
+
obj.nodeType === undefined ) {
|
1752
|
+
type = "window";
|
1753
|
+
} else if ( obj.nodeType === 9 ) {
|
1754
|
+
type = "document";
|
1755
|
+
} else if ( obj.nodeType ) {
|
1756
|
+
type = "node";
|
1757
|
+
} else if (
|
1758
|
+
|
1759
|
+
// native arrays
|
1760
|
+
toString.call( obj ) === "[object Array]" ||
|
1761
|
+
|
1762
|
+
// NodeList objects
|
1763
|
+
( typeof obj.length === "number" && obj.item !== undefined &&
|
1764
|
+
( obj.length ? obj.item( 0 ) === obj[ 0 ] : ( obj.item( 0 ) === null &&
|
1765
|
+
obj[ 0 ] === undefined ) ) )
|
1766
|
+
) {
|
1767
|
+
type = "array";
|
1768
|
+
} else if ( obj.constructor === Error.prototype.constructor ) {
|
1769
|
+
type = "error";
|
1770
|
+
} else {
|
1771
|
+
type = typeof obj;
|
1772
|
+
}
|
1773
|
+
return type;
|
1774
|
+
},
|
1775
|
+
separator: function() {
|
1776
|
+
return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? " " : " ";
|
1777
|
+
},
|
1778
|
+
// extra can be a number, shortcut for increasing-calling-decreasing
|
1779
|
+
indent: function( extra ) {
|
1780
|
+
if ( !this.multiline ) {
|
1781
|
+
return "";
|
1782
|
+
}
|
1783
|
+
var chr = this.indentChar;
|
1784
|
+
if ( this.HTML ) {
|
1785
|
+
chr = chr.replace( /\t/g, " " ).replace( / /g, " " );
|
1786
|
+
}
|
1787
|
+
return new Array( this.depth + ( extra || 0 ) ).join( chr );
|
1788
|
+
},
|
1789
|
+
up: function( a ) {
|
1790
|
+
this.depth += a || 1;
|
1791
|
+
},
|
1792
|
+
down: function( a ) {
|
1793
|
+
this.depth -= a || 1;
|
1794
|
+
},
|
1795
|
+
setParser: function( name, parser ) {
|
1796
|
+
this.parsers[ name ] = parser;
|
1797
|
+
},
|
1798
|
+
// The next 3 are exposed so you can use them
|
1799
|
+
quote: quote,
|
1800
|
+
literal: literal,
|
1801
|
+
join: join,
|
1802
|
+
//
|
1803
|
+
depth: 1,
|
1804
|
+
maxDepth: 5,
|
1805
|
+
|
1806
|
+
// This is the list of parsers, to modify them, use dump.setParser
|
1807
|
+
parsers: {
|
1808
|
+
window: "[Window]",
|
1809
|
+
document: "[Document]",
|
1810
|
+
error: function( error ) {
|
1811
|
+
return "Error(\"" + error.message + "\")";
|
1812
|
+
},
|
1813
|
+
unknown: "[Unknown]",
|
1814
|
+
"null": "null",
|
1815
|
+
"undefined": "undefined",
|
1816
|
+
"function": function( fn ) {
|
1817
|
+
var ret = "function",
|
1818
|
+
|
1819
|
+
// functions never have name in IE
|
1820
|
+
name = "name" in fn ? fn.name : ( reName.exec( fn ) || [] )[ 1 ];
|
1821
|
+
|
1822
|
+
if ( name ) {
|
1823
|
+
ret += " " + name;
|
1824
|
+
}
|
1825
|
+
ret += "( ";
|
1826
|
+
|
1827
|
+
ret = [ ret, dump.parse( fn, "functionArgs" ), "){" ].join( "" );
|
1828
|
+
return join( ret, dump.parse( fn, "functionCode" ), "}" );
|
1829
|
+
},
|
1830
|
+
array: array,
|
1831
|
+
nodelist: array,
|
1832
|
+
"arguments": array,
|
1833
|
+
object: function( map, stack ) {
|
1834
|
+
var keys, key, val, i, nonEnumerableProperties,
|
1835
|
+
ret = [];
|
1836
|
+
|
1837
|
+
if ( dump.maxDepth && dump.depth > dump.maxDepth ) {
|
1838
|
+
return "[object Object]";
|
1839
|
+
}
|
1840
|
+
|
1841
|
+
dump.up();
|
1842
|
+
keys = [];
|
1843
|
+
for ( key in map ) {
|
1844
|
+
keys.push( key );
|
1845
|
+
}
|
1846
|
+
|
1847
|
+
// Some properties are not always enumerable on Error objects.
|
1848
|
+
nonEnumerableProperties = [ "message", "name" ];
|
1849
|
+
for ( i in nonEnumerableProperties ) {
|
1850
|
+
key = nonEnumerableProperties[ i ];
|
1851
|
+
if ( key in map && !( key in keys ) ) {
|
1852
|
+
keys.push( key );
|
1853
|
+
}
|
1854
|
+
}
|
1855
|
+
keys.sort();
|
1856
|
+
for ( i = 0; i < keys.length; i++ ) {
|
1857
|
+
key = keys[ i ];
|
1858
|
+
val = map[ key ];
|
1859
|
+
ret.push( dump.parse( key, "key" ) + ": " +
|
1860
|
+
dump.parse( val, undefined, stack ) );
|
1861
|
+
}
|
1862
|
+
dump.down();
|
1863
|
+
return join( "{", ret, "}" );
|
1864
|
+
},
|
1865
|
+
node: function( node ) {
|
1866
|
+
var len, i, val,
|
1867
|
+
open = dump.HTML ? "<" : "<",
|
1868
|
+
close = dump.HTML ? ">" : ">",
|
1869
|
+
tag = node.nodeName.toLowerCase(),
|
1870
|
+
ret = open + tag,
|
1871
|
+
attrs = node.attributes;
|
1872
|
+
|
1873
|
+
if ( attrs ) {
|
1874
|
+
for ( i = 0, len = attrs.length; i < len; i++ ) {
|
1875
|
+
val = attrs[ i ].nodeValue;
|
1876
|
+
|
1877
|
+
// IE6 includes all attributes in .attributes, even ones not explicitly
|
1878
|
+
// set. Those have values like undefined, null, 0, false, "" or
|
1879
|
+
// "inherit".
|
1880
|
+
if ( val && val !== "inherit" ) {
|
1881
|
+
ret += " " + attrs[ i ].nodeName + "=" +
|
1882
|
+
dump.parse( val, "attribute" );
|
1883
|
+
}
|
1884
|
+
}
|
1885
|
+
}
|
1886
|
+
ret += close;
|
1887
|
+
|
1888
|
+
// Show content of TextNode or CDATASection
|
1889
|
+
if ( node.nodeType === 3 || node.nodeType === 4 ) {
|
1890
|
+
ret += node.nodeValue;
|
1891
|
+
}
|
1892
|
+
|
1893
|
+
return ret + open + "/" + tag + close;
|
1894
|
+
},
|
1895
|
+
|
1896
|
+
// function calls it internally, it's the arguments part of the function
|
1897
|
+
functionArgs: function( fn ) {
|
1898
|
+
var args,
|
1899
|
+
l = fn.length;
|
1900
|
+
|
1901
|
+
if ( !l ) {
|
1902
|
+
return "";
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
args = new Array( l );
|
1906
|
+
while ( l-- ) {
|
1907
|
+
|
1908
|
+
// 97 is 'a'
|
1909
|
+
args[ l ] = String.fromCharCode( 97 + l );
|
1910
|
+
}
|
1911
|
+
return " " + args.join( ", " ) + " ";
|
1912
|
+
},
|
1913
|
+
// object calls it internally, the key part of an item in a map
|
1914
|
+
key: quote,
|
1915
|
+
// function calls it internally, it's the content of the function
|
1916
|
+
functionCode: "[code]",
|
1917
|
+
// node calls it internally, it's an html attribute value
|
1918
|
+
attribute: quote,
|
1919
|
+
string: quote,
|
1920
|
+
date: quote,
|
1921
|
+
regexp: literal,
|
1922
|
+
number: literal,
|
1923
|
+
"boolean": literal
|
1924
|
+
},
|
1925
|
+
// if true, entities are escaped ( <, >, \t, space and \n )
|
1926
|
+
HTML: false,
|
1927
|
+
// indentation unit
|
1928
|
+
indentChar: " ",
|
1929
|
+
// if true, items in a collection, are separated by a \n, else just a space.
|
1930
|
+
multiline: true
|
1931
|
+
};
|
1932
|
+
|
1933
|
+
return dump;
|
1934
|
+
}());
|
1935
|
+
|
1936
|
+
// back compat
|
1937
|
+
QUnit.jsDump = QUnit.dump;
|
1938
|
+
|
1939
|
+
// For browser, export only select globals
|
1940
|
+
if ( typeof window !== "undefined" ) {
|
1941
|
+
|
1942
|
+
// Deprecated
|
1943
|
+
// Extend assert methods to QUnit and Global scope through Backwards compatibility
|
1944
|
+
(function() {
|
1945
|
+
var i,
|
1946
|
+
assertions = Assert.prototype;
|
1947
|
+
|
1948
|
+
function applyCurrent( current ) {
|
1949
|
+
return function() {
|
1950
|
+
var assert = new Assert( QUnit.config.current );
|
1951
|
+
current.apply( assert, arguments );
|
1952
|
+
};
|
1953
|
+
}
|
1954
|
+
|
1955
|
+
for ( i in assertions ) {
|
1956
|
+
QUnit[ i ] = applyCurrent( assertions[ i ] );
|
1957
|
+
}
|
1958
|
+
})();
|
1959
|
+
|
1960
|
+
(function() {
|
1961
|
+
var i, l,
|
1962
|
+
keys = [
|
1963
|
+
"test",
|
1964
|
+
"module",
|
1965
|
+
"expect",
|
1966
|
+
"asyncTest",
|
1967
|
+
"start",
|
1968
|
+
"stop",
|
1969
|
+
"ok",
|
1970
|
+
"equal",
|
1971
|
+
"notEqual",
|
1972
|
+
"propEqual",
|
1973
|
+
"notPropEqual",
|
1974
|
+
"deepEqual",
|
1975
|
+
"notDeepEqual",
|
1976
|
+
"strictEqual",
|
1977
|
+
"notStrictEqual",
|
1978
|
+
"throws"
|
1979
|
+
];
|
1980
|
+
|
1981
|
+
for ( i = 0, l = keys.length; i < l; i++ ) {
|
1982
|
+
window[ keys[ i ] ] = QUnit[ keys[ i ] ];
|
1983
|
+
}
|
1984
|
+
})();
|
1985
|
+
|
1986
|
+
window.QUnit = QUnit;
|
1987
|
+
}
|
1988
|
+
|
1989
|
+
// For nodejs
|
1990
|
+
if ( typeof module !== "undefined" && module.exports ) {
|
1991
|
+
module.exports = QUnit;
|
1992
|
+
}
|
1993
|
+
|
1994
|
+
// For CommonJS with exports, but without module.exports, like Rhino
|
1995
|
+
if ( typeof exports !== "undefined" ) {
|
1996
|
+
exports.QUnit = QUnit;
|
1997
|
+
}
|
1998
|
+
|
1999
|
+
// Get a reference to the global object, like window in browsers
|
2000
|
+
}( (function() {
|
2001
|
+
return this;
|
2002
|
+
})() ));
|
2003
|
+
|
2004
|
+
/*istanbul ignore next */
|
2005
|
+
// jscs:disable maximumLineLength
|
2006
|
+
/*
|
2007
|
+
* Javascript Diff Algorithm
|
2008
|
+
* By John Resig (http://ejohn.org/)
|
2009
|
+
* Modified by Chu Alan "sprite"
|
2010
|
+
*
|
2011
|
+
* Released under the MIT license.
|
2012
|
+
*
|
2013
|
+
* More Info:
|
2014
|
+
* http://ejohn.org/projects/javascript-diff-algorithm/
|
2015
|
+
*
|
2016
|
+
* Usage: QUnit.diff(expected, actual)
|
2017
|
+
*
|
2018
|
+
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
|
2019
|
+
*/
|
2020
|
+
QUnit.diff = (function() {
|
2021
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
2022
|
+
|
2023
|
+
/*jshint eqeqeq:false, eqnull:true */
|
2024
|
+
function diff( o, n ) {
|
2025
|
+
var i,
|
2026
|
+
ns = {},
|
2027
|
+
os = {};
|
2028
|
+
|
2029
|
+
for ( i = 0; i < n.length; i++ ) {
|
2030
|
+
if ( !hasOwn.call( ns, n[ i ] ) ) {
|
2031
|
+
ns[ n[ i ] ] = {
|
2032
|
+
rows: [],
|
2033
|
+
o: null
|
2034
|
+
};
|
2035
|
+
}
|
2036
|
+
ns[ n[ i ] ].rows.push( i );
|
2037
|
+
}
|
2038
|
+
|
2039
|
+
for ( i = 0; i < o.length; i++ ) {
|
2040
|
+
if ( !hasOwn.call( os, o[ i ] ) ) {
|
2041
|
+
os[ o[ i ] ] = {
|
2042
|
+
rows: [],
|
2043
|
+
n: null
|
2044
|
+
};
|
2045
|
+
}
|
2046
|
+
os[ o[ i ] ].rows.push( i );
|
2047
|
+
}
|
2048
|
+
|
2049
|
+
for ( i in ns ) {
|
2050
|
+
if ( hasOwn.call( ns, i ) ) {
|
2051
|
+
if ( ns[ i ].rows.length === 1 && hasOwn.call( os, i ) && os[ i ].rows.length === 1 ) {
|
2052
|
+
n[ ns[ i ].rows[ 0 ] ] = {
|
2053
|
+
text: n[ ns[ i ].rows[ 0 ] ],
|
2054
|
+
row: os[ i ].rows[ 0 ]
|
2055
|
+
};
|
2056
|
+
o[ os[ i ].rows[ 0 ] ] = {
|
2057
|
+
text: o[ os[ i ].rows[ 0 ] ],
|
2058
|
+
row: ns[ i ].rows[ 0 ]
|
2059
|
+
};
|
2060
|
+
}
|
2061
|
+
}
|
2062
|
+
}
|
2063
|
+
|
2064
|
+
for ( i = 0; i < n.length - 1; i++ ) {
|
2065
|
+
if ( n[ i ].text != null && n[ i + 1 ].text == null && n[ i ].row + 1 < o.length && o[ n[ i ].row + 1 ].text == null &&
|
2066
|
+
n[ i + 1 ] == o[ n[ i ].row + 1 ] ) {
|
2067
|
+
|
2068
|
+
n[ i + 1 ] = {
|
2069
|
+
text: n[ i + 1 ],
|
2070
|
+
row: n[ i ].row + 1
|
2071
|
+
};
|
2072
|
+
o[ n[ i ].row + 1 ] = {
|
2073
|
+
text: o[ n[ i ].row + 1 ],
|
2074
|
+
row: i + 1
|
2075
|
+
};
|
2076
|
+
}
|
2077
|
+
}
|
2078
|
+
|
2079
|
+
for ( i = n.length - 1; i > 0; i-- ) {
|
2080
|
+
if ( n[ i ].text != null && n[ i - 1 ].text == null && n[ i ].row > 0 && o[ n[ i ].row - 1 ].text == null &&
|
2081
|
+
n[ i - 1 ] == o[ n[ i ].row - 1 ] ) {
|
2082
|
+
|
2083
|
+
n[ i - 1 ] = {
|
2084
|
+
text: n[ i - 1 ],
|
2085
|
+
row: n[ i ].row - 1
|
2086
|
+
};
|
2087
|
+
o[ n[ i ].row - 1 ] = {
|
2088
|
+
text: o[ n[ i ].row - 1 ],
|
2089
|
+
row: i - 1
|
2090
|
+
};
|
2091
|
+
}
|
2092
|
+
}
|
2093
|
+
|
2094
|
+
return {
|
2095
|
+
o: o,
|
2096
|
+
n: n
|
2097
|
+
};
|
2098
|
+
}
|
2099
|
+
|
2100
|
+
return function( o, n ) {
|
2101
|
+
o = o.replace( /\s+$/, "" );
|
2102
|
+
n = n.replace( /\s+$/, "" );
|
2103
|
+
|
2104
|
+
var i, pre,
|
2105
|
+
str = "",
|
2106
|
+
out = diff( o === "" ? [] : o.split( /\s+/ ), n === "" ? [] : n.split( /\s+/ ) ),
|
2107
|
+
oSpace = o.match( /\s+/g ),
|
2108
|
+
nSpace = n.match( /\s+/g );
|
2109
|
+
|
2110
|
+
if ( oSpace == null ) {
|
2111
|
+
oSpace = [ " " ];
|
2112
|
+
} else {
|
2113
|
+
oSpace.push( " " );
|
2114
|
+
}
|
2115
|
+
|
2116
|
+
if ( nSpace == null ) {
|
2117
|
+
nSpace = [ " " ];
|
2118
|
+
} else {
|
2119
|
+
nSpace.push( " " );
|
2120
|
+
}
|
2121
|
+
|
2122
|
+
if ( out.n.length === 0 ) {
|
2123
|
+
for ( i = 0; i < out.o.length; i++ ) {
|
2124
|
+
str += "<del>" + out.o[ i ] + oSpace[ i ] + "</del>";
|
2125
|
+
}
|
2126
|
+
} else {
|
2127
|
+
if ( out.n[ 0 ].text == null ) {
|
2128
|
+
for ( n = 0; n < out.o.length && out.o[ n ].text == null; n++ ) {
|
2129
|
+
str += "<del>" + out.o[ n ] + oSpace[ n ] + "</del>";
|
2130
|
+
}
|
2131
|
+
}
|
2132
|
+
|
2133
|
+
for ( i = 0; i < out.n.length; i++ ) {
|
2134
|
+
if ( out.n[ i ].text == null ) {
|
2135
|
+
str += "<ins>" + out.n[ i ] + nSpace[ i ] + "</ins>";
|
2136
|
+
} else {
|
2137
|
+
|
2138
|
+
// `pre` initialized at top of scope
|
2139
|
+
pre = "";
|
2140
|
+
|
2141
|
+
for ( n = out.n[ i ].row + 1; n < out.o.length && out.o[ n ].text == null; n++ ) {
|
2142
|
+
pre += "<del>" + out.o[ n ] + oSpace[ n ] + "</del>";
|
2143
|
+
}
|
2144
|
+
str += " " + out.n[ i ].text + nSpace[ i ] + pre;
|
2145
|
+
}
|
2146
|
+
}
|
2147
|
+
}
|
2148
|
+
|
2149
|
+
return str;
|
2150
|
+
};
|
2151
|
+
}());
|
2152
|
+
// jscs:enable
|
2153
|
+
|
2154
|
+
(function() {
|
2155
|
+
|
2156
|
+
// Deprecated QUnit.init - Ref #530
|
2157
|
+
// Re-initialize the configuration options
|
2158
|
+
QUnit.init = function() {
|
2159
|
+
var tests, banner, result, qunit,
|
2160
|
+
config = QUnit.config;
|
2161
|
+
|
2162
|
+
config.stats = { all: 0, bad: 0 };
|
2163
|
+
config.moduleStats = { all: 0, bad: 0 };
|
2164
|
+
config.started = 0;
|
2165
|
+
config.updateRate = 1000;
|
2166
|
+
config.blocking = false;
|
2167
|
+
config.autostart = true;
|
2168
|
+
config.autorun = false;
|
2169
|
+
config.filter = "";
|
2170
|
+
config.queue = [];
|
2171
|
+
|
2172
|
+
// Return on non-browser environments
|
2173
|
+
// This is necessary to not break on node tests
|
2174
|
+
if ( typeof window === "undefined" ) {
|
2175
|
+
return;
|
2176
|
+
}
|
2177
|
+
|
2178
|
+
qunit = id( "qunit" );
|
2179
|
+
if ( qunit ) {
|
2180
|
+
qunit.innerHTML =
|
2181
|
+
"<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
|
2182
|
+
"<h2 id='qunit-banner'></h2>" +
|
2183
|
+
"<div id='qunit-testrunner-toolbar'></div>" +
|
2184
|
+
"<h2 id='qunit-userAgent'></h2>" +
|
2185
|
+
"<ol id='qunit-tests'></ol>";
|
2186
|
+
}
|
2187
|
+
|
2188
|
+
tests = id( "qunit-tests" );
|
2189
|
+
banner = id( "qunit-banner" );
|
2190
|
+
result = id( "qunit-testresult" );
|
2191
|
+
|
2192
|
+
if ( tests ) {
|
2193
|
+
tests.innerHTML = "";
|
2194
|
+
}
|
2195
|
+
|
2196
|
+
if ( banner ) {
|
2197
|
+
banner.className = "";
|
2198
|
+
}
|
2199
|
+
|
2200
|
+
if ( result ) {
|
2201
|
+
result.parentNode.removeChild( result );
|
2202
|
+
}
|
2203
|
+
|
2204
|
+
if ( tests ) {
|
2205
|
+
result = document.createElement( "p" );
|
2206
|
+
result.id = "qunit-testresult";
|
2207
|
+
result.className = "result";
|
2208
|
+
tests.parentNode.insertBefore( result, tests );
|
2209
|
+
result.innerHTML = "Running...<br /> ";
|
2210
|
+
}
|
2211
|
+
};
|
2212
|
+
|
2213
|
+
// Don't load the HTML Reporter on non-Browser environments
|
2214
|
+
if ( typeof window === "undefined" ) {
|
2215
|
+
return;
|
2216
|
+
}
|
2217
|
+
|
2218
|
+
var config = QUnit.config,
|
2219
|
+
hasOwn = Object.prototype.hasOwnProperty,
|
2220
|
+
defined = {
|
2221
|
+
document: window.document !== undefined,
|
2222
|
+
sessionStorage: (function() {
|
2223
|
+
var x = "qunit-test-string";
|
2224
|
+
try {
|
2225
|
+
sessionStorage.setItem( x, x );
|
2226
|
+
sessionStorage.removeItem( x );
|
2227
|
+
return true;
|
2228
|
+
} catch ( e ) {
|
2229
|
+
return false;
|
2230
|
+
}
|
2231
|
+
}())
|
2232
|
+
},
|
2233
|
+
modulesList = [];
|
2234
|
+
|
2235
|
+
/**
|
2236
|
+
* Escape text for attribute or text content.
|
2237
|
+
*/
|
2238
|
+
function escapeText( s ) {
|
2239
|
+
if ( !s ) {
|
2240
|
+
return "";
|
2241
|
+
}
|
2242
|
+
s = s + "";
|
2243
|
+
|
2244
|
+
// Both single quotes and double quotes (for attributes)
|
2245
|
+
return s.replace( /['"<>&]/g, function( s ) {
|
2246
|
+
switch ( s ) {
|
2247
|
+
case "'":
|
2248
|
+
return "'";
|
2249
|
+
case "\"":
|
2250
|
+
return """;
|
2251
|
+
case "<":
|
2252
|
+
return "<";
|
2253
|
+
case ">":
|
2254
|
+
return ">";
|
2255
|
+
case "&":
|
2256
|
+
return "&";
|
2257
|
+
}
|
2258
|
+
});
|
2259
|
+
}
|
2260
|
+
|
2261
|
+
/**
|
2262
|
+
* @param {HTMLElement} elem
|
2263
|
+
* @param {string} type
|
2264
|
+
* @param {Function} fn
|
2265
|
+
*/
|
2266
|
+
function addEvent( elem, type, fn ) {
|
2267
|
+
if ( elem.addEventListener ) {
|
2268
|
+
|
2269
|
+
// Standards-based browsers
|
2270
|
+
elem.addEventListener( type, fn, false );
|
2271
|
+
} else if ( elem.attachEvent ) {
|
2272
|
+
|
2273
|
+
// support: IE <9
|
2274
|
+
elem.attachEvent( "on" + type, fn );
|
2275
|
+
}
|
2276
|
+
}
|
2277
|
+
|
2278
|
+
/**
|
2279
|
+
* @param {Array|NodeList} elems
|
2280
|
+
* @param {string} type
|
2281
|
+
* @param {Function} fn
|
2282
|
+
*/
|
2283
|
+
function addEvents( elems, type, fn ) {
|
2284
|
+
var i = elems.length;
|
2285
|
+
while ( i-- ) {
|
2286
|
+
addEvent( elems[ i ], type, fn );
|
2287
|
+
}
|
2288
|
+
}
|
2289
|
+
|
2290
|
+
function hasClass( elem, name ) {
|
2291
|
+
return ( " " + elem.className + " " ).indexOf( " " + name + " " ) >= 0;
|
2292
|
+
}
|
2293
|
+
|
2294
|
+
function addClass( elem, name ) {
|
2295
|
+
if ( !hasClass( elem, name ) ) {
|
2296
|
+
elem.className += ( elem.className ? " " : "" ) + name;
|
2297
|
+
}
|
2298
|
+
}
|
2299
|
+
|
2300
|
+
function toggleClass( elem, name ) {
|
2301
|
+
if ( hasClass( elem, name ) ) {
|
2302
|
+
removeClass( elem, name );
|
2303
|
+
} else {
|
2304
|
+
addClass( elem, name );
|
2305
|
+
}
|
2306
|
+
}
|
2307
|
+
|
2308
|
+
function removeClass( elem, name ) {
|
2309
|
+
var set = " " + elem.className + " ";
|
2310
|
+
|
2311
|
+
// Class name may appear multiple times
|
2312
|
+
while ( set.indexOf( " " + name + " " ) >= 0 ) {
|
2313
|
+
set = set.replace( " " + name + " ", " " );
|
2314
|
+
}
|
2315
|
+
|
2316
|
+
// trim for prettiness
|
2317
|
+
elem.className = typeof set.trim === "function" ? set.trim() : set.replace( /^\s+|\s+$/g, "" );
|
2318
|
+
}
|
2319
|
+
|
2320
|
+
function id( name ) {
|
2321
|
+
return defined.document && document.getElementById && document.getElementById( name );
|
2322
|
+
}
|
2323
|
+
|
2324
|
+
function getUrlConfigHtml() {
|
2325
|
+
var i, j, val,
|
2326
|
+
escaped, escapedTooltip,
|
2327
|
+
selection = false,
|
2328
|
+
len = config.urlConfig.length,
|
2329
|
+
urlConfigHtml = "";
|
2330
|
+
|
2331
|
+
for ( i = 0; i < len; i++ ) {
|
2332
|
+
val = config.urlConfig[ i ];
|
2333
|
+
if ( typeof val === "string" ) {
|
2334
|
+
val = {
|
2335
|
+
id: val,
|
2336
|
+
label: val
|
2337
|
+
};
|
2338
|
+
}
|
2339
|
+
|
2340
|
+
escaped = escapeText( val.id );
|
2341
|
+
escapedTooltip = escapeText( val.tooltip );
|
2342
|
+
|
2343
|
+
config[ val.id ] = QUnit.urlParams[ val.id ];
|
2344
|
+
if ( !val.value || typeof val.value === "string" ) {
|
2345
|
+
urlConfigHtml += "<input id='qunit-urlconfig-" + escaped +
|
2346
|
+
"' name='" + escaped + "' type='checkbox'" +
|
2347
|
+
( val.value ? " value='" + escapeText( val.value ) + "'" : "" ) +
|
2348
|
+
( config[ val.id ] ? " checked='checked'" : "" ) +
|
2349
|
+
" title='" + escapedTooltip + "' /><label for='qunit-urlconfig-" + escaped +
|
2350
|
+
"' title='" + escapedTooltip + "'>" + val.label + "</label>";
|
2351
|
+
} else {
|
2352
|
+
urlConfigHtml += "<label for='qunit-urlconfig-" + escaped +
|
2353
|
+
"' title='" + escapedTooltip + "'>" + val.label +
|
2354
|
+
": </label><select id='qunit-urlconfig-" + escaped +
|
2355
|
+
"' name='" + escaped + "' title='" + escapedTooltip + "'><option></option>";
|
2356
|
+
|
2357
|
+
if ( QUnit.is( "array", val.value ) ) {
|
2358
|
+
for ( j = 0; j < val.value.length; j++ ) {
|
2359
|
+
escaped = escapeText( val.value[ j ] );
|
2360
|
+
urlConfigHtml += "<option value='" + escaped + "'" +
|
2361
|
+
( config[ val.id ] === val.value[ j ] ?
|
2362
|
+
( selection = true ) && " selected='selected'" : "" ) +
|
2363
|
+
">" + escaped + "</option>";
|
2364
|
+
}
|
2365
|
+
} else {
|
2366
|
+
for ( j in val.value ) {
|
2367
|
+
if ( hasOwn.call( val.value, j ) ) {
|
2368
|
+
urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
|
2369
|
+
( config[ val.id ] === j ?
|
2370
|
+
( selection = true ) && " selected='selected'" : "" ) +
|
2371
|
+
">" + escapeText( val.value[ j ] ) + "</option>";
|
2372
|
+
}
|
2373
|
+
}
|
2374
|
+
}
|
2375
|
+
if ( config[ val.id ] && !selection ) {
|
2376
|
+
escaped = escapeText( config[ val.id ] );
|
2377
|
+
urlConfigHtml += "<option value='" + escaped +
|
2378
|
+
"' selected='selected' disabled='disabled'>" + escaped + "</option>";
|
2379
|
+
}
|
2380
|
+
urlConfigHtml += "</select>";
|
2381
|
+
}
|
2382
|
+
}
|
2383
|
+
|
2384
|
+
return urlConfigHtml;
|
2385
|
+
}
|
2386
|
+
|
2387
|
+
// Handle "click" events on toolbar checkboxes and "change" for select menus.
|
2388
|
+
// Updates the URL with the new state of `config.urlConfig` values.
|
2389
|
+
function toolbarChanged() {
|
2390
|
+
var updatedUrl, value,
|
2391
|
+
field = this,
|
2392
|
+
params = {};
|
2393
|
+
|
2394
|
+
// Detect if field is a select menu or a checkbox
|
2395
|
+
if ( "selectedIndex" in field ) {
|
2396
|
+
value = field.options[ field.selectedIndex ].value || undefined;
|
2397
|
+
} else {
|
2398
|
+
value = field.checked ? ( field.defaultValue || true ) : undefined;
|
2399
|
+
}
|
2400
|
+
|
2401
|
+
params[ field.name ] = value;
|
2402
|
+
updatedUrl = QUnit.url( params );
|
2403
|
+
|
2404
|
+
if ( "hidepassed" === field.name && "replaceState" in window.history ) {
|
2405
|
+
config[ field.name ] = value || false;
|
2406
|
+
if ( value ) {
|
2407
|
+
addClass( id( "qunit-tests" ), "hidepass" );
|
2408
|
+
} else {
|
2409
|
+
removeClass( id( "qunit-tests" ), "hidepass" );
|
2410
|
+
}
|
2411
|
+
|
2412
|
+
// It is not necessary to refresh the whole page
|
2413
|
+
window.history.replaceState( null, "", updatedUrl );
|
2414
|
+
} else {
|
2415
|
+
window.location = updatedUrl;
|
2416
|
+
}
|
2417
|
+
}
|
2418
|
+
|
2419
|
+
function toolbarUrlConfigContainer() {
|
2420
|
+
var urlConfigContainer = document.createElement( "span" );
|
2421
|
+
|
2422
|
+
urlConfigContainer.innerHTML = getUrlConfigHtml();
|
2423
|
+
|
2424
|
+
// For oldIE support:
|
2425
|
+
// * Add handlers to the individual elements instead of the container
|
2426
|
+
// * Use "click" instead of "change" for checkboxes
|
2427
|
+
addEvents( urlConfigContainer.getElementsByTagName( "input" ), "click", toolbarChanged );
|
2428
|
+
addEvents( urlConfigContainer.getElementsByTagName( "select" ), "change", toolbarChanged );
|
2429
|
+
|
2430
|
+
return urlConfigContainer;
|
2431
|
+
}
|
2432
|
+
|
2433
|
+
function toolbarModuleFilterHtml() {
|
2434
|
+
var i,
|
2435
|
+
moduleFilterHtml = "";
|
2436
|
+
|
2437
|
+
if ( !modulesList.length ) {
|
2438
|
+
return false;
|
2439
|
+
}
|
2440
|
+
|
2441
|
+
modulesList.sort(function( a, b ) {
|
2442
|
+
return a.localeCompare( b );
|
2443
|
+
});
|
2444
|
+
|
2445
|
+
moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label>" +
|
2446
|
+
"<select id='qunit-modulefilter' name='modulefilter'><option value='' " +
|
2447
|
+
( QUnit.urlParams.module === undefined ? "selected='selected'" : "" ) +
|
2448
|
+
">< All Modules ></option>";
|
2449
|
+
|
2450
|
+
for ( i = 0; i < modulesList.length; i++ ) {
|
2451
|
+
moduleFilterHtml += "<option value='" +
|
2452
|
+
escapeText( encodeURIComponent( modulesList[ i ] ) ) + "' " +
|
2453
|
+
( QUnit.urlParams.module === modulesList[ i ] ? "selected='selected'" : "" ) +
|
2454
|
+
">" + escapeText( modulesList[ i ] ) + "</option>";
|
2455
|
+
}
|
2456
|
+
moduleFilterHtml += "</select>";
|
2457
|
+
|
2458
|
+
return moduleFilterHtml;
|
2459
|
+
}
|
2460
|
+
|
2461
|
+
function toolbarModuleFilter() {
|
2462
|
+
var toolbar = id( "qunit-testrunner-toolbar" ),
|
2463
|
+
moduleFilter = document.createElement( "span" ),
|
2464
|
+
moduleFilterHtml = toolbarModuleFilterHtml();
|
2465
|
+
|
2466
|
+
if ( !moduleFilterHtml ) {
|
2467
|
+
return false;
|
2468
|
+
}
|
2469
|
+
|
2470
|
+
moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
|
2471
|
+
moduleFilter.innerHTML = moduleFilterHtml;
|
2472
|
+
|
2473
|
+
addEvent( moduleFilter.lastChild, "change", function() {
|
2474
|
+
var selectBox = moduleFilter.getElementsByTagName( "select" )[ 0 ],
|
2475
|
+
selection = decodeURIComponent( selectBox.options[ selectBox.selectedIndex ].value );
|
2476
|
+
|
2477
|
+
window.location = QUnit.url({
|
2478
|
+
module: ( selection === "" ) ? undefined : selection,
|
2479
|
+
|
2480
|
+
// Remove any existing filters
|
2481
|
+
filter: undefined,
|
2482
|
+
testId: undefined
|
2483
|
+
});
|
2484
|
+
});
|
2485
|
+
|
2486
|
+
toolbar.appendChild( moduleFilter );
|
2487
|
+
}
|
2488
|
+
|
2489
|
+
function appendToolbar() {
|
2490
|
+
var toolbar = id( "qunit-testrunner-toolbar" );
|
2491
|
+
|
2492
|
+
if ( toolbar ) {
|
2493
|
+
toolbar.appendChild( toolbarUrlConfigContainer() );
|
2494
|
+
}
|
2495
|
+
}
|
2496
|
+
|
2497
|
+
function appendBanner() {
|
2498
|
+
var banner = id( "qunit-banner" );
|
2499
|
+
|
2500
|
+
if ( banner ) {
|
2501
|
+
banner.className = "";
|
2502
|
+
banner.innerHTML = "<a href='" +
|
2503
|
+
QUnit.url({ filter: undefined, module: undefined, testId: undefined }) +
|
2504
|
+
"'>" + banner.innerHTML + "</a> ";
|
2505
|
+
}
|
2506
|
+
}
|
2507
|
+
|
2508
|
+
function appendTestResults() {
|
2509
|
+
var tests = id( "qunit-tests" ),
|
2510
|
+
result = id( "qunit-testresult" );
|
2511
|
+
|
2512
|
+
if ( result ) {
|
2513
|
+
result.parentNode.removeChild( result );
|
2514
|
+
}
|
2515
|
+
|
2516
|
+
if ( tests ) {
|
2517
|
+
tests.innerHTML = "";
|
2518
|
+
result = document.createElement( "p" );
|
2519
|
+
result.id = "qunit-testresult";
|
2520
|
+
result.className = "result";
|
2521
|
+
tests.parentNode.insertBefore( result, tests );
|
2522
|
+
result.innerHTML = "Running...<br /> ";
|
2523
|
+
}
|
2524
|
+
}
|
2525
|
+
|
2526
|
+
function storeFixture() {
|
2527
|
+
var fixture = id( "qunit-fixture" );
|
2528
|
+
if ( fixture ) {
|
2529
|
+
config.fixture = fixture.innerHTML;
|
2530
|
+
}
|
2531
|
+
}
|
2532
|
+
|
2533
|
+
function appendUserAgent() {
|
2534
|
+
var userAgent = id( "qunit-userAgent" );
|
2535
|
+
if ( userAgent ) {
|
2536
|
+
userAgent.innerHTML = navigator.userAgent;
|
2537
|
+
}
|
2538
|
+
}
|
2539
|
+
|
2540
|
+
function appendTestsList( modules ) {
|
2541
|
+
var i, l, x, z, test, moduleObj;
|
2542
|
+
|
2543
|
+
for ( i = 0, l = modules.length; i < l; i++ ) {
|
2544
|
+
moduleObj = modules[ i ];
|
2545
|
+
|
2546
|
+
if ( moduleObj.name ) {
|
2547
|
+
modulesList.push( moduleObj.name );
|
2548
|
+
}
|
2549
|
+
|
2550
|
+
for ( x = 0, z = moduleObj.tests.length; x < z; x++ ) {
|
2551
|
+
test = moduleObj.tests[ x ];
|
2552
|
+
|
2553
|
+
appendTest( test.name, test.testId, moduleObj.name );
|
2554
|
+
}
|
2555
|
+
}
|
2556
|
+
}
|
2557
|
+
|
2558
|
+
function appendTest( name, testId, moduleName ) {
|
2559
|
+
var title, rerunTrigger, testBlock, assertList,
|
2560
|
+
tests = id( "qunit-tests" );
|
2561
|
+
|
2562
|
+
if ( !tests ) {
|
2563
|
+
return;
|
2564
|
+
}
|
2565
|
+
|
2566
|
+
title = document.createElement( "strong" );
|
2567
|
+
title.innerHTML = getNameHtml( name, moduleName );
|
2568
|
+
|
2569
|
+
rerunTrigger = document.createElement( "a" );
|
2570
|
+
rerunTrigger.innerHTML = "Rerun";
|
2571
|
+
rerunTrigger.href = QUnit.url({ testId: testId });
|
2572
|
+
|
2573
|
+
testBlock = document.createElement( "li" );
|
2574
|
+
testBlock.appendChild( title );
|
2575
|
+
testBlock.appendChild( rerunTrigger );
|
2576
|
+
testBlock.id = "qunit-test-output-" + testId;
|
2577
|
+
|
2578
|
+
assertList = document.createElement( "ol" );
|
2579
|
+
assertList.className = "qunit-assert-list";
|
2580
|
+
|
2581
|
+
testBlock.appendChild( assertList );
|
2582
|
+
|
2583
|
+
tests.appendChild( testBlock );
|
2584
|
+
}
|
2585
|
+
|
2586
|
+
// HTML Reporter initialization and load
|
2587
|
+
QUnit.begin(function( details ) {
|
2588
|
+
var qunit = id( "qunit" );
|
2589
|
+
|
2590
|
+
// Fixture is the only one necessary to run without the #qunit element
|
2591
|
+
storeFixture();
|
2592
|
+
|
2593
|
+
if ( !qunit ) {
|
2594
|
+
return;
|
2595
|
+
}
|
2596
|
+
|
2597
|
+
qunit.innerHTML =
|
2598
|
+
"<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
|
2599
|
+
"<h2 id='qunit-banner'></h2>" +
|
2600
|
+
"<div id='qunit-testrunner-toolbar'></div>" +
|
2601
|
+
"<h2 id='qunit-userAgent'></h2>" +
|
2602
|
+
"<ol id='qunit-tests'></ol>";
|
2603
|
+
|
2604
|
+
appendBanner();
|
2605
|
+
appendTestResults();
|
2606
|
+
appendUserAgent();
|
2607
|
+
appendToolbar();
|
2608
|
+
appendTestsList( details.modules );
|
2609
|
+
toolbarModuleFilter();
|
2610
|
+
|
2611
|
+
if ( config.hidepassed ) {
|
2612
|
+
addClass( qunit.lastChild, "hidepass" );
|
2613
|
+
}
|
2614
|
+
});
|
2615
|
+
|
2616
|
+
QUnit.done(function( details ) {
|
2617
|
+
var i, key,
|
2618
|
+
banner = id( "qunit-banner" ),
|
2619
|
+
tests = id( "qunit-tests" ),
|
2620
|
+
html = [
|
2621
|
+
"Tests completed in ",
|
2622
|
+
details.runtime,
|
2623
|
+
" milliseconds.<br />",
|
2624
|
+
"<span class='passed'>",
|
2625
|
+
details.passed,
|
2626
|
+
"</span> assertions of <span class='total'>",
|
2627
|
+
details.total,
|
2628
|
+
"</span> passed, <span class='failed'>",
|
2629
|
+
details.failed,
|
2630
|
+
"</span> failed."
|
2631
|
+
].join( "" );
|
2632
|
+
|
2633
|
+
if ( banner ) {
|
2634
|
+
banner.className = details.failed ? "qunit-fail" : "qunit-pass";
|
2635
|
+
}
|
2636
|
+
|
2637
|
+
if ( tests ) {
|
2638
|
+
id( "qunit-testresult" ).innerHTML = html;
|
2639
|
+
}
|
2640
|
+
|
2641
|
+
if ( config.altertitle && defined.document && document.title ) {
|
2642
|
+
|
2643
|
+
// show ✖ for good, ✔ for bad suite result in title
|
2644
|
+
// use escape sequences in case file gets loaded with non-utf-8-charset
|
2645
|
+
document.title = [
|
2646
|
+
( details.failed ? "\u2716" : "\u2714" ),
|
2647
|
+
document.title.replace( /^[\u2714\u2716] /i, "" )
|
2648
|
+
].join( " " );
|
2649
|
+
}
|
2650
|
+
|
2651
|
+
// clear own sessionStorage items if all tests passed
|
2652
|
+
if ( config.reorder && defined.sessionStorage && details.failed === 0 ) {
|
2653
|
+
for ( i = 0; i < sessionStorage.length; i++ ) {
|
2654
|
+
key = sessionStorage.key( i++ );
|
2655
|
+
if ( key.indexOf( "qunit-test-" ) === 0 ) {
|
2656
|
+
sessionStorage.removeItem( key );
|
2657
|
+
}
|
2658
|
+
}
|
2659
|
+
}
|
2660
|
+
|
2661
|
+
// scroll back to top to show results
|
2662
|
+
if ( config.scrolltop && window.scrollTo ) {
|
2663
|
+
window.scrollTo( 0, 0 );
|
2664
|
+
}
|
2665
|
+
});
|
2666
|
+
|
2667
|
+
function getNameHtml( name, module ) {
|
2668
|
+
var nameHtml = "";
|
2669
|
+
|
2670
|
+
if ( module ) {
|
2671
|
+
nameHtml = "<span class='module-name'>" + escapeText( module ) + "</span>: ";
|
2672
|
+
}
|
2673
|
+
|
2674
|
+
nameHtml += "<span class='test-name'>" + escapeText( name ) + "</span>";
|
2675
|
+
|
2676
|
+
return nameHtml;
|
2677
|
+
}
|
2678
|
+
|
2679
|
+
QUnit.testStart(function( details ) {
|
2680
|
+
var running, testBlock;
|
2681
|
+
|
2682
|
+
testBlock = id( "qunit-test-output-" + details.testId );
|
2683
|
+
if ( testBlock ) {
|
2684
|
+
testBlock.className = "running";
|
2685
|
+
} else {
|
2686
|
+
|
2687
|
+
// Report later registered tests
|
2688
|
+
appendTest( details.name, details.testId, details.module );
|
2689
|
+
}
|
2690
|
+
|
2691
|
+
running = id( "qunit-testresult" );
|
2692
|
+
if ( running ) {
|
2693
|
+
running.innerHTML = "Running: <br />" + getNameHtml( details.name, details.module );
|
2694
|
+
}
|
2695
|
+
|
2696
|
+
});
|
2697
|
+
|
2698
|
+
QUnit.log(function( details ) {
|
2699
|
+
var assertList, assertLi,
|
2700
|
+
message, expected, actual,
|
2701
|
+
testItem = id( "qunit-test-output-" + details.testId );
|
2702
|
+
|
2703
|
+
if ( !testItem ) {
|
2704
|
+
return;
|
2705
|
+
}
|
2706
|
+
|
2707
|
+
message = escapeText( details.message ) || ( details.result ? "okay" : "failed" );
|
2708
|
+
message = "<span class='test-message'>" + message + "</span>";
|
2709
|
+
message += "<span class='runtime'>@ " + details.runtime + " ms</span>";
|
2710
|
+
|
2711
|
+
// pushFailure doesn't provide details.expected
|
2712
|
+
// when it calls, it's implicit to also not show expected and diff stuff
|
2713
|
+
// Also, we need to check details.expected existence, as it can exist and be undefined
|
2714
|
+
if ( !details.result && hasOwn.call( details, "expected" ) ) {
|
2715
|
+
expected = escapeText( QUnit.dump.parse( details.expected ) );
|
2716
|
+
actual = escapeText( QUnit.dump.parse( details.actual ) );
|
2717
|
+
message += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" +
|
2718
|
+
expected +
|
2719
|
+
"</pre></td></tr>";
|
2720
|
+
|
2721
|
+
if ( actual !== expected ) {
|
2722
|
+
message += "<tr class='test-actual'><th>Result: </th><td><pre>" +
|
2723
|
+
actual + "</pre></td></tr>" +
|
2724
|
+
"<tr class='test-diff'><th>Diff: </th><td><pre>" +
|
2725
|
+
QUnit.diff( expected, actual ) + "</pre></td></tr>";
|
2726
|
+
}
|
2727
|
+
|
2728
|
+
if ( details.source ) {
|
2729
|
+
message += "<tr class='test-source'><th>Source: </th><td><pre>" +
|
2730
|
+
escapeText( details.source ) + "</pre></td></tr>";
|
2731
|
+
}
|
2732
|
+
|
2733
|
+
message += "</table>";
|
2734
|
+
|
2735
|
+
// this occours when pushFailure is set and we have an extracted stack trace
|
2736
|
+
} else if ( !details.result && details.source ) {
|
2737
|
+
message += "<table>" +
|
2738
|
+
"<tr class='test-source'><th>Source: </th><td><pre>" +
|
2739
|
+
escapeText( details.source ) + "</pre></td></tr>" +
|
2740
|
+
"</table>";
|
2741
|
+
}
|
2742
|
+
|
2743
|
+
assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
|
2744
|
+
|
2745
|
+
assertLi = document.createElement( "li" );
|
2746
|
+
assertLi.className = details.result ? "pass" : "fail";
|
2747
|
+
assertLi.innerHTML = message;
|
2748
|
+
assertList.appendChild( assertLi );
|
2749
|
+
});
|
2750
|
+
|
2751
|
+
QUnit.testDone(function( details ) {
|
2752
|
+
var testTitle, time, testItem, assertList,
|
2753
|
+
good, bad, testCounts, skipped,
|
2754
|
+
tests = id( "qunit-tests" );
|
2755
|
+
|
2756
|
+
if ( !tests ) {
|
2757
|
+
return;
|
2758
|
+
}
|
2759
|
+
|
2760
|
+
testItem = id( "qunit-test-output-" + details.testId );
|
2761
|
+
|
2762
|
+
assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
|
2763
|
+
|
2764
|
+
good = details.passed;
|
2765
|
+
bad = details.failed;
|
2766
|
+
|
2767
|
+
// store result when possible
|
2768
|
+
if ( config.reorder && defined.sessionStorage ) {
|
2769
|
+
if ( bad ) {
|
2770
|
+
sessionStorage.setItem( "qunit-test-" + details.module + "-" + details.name, bad );
|
2771
|
+
} else {
|
2772
|
+
sessionStorage.removeItem( "qunit-test-" + details.module + "-" + details.name );
|
2773
|
+
}
|
2774
|
+
}
|
2775
|
+
|
2776
|
+
if ( bad === 0 ) {
|
2777
|
+
addClass( assertList, "qunit-collapsed" );
|
2778
|
+
}
|
2779
|
+
|
2780
|
+
// testItem.firstChild is the test name
|
2781
|
+
testTitle = testItem.firstChild;
|
2782
|
+
|
2783
|
+
testCounts = bad ?
|
2784
|
+
"<b class='failed'>" + bad + "</b>, " + "<b class='passed'>" + good + "</b>, " :
|
2785
|
+
"";
|
2786
|
+
|
2787
|
+
testTitle.innerHTML += " <b class='counts'>(" + testCounts +
|
2788
|
+
details.assertions.length + ")</b>";
|
2789
|
+
|
2790
|
+
if ( details.skipped ) {
|
2791
|
+
addClass( testItem, "skipped" );
|
2792
|
+
skipped = document.createElement( "em" );
|
2793
|
+
skipped.className = "qunit-skipped-label";
|
2794
|
+
skipped.innerHTML = "skipped";
|
2795
|
+
testItem.insertBefore( skipped, testTitle );
|
2796
|
+
} else {
|
2797
|
+
addEvent( testTitle, "click", function() {
|
2798
|
+
toggleClass( assertList, "qunit-collapsed" );
|
2799
|
+
});
|
2800
|
+
|
2801
|
+
testItem.className = bad ? "fail" : "pass";
|
2802
|
+
|
2803
|
+
time = document.createElement( "span" );
|
2804
|
+
time.className = "runtime";
|
2805
|
+
time.innerHTML = details.runtime + " ms";
|
2806
|
+
testItem.insertBefore( time, assertList );
|
2807
|
+
}
|
2808
|
+
});
|
2809
|
+
|
2810
|
+
if ( !defined.document || document.readyState === "complete" ) {
|
2811
|
+
config.pageLoaded = true;
|
2812
|
+
config.autorun = true;
|
2813
|
+
}
|
2814
|
+
|
2815
|
+
if ( defined.document ) {
|
2816
|
+
addEvent( window, "load", QUnit.load );
|
2817
|
+
}
|
2818
|
+
|
2819
|
+
})();
|