From 878357ff7c6731b221e6e8cc809ebe400f48e0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sat, 2 Sep 2017 19:04:39 +0200 Subject: [PATCH 1/4] Use Yarn instead of NPM --- Makefile | 36 +- js/package.json | 8 +- js/yarn.lock | 1946 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1968 insertions(+), 22 deletions(-) create mode 100644 js/yarn.lock diff --git a/Makefile b/Makefile index 2f14d51bf..6d216be06 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ # @author Raimund Schlüßler # @copyright 2017 Raimund Schlüßler -# Generic Makefile for building and packaging a Nextcloud app which uses npm and +# Generic Makefile for building and packaging a Nextcloud app which uses yarn and # Composer. # # Dependencies: @@ -15,31 +15,31 @@ # * which # * curl: used if phpunit and composer are not installed to fetch them from the web # * tar: for building the archive -# * npm: for building and testing everything JS +# * yarn: for building and testing everything JS # # If no composer.json is in the app root directory, the Composer step # will be skipped. The same goes for the package.json which can be located in # the app root or the js/ directory. # -# The npm command by launches the npm build script: +# The yarn command by launches the yarn build script: # -# npm run build +# yarn run build # -# The npm test command launches the npm test script: +# The yarn test command launches the yarn test script: # -# npm run test +# yarn run test # # The idea behind this is to be completely testing and build tool agnostic. All # build tools and additional package managers should be installed locally in # your project, since this won't pollute people's global namespace. # -# The following npm scripts in your package.json install and update the bower -# and npm dependencies and use gulp as build system (notice how everything is +# The following yarn scripts in your package.json install and update the bower +# and yarn dependencies and use gulp as build system (notice how everything is # run from the node_modules folder): # # "scripts": { # "test": "node node_modules/gulp-cli/bin/gulp.js karma", -# "prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", +# "prebuild": "yarn install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", # "build": "node node_modules/gulp-cli/bin/gulp.js" # }, @@ -51,7 +51,7 @@ source_package_name=$(source_artifact_directory)/$(app_name) appstore_build_directory=$(CURDIR)/build/appstore/tasks appstore_artifact_directory=$(CURDIR)/build/artifacts/appstore appstore_package_name=$(appstore_artifact_directory)/$(app_name) -npm=$(shell which npm 2> /dev/null) +yarn=$(shell which yarn 2> /dev/null) gcp=$(shell which gcp 2> /dev/null) ifeq (, $(gcp)) @@ -83,15 +83,15 @@ all: build # Fetches the PHP and JS dependencies and compiles the JS. If no composer.json # is present, the composer step is skipped, if no package.json or js/package.json -# is present, the npm step is skipped +# is present, the yarn step is skipped .PHONY: build build: - make npm + make yarn -# Installs npm dependencies -.PHONY: npm -npm: - cd js && $(npm) run build +# Installs yarn dependencies +.PHONY: yarn +yarn: + cd js && $(yarn) run build # Removes the appstore build .PHONY: clean @@ -99,7 +99,7 @@ clean: rm -rf ./build # Same as clean but also removes dependencies installed by composer, bower and -# npm +# yarn .PHONY: distclean distclean: clean rm -rf vendor @@ -218,7 +218,7 @@ endif # from the internet .PHONY: test test: - cd js && $(npm) run test + cd js && $(yarn) run test ifeq (, $(shell which phpunit 2> /dev/null)) @echo "No phpunit command available, downloading a copy from the web" mkdir -p $(build_tools_directory) diff --git a/js/package.json b/js/package.json index 771fe1b1f..bd1dff587 100644 --- a/js/package.json +++ b/js/package.json @@ -10,7 +10,7 @@ "homepage": "", "scripts": { "test": "node node_modules/grunt-cli/bin/grunt karma", - "prebuild": "npm install && npm update && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", + "prebuild": "yarn install && yarn upgrade && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", "build": "node node_modules/grunt-cli/bin/grunt build" }, "repository": { @@ -24,14 +24,14 @@ "bower": "*", "grunt": "^1.0.1", "grunt-cli": "^1.2.0", - "grunt-contrib-jshint": "^1.0.0", - "jshint-stylish": "^2.2.1", "grunt-concurrent": "^2.3.1", "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-jshint": "^1.0.0", "grunt-contrib-watch": "^1.0.0", "grunt-karma": "^2.0.0", + "grunt-svg-sprite": "1.3.7", "grunt-wrap": "^0.3.0", - "grunt-svg-sprite": "1.3.7" + "jshint-stylish": "^2.2.1" }, "engines": { "node": ">=6" diff --git a/js/yarn.lock b/js/yarn.lock new file mode 100644 index 000000000..120a1acc0 --- /dev/null +++ b/js/yarn.lock @@ -0,0 +1,1946 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +argparse@^1.0.2, argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async@^1.2.1, async@^1.5.0, async@~1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.4.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + dependencies: + lodash "^4.14.0" + +async@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +beeper@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +body-parser@~1.14.0: + version "1.14.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.14.2.tgz#1015cb1fe2c443858259581db53332f8d0cf50f9" + dependencies: + bytes "2.2.0" + content-type "~1.0.1" + debug "~2.2.0" + depd "~1.1.0" + http-errors "~1.3.1" + iconv-lite "0.4.13" + on-finished "~2.3.0" + qs "5.2.0" + raw-body "~2.1.5" + type-is "~1.6.10" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +bower@*: + version "1.8.0" + resolved "https://registry.yarnpkg.com/bower/-/bower-1.8.0.tgz#55dbebef0ad9155382d9e9d3e497c1372345b44a" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +bytes@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588" + +bytes@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3, chalk@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +clap@^1.0.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857" + dependencies: + chalk "^1.1.3" + +cli@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14" + dependencies: + exit "0.1.2" + glob "^7.1.1" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + +clone@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" + +cloneable-readable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117" + dependencies: + inherits "^2.0.1" + process-nextick-args "^1.0.6" + through2 "^2.0.1" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +coa@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" + dependencies: + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +coffee-script@~1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.10.0.tgz#12938bcf9be1948fa006f92e0c4c9e81705108c0" + +colors@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +console-browserify@1.1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +content-type@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +css-selector-parser@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/css-selector-parser/-/css-selector-parser-1.3.0.tgz#5f1ad43e2d8eefbfdc304fcd39a521664943e3eb" + +cssmin@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/cssmin/-/cssmin-0.4.3.tgz#c9194077e0ebdacd691d5f59015b9d819f38d015" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +cssom@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +cycle@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +dateformat@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" + +dateformat@~1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +debug@2.2.0, debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +depd@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + dependencies: + domelementtype "1" + +domutils@1.5: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +duplexify@^3.1.2: + version "3.5.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.1.tgz#4e1516be68838bc90a49994f0b39a6e5960befcd" + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" + dependencies: + once "^1.4.0" + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es6-promise@~4.0.3: + version "4.0.5" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +eventemitter2@~0.4.13: + version "0.4.14" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit@0.1.2, exit@0.1.x, exit@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extract-zip@~1.6.5: + version "1.6.5" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.5.tgz#99a06735b6ea20ea9b705d779acffcc87cff0440" + dependencies: + concat-stream "1.6.0" + debug "2.2.0" + mkdirp "0.5.0" + yauzl "2.4.1" + +extsprintf@1.3.0, extsprintf@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +eyes@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + +faye-websocket@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + dependencies: + websocket-driver ">=0.5.1" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +findup-sync@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" + dependencies: + glob "~5.0.0" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-extra@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +gaze@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + dependencies: + globule "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +getobject@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/getobject/-/getobject-0.1.0.tgz#047a449789fa160d018f5486ed91320b6ec7885c" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~5.0.0: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~7.0.0: + version "7.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globule@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.0.tgz#1dc49c6822dd9e8a2fa00ba2a295006e8664bd09" + dependencies: + glob "~7.1.1" + lodash "~4.17.4" + minimatch "~3.0.2" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +grunt-cli@^1.2.0, grunt-cli@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.2.0.tgz#562b119ebb069ddb464ace2845501be97b35b6a8" + dependencies: + findup-sync "~0.3.0" + grunt-known-options "~1.1.0" + nopt "~3.0.6" + resolve "~1.1.0" + +grunt-concurrent@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/grunt-concurrent/-/grunt-concurrent-2.3.1.tgz#1e3db38ccef5a3da1195e61d631fe7e321344d23" + dependencies: + arrify "^1.0.1" + async "^1.2.1" + indent-string "^2.0.0" + pad-stream "^1.0.0" + +grunt-contrib-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz#61509863084e871d7e86de48c015259ed97745bd" + dependencies: + chalk "^1.0.0" + source-map "^0.5.3" + +grunt-contrib-jshint@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/grunt-contrib-jshint/-/grunt-contrib-jshint-1.1.0.tgz#369d909b2593c40e8be79940b21340850c7939ac" + dependencies: + chalk "^1.1.1" + hooker "^0.2.3" + jshint "~2.9.4" + +grunt-contrib-watch@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/grunt-contrib-watch/-/grunt-contrib-watch-1.0.0.tgz#84a1a7a1d6abd26ed568413496c73133e990018f" + dependencies: + async "^1.5.0" + gaze "^1.0.0" + lodash "^3.10.1" + tiny-lr "^0.2.1" + +grunt-karma@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/grunt-karma/-/grunt-karma-2.0.0.tgz#753583d115dfdc055fe57e58f96d6b3c7e612118" + dependencies: + lodash "^3.10.1" + +grunt-known-options@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/grunt-known-options/-/grunt-known-options-1.1.0.tgz#a4274eeb32fa765da5a7a3b1712617ce3b144149" + +grunt-legacy-log-utils@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz#a7b8e2d0fb35b5a50f4af986fc112749ebc96f3d" + dependencies: + chalk "~1.1.1" + lodash "~4.3.0" + +grunt-legacy-log@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz#fb86f1809847bc07dc47843f9ecd6cacb62df2d5" + dependencies: + colors "~1.1.2" + grunt-legacy-log-utils "~1.0.0" + hooker "~0.2.3" + lodash "~3.10.1" + underscore.string "~3.2.3" + +grunt-legacy-util@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz#386aa78dc6ed50986c2b18957265b1b48abb9b86" + dependencies: + async "~1.5.2" + exit "~0.1.1" + getobject "~0.1.0" + hooker "~0.2.3" + lodash "~4.3.0" + underscore.string "~3.2.3" + which "~1.2.1" + +grunt-svg-sprite@1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/grunt-svg-sprite/-/grunt-svg-sprite-1.3.7.tgz#e6fe2a7de7f3c0657836ff9401c34cd58e03d8c4" + dependencies: + chalk "^1.1.3" + prettysize "^0.1.0" + svg-sprite "~1.3.7" + +grunt-wrap@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/grunt-wrap/-/grunt-wrap-0.3.1.tgz#75120979a2f2fe96242fb08b00f65ead2f56c966" + +grunt@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.0.1.tgz#e8778764e944b18f32bb0f10b9078475c9dfb56b" + dependencies: + coffee-script "~1.10.0" + dateformat "~1.0.12" + eventemitter2 "~0.4.13" + exit "~0.1.1" + findup-sync "~0.3.0" + glob "~7.0.0" + grunt-cli "~1.2.0" + grunt-known-options "~1.1.0" + grunt-legacy-log "~1.0.0" + grunt-legacy-util "~1.0.0" + iconv-lite "~0.4.13" + js-yaml "~3.5.2" + minimatch "~3.0.0" + nopt "~3.0.6" + path-is-absolute "~1.0.0" + rimraf "~2.2.8" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +hasha@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" + dependencies: + is-stream "^1.0.1" + pinkie-promise "^2.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hooker@^0.2.3, hooker@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/hooker/-/hooker-0.2.3.tgz#b834f723cc4a242aa65963459df6d984c5d3d959" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +htmlparser2@3.8.x: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-errors@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.3.1.tgz#197e22cdebd4198585e8694ef6786197b91ed942" + dependencies: + inherits "~2.0.1" + statuses "1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +iconv-lite@~0.4.13: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + +indent-string@^2.0.0, indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +irregular-plurals@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.3.0.tgz#7af06931bdf74be33dcf585a13e06fccc16caecf" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isstream@0.1.x, isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +js-yaml@^3.8.4: + version "3.9.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@~3.5.2: + version "3.5.5" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.5.5.tgz#0377c38017cabc7322b0d1fbcd25a491641f2fbe" + dependencies: + argparse "^1.0.2" + esprima "^2.6.0" + +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jshint-stylish@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/jshint-stylish/-/jshint-stylish-2.2.1.tgz#242082a2c035ae03fd81044e0570cc4208cf6e61" + dependencies: + beeper "^1.1.0" + chalk "^1.0.0" + log-symbols "^1.0.0" + plur "^2.1.0" + string-length "^1.0.0" + text-table "^0.2.0" + +jshint@~2.9.4: + version "2.9.5" + resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.9.5.tgz#1e7252915ce681b40827ee14248c46d34e9aa62c" + dependencies: + cli "~1.0.0" + console-browserify "1.1.x" + exit "0.1.x" + htmlparser2 "3.8.x" + lodash "3.7.x" + minimatch "~3.0.2" + shelljs "0.3.x" + strip-json-comments "1.0.x" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kew@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +livereload-js@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.2.2.tgz#6c87257e648ab475bc24ea257457edcc1f8d0bc2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._arraymap@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz#1a8fd0f4c0df4b61dea076d717cdc97f0a3c3e66" + +lodash._basecallback@^3.0.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/lodash._basecallback/-/lodash._basecallback-3.3.1.tgz#b7b2bb43dc2160424a21ccf26c57e443772a8e27" + dependencies: + lodash._baseisequal "^3.0.0" + lodash._bindcallback "^3.0.0" + lodash.isarray "^3.0.0" + lodash.pairs "^3.0.0" + +lodash._baseeach@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz#cf8706572ca144e8d9d75227c990da982f932af3" + dependencies: + lodash.keys "^3.0.0" + +lodash._baseget@^3.0.0: + version "3.7.2" + resolved "https://registry.yarnpkg.com/lodash._baseget/-/lodash._baseget-3.7.2.tgz#1b6ae1d5facf3c25532350a13c1197cb8bb674f4" + +lodash._baseisequal@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1" + dependencies: + lodash.isarray "^3.0.0" + lodash.istypedarray "^3.0.0" + lodash.keys "^3.0.0" + +lodash._bindcallback@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._topath@^3.0.0: + version "3.8.1" + resolved "https://registry.yarnpkg.com/lodash._topath/-/lodash._topath-3.8.1.tgz#3ec5e2606014f4cb97f755fe6914edd8bfc00eac" + dependencies: + lodash.isarray "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.istypedarray@^3.0.0: + version "3.0.6" + resolved "https://registry.yarnpkg.com/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz#c9a477498607501d8e8494d283b87c39281cef62" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.map@^3.0.0: + version "3.1.4" + resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-3.1.4.tgz#b483acd1b786c5c7b492c495f7b5266229bc00c2" + dependencies: + lodash._arraymap "^3.0.0" + lodash._basecallback "^3.0.0" + lodash._baseeach "^3.0.0" + lodash.isarray "^3.0.0" + lodash.keys "^3.0.0" + +lodash.pairs@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash.pairs/-/lodash.pairs-3.0.1.tgz#bbe08d5786eeeaa09a15c91ebf0dcb7d2be326a9" + dependencies: + lodash.keys "^3.0.0" + +lodash.pluck@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.pluck/-/lodash.pluck-3.1.2.tgz#b347f0374c0169f0eeb04d672d89cec8632c2231" + dependencies: + lodash._baseget "^3.0.0" + lodash._topath "^3.0.0" + lodash.isarray "^3.0.0" + lodash.map "^3.0.0" + +lodash@3.7.x: + version "3.7.0" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.7.0.tgz#3678bd8ab995057c07ade836ed2ef087da811d45" + +lodash@^3.10.1, lodash@~3.10.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.14.0, lodash@^4.17.4, lodash@~4.17.4: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +lodash@~4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.3.0.tgz#efd9c4a6ec53f3b05412429915c3e4824e4d25a4" + +log-symbols@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + dependencies: + chalk "^1.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +meow@^3.0.0, meow@^3.3.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" + +mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.7: + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" + dependencies: + mime-db "~1.30.0" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.0, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + +mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +mustache@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +pad-stream@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pad-stream/-/pad-stream-1.2.0.tgz#631dcc9f79810b705965e89dedea6cff0fc1dfc9" + dependencies: + meow "^3.0.0" + pumpify "^1.3.3" + repeating "^2.0.0" + split2 "^1.0.0" + through2 "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parseurl@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +phantomjs-prebuilt@^2.1.14: + version "2.1.15" + resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.15.tgz#20f86e82d3349c505917527745b7a411e08b3903" + dependencies: + es6-promise "~4.0.3" + extract-zip "~1.6.5" + fs-extra "~1.0.0" + hasha "~2.2.0" + kew "~0.7.0" + progress "~1.1.8" + request "~2.81.0" + request-progress "~2.0.1" + which "~1.2.10" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +plur@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" + dependencies: + irregular-plurals "^1.0.0" + +prettysize@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/prettysize/-/prettysize-0.1.0.tgz#38ee534e2d298bc945fb7243203dd873cefc9679" + +process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +progress@~1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +pump@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.3.5" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.3.5.tgz#1b671c619940abcaeac0ad0e3a3c164be760993b" + dependencies: + duplexify "^3.1.2" + inherits "^2.0.1" + pump "^1.0.0" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +q@^1.1.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + +qs@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.0.tgz#a9f31142af468cb72b25b30136ba2456834916be" + +qs@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-5.1.0.tgz#4d932e5c7ea411cca76a312d39a606200fd50cd9" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +raw-body@~2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774" + dependencies: + bytes "2.4.0" + iconv-lite "0.4.13" + unpipe "1.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.1.5, readable-stream@^2.2.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + +request-progress@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" + dependencies: + throttleit "^1.0.0" + +request@~2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve@~1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +rimraf@~2.2.8: + version "2.2.8" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" + +safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sax@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +"semver@2 || 3 || 4 || 5": + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shelljs@0.3.x: + version "0.3.0" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map@^0.5.3: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +split2@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/split2/-/split2-1.1.1.tgz#162d9b18865f02ab2f2ad9585522db9b54c481f9" + dependencies: + through2 "~2.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + +statuses@1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +string-length@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +svg-sprite@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/svg-sprite/-/svg-sprite-1.3.7.tgz#7ade036000e8794a3f814402a808aae290ecd1f3" + dependencies: + async "^2.4.1" + css-selector-parser "^1.3.0" + cssmin "^0.4.3" + cssom "^0.3.2" + dateformat "^2.0.0" + glob "^7.1.2" + js-yaml "^3.8.4" + lodash "^4.17.4" + lodash.pluck "^3.1.2" + mkdirp "^0.5.1" + mustache "^2.3.0" + phantomjs-prebuilt "^2.1.14" + prettysize "^0.1.0" + svgo "^0.7.2" + vinyl "^2.0.2" + winston "^2.3.1" + xmldom "0.1.27" + xpath "^0.0.24" + yargs "^8.0.1" + +svgo@^0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + +through2@^2.0.0, through2@^2.0.1, through2@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +tiny-lr@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-0.2.1.tgz#b3fdba802e5d56a33c2f6f10794b32e477ac729d" + dependencies: + body-parser "~1.14.0" + debug "~2.2.0" + faye-websocket "~0.10.0" + livereload-js "^2.2.0" + parseurl "~1.3.0" + qs "~5.1.0" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-is@~1.6.10: + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.15" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +underscore.string@~3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.2.3.tgz#806992633665d5e5fcb4db1fb3a862eb68e9e6da" + +unpipe@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vinyl@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c" + dependencies: + clone "^2.1.1" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + +websocket-driver@>=0.5.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" + dependencies: + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +which@~1.2.1, which@~1.2.10: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +winston@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/winston/-/winston-2.3.1.tgz#0b48420d978c01804cf0230b648861598225a119" + dependencies: + async "~1.0.0" + colors "1.0.x" + cycle "1.0.x" + eyes "0.1.x" + isstream "0.1.x" + stack-trace "0.0.x" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xmldom@0.1.27: + version "0.1.27" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" + +xpath@^0.0.24: + version "0.0.24" + resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.24.tgz#1ade162e1cc523c8d39fc7d06afc16ea216f29fb" + +xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yauzl@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + dependencies: + fd-slicer "~1.0.1" From 493dd230c784ecbbee9655a14963f8c0e6a569de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sat, 2 Sep 2017 19:30:37 +0200 Subject: [PATCH 2/4] Use Gulp instead of Grunt, minify js files --- js/.jshintrc | 3 +- js/.stylelintrc | 15 + js/Gruntfile.js | 130 - js/README.md | 20 - js/gulpfile.js | 159 ++ js/package.json | 36 +- js/public/app.js | 4962 -------------------------------------- js/public/app.min.js | 4 + js/public/app.min.js.map | 1 + js/yarn.lock | 3488 ++++++++++++++++++++++++--- templates/main.php | 2 +- 11 files changed, 3345 insertions(+), 5475 deletions(-) create mode 100644 js/.stylelintrc delete mode 100644 js/Gruntfile.js delete mode 100644 js/README.md create mode 100644 js/gulpfile.js delete mode 100644 js/public/app.js create mode 100644 js/public/app.min.js create mode 100644 js/public/app.min.js.map diff --git a/js/.jshintrc b/js/.jshintrc index dd19c68c1..1b416023a 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -38,6 +38,7 @@ "exports": true, "escapeHTML": true, "possible": true, - "dav": true + "dav": true, + "OCA": true } } diff --git a/js/.stylelintrc b/js/.stylelintrc new file mode 100644 index 000000000..a63b8fe30 --- /dev/null +++ b/js/.stylelintrc @@ -0,0 +1,15 @@ +{ + "extends": "stylelint-config-standard", + "plugins": [ + "stylelint-scss" + ], + "rules": { + "indentation": "tab", + "number-leading-zero": "never", + "comment-empty-line-before": ["always", { + "except": ["first-nested"] + }], + "at-rule-no-unknown": null, + "scss/at-rule-no-unknown": true + } +} diff --git a/js/Gruntfile.js b/js/Gruntfile.js deleted file mode 100644 index 85f8ba337..000000000 --- a/js/Gruntfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Nextcloud - Tasks - * - * @author Raimund Schlüßler - * @copyright 2017 Raimund Schlüßler - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see . - * - */ - -module.exports = function(grunt) { - 'use strict'; - - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-wrap'); - // grunt.loadNpmTasks('grunt-karma'); - grunt.loadNpmTasks('grunt-svg-sprite'); - - grunt.initConfig({ - meta: { - pkg: grunt.file.readJSON('package.json'), - version: '<%= meta.pkg.version %>', - banner: '/**\n' + ' * <%= meta.pkg.description %> - v<%= meta.version %>\n' + ' *\n' + ' * Copyright (c) <%= grunt.template.today("yyyy") %> - ' + '<%= meta.pkg.author.name %> <<%= meta.pkg.author.email %>>\n' + ' *\n' + ' * This file is licensed under the Affero\ - General Public License version 3 or later.\n' + ' * See the COPYING file\n' + ' *\n' + ' */\n\n', - build: 'app/', - production: 'public/' - }, - concat: { - "default": { - options: { - banner: '<%= meta.banner %>\n', - stripBanners: { - options: 'block' - } - }, - src: '<%= meta.build %>/**/*.js', - dest: '<%= meta.production %>app.js' - } - }, - wrap: { - "default": { - src: '<%= meta.production %>app.js', - dest: '', - wrapper: ['(function(angular, $, oc_requesttoken, undefined){\n\n', '\n})(window.angular, window.jQuery, oc_requesttoken);'] - } - }, - - jshint: { - files: [ - 'Gruntfile.js', - '<%= meta.build %>**/*.js' - ], - options: { - jshintrc: '.jshintrc', - reporter: require('jshint-stylish') - } - }, - - watch: { - concat: { - files: [ - '<%= meta.build %>**/*.js' - ], - options: { - livereload: true - }, - tasks: ['js'] - } - }, - karma: { - unit: { - configFile: 'config/karma.js' - }, - continuous: { - configFile: 'config/karma.js', - singleRun: true, - reporters: ['progress', 'junit'], - junitReporter: { - outputFile: 'test-results.xml' - } - } - }, - svg_sprite: { - basic: { - - // Target basics - expand: true, - cwd: '../img/src', - src: ['**/*.svg'], - dest: '..', - - // Target options - options: { - shape: { - transform: [] - }, - mode: { - css: { // Activate the «css» mode - bust: false, - common: 'icon', - dimensions: '', - prefix: '.ico-%s', - sprite: "../img/sprites.svg", - render: { - css: true // Activate CSS output (with default options) - } - } - } - } - } - } - }); - // grunt.registerTask('ci', ['karma:continuous']); - grunt.registerTask('js', ['concat']); - grunt.registerTask('default', 'js'); - grunt.registerTask('build', ['concat', 'svg_sprite']); -}; diff --git a/js/README.md b/js/README.md deleted file mode 100644 index 0e3a1b57f..000000000 --- a/js/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# JS & CSS development -You need grunt installed to compile the coffeescript and less files. -To compile all files run `grunt dev`. - -## JS -To compile the coffeescript run: -`grunt js` - -## CSS -To compile the less files run: -`grunt css` - -## Watch Tasks -Instead of executing the command everytime you change a file, grunt can watch for changes. -Use the following commands instead: -``` -grunt watch:dev -grunt watch:js -grunt watch:css -``` diff --git a/js/gulpfile.js b/js/gulpfile.js new file mode 100644 index 000000000..9e4c1edeb --- /dev/null +++ b/js/gulpfile.js @@ -0,0 +1,159 @@ +/** + * Nextcloud - Inventory + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt + * @copyright Bernhard Posselt 2012, 2014 + * + * @author Georg Ehrke + * @copyright 2017 Georg Ehrke + * + * @author Raimund Schlüßler + * @copyright 2017 Raimund Schlüßler + */ + +/*jslint node: true */ +'use strict'; + +// get plugins +const gulp = require('gulp'), + uglify = require('gulp-uglify'), + jshint = require('gulp-jshint'), + KarmaServer = require('karma').Server, + concat = require('gulp-concat'), + wrap = require('gulp-wrap'), + strip = require('gulp-strip-banner'), + babel = require('gulp-babel'), + stylelint = require('gulp-stylelint'), + sourcemaps = require('gulp-sourcemaps'), + svgSprite = require('gulp-svg-sprite'), + npmFiles = require('gulp-npm-files'); + +// configure +const buildTarget = 'app.min.js'; +const scssBuildTarget = 'style.scss'; +const karmaConfig = __dirname + '/../tests/js/config/karma.js'; +const destinationFolder = __dirname + '/public/'; +const scssDestinationFolder = '../css/'; + +const jsSources = [ + 'app/**/*.js' +]; +const scssSources = [ + '../css/src/*.scss' +]; + +const testSources = ['../tests/js/unit/**/*.js']; +const lintSources = jsSources.concat(testSources).concat(['*.js']); +const watchSources = lintSources; + +const svgConfig = { + shape: { + transform: [] + }, + mode: { + css: { // Activate the «css» mode + bust: false, + common: 'icon', + dimensions: '', + prefix: '.ico-%s', + sprite: "../img/sprites.svg", + render: { + css: { + dest: "../css/sprite.css" + } + } + } + } +}; + +// tasks +gulp.task('build', ['lint'], () => { + + return gulp.src(jsSources) + .pipe(babel({ + presets: ['es2015'], + compact: false, + babelrc: false, + ast: false + })) + .pipe(strip()) + .pipe(sourcemaps.init({identityMap: true})) + .pipe(concat(buildTarget)) + .pipe(wrap(`(function($, oc_requesttoken, undefined){ + 'use strict'; + + <%= contents %> +})(jQuery, oc_requesttoken);`)) + .pipe(uglify()) + .pipe(sourcemaps.write('./')) + .pipe(gulp.dest(destinationFolder)); +}); + +// gulp.task('default', ['build', 'vendor', 'scsslint', 'scssConcat']); +gulp.task('default', ['build', 'vendor', 'svg_sprite']); + +gulp.task('lint', () => { + return gulp.src(lintSources) + .pipe(jshint('.jshintrc')) + .pipe(jshint.reporter('default')); + // .pipe(jshint.reporter('fail')); +}); + +gulp.task('scsslint', () => { + return gulp.src(scssSources) + .pipe(stylelint ({ + reporters: [{ + formatter: 'string', + console: true + }] + })); +}); + +gulp.task('scssConcat', ['svg_sprite'], () => { + return gulp.src(scssSources) + .pipe(concat(scssBuildTarget)) + .pipe(gulp.dest(scssDestinationFolder)); +}); + +gulp.task('scssConcatWatch', () => { + return gulp.src(scssSources) + .pipe(concat(scssBuildTarget)) + .pipe(gulp.dest(scssDestinationFolder)); +}); + +gulp.task('watch', () => { + gulp.watch(watchSources, ['build']); + gulp.watch(scssSources, ['scssConcatWatch']); +}); + +gulp.task('karma', (done) => { + new KarmaServer({ + configFile: karmaConfig, + singleRun: true, + browsers: ['Firefox'], + reporters: ['progress', 'coverage'] + }, done).start(); +}); + +gulp.task('watch-karma', (done) => { + new KarmaServer({ + configFile: karmaConfig, + autoWatch: true, + browsers: ['Firefox'], + reporters: ['progress', 'coverage'] + }, done).start(); +}); + +gulp.task('svg_sprite', () => { + return gulp.src('**/*.svg', {cwd: '../img/src'}) + .pipe(svgSprite(svgConfig)) + .pipe(gulp.dest('..')); +}); + +gulp.task("vendor", () => { + return gulp.src(npmFiles(), { base: "./node_modules" }) + .pipe(gulp.dest('vendor')); +}); diff --git a/js/package.json b/js/package.json index bd1dff587..4f7ad8bed 100644 --- a/js/package.json +++ b/js/package.json @@ -6,12 +6,13 @@ "name": "Raimund Schlüßler", "email": "raimund.schluessler@googlemail.com" }, + "license": "AGPLv3", "private": true, - "homepage": "", + "homepage": "https://github.com/nextcloud/tasks", "scripts": { - "test": "node node_modules/grunt-cli/bin/grunt karma", + "test": "node node_modules/gulp-cli/bin/gulp.js karma", "prebuild": "yarn install && yarn upgrade && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", - "build": "node node_modules/grunt-cli/bin/grunt build" + "build": "node node_modules/gulp-cli/bin/gulp.js" }, "repository": { "type": "git", @@ -21,17 +22,26 @@ "contributors": [], "dependencies": {}, "devDependencies": { + "babel-preset-es2015": "^6.14.0", "bower": "*", - "grunt": "^1.0.1", - "grunt-cli": "^1.2.0", - "grunt-concurrent": "^2.3.1", - "grunt-contrib-concat": "^1.0.1", - "grunt-contrib-jshint": "^1.0.0", - "grunt-contrib-watch": "^1.0.0", - "grunt-karma": "^2.0.0", - "grunt-svg-sprite": "1.3.7", - "grunt-wrap": "^0.3.0", - "jshint-stylish": "^2.2.1" + "gulp": "^3.9.1", + "gulp-babel": "^6.1.2", + "gulp-cli": "^1.2.2", + "gulp-concat": "^2.6.1", + "gulp-jshint": "^2.0.4", + "gulp-ng-annotate": "^2.0.0", + "gulp-npm-files": "^0.1.3", + "gulp-sourcemaps": "^2.4.0", + "gulp-strip-banner": "0.0.2", + "gulp-stylelint": "^4.0.0", + "gulp-svg-sprite": "1.3.7", + "gulp-uglify": "^2.0.0", + "gulp-wrap": "^0.13.0", + "jshint": "^2.9.4", + "karma": "^1.3.0", + "stylelint": "^8.0.0", + "stylelint-config-standard": "^17.0.0", + "stylelint-scss": "^2.1.0" }, "engines": { "node": ">=6" diff --git a/js/public/app.js b/js/public/app.js deleted file mode 100644 index caaef96b7..000000000 --- a/js/public/app.js +++ /dev/null @@ -1,4962 +0,0 @@ -/** - * Nextcloud - Tasks - v0.9.5 - * - * Copyright (c) 2017 - Raimund Schlüßler - * - * This file is licensed under the Affero General Public License version 3 or later. - * See the COPYING file - * - */ - - -angular.module('Tasks', ['ngRoute', 'ngAnimate', 'ui.select', 'ngSanitize', 'dndLists']).config([ - '$provide', '$routeProvider', '$interpolateProvider', '$httpProvider', - function($provide, $routeProvider, $interpolateProvider, $httpProvider) { - 'use strict'; - var config; - $provide.value('Config', config = { - markReadTimeout: 500, - taskUpdateInterval: 1000 * 600 - }); - $httpProvider.defaults.headers.common.requesttoken = oc_requesttoken; - $routeProvider - .when('/calendars/:calendarID', {}) - .when('/calendars/:calendarID/edit/:listparameter', {}) - .when('/calendars/:calendarID/tasks/:taskID', {}) - .when('/calendars/:calendarID/tasks/:taskID/settings', {}) - .when('/calendars/:calendarID/tasks/:taskID/edit/:parameter', {}) - .when('/collections/:collectionID/tasks/:taskID', {}) - .when('/collections/:collectionID/tasks/:taskID/settings', {}) - .when('/collections/:collectionID/tasks/:taskID/edit/:parameter', {}) - .when('/collections/:collectionID', {}) - .when('/search/:searchString', {}) - .when('/search/:searchString/tasks/:taskID', {}) - .when('/search/:searchString/tasks/:taskID/edit/:parameter', {}) - .otherwise({ - redirectTo: '/collections/all' - }); - } -]); - -angular.module('Tasks').run([ - '$document', '$rootScope', 'Config', '$timeout', 'ListsBusinessLayer', 'TasksBusinessLayer', 'SearchBusinessLayer', - function($document, $rootScope, Config, $timeout, TasksBusinessLayer, ListsBusinessLayer, SearchBusinessLayer) { - 'use strict'; - var update; - var init = false; - (update = function() { - var timeOutUpdate; - timeOutUpdate = function() { - return $timeout(update, Config.taskUpdateInterval); - }; - init = true; - return timeOutUpdate(); - }).call(); - OCA.Search.tasks = SearchBusinessLayer; - $document.click(function(event) { - $rootScope.$broadcast('documentClicked', event); - }); - moment.locale('details', { - calendar: { - lastDay: '[' + t('tasks', 'Due yesterday') + '], HH:mm', - sameDay: '[' + t('tasks', 'Due today') + '], HH:mm', - nextDay: '[' + t('tasks', 'Due tomorrow') + '], HH:mm', - lastWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY, HH:mm', - nextWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY, HH:mm', - sameElse: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY, HH:mm' - } - }); - moment.locale('details_allday', { - calendar: { - lastDay: '[' + t('tasks', 'Due yesterday') + ']', - sameDay: '[' + t('tasks', 'Due today') + ']', - nextDay: '[' + t('tasks', 'Due tomorrow') + ']', - lastWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY', - nextWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY', - sameElse: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY' - } - }); - moment.locale('start', { - calendar: { - lastDay: '[' + t('tasks', 'Started yesterday') + '], HH:mm', - sameDay: '[' + t('tasks', 'Starts today') + '], HH:mm', - nextDay: '[' + t('tasks', 'Starts tomorrow') + '], HH:mm', - lastWeek: '[' + t('tasks', 'Started on') + '] MMM DD, YYYY, HH:mm', - nextWeek: '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY, HH:mm', - sameElse: function() { - if (this.diff(moment()) > 0) { - return '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY, HH:mm'; - } else { - return '[' + t('tasks', 'Started on') + '] MMM DD, YYYY, HH:mm'; - } - } - } - }); - moment.locale('start_allday', { - calendar: { - lastDay: '[' + t('tasks', 'Started yesterday') + ']', - sameDay: '[' + t('tasks', 'Starts today') + ']', - nextDay: '[' + t('tasks', 'Starts tomorrow') + ']', - lastWeek: '[' + t('tasks', 'Started on') + '] MMM DD, YYYY', - nextWeek: '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY', - sameElse: function() { - if (this.diff(moment()) > 0) { - return '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY'; - } else { - return '[' + t('tasks', 'Started on') + '] MMM DD, YYYY'; - } - } - } - }); - moment.locale('reminder', { - calendar: { - lastDay: t('tasks', '[Remind me yesterday at ]HH:mm'), - sameDay: t('tasks', '[Remind me today at ]HH:mm'), - nextDay: t('tasks', '[Remind me tomorrow at ]HH:mm'), - lastWeek: t('tasks', '[Remind me on ]MMM DD, YYYY,[ at ]HH:mm'), - nextWeek: t('tasks', '[Remind me on ]MMM DD, YYYY,[ at ]HH:mm'), - sameElse: t('tasks', '[Remind me on ]MMM DD, YYYY,[ at ]HH:mm') - } - }); - moment.locale('tasks', { - calendar: { - lastDay: '[' + t('tasks', 'Yesterday') + ']', - sameDay: '[' + t('tasks', 'Today') + ']', - nextDay: '[' + t('tasks', 'Tomorrow') + ']', - lastWeek: 'DD.MM.YYYY', - nextWeek: 'DD.MM.YYYY', - sameElse: 'DD.MM.YYYY' - } - }); - moment.locale('details_short', { - calendar: { - lastDay: '[' + t('tasks', 'Yesterday') + ']', - sameDay: '[' + t('tasks', 'Today') + ']', - nextDay: '[' + t('tasks', 'Tomorrow') + ']', - lastWeek: 'MMM DD, YYYY', - nextWeek: 'MMM DD, YYYY', - sameElse: 'MMM DD, YYYY' - } - }); - moment.locale('list_week', { - calendar: { - lastDay: '[' + t('tasks', 'Yesterday') + ']', - sameDay: '[' + t('tasks', 'Today') + '], MMM. DD', - nextDay: '[' + t('tasks', 'Tomorrow') + '], MMM. DD', - lastWeek: 'ddd, MMM. DD', - nextWeek: 'ddd, MMM. DD', - sameElse: 'ddd, MMM. DD' - } - }); - return moment.locale('en', { - relativeTime: { - future: t('tasks', "in %s"), - past: t('tasks', "%s ago"), - s: t('tasks', "seconds"), - m: t('tasks', "a minute"), - mm: t('tasks', "%d minutes"), - h: t('tasks', "an hour"), - hh: t('tasks', "%d hours"), - d: t('tasks', "a day"), - dd: t('tasks', "%d days"), - M: t('tasks', "a month"), - MM: t('tasks', "%d months"), - y: t('tasks', "a year"), - yy: t('tasks', "%d years") - } - }); - } -]); - -angular.module('Tasks').controller('AppController', [ - '$scope', '$rootScope', 'ListsBusinessLayer', '$route', 'Status', '$timeout', '$location', '$routeParams', 'Loading', 'SettingsModel', 'Persistence', function($scope, $rootScope, ListsBusinessLayer, $route, status, $timeout, $location, $routeParams, Loading, SettingsModel, Persistence) { - 'use strict'; - var AppController = (function() { - function AppController(_$scope, $rootScope, _$listsbusinesslayer, _$route, _$status, _$timeout, _$location, _$routeparams, _Loading, _$settingsmodel, _persistence) { - this._$scope = _$scope; - this._$listsbusinesslayer = _$listsbusinesslayer; - this._$route = _$route; - this._$status = _$status; - this._$timeout = _$timeout; - this._$location = _$location; - this._$routeparams = _$routeparams; - this._Loading = _Loading; - this._$settingsmodel = _$settingsmodel; - this._persistence = _persistence; - this._$scope.status = this._$status.getStatus(); - this._$scope.route = this._$routeparams; - this._$scope.status.newListName = ""; - this._$scope.settingsmodel = this._$settingsmodel; - - this._$listsbusinesslayer.init().then(function(results) { - Promise.all(results).then(function() { - $scope.$apply(); - }); - }); - - this._persistence.init(); - - this._$scope.closeAll = function($event) { - if ($($event.target).closest('.close-all').length || $($event.currentTarget).is($($event.target).closest('.handler'))) { - if (!angular.isUndefined(_$scope.route.calendarID)) { - if (_$scope.route.listparameter === 'name') { - $rootScope.$broadcast('cancelEditCalendar', _$scope.route.calendarID); - } - _$location.path('/calendars/' + _$scope.route.calendarID); - } else if (!angular.isUndefined(_$scope.route.collectionID)) { - _$location.path('/collections/' + _$scope.route.collectionID); - } else { - _$location.path('/collections/all'); - } - _$scope.status.addingList = false; - _$scope.status.focusTaskInput = false; - _$scope.status.newListName = ""; - } - if (!$($event.target).closest('.newList').length) { - _$scope.status.addingList = false; - _$scope.status.newListName = ""; - } - if (!$($event.target).closest('.add-subtask').length) { - _$scope.status.addSubtaskTo = null; - _$scope.status.focusSubtaskInput = false; - } - }; - this._$scope.isLoading = function() { - return _Loading.isLoading(); - }; - } - return AppController; - })(); - return new AppController($scope, $rootScope, ListsBusinessLayer, $route, status, $timeout, $location, $routeParams, Loading, SettingsModel, Persistence); - } -]); - -angular.module('Tasks').controller('DetailsController', [ - '$scope', '$window', 'TasksModel', 'TasksBusinessLayer', '$route', '$location', '$timeout', '$routeParams', 'SettingsModel', 'Loading', 'ListsModel', - function($scope, $window, TasksModel, TasksBusinessLayer, $route, $location, $timeout, $routeParams, SettingsModel, Loading, ListsModel) { - 'use strict'; - var DetailsController = (function() { - function DetailsController(_$scope, _$window, _$tasksmodel, - _tasksbusinesslayer, _$route, _$location, _$timeout, _$routeparams, _$settingsmodel, _Loading, _$listsmodel) { - this._$scope = _$scope; - this._$window = _$window; - this._$tasksmodel = _$tasksmodel; - this._$listsmodel = _$listsmodel; - this._tasksbusinesslayer = _tasksbusinesslayer; - this._$route = _$route; - this._$location = _$location; - this._$timeout = _$timeout; - this._$routeparams = _$routeparams; - this._$settingsmodel = _$settingsmodel; - this._Loading = _Loading; - this._$scope.task = _$tasksmodel.getById(_$scope.route.taskID); - this._$scope.found = true; - this._$scope.$on('$routeChangeSuccess', function() { - var task = _$tasksmodel.getByUri(_$scope.route.taskID); - - if (!(angular.isUndefined(task) || task === null)) { - _$scope.task = task; - // Bind categories to task.cats as angular.ui/ui-select seems to have problems with Getter/Setter - _$scope.task.cats = task.categories; - _$scope.found = true; - } else if (_$scope.route.taskID !== void 0) { - _$scope.found = false; - } - }); - - this._$scope.settingsmodel = this._$settingsmodel; - this._$scope.settingsmodel.add({ - 'id': 'various', - 'categories': [] - }); - this._$scope.isAddingComment = false; - this._$scope.timers = []; - this._$scope.durations = [{ - name: t('tasks', 'week'), - names: t('tasks', 'weeks'), - id: 'week' - }, { - name: t('tasks', 'day'), - names: t('tasks', 'days'), - id: 'day' - }, { - name: t('tasks', 'hour'), - names: t('tasks', 'hours'), - id: 'hour' - }, { - name: t('tasks', 'minute'), - names: t('tasks', 'minutes'), - id: 'minute' - }, { - name: t('tasks', 'second'), - names: t('tasks', 'seconds'), - id: 'second' - } - ]; - this._$scope.loadTask = function(taskID) { - var task = _$tasksmodel.getByUri(_$scope.route.taskID); - if (!(angular.isUndefined(task) || task === null)) { - _$scope.task = task; - _$scope.found = true; - } - }; - this._$scope.TaskState = function() { - if (_$scope.found) { - return 'found'; - } else { - if (_Loading.isLoading()) { - return 'loading'; - } else { - return null; - } - } - }; - this._$scope.params = [ - { - name: t('tasks', 'before beginning'), - invert: true, - related: 'START', - id: "10" - }, { - name: t('tasks', 'after beginning'), - invert: false, - related: 'START', - id: "00" - }, { - name: t('tasks', 'before end'), - invert: true, - related: 'END', - id: "11" - }, { - name: t('tasks', 'after end'), - invert: false, - related: 'END', - id: "01" - } - ]; - this._$scope.filterParams = function(params) { - var task; - task = _$tasksmodel.getById(_$scope.route.taskID); - if (!(angular.isUndefined(task) || task === null)) { - if (task.due && task.start) { - return params; - } else if (task.start) { - return params.slice(0, 2); - } else { - return params.slice(2); - } - } - }; - this._$scope.deleteTask = function(task) { - return _$timeout(function() { - return _tasksbusinesslayer.deleteTask(task).then(function () { - return $scope.$apply(); - }); - }, 500); - }; - this._$scope.triggerUpdate = function(task) { - _tasksbusinesslayer.triggerUpdate(task); - }; - this._$scope.editName = function($event, task) { - if (task.calendar.writable) { - if (!$($event.target).is('a')) { - _$scope.setEditRoute('name'); - } - } - }; - this._$scope.editDueDate = function($event, task) { - if (task.calendar.writable) { - if ($($event.currentTarget).is($($event.target).closest('.handler'))) { - _$scope.setEditRoute('duedate'); - _tasksbusinesslayer.initDueDate(task); - } - } - }; - this._$scope.editStart = function($event, task) { - if (task.calendar.writable) { - if ($($event.currentTarget).is($($event.target).closest('.handler'))) { - _$scope.setEditRoute('startdate'); - _tasksbusinesslayer.initStartDate(task); - } - } - }; - this._$scope.editReminder = function($event, task) { - if (task.calendar.writable) { - if ($($event.currentTarget).is($($event.target).closest('.handler'))) { - _$scope.setEditRoute('reminer'); - return _tasksbusinesslayer.initReminder(_$scope.route.taskID); - } - } - }; - this._$scope.editNote = function($event, task) { - if (task.calendar.writable) { - if ($($event.currentTarget).is($($event.target).closest('.handler'))) { - if (!$($event.target).is('a')) { - _$scope.setEditRoute('note'); - } - } - } - }; - this._$scope.editPriority = function($event, task) { - if (task.calendar.writable) { - if ($($event.currentTarget).is($($event.target).closest('.handler'))) { - _$scope.setEditRoute('priority'); - } - } - }; - this._$scope.editPercent = function($event, task) { - if (task.calendar.writable) { - if ($($event.currentTarget).is($($event.target).closest('.handler'))) { - _$scope.setEditRoute('percent'); - } - } - }; - this._$scope.endEdit = function($event) { - if ($($event.target).closest('.end-edit').length || $($event.currentTarget).is($($event.target).closest('.handler'))) { - _$scope.resetRoute(); - } - }; - this._$scope.endName = function($event) { - if ($event.keyCode === 13) { - $event.preventDefault(); - _$scope.resetRoute(); - } - if ($event.keyCode === 27) { - return _$scope.resetRoute(); - } - }; - - this._$scope.setEditRoute = function(type) { - var calendarID = _$scope.route.calendarID; - var collectionID = _$scope.route.collectionID; - if (calendarID) { - $location.path('/calendars/' + calendarID + '/tasks/' + _$scope.route.taskID + '/edit/' + type); - } else if (collectionID) { - $location.path('/collections/' + collectionID + '/tasks/' + _$scope.route.taskID + '/edit/' + type); - } - }; - - this._$scope.resetRoute = function() { - var calendarID = _$scope.route.calendarID; - var collectionID = _$scope.route.collectionID; - if (calendarID) { - $location.path('/calendars/' + calendarID + '/tasks/' + _$scope.route.taskID); - } else if (collectionID) { - $location.path('/collections/' + collectionID + '/tasks/' + _$scope.route.taskID); - } - }; - this._$scope.deletePercent = function(task) { - return _tasksbusinesslayer.setPercentComplete(task, 0); - }; - this._$scope.deleteReminder = function() { - return _tasksbusinesslayer.deleteReminderDate(_$scope.route.taskID); - }; - - this._$scope.toggleCompleted = function(task) { - if (task.completed) { - _tasksbusinesslayer.setPercentComplete(task, 0); - } else { - _tasksbusinesslayer.setPercentComplete(task, 100); - } - }; - - this._$scope.setPercentComplete = function(task, complete) { - _tasksbusinesslayer.setPercentComplete(task, complete); - }; - - this._$scope.toggleStarred = function(task) { - if (task.priority > 5) { - _tasksbusinesslayer.setPriority(task, 0); - } else { - _tasksbusinesslayer.setPriority(task, 9); - } - }; - - this._$scope.deletePriority = function(task) { - return _tasksbusinesslayer.setPriority(task, 0); - }; - this._$scope.isDue = function(date) { - return _$tasksmodel.due(date); - }; - this._$scope.isOverDue = function(date) { - return _$tasksmodel.overdue(date); - }; - - this._$scope.setstartday = function(date) { - return _tasksbusinesslayer.setStart(_$scope.task, moment(date, 'MM/DD/YYYY'), 'day'); - }; - this._$scope.setstarttime = function(date) { - return _tasksbusinesslayer.setStart(_$scope.task, moment(date, 'HH:mm'), 'time'); - }; - this._$scope.deleteStartDate = function(task) { - _tasksbusinesslayer.deleteStartDate(task); - }; - - this._$scope.setdueday = function(date) { - return _tasksbusinesslayer.setDue(_$scope.task, moment(date, 'MM/DD/YYYY'), 'day'); - }; - this._$scope.setduetime = function(date) { - return _tasksbusinesslayer.setDue(_$scope.task, moment(date, 'HH:mm'), 'time'); - }; - this._$scope.deleteDueDate = function(task) { - _tasksbusinesslayer.deleteDueDate(task); - }; - - this._$scope.isAllDayPossible = function(task) { - return !angular.isUndefined(task) && task.calendar.writable && (task.due || task.start); - }; - this._$scope.toggleAllDay = function(task) { - _tasksbusinesslayer.setAllDay(task, !task.allDay); - }; - - this._$scope.setreminderday = function(date) { - return _tasksbusinesslayer.setReminderDate(_$scope.route.taskID, moment(date, 'MM/DD/YYYY'), 'day'); - }; - this._$scope.setremindertime = function(date) { - return _tasksbusinesslayer.setReminderDate(_$scope.route.taskID, moment(date, 'HH:mm'), 'time'); - }; - this._$scope.reminderType = function(task) { - if (!angular.isUndefined(task)) { - if (task.reminder === null) { - if (moment(task.start, "YYYYMMDDTHHmmss").isValid() || moment(task.due, "YYYYMMDDTHHmmss").isValid()) { - return 'DURATION'; - } else { - return 'DATE-TIME'; - } - } else { - return task.reminder.type; - } - } - }; - this._$scope.changeReminderType = function(task) { - _tasksbusinesslayer.checkReminderDate(task.id); - if (this.reminderType(task) === 'DURATION') { - if (task.reminder) { - task.reminder.type = 'DATE-TIME'; - } else { - task.reminder = { - type: 'DATE-TIME' - }; - } - } else { - if (task.reminder) { - task.reminder.type = 'DURATION'; - } else { - task.reminder = { - type: 'DURATION' - }; - } - } - return _tasksbusinesslayer.setReminder(task.id); - }; - this._$scope.setReminderDuration = function(taskID) { - return _tasksbusinesslayer.setReminder(_$scope.route.taskID); - }; - this._$scope.addComment = function() { - var comment, - _this = this; - if (_$scope.CommentContent) { - _$scope.isAddingComment = true; - comment = { - tmpID: 'newComment' + Date.now(), - comment: _$scope.CommentContent, - taskID: _$scope.route.taskID, - time: moment().format('YYYYMMDDTHHmmss'), - name: $('#expandDisplayName').text() - }; - _tasksbusinesslayer.addComment(comment, function(data) { - _$tasksmodel.updateComment(data); - _$scope.isAddingComment = false; - }, function() { - _$scope.isAddingComment = false; - }); - _$scope.CommentContent = ''; - } - }; - this._$scope.sendComment = function(event) { - if (event.keyCode === 13) { - return _$scope.addComment(); - } - }; - this._$scope.deleteComment = function(commentID) { - return _tasksbusinesslayer.deleteComment(_$scope.route.taskID, commentID); - }; - this._$scope.commentStrings = function() { - return { - button: t('tasks', 'Comment'), - input: t('tasks', 'Add a comment') - }; - }; - this._$scope.addCategory = function(category, model) { - _$scope.task.categories = _$scope.task.cats; - var default_categories = _$scope.settingsmodel.getById('various').categories; - if (default_categories.indexOf(category) < 0) { - default_categories.push(category); - } - _tasksbusinesslayer.doUpdate(_$scope.task); - }; - this._$scope.removeCategory = function(category, model) { - _$scope.task.categories = _$scope.task.cats; - _tasksbusinesslayer.doUpdate(_$scope.task); - }; - } - - return DetailsController; - - })(); - return new DetailsController($scope, $window, TasksModel, TasksBusinessLayer, $route, $location, $timeout, $routeParams, SettingsModel, Loading, ListsModel); - } -]); - -angular.module('Tasks').controller('ListController', [ - '$scope', '$rootScope', '$window', '$routeParams', 'ListsModel', 'TasksBusinessLayer', 'CollectionsModel', 'ListsBusinessLayer', '$location', - 'SearchBusinessLayer', 'CalendarService', 'TasksModel', '$timeout', - function($scope, $rootScope, $window, $routeParams, ListsModel, TasksBusinessLayer, CollectionsModel, ListsBusinessLayer, $location, - SearchBusinessLayer, CalendarService, TasksModel, $timeout) { - 'use strict'; - var ListController; - ListController = (function() { - function ListController(_$scope, $rootScope, _$window, _$routeParams, _$listsmodel, _$tasksbusinesslayer, _$collectionsmodel, _$listsbusinesslayer, $location, - _$searchbusinesslayer, _$calendarservice, _$tasksmodel, _$timeout) { - - this._$scope = _$scope; - this._$window = _$window; - this._$routeParams = _$routeParams; - this._$listsmodel = _$listsmodel; - this._$tasksmodel = _$tasksmodel; - this._$tasksbusinesslayer = _$tasksbusinesslayer; - this._$collectionsmodel = _$collectionsmodel; - this._$listsbusinesslayer = _$listsbusinesslayer; - this.$location = $location; - this._$timeout = _$timeout; - this._$searchbusinesslayer = _$searchbusinesslayer; - this._$calendarservice = _$calendarservice; - this._$scope.collections = this._$collectionsmodel.getAll(); - this._$scope.calendars = this._$listsmodel.getAll(); - this._$scope.draggedTasks = []; - this._$scope.TasksBusinessLayer = this._$tasksbusinesslayer; - this._$scope.nameError = false; - this._$scope.color = '#31CC7C'; - - this._$scope.deleteMessage = function (calendar) { - return t('tasks', 'This will delete the Calendar "%s" and all of its entries.').replace('%s', calendar.displayname); - }; - - this._$scope["delete"] = function(calendar) { - return _$listsbusinesslayer["delete"](calendar).then(function() { - $location.path('/calendars/' + _$listsmodel.getStandardList().uri); - return $scope.$apply(); - }); - }; - - this._$scope.startCreate = function() { - _$scope.status.addingList = true; - _$scope.nameError = false; - $('.hasTooltip').tooltip('hide'); - _$timeout(function() { - $('#newList').focus(); - }, 50); - }; - - this._$scope.create = function() { - var check = _$scope.isNameAllowed(_$scope.status.newListName); - if (check.allowed) { - _$scope.status.addingList = false; - _$scope.isAddingList = true; - _$listsbusinesslayer.add(_$scope.status.newListName, _$scope.color).then(function(calendar) { - $location.path('/calendars/' + calendar.uri); - return $scope.$apply(); - }); - _$scope.status.newListName = ''; - } - }; - - this._$scope.cancelCreate = function() { - $('.hasTooltip').tooltip('hide'); - _$scope.nameError = false; - _$scope.status.addingList = false; - _$scope.status.newListName = ""; - }; - - this._$scope.startEdit = function(calendar) { - _$scope.status.addingList = false; - _$scope.nameError = false; - $('.hasTooltip').tooltip('hide'); - calendar.prepareUpdate(); - $location.path('/calendars/' + _$scope.route.calendarID + '/edit/name'); - _$timeout(function() { - $('#list_' + calendar.uri + ' input.edit').focus(); - }, 50); - }; - - this._$scope.showCalDAVUrl = function(calendar) { - _$scope.status.addingList = false; - _$scope.nameError = false; - $location.path('/calendars/' + _$scope.route.calendarID + '/edit/caldav'); - _$timeout(function() { - $('#list_' + calendar.uri + ' input.caldav').focus(); - }, 50); - }; - - this._$scope.hideCalDAVUrl = function() { - $location.path('/calendars/' + _$scope.route.calendarID); - }; - - this._$scope.download = function (calendar) { - var url = calendar.url; - // cut off last slash to have a fancy name for the ics - if (url.slice(url.length - 1) === '/') { - url = url.slice(0, url.length - 1); - } - url += '?export'; - $window.open(url); - }; - - this._$scope.checkNew = function(event,name) { - _$scope.checkName(event,name); - }; - - this._$scope.checkEdit = function(event,calendar) { - _$scope.checkName(event,calendar.displayname,calendar.uri); - if (event.keyCode === 27) { - _$scope.cancelEdit(calendar); - } - }; - - this._$scope.checkName = function(event,name,uri) { - var check = _$scope.isNameAllowed(name,uri); - var $input = $(event.currentTarget); - if (!check.allowed) { - $input.attr('title', check.msg) - .tooltip({placement: 'bottom', trigger: 'manual'}) - .tooltip('fixTitle').tooltip('show'); - _$scope.nameError = true; - } else { - $input.tooltip('hide'); - _$scope.nameError = false; - } - if (event.keyCode === 27) { - event.preventDefault(); - $input.tooltip('hide'); - _$scope.status.addingList = false; - _$scope.status.newListName = ""; - _$scope.nameError = false; - } - }; - - $rootScope.$on('cancelEditCalendar', function(s, calendarUri) { - var calendar = _$listsmodel.getByUri(calendarUri); - _$scope.cancelEdit(calendar); - }); - - this._$scope.cancelEdit = function(calendar) { - calendar.resetToPreviousState(); - $('.hasTooltip').tooltip('hide'); - _$scope.nameError = false; - $location.path('/calendars/' + _$scope.route.calendarID); - }; - - this._$scope.saveEdit = function(calendar) { - var check = _$scope.isNameAllowed(calendar.displayname, calendar.uri); - if (check.allowed) { - _$listsbusinesslayer.rename(calendar); - $location.path('/calendars/' + _$scope.route.calendarID); - } - }; - - this._$scope.isNameAllowed = function(name, uri) { - var check = { - allowed: false, - msg: '' - }; - if (_$listsmodel.isNameAlreadyTaken(name, uri)) { - check.msg = t('tasks', 'The name "%s" is already used.').replace('%s', name); - } else if (!name) { - check.msg = t('tasks', 'An empty name is not allowed.'); - } else { - check.allowed = true; - } - return check; - }; - - this._$scope.getCollectionCount = function(collectionID) { - var filter; - filter = _$searchbusinesslayer.getFilter(); - return _$collectionsmodel.getCount(collectionID, filter); - }; - - this._$scope.hideCollection = function(collectionID) { - var collection; - collection = _$collectionsmodel.getById(collectionID); - switch (collection.show) { - case 0: - return true; - case 1: - return false; - case 2: - return this.getCollectionCount(collectionID) < 1; - } - }; - - this._$scope.getCollectionString = function(collectionID) { - var filter; - if (collectionID !== 'completed') { - filter = _$searchbusinesslayer.getFilter(); - return _$collectionsmodel.getCount(collectionID, filter); - } else { - return ''; - } - }; - - this._$scope.getListCount = function(listID, type) { - var filter; - filter = _$searchbusinesslayer.getFilter(); - return _$listsmodel.getCount(listID, type, filter); - }; - - this._$scope.dragoverList = function($event, index) { - var calendarID = $($event.target).closest('li.list').attr('calendarID'); - var calendar = _$listsmodel.getByUri(calendarID); - return calendar.writable; - }; - - this._$scope.dropList = function($event, index, item) { - if ($event.dataTransfer.dropEffect === 'move') { - // we can't simply use item as task, since the directive seems to not copy all properties --> task.calendar.uri == undefined - var task = _$tasksmodel.getByUri(item.uri); - var calendarID = $($event.target).closest('li.list').attr('calendarID'); - var calendar = _$listsmodel.getByUri(calendarID); - _$tasksbusinesslayer.changeCalendar(task, calendar).then(function() { - _$scope.$apply(); - }); - } - return true; - }; - - this._$scope.dragoverCollection = function($event, index) { - if ($event.dataTransfer.effectAllowed === 'copy' || ($event.dataTransfer.effectAllowed === 'copyMove' && $event.ctrlKey)) { - return false; - } - var collectionID; - collectionID = $($event.target).closest('li.collection').attr('collectionID'); - return collectionID === 'starred' || collectionID === 'completed' || collectionID === 'today'; - }; - - this._$scope.dropCollection = function($event, index, item) { - if ($event.dataTransfer.dropEffect === 'move') { - var collectionID = $($event.target).closest('li.collection').attr('collectionID'); - _$tasksbusinesslayer.changeCollection(item.uri, collectionID); - } - return true; - }; - } - - return ListController; - - })(); - return new ListController($scope, $rootScope, $window, $routeParams, ListsModel, TasksBusinessLayer, CollectionsModel, ListsBusinessLayer, $location, - SearchBusinessLayer, CalendarService, TasksModel, $timeout); - } -]); - -angular.module('Tasks').controller('SettingsController', [ - '$scope', '$window', 'Status', '$location', 'CollectionsModel', 'SettingsBusinessLayer', 'SettingsModel', function($scope, $window, Status, $location, CollectionsModel, SettingsBusinessLayer, SettingsModel) { - 'use strict'; - var SettingsController; - SettingsController = (function() { - function SettingsController(_$scope, _$window, _$status, _$location, _$collectionsmodel, _$settingsbusinesslayer, _$settingsmodel) { - var _this = this; - this._$scope = _$scope; - this._$window = _$window; - this._$status = _$status; - this._$location = _$location; - this._$collectionsmodel = _$collectionsmodel; - this._$settingsbusinesslayer = _$settingsbusinesslayer; - this._$settingsmodel = _$settingsmodel; - this._$scope.status = this._$status.getStatus(); - this._$scope.collections = this._$collectionsmodel.getAll(); - this._$scope.settingsmodel = this._$settingsmodel; - this._$scope.collectionOptions = [ - { - id: 0, - name: t('tasks', 'Hidden') - }, { - id: 1, - name: t('tasks', 'Visible') - }, { - id: 2, - name: t('tasks', 'Automatic') - } - ]; - this._$scope.startOfWeekOptions = [ - { - id: 0, - name: t('tasks', 'Sunday') - }, { - id: 1, - name: t('tasks', 'Monday') - }, { - id: 2, - name: t('tasks', 'Tuesday') - }, { - id: 3, - name: t('tasks', 'Wednesday') - }, { - id: 4, - name: t('tasks', 'Thursday') - }, { - id: 5, - name: t('tasks', 'Friday') - }, { - id: 6, - name: t('tasks', 'Saturday') - } - ]; - this._$scope.setVisibility = function(collectionID) { - var collection; - collection = _$collectionsmodel.getById(collectionID); - return _$settingsbusinesslayer.setVisibility(collectionID, collection.show); - }; - this._$scope.setStartOfWeek = function() { - return _$settingsbusinesslayer.set('various', 'startOfWeek', _$settingsmodel.getById('various').startOfWeek); - }; - } - - return SettingsController; - - })(); - return new SettingsController($scope, $window, Status, $location, CollectionsModel, SettingsBusinessLayer, SettingsModel); - } - ]); - -(function() { - 'use strict'; - var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - angular.module('Tasks').controller('TasksController', [ - '$scope', '$window', '$routeParams', 'TasksModel', 'ListsModel', 'CollectionsModel', 'TasksBusinessLayer', '$location', - 'SettingsBusinessLayer', 'SearchBusinessLayer', 'VTodo', 'SettingsModel', - function($scope, $window, $routeParams, TasksModel, ListsModel, CollectionsModel, TasksBusinessLayer, $location, - SettingsBusinessLayer, SearchBusinessLayer, VTodo, SettingsModel) { - var TasksController; - TasksController = (function() { - function TasksController(_$scope, _$window, _$routeParams, _$tasksmodel, _$listsmodel, _$collectionsmodel, _tasksbusinesslayer, $location, - _settingsbusinesslayer, _searchbusinesslayer, vtodo, _$settingsmodel) { - var _this = this; - this._$scope = _$scope; - this._$window = _$window; - this._$routeParams = _$routeParams; - this._$tasksmodel = _$tasksmodel; - this._$listsmodel = _$listsmodel; - this._$collectionsmodel = _$collectionsmodel; - this._tasksbusinesslayer = _tasksbusinesslayer; - this.$location = $location; - this._settingsbusinesslayer = _settingsbusinesslayer; - this._searchbusinesslayer = _searchbusinesslayer; - this._vtodo = vtodo; - this._$scope.tasks = this._$tasksmodel.getAll(); - this._$scope.draggedTasks = []; - this._$scope.calendars = this._$listsmodel.getAll(); - this._$scope.days = [0, 1, 2, 3, 4, 5, 6]; - this._$scope.isAddingTask = false; - this._$scope.focusInputField = false; - this._$scope.TasksModel = this._$tasksmodel; - this._$scope.TasksBusinessLayer = this._tasksbusinesslayer; - this._$settingsmodel = _$settingsmodel; - - this._$scope.addTask = function(taskName, related, calendar, parent) { - var _ref, _this = this; - if (calendar === null) { - calendar = ''; - } - _$scope.isAddingTask = true; - var task = { - calendar: null, - related: related, - summary: taskName, - priority: '0', - due: false, - start: false, - reminder: null, - completed: false, - complete: '0', - note: '' - }; - if (((_ref = _$scope.route.collectionID) === 'starred' || _ref === 'today' || _ref === 'week' || _ref === 'all' || _ref === 'completed' || _ref === 'current')) { - if (related) { - task.calendar = calendar; - } else { - task.calendar = _$listsmodel.getStandardList(); - } - if (_$scope.route.collectionID === 'starred') { - task.priority = '1'; - } - if (_$scope.route.collectionID === 'today') { - task.due = moment().startOf('day').format("YYYY-MM-DDTHH:mm:ss"); - } - if (_$scope.route.collectionID === 'current') { - task.start = moment().format("YYYY-MM-DDTHH:mm:ss"); - } - } else { - task.calendar = _$listsmodel.getByUri(_$scope.route.calendarID); - } - task = VTodo.create(task); - _tasksbusinesslayer.add(task).then(function(task) { - _$scope.isAddingTask = false; - _$scope.openDetails(task.uri, null); - return $scope.$apply(); - }); - if (parent) { - _tasksbusinesslayer.setHideSubtasks(parent, 0); - } - _$scope.status.focusTaskInput = false; - _$scope.status.focusSubtaskInput = false; - _$scope.status.addSubtaskTo = null; - _$scope.status.taskName = ''; - _$scope.status.subtaskName = ''; - }; - - this._$scope.getAddString = function() { - var calendar = _$listsmodel.getStandardList(); - if (angular.isDefined(calendar)) { - if (angular.isDefined(_$scope.route.collectionID)) { - switch (_$scope.route.collectionID) { - case 'starred': - return t('tasks', 'Add an important item in "%s"...').replace('%s', calendar.displayname); - case 'today': - return t('tasks', 'Add an item due today in "%s"...').replace('%s', calendar.displayname); - case 'all': - return t('tasks', 'Add an item in "%s"...').replace('%s', calendar.displayname); - case 'current': - return t('tasks', 'Add a current item in "%s"...').replace('%s', calendar.displayname); - case 'completed': - case 'week': - return null; - } - } else { - if (angular.isDefined(_$listsmodel.getByUri(_$scope.route.calendarID))) { - return t('tasks', 'Add an item in "%s"...').replace('%s', _$listsmodel.getByUri(_$scope.route.calendarID).displayname); - } - } - } - }; - - this._$scope.getSubAddString = function(taskname) { - return t('tasks', 'Add a subtask to "%s"...').replace('%s', taskname); - }; - - this._$scope.showSubtaskInput = function(uid) { - _$scope.status.addSubtaskTo = uid; - }; - - this._$scope.hideSubtasks = function(task) { - var taskID = _$scope.route.taskID; - var descendantIDs = _$tasksmodel.getDescendantIDs(task); - if (task.uri === taskID) { - return false; - } else if (__indexOf.call(descendantIDs, taskID) >= 0) { - return false; - } else { - return task.hideSubtasks; - } - }; - - this._$scope.showInput = function() { - var collectionID = _$scope.route.collectionID; - var calendar = _$listsmodel.getByUri(_$scope.route.calendarID); - if (collectionID === 'completed' || collectionID === 'week') { - return false; - } - if (angular.isDefined(calendar)) { - return calendar.writable; - } else { - return true; - } - }; - - this._$scope.focusTaskInput = function() { - _$scope.status.focusTaskInput = true; - }; - this._$scope.focusSubtaskInput = function() { - _$scope.status.focusSubtaskInput = true; - }; - - this._$scope.openDetails = function(id, $event) { - var calendarID = _$scope.route.calendarID; - var collectionID = _$scope.route.collectionID; - if ($event === null || $($event.currentTarget).is($($event.target).closest('.handler'))) { - var parent = _$tasksmodel.getByUri(id); - if (!parent.loadedCompleted) { - _tasksbusinesslayer.getAll(parent.calendar, true, parent).then(function() { - parent.loadedCompleted = true; - $scope.$apply(); - }); - } - if (calendarID) { - $location.path('/calendars/' + calendarID + '/tasks/' + id); - } else if (collectionID) { - $location.path('/collections/' + collectionID + '/tasks/' + id); - } - } - }; - - this._$scope.toggleCompleted = function(task) { - if (task.completed) { - _tasksbusinesslayer.setPercentComplete(task, 0); - } else { - _tasksbusinesslayer.setPercentComplete(task, 100); - } - }; - - this._$scope.toggleStarred = function(task) { - if (task.priority > 5) { - _tasksbusinesslayer.setPriority(task, 0); - } else { - _tasksbusinesslayer.setPriority(task, 9); - } - }; - - this._$scope.toggleHidden = function() { - return _settingsbusinesslayer.toggle('various', 'showHidden'); - }; - - this._$scope.filterTasks = function(task, filter) { - return function(task) { - return _$tasksmodel.filterTasks(task, filter); - }; - }; - - this._$scope.getSubTasks = function(tasks, parent) { - var ret, task, _i, _len; - ret = []; - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (task.related === parent.uid && task !== parent && !(parent.hideCompletedSubtasks && task.completed)) { - ret.push(task); - } - } - return ret; - }; - - this._$scope.hasNoParent = function(task) { - return function(task) { - return _$tasksmodel.hasNoParent(task); - }; - }; - - this._$scope.hasSubtasks = function(task) { - return _$tasksmodel.hasSubtasks(task.uid); - }; - - this._$scope.hasCompletedSubtasks = function(task) { - return _$tasksmodel.hasCompletedSubtasks(task.uid); - }; - - this._$scope.toggleSubtasks = function(task) { - _tasksbusinesslayer.setHideSubtasks(task, !task.hideSubtasks); - }; - - this._$scope.toggleCompletedSubtasks = function(task) { - _tasksbusinesslayer.setHideCompletedSubtasks(task, !task.hideCompletedSubtasks); - }; - - this._$scope.filterTasksByString = function(task) { - return function(task) { - var filter = _searchbusinesslayer.getFilter(); - return _$tasksmodel.filterTasksByString(task, filter); - }; - }; - - this._$scope.filteredTasks = function() { - var filter; - filter = _searchbusinesslayer.getFilter(); - return _$tasksmodel.filteredTasks(filter); - }; - - this._$scope.dayHasEntry = function() { - return function(date) { - var filter, task, tasks, _i, _len; - filter = _searchbusinesslayer.getFilter(); - tasks = _$tasksmodel.filteredTasks(filter); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (task.completed || !_$tasksmodel.hasNoParent(task)) { - continue; - } - if (_$tasksmodel.taskAtDay(task, date)) { - return true; - } - } - return false; - }; - }; - this._$scope.taskAtDay = function(task, day) { - return function(task) { - return _$tasksmodel.taskAtDay(task, day); - }; - }; - this._$scope.filterLists = function() { - return function(calendar) { - return _$scope.getCount(calendar.uri, _$scope.route.collectionID); - }; - }; - - this._$scope.getCount = function(calendarID, type) { - var filter = _searchbusinesslayer.getFilter(); - return _$listsmodel.getCount(calendarID, type, filter); - }; - - this._$scope.getCountString = function(calendarID, type) { - var filter = _searchbusinesslayer.getFilter(); - return n('tasks', '%n Completed Task', '%n Completed Tasks', _$listsmodel.getCount(calendarID, type, filter)); - }; - - this._$scope.checkTaskInput = function($event) { - if ($event.keyCode === 27) { - $($event.currentTarget).blur(); - _$scope.status.taskName = ''; - _$scope.status.subtaskName = ''; - _$scope.status.addSubtaskTo = null; - _$scope.status.focusTaskInput = false; - _$scope.status.focusSubtaskInput = false; - } - }; - - this._$scope.getCompletedTasks = function(calendarID) { - var calendar = _$listsmodel.getById(calendarID); - _tasksbusinesslayer.getAll(calendar, true).then(function() { - _$listsmodel.setLoadedCompleted(calendarID); - $scope.$apply(); - }); - }; - - this._$scope.loadedCompleted = function(calendarID) { - return _$listsmodel.loadedCompleted(calendarID); - }; - - this._$scope.sortDue = function(task) { - if (task.due === null) { - return 'last'; - } else { - return task.due; - } - }; - - this._$scope.sortStart = function(task) { - if (task.start === null) { - return 'last'; - } else { - return task.start; - } - }; - - this._$scope.getSortOrder = function() { - switch (_$scope.settingsmodel.getById('various').sortOrder) { - case 'due': - return _$scope.sortDue; - case 'start': - return _$scope.sortStart; - case 'priority': - return '-priority'; - case 'alphabetically': - return 'summary'; - case 'manual': - return 'manual'; - default: - return ['completed', _$scope.sortDue, '-priority', _$scope.sortStart, 'summary']; - } - }; - - this._$scope.getSortOrderIcon = function() { - switch (_$scope.settingsmodel.getById('various').sortOrder) { - case 'due': - case 'start': - return 'ico-calendar'; - case 'priority': - return 'ico-star'; - case 'alphabetically': - return 'ico-alphabetically'; - case 'manual': - return 'ico-manual'; - default: - return 'ico-menu'; - } - }; - - this._$scope.setSortOrder = function($event, order) { - _$scope.settingsmodel.getById('various').sortDirection = (_$scope.settingsmodel.getById('various').sortOrder === order) ? +!_$scope.settingsmodel.getById('various').sortDirection : 0; - _$scope.settingsmodel.getById('various').sortOrder = order; - _settingsbusinesslayer.set('various', 'sortOrder', order); - _settingsbusinesslayer.set('various', 'sortDirection', _$scope.settingsmodel.getById('various').sortDirection); - }; - - this._$scope.dropAsSubtask = function($event, item, index) { - if ($event.dataTransfer.dropEffect === 'move') { - var parentID = $($event.target).closest('.task-item').attr('taskID'); - var task = _$tasksmodel.getByUri(item.uri); - var parent = _$tasksmodel.getByUri(parentID); - _tasksbusinesslayer.changeParent(task, parent); - } - $('.subtasks-container').removeClass('dropzone-visible'); - return true; - - }; - - this._$scope.dropAsRootTask = function($event, item, index) { - if ($event.dataTransfer.dropEffect === 'move') { - var task = _$tasksmodel.getByUri(item.uri); - var collectionID = $($event.target).closest('ol[dnd-list]').attr('collectionID'); - var calendarID = $($event.target).closest('ol[dnd-list]').attr('calendarID'); - var newCalendar = _$listsmodel.getByUri(calendarID); - var queries = _tasksbusinesslayer.makeRootTask(task, newCalendar, collectionID); - Promise.all(queries).then(function() { - $scope.$apply(); - }); - } - $('.subtasks-container').removeClass('dropzone-visible'); - return true; - }; - - this._$scope.dragover = function($event, item, index) { - $('.subtasks-container').removeClass('dropzone-visible'); - var calendarID = $($event.target).closest('ol[dnd-list]').attr('calendarID'); - var calendar = _$listsmodel.getByUri(calendarID); - if (calendar.writable) { - $($event.target).closest('.task-item').children('.subtasks-container').addClass('dropzone-visible'); - return true; - } else { - return false; - } - }; - - this._$scope.allow = function(task) { - if (task.calendar.writable) { - return "copyMove"; - } else { - return "copy"; - } - }; - - this._$scope.dragStart = function($event) { - if ($event.dataTransfer.effectAllowed === 'copy' || ($event.dataTransfer.effectAllowed === 'copyMove' && $event.ctrlKey)) { - $($event.target).addClass('copy'); - } - }; - - this._$scope.dragEnd = function($event) { - $($event.target).removeClass('copy'); - }; - } - - return TasksController; - - })(); - return new TasksController($scope, $window, $routeParams, TasksModel, ListsModel, CollectionsModel, TasksBusinessLayer, $location, SettingsBusinessLayer, - SearchBusinessLayer, VTodo, SettingsModel); - } - ]); - -}).call(this); - -angular.module('Tasks').directive('appNavigationEntryUtils', function() { - 'use strict'; - return { - restrict: 'C', - link: function(scope, elm) { - var button, menu; - menu = elm.siblings('.app-navigation-entry-menu'); - button = $(elm).find('.app-navigation-entry-utils-menu-button button'); - button.click(function() { - menu.toggleClass('open'); - }); - scope.$on('documentClicked', function(scope, event) { - if (event.target !== button[0]) { - menu.removeClass('open'); - } - }); - } - }; -}); - -angular.module('Tasks').directive('autofocusOnInsert', function() { - 'use strict'; - return function(scope, elm) { - return elm.focus(); - }; -}); - -angular.module('Tasks').directive('avatar', function() { - 'use strict'; - return { - restrict: 'A', - scope: false, - link: function(scope, elm, attr) { - return attr.$observe('userid', function() { - if (attr.userid) { - return elm.avatar(attr.userid, attr.size); - } - }); - } - }; -}); - -/* https://github.com/kayellpeee/hsl_rgb_converter - * expected hue range: [0, 360) - * expected saturation range: [0, 1] - * expected lightness range: [0, 1] - */ -var hslToRgb = function(hue, saturation, lightness) { - 'use strict'; - // based on algorithm from http://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB - if(Array.isArray(hue)) { - saturation = hue[1]; - lightness = hue[2]; - hue = hue[0]; - } - if (hue === undefined) { - return [0, 0, 0]; - } - saturation /= 100; - lightness /= 100; - - var chroma = (1 - Math.abs((2 * lightness) - 1)) * saturation; - var huePrime = hue / 60; - var secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1)); - - huePrime = Math.floor(huePrime); - var red; - var green; - var blue; - - if (huePrime === 0) { - red = chroma; - green = secondComponent; - blue = 0; - } else if (huePrime === 1) { - red = secondComponent; - green = chroma; - blue = 0; - } else if (huePrime === 2) { - red = 0; - green = chroma; - blue = secondComponent; - } else if (huePrime === 3) { - red = 0; - green = secondComponent; - blue = chroma; - } else if (huePrime === 4) { - red = secondComponent; - green = 0; - blue = chroma; - } else if (huePrime === 5) { - red = chroma; - green = 0; - blue = secondComponent; - } - - var lightnessAdjustment = lightness - (chroma / 2); - red += lightnessAdjustment; - green += lightnessAdjustment; - blue += lightnessAdjustment; - - return [Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255)]; - -}; - -/* - * Convert rgb array to hex string - */ -var rgbToHex = function(r, g, b) { - 'use strict'; - if(Array.isArray(r)) { - g = r[1]; - b = r[2]; - r = r[0]; - } - return '#' + parseInt(r, 10).toString(16) + parseInt(g, 10).toString(16) + parseInt(b, 10).toString(16); -}; - -var listofcolours = [ - '#31CC7C', - '#317CCC', - '#FF7A66', - '#F1DB50', - '#7C31CC', - '#CC317C', - '#3A3B3D', - '#CACBCD' -]; - -/* - * Generate a random colour with the core generator - */ -var randColour = function() { - 'use strict'; - if (typeof String.prototype.toHsl === 'function') { - return rgbToHex(hslToRgb(Math.random().toString().toHsl())); - } else { - return listofcolours[Math.floor(Math.random() * listofcolours.length)]; - } -}; - -/** - * Directive: Colorpicker - * Description: Colorpicker for the Tasks app. - */ - - -angular.module('Tasks').directive('colorpicker', function() { - 'use strict'; - if (typeof String.prototype.toHsl === 'function') { - var hsl = ""; - var hslcolour = ""; - // 0 40 80 120 160 200 240 280 320 - listofcolours = ["15", "9", "4", "b", "6", "11", "74", "f", "57"]; - listofcolours.forEach(function(hash, index) { - hsl = hash.toHsl(); - hslcolour = hslToRgb(hsl); - listofcolours[index] = rgbToHex(hslcolour); - }); - } - return { - scope: { - selected: '=', - customizedColors: '=colors' - }, - restrict: 'AE', - templateUrl: OC.filePath('tasks', 'templates', 'colorpicker.html'), - link: function(scope, element, attr) { - scope.colors = scope.customizedColors || listofcolours; - scope.selected = scope.selected || scope.colors[0]; - scope.random = "#000000"; - - scope.randomizeColour = function() { - scope.random = randColour(); - scope.pick(scope.random); - }; - - scope.pick = function(color) { - scope.selected = color; - }; - - } - }; - -}); - -angular.module('Tasks').directive('confirmation', function() { - 'use strict'; - return { - priority: -1, - restrict: 'A', - templateUrl: OC.generateUrl('/apps/tasks/templates/confirmation', {}), - scope: { - confirmationFunction: "&confirmation", - confirmationMessage: "&confirmationMessage", - - }, - controller: 'ConfirmationController' - }; -}); - -angular.module('Tasks').controller('ConfirmationController', [ - '$scope', '$rootScope', '$element', '$attrs', '$compile', '$document', '$window', '$timeout', function($scope, $rootScope, $element, $attrs, $compile, $document, $window, $timeout) { - 'use strict'; - var ConfirmationController = (function() { - function ConfirmationController(_$scope, $rootScope, $element, $attrs, $compile, $document, $window, $timeout) { - this._$scope = _$scope; - this._$scope.countdown = 3; - - $element.bind( 'click', function( e ){ - _$scope.countdown = 3; - $element.removeClass('active'); - var message = _$scope.confirmationMessage() ? _$scope.confirmationMessage() : "Are you sure?"; - if ($element.hasClass('confirmed')) { - return; - } - e.stopPropagation(); - _$scope.activate(); - $element.children('.confirmation-confirm') - .tooltip({title: message, container: 'body', placement: 'right'}); - $element.addClass("confirmed"); - }); - - $element.children('.confirmation-confirm').bind( 'click', function (e) { - if ($element.hasClass('confirmed active')) { - _$scope.confirmationFunction(); - return; - } else{ - e.stopPropagation(); - } - }); - - this._$scope.documentClick = function () { - $element.removeClass("confirmed"); - }; - - this._$scope.activate = function () { - if (_$scope.countdown) { - $element.find('.countdown').html(_$scope.countdown+' s'); - $timeout(function() { - _$scope.activate(); - }, 1000); - _$scope.countdown--; - } else { - $element.addClass('active'); - } - }; - - $document.bind('click', _$scope.documentClick); - $document.bind('touchend', _$scope.documentClick); - - $scope.$on('$destroy', function() { - $document.unbind('click', _$scope.documentClick); - $document.unbind('touchend', _$scope.documentClick); - }); - } - return ConfirmationController; - })(); - return new ConfirmationController($scope, $rootScope, $element, $attrs, $compile, $document, $window, $timeout); - } -]); - -angular.module('Tasks').directive('datepicker', function() { - 'use strict'; - return { - restrict: 'A', - scope: false, - link: function(scope, elm, attr) { - return elm.datepicker({ - onSelect: function(date, inst) { - scope['set' + attr.datepicker + 'day'](date); - return scope.$apply(); - }, - beforeShow: function(input, inst) { - var dp, marginLeft; - dp = $(inst).datepicker('widget'); - marginLeft = -Math.abs($(input).outerWidth() - dp.outerWidth()) / 2 + 'px'; - dp.css({ - 'margin-left': marginLeft - }); - $("div.ui-datepicker:before").css({ - 'left': 100 + 'px' - }); - return $('.hasDatepicker').datepicker("option", "firstDay", scope.settingsmodel.getById('various').startOfWeek); - }, - beforeShowDay: function(date) { - if (moment(date).startOf('day').diff(moment(scope.task[attr.datepicker], "YYYYMMDDTHHmmss").startOf('day'), 'days') === 0) { - return [1, "selected"]; - } else { - return [1, ""]; - } - }, - minDate: null - }); - } - }; -}); - -angular.module('Tasks').directive('ocClickFocus', [ - '$timeout', function($timeout) { - 'use strict'; - return function(scope, elm, attr) { - var options; - options = scope.$eval(attr.ocClickFocus); - if (angular.isDefined(options) && angular.isDefined(options.selector)) { - return elm.click(function() { - if (angular.isDefined(options.timeout)) { - return $timeout(function() { - return $(options.selector).focus(); - }, options.timeout); - } else { - return $(options.selector).focus(); - } - }); - } - }; - } -]); - -angular.module('Tasks').directive('timepicker', function() { - 'use strict'; - return { - restrict: 'A', - link: function(scope, elm, attr) { - return elm.timepicker({ - onSelect: function(date, inst) { - scope['set' + attr.timepicker + 'time'](date); - return scope.$apply(); - }, - myPosition: 'center top', - atPosition: 'center bottom', - hourText: t('tasks', 'Hours'), - minuteText: t('tasks', 'Minutes') - }); - } - }; -}); - -angular.module('Tasks').directive('watchTop', function() { - 'use strict'; - return { - restrict: 'A', - link: function(scope, element, attr) { - ({ - scope: { - "divTop": "=" - } - }); - return scope.$watch(function() { - scope.divTop = element.prev().outerHeight(true); - }); - } - }; -}); - -angular.module('Tasks').filter('counterFormatter', function() { - 'use strict'; - return function(count) { - switch (false) { - case count !== 0: - return ''; - case count < 999: - return '999+'; - default: - return count; - } - }; -}); - -angular.module('Tasks').filter('dateDetails', function() { - 'use strict'; - return function(due) { - if (moment(due, "YYYYMMDDTHHmmss").isValid()) { - return moment(due, "YYYYMMDDTHHmmss").locale(due.isDate ? 'details_allday' : 'details').calendar(); - } else { - return t('tasks', 'Set due date'); - } - }; -}); - -angular.module('Tasks').filter('dateDetailsShort', function() { - 'use strict'; - return function(reminder) { - if (moment(reminder, "YYYYMMDDTHHmmss").isValid()) { - return moment(reminder, "YYYYMMDDTHHmmss").locale('details_short').calendar(); - } else { - return ''; - } - }; -}); - -angular.module('Tasks').filter('dateFromNow', function() { - 'use strict'; - return function(due) { - if (moment(due, "YYYYMMDDTHHmmss").isValid()) { - return moment(due, "YYYYMMDDTHHmmss").fromNow(); - } else { - return ''; - } - }; -}); - -angular.module('Tasks').filter('dateTaskList', function() { - 'use strict'; - return function(due) { - if (moment(due, "YYYYMMDDTHHmmss").isValid()) { - return moment(due, "YYYYMMDDTHHmmss").locale('tasks').calendar(); - } else { - return ''; - } - }; -}); - -angular.module('Tasks').filter('day', function() { - 'use strict'; - return function(i) { - return moment().add('days', i).locale('list_week').calendar(); - }; -}); - -angular.module('Tasks').filter('dayTaskList', function() { - 'use strict'; - return function(due) { - if (moment(due, "YYYYMMDDTHHmmss").isValid()) { - return moment(due, "YYYYMMDDTHHmmss").locale('tasks').calendar(); - } else { - return ''; - } - }; -}); - -angular.module('Tasks').filter('percentDetails', function() { - 'use strict'; - return function(percent) { - return t('tasks', '%s %% completed').replace('%s', percent).replace('%%', '%'); - }; -}); - -angular.module('Tasks').filter('priorityDetails', function() { - 'use strict'; - return function(priority) { - var string; - string = t('tasks', 'priority %s: ').replace('%s', priority); - if (+priority === 6 || +priority === 7 || +priority === 8 || +priority === 9) { - return string + ' ' + t('tasks', 'high'); - } else if (+priority === 5) { - return string + ' ' + t('tasks', 'medium'); - } else if (+priority === 1 || +priority === 2 || +priority === 3 || +priority === 4) { - return string + ' ' + t('tasks', 'low'); - } else { - return t('tasks', 'no priority assigned'); - } - }; -}); - -angular.module('Tasks').filter('reminderDetails', function() { - 'use strict'; - return function(reminder, scope) { - var ds, time, token, _i, _len, _ref; - if (!(angular.isUndefined(reminder) || reminder === null)) { - if (reminder.type === 'DATE-TIME' && moment(reminder.date, "YYYYMMDDTHHmmss").isValid()) { - return moment(reminder.date, "YYYYMMDDTHHmmss").locale('reminder').calendar(); - } else if (reminder.type === 'DURATION' && reminder.duration) { - ds = t('tasks', 'Remind me'); - _ref = scope.durations; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - token = _ref[_i]; - if (+reminder.duration[token.id]) { - time = 1; - ds += ' ' + reminder.duration[token.id] + ' '; - if (+reminder.duration[token.id] === 1) { - ds += token.name; - } else { - ds += token.names; - } - } - } - if (!time) { - if (reminder.duration.params.related === 'END') { - ds += ' ' + t('tasks', 'at the end'); - } else { - ds += ' ' + t('tasks', 'at the beginning'); - } - } else { - if (reminder.duration.params.invert) { - if (reminder.duration.params.related === 'END') { - ds += ' ' + t('tasks', 'before end'); - } else { - ds += ' ' + t('tasks', 'before beginning'); - } - } else { - if (reminder.duration.params.related === 'END') { - ds += ' ' + t('tasks', 'after end'); - } else { - ds += ' ' + t('tasks', 'after beginning'); - } - } - } - return ds; - } else { - return t('tasks', 'Remind me'); - } - } else { - return t('tasks', 'Remind me'); - } - }; -}); - -angular.module('Tasks').filter('startDetails', function() { - 'use strict'; - return function(due) { - if (moment(due, "YYYYMMDDTHHmmss").isValid()) { - return moment(due, "YYYYMMDDTHHmmss").locale(due.isDate ? 'start_allday' : 'start').calendar(); - } else { - return t('tasks', 'Set start date'); - } - }; -}); - -angular.module('Tasks').filter('timeTaskList', function() { - 'use strict'; - return function(due) { - if (moment(due, "YYYYMMDDTHHmmss").isValid()) { - return moment(due, "YYYYMMDDTHHmmss").format('HH:mm'); - } else { - return ''; - } - }; -}); - -angular.module('Tasks').factory('ListsBusinessLayer', [ - 'ListsModel', 'Persistence', 'TasksBusinessLayer', 'CalendarService', function(ListsModel, Persistence, TasksBusinessLayer, CalendarService) { - 'use strict'; - var ListsBusinessLayer; - ListsBusinessLayer = (function() { - function ListsBusinessLayer(_$listsmodel, _persistence, _$tasksbusinesslayer, _$calendarservice) { - this._$listsmodel = _$listsmodel; - this._persistence = _persistence; - this._$tasksbusinesslayer = _$tasksbusinesslayer; - this._$calendarservice = _$calendarservice; - } - - ListsBusinessLayer.prototype.init = function() { - return this._$calendarservice.getAll().then(function(calendars) { - var calendar, _i, _len, _results; - _results = []; - for (_i = 0, _len = calendars.length; _i < _len; _i++) { - calendar = calendars[_i]; - ListsModel.add(calendar); - _results.push(TasksBusinessLayer.getAll(calendar)); - } - return _results; - }); - }; - - ListsBusinessLayer.prototype.add = function(calendar, color) { - return this._$calendarservice.create(calendar, color, ['vtodo']).then(function(calendar) { - ListsModel.add(calendar); - return calendar; - }); - }; - - ListsBusinessLayer.prototype["delete"] = function(calendar) { - return this._$calendarservice["delete"](calendar).then(function() { - return ListsModel["delete"](calendar); - }); - }; - - ListsBusinessLayer.prototype.rename = function(calendar) { - this._$calendarservice.update(calendar).then(function(calendar) { - calendar.dropPreviousState(); - }); - }; - - return ListsBusinessLayer; - - })(); - return new ListsBusinessLayer(ListsModel, Persistence, TasksBusinessLayer, CalendarService); - } -]); - -(function() { - 'use strict'; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - - angular.module('Tasks').factory('SearchBusinessLayer', [ - 'ListsModel', 'Persistence', 'TasksModel', '$rootScope', '$routeParams', '$location', function(ListsModel, Persistence, TasksModel, $rootScope, $routeParams, $location) { - var SearchBusinessLayer; - SearchBusinessLayer = (function() { - function SearchBusinessLayer(_$listsmodel, _persistence, _$tasksmodel, _$rootScope, _$routeparams, _$location) { - this._$listsmodel = _$listsmodel; - this._persistence = _persistence; - this._$tasksmodel = _$tasksmodel; - this._$rootScope = _$rootScope; - this._$routeparams = _$routeparams; - this._$location = _$location; - this.getFilter = __bind(this.getFilter, this); - this.setFilter = __bind(this.setFilter, this); - this.attach = __bind(this.attach, this); - this.initialize(); - this._$searchString = ''; - } - - SearchBusinessLayer.prototype.attach = function(search) { - var _this = this; - search.setFilter('tasks', function(query) { - return _this._$rootScope.$apply(function() { - return _this.setFilter(query); - }); - }); - search.setRenderer('task', this.renderTaskResult.bind(this)); - return search.setHandler('task', this.handleTaskClick.bind(this)); - }; - - SearchBusinessLayer.prototype.setFilter = function(query) { - this._$searchString = query; - }; - - SearchBusinessLayer.prototype.getFilter = function() { - return this._$searchString; - }; - - SearchBusinessLayer.prototype.initialize = function() { - var _this = this; - this.handleTaskClick = function($row, result, event) { - return _this._$location.path('/lists/' + result.calendarid + '/tasks/' + result.id); - }; - this.renderTaskResult = function($row, result) { - var $template; - if (!_this._$tasksmodel.filterTasks(result, _this._$routeparams.listID) || !_this._$tasksmodel.isLoaded(result)) { - $template = $('div.task-item.template'); - $template = $template.clone(); - $row = $('').append($template.removeClass('template')); - $row.data('result', result); - $row.find('span.title').text(result.name); - if (result.starred) { - $row.find('span.task-star').addClass('task-starred'); - } - if (result.completed) { - $row.find('div.task-item').addClass('done'); - $row.find('span.task-checkbox').addClass('svg-checkmark'); - } - if (result.complete) { - $row.find('div.percentdone').css({ - 'width': result.complete + '%', - 'background-color': '' + _this._$listsmodel.getColor(result.calendarid) - }); - } - if (result.note) { - $row.find('div.title-wrapper').addClass('attachment'); - } - return $row; - } else { - return null; - } - }; - return OC.Plugins.register('OCA.Search', this); - }; - - return SearchBusinessLayer; - - })(); - return new SearchBusinessLayer(ListsModel, Persistence, TasksModel, $rootScope, $routeParams, $location); - } - ]); - -}).call(this); - -angular.module('Tasks').factory('SettingsBusinessLayer', [ - 'Persistence', 'SettingsModel', function(Persistence, SettingsModel) { - 'use strict'; - var SettingsBusinessLayer = (function() { - function SettingsBusinessLayer(_persistence, _$settingsmodel) { - this._persistence = _persistence; - this._$settingsmodel = _$settingsmodel; - } - - SettingsBusinessLayer.prototype.updateModel = function() { - var success, _this = this; - success = function() {}; - return this._persistence.getCollections(success, true); - }; - - SettingsBusinessLayer.prototype.setVisibility = function(collectionID, visibility) { - return this._persistence.setVisibility(collectionID, visibility); - }; - - SettingsBusinessLayer.prototype.toggle = function(type, setting) { - this._$settingsmodel.toggle(type, setting); - var value = this._$settingsmodel.getById(type)[setting]; - return this._persistence.setting(type, setting, +value); - }; - - SettingsBusinessLayer.prototype.set = function(type, setting, value) { - return this._persistence.setting(type, setting, value); - }; - - return SettingsBusinessLayer; - - })(); - return new SettingsBusinessLayer(Persistence, SettingsModel); - } -]); - -angular.module('Tasks').factory('TasksBusinessLayer', [ - 'TasksModel', 'Persistence', 'VTodoService', 'VTodo', '$timeout', - function(TasksModel, Persistence, VTodoService, VTodo, $timeout) { - 'use strict'; - var TasksBusinessLayer; - TasksBusinessLayer = (function() { - function TasksBusinessLayer(_$tasksmodel, _persistence, _$vtodoservice, _$vtodo, $timeout) { - this._$tasksmodel = _$tasksmodel; - this._persistence = _persistence; - this._$vtodoservice = _$vtodoservice; - } - - TasksBusinessLayer.prototype.getAll = function(calendar, completed, parent) { - return this._$vtodoservice.getAll(calendar, completed, parent).then(function(tasks) { - var task, _i, _len, _results; - _results = []; - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - var vTodo = new VTodo(task.calendar, task.properties, task.uri); - _results.push(TasksModel.ad(vTodo)); - } - return _results; - }); - }; - - TasksBusinessLayer.prototype.add = function(task) { - return this._$vtodoservice.create(task.calendar, task.data).then(function(task) { - var vTodo = new VTodo(task.calendar, task.properties, task.uri); - TasksModel.ad(vTodo); - return vTodo; - }); - }; - - TasksBusinessLayer.prototype.getTask = function(calendar, uri) { - return this._$vtodoservice.get(calendar, uri).then(function(task) { - TasksModel.ad(task); - return task; - }); - }; - - TasksBusinessLayer.prototype.setPriority = function(task, priority) { - if (task.calendar.writable) { - task.priority = priority; - this.doUpdate(task); - } - }; - - TasksBusinessLayer.prototype.setPercentComplete = function(task, percentComplete) { - if (task.calendar.writable) { - if (percentComplete < 100) { - this.uncompleteParents(task.related); - } else { - this.completeChildren(task); - } - task.complete = percentComplete; - this.triggerUpdate(task); - } - }; - - TasksBusinessLayer.prototype.triggerUpdate = function(task, duration) { - if (!duration) { - duration = 1000; - } - if (task.timers.update) { - $timeout.cancel(task.timers.update); - } - task.timers.update = $timeout(function(task) { - VTodoService.update(task); - }, duration, true, task); - }; - - TasksBusinessLayer.prototype.doUpdate = function(task) { - return this._$vtodoservice.update(task); - }; - - TasksBusinessLayer.prototype.completeChildren = function(task) { - var child, _i, _len; - var children = this._$tasksmodel.getChildren(task); - var _results = []; - for (_i = 0, _len = children.length; _i < _len; _i++) { - child = children[_i]; - _results.push(this.setPercentComplete(child, 100)); - } - return _results; - }; - - TasksBusinessLayer.prototype.uncompleteParents = function(uid) { - if (uid) { - var parent = this._$tasksmodel.getByUid(uid); - if (parent.completed) { - return this.setPercentComplete(parent, 0); - } - } - }; - - TasksBusinessLayer.prototype.setHideSubtasks = function(task, hide) { - task.hideSubtasks = hide; - if (task.calendar.writable) { - this.doUpdate(task); - } - }; - - TasksBusinessLayer.prototype.setHideCompletedSubtasks = function(task, hide) { - task.hideCompletedSubtasks = hide; - if (task.calendar.writable) { - this.doUpdate(task); - } - }; - - TasksBusinessLayer.prototype.deleteTask = function(task) { - var child, children, _i, _len; - children = this._$tasksmodel.getChildren(task); - for (_i = 0, _len = children.length; _i < _len; _i++) { - child = children[_i]; - this.deleteTask(child); - } - return this._$vtodoservice["delete"](task).then(function() { - return TasksModel["delete"](task); - }); - }; - - TasksBusinessLayer.prototype.momentToICALTime = function(moment, asDate) { - if(asDate) { - return ICAL.Time.fromDateString(moment.format('YYYY-MM-DD')); - } else { - return ICAL.Time.fromDateTimeString(moment.format('YYYY-MM-DDTHH:mm:ss')); - } - }; - - TasksBusinessLayer.prototype.initDueDate = function(task) { - var start = moment(task.start, "YYYY-MM-DDTHH:mm:ss"); - var due = moment(task.due, "YYYY-MM-DDTHH:mm:ss"); - if (!due.isValid()) { - var reference = start.isAfter() ? start : moment(); - if(task.allDay) { - reference.startOf('day').add(1, 'd'); - } else { - reference.startOf('hour').add(1, 'h'); - } - return this.setDue(task, reference, 'all'); - } - }; - - TasksBusinessLayer.prototype.setDue = function(task, date, type) { - if (type === null) { - type = 'day'; - } - var allDay = task.allDay; - var start = moment(task.start, "YYYY-MM-DDTHH:mm:ss"); - var olddue = moment(task.due, "YYYY-MM-DDTHH:mm:ss"); - var due = olddue.clone(); - if (type === 'day') { - if (moment(due).isValid()) { - due.year(date.year()).month(date.month()).date(date.date()); - } else { - due = date.add(12, 'h'); - } - } else if (type === 'time') { - if (moment(due).isValid()) { - due.hour(date.hour()).minute(date.minute()); - } else { - due = date; - } - } else if (type === 'all') { - due = date; - } else { - return; - } - if(due.isBefore(start) || due.isSame(start)) { - start.subtract(olddue.diff(due), 'ms'); - task.start = this.momentToICALTime(start, allDay); - } - task.due = this.momentToICALTime(due, allDay); - // this.checkReminderDate(task); - this.doUpdate(task); - }; - - TasksBusinessLayer.prototype.deleteDueDate = function(task) { - // var reminder = task.reminder; - // if (reminder !== null && reminder.type === 'DURATION' && reminder.duration.params.related === 'END') { - // this.deleteReminderDate(task); - // } - task.due = null; - this.doUpdate(task); - }; - - TasksBusinessLayer.prototype.initStartDate = function(task) { - var start = moment(task.start, "YYYY-MM-DDTHH:mm:ss"); - var due = moment(task.due, "YYYY-MM-DDTHH:mm:ss"); - if (!start.isValid()) { - var reference = moment().add(1, 'h'); - if (due.isBefore(reference)) { - reference = due.subtract(1, 'm'); - } - reference.startOf(task.allDay ? 'day' : 'hour'); - return this.setStart(task, reference, 'all'); - } - }; - - TasksBusinessLayer.prototype.setStart = function(task, date, type) { - if (type === null) { - type = 'day'; - } - var allDay = task.allDay; - var due = moment(task.due, "YYYY-MM-DDTHH:mm:ss"); - var oldstart = moment(task.start, "YYYY-MM-DDTHH:mm:ss"); - var start = oldstart.clone(); - if (type === 'day') { - if (moment(start).isValid()) { - start.year(date.year()).month(date.month()).date(date.date()); - } else { - start = date.add(12, 'h'); - } - } else if (type === 'time') { - if (moment(start).isValid()) { - start.hour(date.hour()).minute(date.minute()); - } else { - start = date; - } - } else if (type === 'all') { - start = date; - } else { - return; - } - if(start.isAfter(due) || start.isSame(due)) { - due.add(start.diff(oldstart), 'ms'); - task.due = this.momentToICALTime(due, allDay); - } - task.start = this.momentToICALTime(start, allDay); - // this.checkReminderDate(taskID); - this.doUpdate(task); - }; - - TasksBusinessLayer.prototype.deleteStartDate = function(task) { - // var reminder = task.reminder; - // if (reminder !== null && reminder.type === 'DURATION' && reminder.duration.params.related === 'START') { - // this.deleteReminderDate(task); - // } - task.start = null; - this.doUpdate(task); - }; - - TasksBusinessLayer.prototype.setAllDay = function(task, allDay) { - task.allDay = allDay; - if(allDay) { - var due = moment(task.due, "YYYY-MM-DDTHH:mm:ss"); - var start = moment(task.start, "YYYY-MM-DDTHH:mm:ss"); - if(start.isAfter(due) || start.isSame(due)) { - start = moment(due).subtract(1, 'day'); - task.start = this.momentToICALTime(start, allDay); - } - } - this.doUpdate(task); - }; - - TasksBusinessLayer.prototype.initReminder = function(taskID) { - var p, task; - if (!this.checkReminderDate(taskID)) { - task = this._$tasksmodel.getById(taskID); - task.reminder = { - type: 'DURATION', - action: 'DISPLAY', - duration: { - token: 'week', - week: 0, - day: 0, - hour: 0, - minute: 0, - second: 0, - params: { - invert: true - } - } - }; - if (moment(task.start, "YYYYMMDDTHHmmss").isValid()) { - p = task.reminder.duration.params; - p.related = 'START'; - p.id = '10'; - } else if (moment(task.due, "YYYYMMDDTHHmmss").isValid()) { - p = task.reminder.duration.params; - p.related = 'END'; - p.id = '11'; - } else { - task.reminder.type = 'DATE-TIME'; - task.reminder.date = moment().startOf('hour').add(1, 'h').format('YYYYMMDDTHHmmss'); - } - return this.setReminder(taskID); - } - }; - - TasksBusinessLayer.prototype.setReminderDate = function(taskID, date, type) { - var newreminder, reminder, reminderdate; - if (type === null) { - type = 'day'; - } - reminder = this._$tasksmodel.getById(taskID).reminder; - newreminder = { - type: 'DATE-TIME', - action: 'DISPLAY', - duration: null - }; - if (type === 'day') { - if (this.checkReminderDate(taskID) || reminder === null) { - reminderdate = moment(reminder.date, "YYYYMMDDTHHmmss"); - newreminder.action = reminder.action; - if (reminderdate.isValid() && reminder.type === 'DATE-TIME') { - reminderdate.year(date.year()).month(date.month()).date(date.date()); - } else { - reminderdate = date.add(12, 'h'); - } - } else { - reminderdate = date.add(12, 'h'); - } - } else if (type === 'time') { - if (this.checkReminderDate(taskID) || reminder === null) { - reminderdate = moment(reminder.date, "YYYYMMDDTHHmmss"); - newreminder.action = reminder.action; - if (reminderdate.isValid() && reminder.type === 'DATE-TIME') { - reminderdate.hour(date.hour()).minute(date.minute()); - } else { - reminderdate = date; - } - } else { - reminderdate = date; - } - } else { - return; - } - newreminder.date = reminderdate.format('YYYYMMDDTHHmmss'); - this._$tasksmodel.setReminder(taskID, newreminder); - return this._persistence.setReminder(taskID, newreminder); - }; - - TasksBusinessLayer.prototype.setReminder = function(taskID) { - var reminder; - if (this.checkReminderDate(taskID)) { - reminder = this._$tasksmodel.getById(taskID).reminder; - return this._persistence.setReminder(taskID, reminder); - } - }; - - TasksBusinessLayer.prototype.checkReminderDate = function(taskID) { - var d, date, duration, rel, related, reminder, seg, task, token; - task = this._$tasksmodel.getById(taskID); - reminder = task.reminder; - if (reminder !== null && reminder.type === 'DURATION') { - if (!reminder.duration) { - return false; - } else if (reminder.duration.params.related === 'START') { - token = 'start'; - } else if (reminder.duration.params.related === 'END') { - token = 'due'; - } else { - return false; - } - date = moment(task[token], "YYYYMMDDTHHmmss"); - duration = reminder.duration; - d = { - w: duration.week, - d: duration.day, - h: duration.hour, - m: duration.minute, - s: duration.second - }; - if (duration.params.invert) { - date = date.subtract(d); - } else { - date = date.add(d); - } - task.reminder.date = date.format('YYYYMMDDTHHmmss'); - } else if (reminder !== null && reminder.type === 'DATE-TIME') { - duration = reminder.duration; - date = moment(reminder.date, "YYYYMMDDTHHmmss"); - if (!date.isValid()) { - return false; - } - if (duration) { - if (duration.params.related === 'START') { - related = moment(task.start, "YYYYMMDDTHHmmss"); - } else { - related = moment(task.due, "YYYYMMDDTHHmmss"); - } - seg = this.secondsToSegments(date.diff(related, 'seconds')); - duration.params.invert = seg.invert; - duration.token = 'week'; - duration.week = seg.week; - duration.day = seg.day; - duration.hour = seg.hour; - duration.minute = seg.minute; - duration.second = seg.second; - } else { - if (task.start) { - related = moment(task.start, "YYYYMMDDTHHmmss"); - rel = 'START'; - d = 0; - } else if (task.due) { - related = moment(task.due, "YYYYMMDDTHHmmss"); - rel = 'END'; - d = 1; - } else { - return true; - } - seg = this.secondsToSegments(date.diff(related, 'seconds')); - reminder.duration = { - token: 'week', - params: { - related: rel, - invert: seg.invert, - id: +seg.invert + '' + d - }, - week: seg.week, - day: seg.day, - hour: seg.hour, - minute: seg.minute, - second: seg.second - }; - } - } else { - return false; - } - return true; - }; - - TasksBusinessLayer.prototype.secondsToSegments = function(s) { - var d, h, i, m, w; - if (s < 0) { - s *= -1; - i = true; - } else { - i = false; - } - w = Math.floor(s / 604800); - s -= w * 604800; - d = Math.floor(s / 86400); - s -= d * 86400; - h = Math.floor(s / 3600); - s -= h * 3600; - m = Math.floor(s / 60); - s -= m * 60; - return { - week: w, - day: d, - hour: h, - minute: m, - second: s, - invert: i - }; - }; - - TasksBusinessLayer.prototype.deleteReminderDate = function(taskID) { - this._$tasksmodel.setReminder(taskID, null); - return this._persistence.setReminder(taskID, false); - }; - - TasksBusinessLayer.prototype.changeCalendar = function(task, newCalendar) { - if(task.calendar !== newCalendar && newCalendar.writable) { - var newTask = angular.copy(task); - newTask.calendar = newCalendar; - if (!TasksModel.hasNoParent(newTask)) { - var parent = TasksModel.getByUid(newTask.related); - if (parent.calendar.uri !== newTask.calendar.uri) { - newTask.related = null; - TasksBusinessLayer.prototype.setPercentComplete(newTask, 0); - } - } - return VTodoService.create(newCalendar, newTask.data).then(function(newVTodo) { - var vTodo = new VTodo(newVTodo.calendar, newVTodo.properties, newVTodo.uri); - TasksModel.ad(vTodo); - return VTodoService["delete"](task).then(function() { - TasksModel["delete"](task); - var queries = []; - var children = TasksModel.getChildren(newTask); - var _i, _len, child; - for (_i = 0, _len = children.length; _i < _len; _i++) { - child = children[_i]; - if (child.calendar.uri !== newTask.calendar.uri) { - queries.push(TasksBusinessLayer.prototype.changeCalendar(child, newTask.calendar)); - } - } - return Promise.all(queries); - }); - }); - } else { - return Promise.resolve(true); - } - }; - - // called from outside - TasksBusinessLayer.prototype.changeCollection = function(taskID, collectionID) { - var task = this._$tasksmodel.getById(taskID); - switch (collectionID) { - case 'starred': - task.priority = 9; - return this.doUpdate(task); - case 'completed': - return this.setPercentComplete(task, 100); - case 'uncompleted': - if (task.completed) { - return this.setPercentComplete(task, 0); - } else { - return false; - } - break; - case 'today': - return this.setDue(task, moment().startOf('day').add(12, 'h'), 'all'); - case 'week': - case 'all': - return false; - default: - return false; - } - }; - - TasksBusinessLayer.prototype.changeParent = function(task, parent) { - if (parent.calendar.writable) { - task.related = parent.uid; - parent.hideSubtasks = 0; - if (parent.completed && !task.completed) { - this.setPercentComplete(parent, 0); - } else { - this.doUpdate(parent); - } - if (parent.calendar.uri !== task.calendar.uri) { - this.changeCalendar(task, parent.calendar); - } else { - this.doUpdate(task); - } - } - }; - - TasksBusinessLayer.prototype.makeRootTask = function(task, newCalendar, collectionID) { - if (newCalendar.writable) { - var requests = []; - task.related = null; - if (collectionID !== "completed" && task.completed) { - task.complete = 0; - } - requests.push(this.changeCollection(task.uri, collectionID)); - if (task.calendar !== newCalendar) { - requests.push(this.changeCalendar(task, newCalendar)); - } else { - requests.push(this.doUpdate(task)); - } - return requests; - } - }; - - TasksBusinessLayer.prototype.addComment = function(comment, onSuccess, onFailure) { - var success, - _this = this; - if (!onSuccess) { - onSuccess = function() {}; - } - if (!onFailure) { - onFailure = function() {}; - } - this._$tasksmodel.addComment(comment); - success = function(response) { - if (response.status === 'error') { - return onFailure(); - } else { - return onSuccess(response.data); - } - }; - return this._persistence.addComment(comment, success); - }; - - TasksBusinessLayer.prototype.deleteComment = function(taskID, commentID) { - this._$tasksmodel.deleteComment(taskID, commentID); - return this._persistence.deleteComment(taskID, commentID); - }; - - return TasksBusinessLayer; - - })(); - return new TasksBusinessLayer(TasksModel, Persistence, VTodoService, VTodo, $timeout); - } -]); - -angular.module('Tasks').service('CalendarService', ['DavClient', 'Calendar', function(DavClient, Calendar){ - 'use strict'; - - var _this = this; - - this._CALENDAR_HOME = null; - - this._currentUserPrincipal = null; - - this._takenUrls = []; - - this._PROPERTIES = [ - '{' + DavClient.NS_DAV + '}displayname', - '{' + DavClient.NS_IETF + '}calendar-description', - '{' + DavClient.NS_IETF + '}calendar-timezone', - '{' + DavClient.NS_APPLE + '}calendar-order', - '{' + DavClient.NS_APPLE + '}calendar-color', - '{' + DavClient.NS_IETF + '}supported-calendar-component-set', - '{' + DavClient.NS_OWNCLOUD + '}calendar-enabled', - '{' + DavClient.NS_DAV + '}acl', - '{' + DavClient.NS_DAV + '}owner', - '{' + DavClient.NS_OWNCLOUD + '}invite' - ]; - - function discoverHome(callback) { - return DavClient.propFind(DavClient.buildUrl(OC.linkToRemoteBase('dav')), ['{' + DavClient.NS_DAV + '}current-user-principal'], 0, {'requesttoken': OC.requestToken}).then(function(response) { - if (!DavClient.wasRequestSuccessful(response.status)) { - throw "CalDAV client could not be initialized - Querying current-user-principal failed"; - } - - if (response.body.propStat.length < 1) { - return; - } - var props = response.body.propStat[0].properties; - _this._currentUserPrincipal = props['{' + DavClient.NS_DAV + '}current-user-principal'][0].textContent; - - return DavClient.propFind(DavClient.buildUrl(_this._currentUserPrincipal), ['{' + DavClient.NS_IETF + '}calendar-home-set'], 0, {'requesttoken': OC.requestToken}).then(function (response) { - if (!DavClient.wasRequestSuccessful(response.status)) { - throw "CalDAV client could not be initialized - Querying calendar-home-set failed"; - } - - if (response.body.propStat.length < 1) { - return; - } - var props = response.body.propStat[0].properties; - _this._CALENDAR_HOME = props['{' + DavClient.NS_IETF + '}calendar-home-set'][0].textContent; - - return callback(); - }); - }); - } - - function getResponseCodeFromHTTPResponse(t) { - return parseInt(t.split(' ')[1]); - } - - this.getAll = function() { - if (this._CALENDAR_HOME === null) { - return discoverHome(function() { - return _this.getAll(); - }); - } - - var prom = DavClient.propFind(DavClient.buildUrl(this._CALENDAR_HOME), this._PROPERTIES, 1, {'requesttoken': OC.requestToken}).then(function(response) { - var calendars = []; - - if (!DavClient.wasRequestSuccessful(response.status)) { - throw "CalDAV client could not be initialized - Querying calendars failed"; - } - - for (var i = 0; i < response.body.length; i++) { - var body = response.body[i]; - if (body.propStat.length < 1) { - continue; - } - - _this._takenUrls.push(body.href); - - var responseCode = getResponseCodeFromHTTPResponse(body.propStat[0].status); - if (!DavClient.wasRequestSuccessful(responseCode)) { - continue; - } - - var doesSupportVTodo = false; - var components = body.propStat[0].properties['{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set']; - if (components) { - for (var j=0; j < components.length; j++) { - var name = components[j].attributes.getNamedItem('name').textContent.toLowerCase(); - if (name === 'vtodo') { - doesSupportVTodo = true; - } - } - } - - if (!doesSupportVTodo) { - continue; - } - - _this._getACLFromResponse(body); - - var uri = body.href.substr(_this._CALENDAR_HOME.length).replace(/[^\w\-]+/g, ''); - - var calendar = new Calendar(body.href, body.propStat[0].properties, uri); - calendars.push(calendar); - } - - return calendars; - }); - return prom; - }; - - this.get = function(url) { - if (this._CALENDAR_HOME === null) { - return discoverHome(function() { - return _this.get(url); - }); - } - - return DavClient.propFind(DavClient.buildUrl(url), this._PROPERTIES, 0, {'requesttoken': OC.requestToken}).then(function(response) { - var body = response.body; - if (body.propStat.length < 1) { - //TODO - something went wrong - return; - } - - var responseCode = getResponseCodeFromHTTPResponse(body.propStat[0].status); - if (!DavClient.wasRequestSuccessful(responseCode)) { - //TODO - something went wrong - return; - } - - _this._getACLFromResponse(body); - - var uri = body.href.substr(_this._CALENDAR_HOME.length).replace(/[^\w\-]+/g, ''); - - return new Calendar(body.href, body.propStat[0].properties, uri); - }); - }; - - this.create = function(name, color, components) { - if (this._CALENDAR_HOME === null) { - return discoverHome(function() { - return _this.create(name, color); - }); - } - - if (typeof components === 'undefined') { - components = ['vtodo']; - } - - var xmlDoc = document.implementation.createDocument('', '', null); - var cMkcalendar = xmlDoc.createElement('c:mkcalendar'); - cMkcalendar.setAttribute('xmlns:c', 'urn:ietf:params:xml:ns:caldav'); - cMkcalendar.setAttribute('xmlns:d', 'DAV:'); - cMkcalendar.setAttribute('xmlns:a', 'http://apple.com/ns/ical/'); - cMkcalendar.setAttribute('xmlns:o', 'http://owncloud.org/ns'); - xmlDoc.appendChild(cMkcalendar); - - var dSet = xmlDoc.createElement('d:set'); - cMkcalendar.appendChild(dSet); - - var dProp = xmlDoc.createElement('d:prop'); - dSet.appendChild(dProp); - - dProp.appendChild(this._createXMLForProperty(xmlDoc, 'displayname', name)); - dProp.appendChild(this._createXMLForProperty(xmlDoc, 'enabled', true)); - dProp.appendChild(this._createXMLForProperty(xmlDoc, 'color', color)); - dProp.appendChild(this._createXMLForProperty(xmlDoc, 'components', components)); - - var body = cMkcalendar.outerHTML; - - var uri = this._suggestUri(name); - var url = this._CALENDAR_HOME + uri + '/'; - var headers = { - 'Content-Type' : 'application/xml; charset=utf-8', - 'requesttoken' : OC.requestToken - }; - - return DavClient.request('MKCALENDAR', url, headers, body).then(function(response) { - if (response.status === 201) { - _this._takenUrls.push(url); - return _this.get(url).then(function(calendar) { - calendar.enabled = true; - return _this.update(calendar); - }); - } - }); - }; - - this.update = function(calendar) { - var xmlDoc = document.implementation.createDocument('', '', null); - var dPropUpdate = xmlDoc.createElement('d:propertyupdate'); - dPropUpdate.setAttribute('xmlns:c', 'urn:ietf:params:xml:ns:caldav'); - dPropUpdate.setAttribute('xmlns:d', 'DAV:'); - dPropUpdate.setAttribute('xmlns:a', 'http://apple.com/ns/ical/'); - dPropUpdate.setAttribute('xmlns:o', 'http://owncloud.org/ns'); - xmlDoc.appendChild(dPropUpdate); - - var dSet = xmlDoc.createElement('d:set'); - dPropUpdate.appendChild(dSet); - - var dProp = xmlDoc.createElement('d:prop'); - dSet.appendChild(dProp); - - var updatedProperties = calendar.updatedProperties; - calendar.resetUpdatedProperties(); - for (var i=0; i < updatedProperties.length; i++) { - dProp.appendChild(this._createXMLForProperty( - xmlDoc, - updatedProperties[i], - calendar[updatedProperties[i]] - )); - } - - var url = calendar.url; - var body = dPropUpdate.outerHTML; - var headers = { - 'Content-Type' : 'application/xml; charset=utf-8', - 'requesttoken' : OC.requestToken - }; - - return DavClient.request('PROPPATCH', url, headers, body).then(function(response) { - return calendar; - }); - }; - - this.delete = function(calendar) { - return DavClient.request('DELETE', calendar.url, {'requesttoken': OC.requestToken}, '').then(function(response) { - if (response.status === 204) { - return true; - } else { - // TODO - handle error case - return false; - } - }); - }; - - this.share = function(calendar, shareType, shareWith, writable, existingShare) { - var xmlDoc = document.implementation.createDocument('', '', null); - var oShare = xmlDoc.createElement('o:share'); - oShare.setAttribute('xmlns:d', 'DAV:'); - oShare.setAttribute('xmlns:o', 'http://owncloud.org/ns'); - xmlDoc.appendChild(oShare); - - var oSet = xmlDoc.createElement('o:set'); - oShare.appendChild(oSet); - - var dHref = xmlDoc.createElement('d:href'); - if (shareType === OC.Share.SHARE_TYPE_USER) { - dHref.textContent = 'principal:principals/users/'; - } else if (shareType === OC.Share.SHARE_TYPE_GROUP) { - dHref.textContent = 'principal:principals/groups/'; - } - dHref.textContent += shareWith; - oSet.appendChild(dHref); - - var oSummary = xmlDoc.createElement('o:summary'); - oSummary.textContent = t('calendar', '{calendar} shared by {owner}', { - calendar: calendar.displayname, - owner: calendar.owner - }); - oSet.appendChild(oSummary); - - if (writable) { - var oRW = xmlDoc.createElement('o:read-write'); - oSet.appendChild(oRW); - } - - var headers = { - 'Content-Type' : 'application/xml; charset=utf-8', - requesttoken : oc_requesttoken - }; - var body = oShare.outerHTML; - return DavClient.request('POST', calendar.url, headers, body).then(function(response) { - if (response.status === 200) { - if (!existingShare) { - if (shareType === OC.Share.SHARE_TYPE_USER) { - calendar.sharedWith.users.push({ - id: shareWith, - displayname: shareWith, - writable: writable - }); - } else if (shareType === OC.Share.SHARE_TYPE_GROUP) { - calendar.sharedWith.groups.push({ - id: shareWith, - displayname: shareWith, - writable: writable - }); - } - } - } - }); - }; - - this.unshare = function(calendar, shareType, shareWith) { - var xmlDoc = document.implementation.createDocument('', '', null); - var oShare = xmlDoc.createElement('o:share'); - oShare.setAttribute('xmlns:d', 'DAV:'); - oShare.setAttribute('xmlns:o', 'http://owncloud.org/ns'); - xmlDoc.appendChild(oShare); - - var oRemove = xmlDoc.createElement('o:remove'); - oShare.appendChild(oRemove); - - var dHref = xmlDoc.createElement('d:href'); - if (shareType === OC.Share.SHARE_TYPE_USER) { - dHref.textContent = 'principal:principals/users/'; - } else if (shareType === OC.Share.SHARE_TYPE_GROUP) { - dHref.textContent = 'principal:principals/groups/'; - } - dHref.textContent += shareWith; - oRemove.appendChild(dHref); - - var headers = { - 'Content-Type' : 'application/xml; charset=utf-8', - requesttoken: oc_requesttoken - }; - var body = oShare.outerHTML; - return DavClient.request('POST', calendar.url, headers, body).then(function(response) { - if (response.status === 200) { - if (shareType === OC.Share.SHARE_TYPE_USER) { - calendar.sharedWith.users = calendar.sharedWith.users.filter(function(user) { - return user.id !== shareWith; - }); - } else if (shareType === OC.Share.SHARE_TYPE_GROUP) { - calendar.sharedWith.groups = calendar.sharedWith.groups.filter(function(groups) { - return groups.id !== shareWith; - }); - } - //todo - remove entry from calendar object - return true; - } else { - return false; - } - }); - }; - - this._createXMLForProperty = function(xmlDoc, propName, value) { - switch(propName) { - case 'enabled': - var oEnabled = xmlDoc.createElement('o:calendar-enabled'); - oEnabled.textContent = value ? '1' : '0'; - return oEnabled; - - case 'displayname': - var dDisplayname = xmlDoc.createElement('d:displayname'); - dDisplayname.textContent = value; - return dDisplayname; - - case 'order': - var aOrder = xmlDoc.createElement('a:calendar-color'); - aOrder.textContent = value; - return aOrder; - - case 'color': - var aColor = xmlDoc.createElement('a:calendar-color'); - aColor.textContent = value; - return aColor; - - case 'components': - var cComponents = xmlDoc.createElement('c:supported-calendar-component-set'); - for (var i=0; i < value.length; i++) { - var cComp = xmlDoc.createElement('c:comp'); - cComp.setAttribute('name', value[i].toUpperCase()); - cComponents.appendChild(cComp); - } - return cComponents; - } - }; - - this._getACLFromResponse = function(body) { - var canWrite = false; - var acl = body.propStat[0].properties['{' + DavClient.NS_DAV + '}acl']; - if (acl) { - for (var k=0; k < acl.length; k++) { - var href = acl[k].getElementsByTagNameNS('DAV:', 'href'); - if (href.length === 0) { - continue; - } - href = href[0].textContent; - if (href !== _this._currentUserPrincipal) { - continue; - } - var writeNode = acl[k].getElementsByTagNameNS('DAV:', 'write'); - if (writeNode.length > 0) { - canWrite = true; - } - } - } - body.propStat[0].properties.canWrite = canWrite; - }; - - this._isUriAlreadyTaken = function(uri) { - return (this._takenUrls.indexOf(this._CALENDAR_HOME + uri + '/') !== -1); - }; - - this._suggestUri = function(displayname) { - var uri = displayname.toString().toLowerCase() - .replace(/\s+/g, '-') // Replace spaces with - - .replace(/[^\w\-]+/g, '') // Remove all non-word chars - .replace(/\-\-+/g, '-') // Replace multiple - with single - - .replace(/^-+/, '') // Trim - from start of text - .replace(/-+$/, ''); // Trim - from end of text - - if (!this._isUriAlreadyTaken(uri)) { - return uri; - } - - if (uri.indexOf('-') === -1) { - uri = uri + '-1'; - if (!this._isUriAlreadyTaken(uri)) { - return uri; - } - } - - while (this._isUriAlreadyTaken(uri)) { - var positionLastDash = uri.lastIndexOf('-'); - var firstPart = uri.substr(0, positionLastDash); - var lastPart = uri.substr(positionLastDash + 1); - - if (lastPart.match(/^\d+$/)) { - lastPart = parseInt(lastPart); - lastPart++; - - uri = firstPart + '-' + lastPart; - } else if (lastPart === '') { - uri = uri + '1'; - } else { - uri = uri = '-1'; - } - } - - return uri; - }; - -}]); - -angular.module('Tasks').service('DavClient', [ - function() { - 'use strict'; - var client; - client = new dav.Client({ - baseUrl: OC.linkToRemote('dav/calendars'), - xmlNamespaces: { - 'DAV:': 'd', - 'urn:ietf:params:xml:ns:caldav': 'c', - 'http://apple.com/ns/ical/': 'aapl', - 'http://owncloud.org/ns': 'oc', - 'http://nextcloud.com/ns': 'nc', - 'http://calendarserver.org/ns/': 'cs' - } - }); - angular.extend(client, { - NS_DAV: 'DAV:', - NS_IETF: 'urn:ietf:params:xml:ns:caldav', - NS_APPLE: 'http://apple.com/ns/ical/', - NS_OWNCLOUD: 'http://owncloud.org/ns', - NS_NEXTCLOUD: 'http://nextcloud.com/ns', - NS_CALENDARSERVER: 'http://calendarserver.org/ns/', - buildUrl: function(path) { - return window.location.protocol + '//' + window.location.host + path; - }, - wasRequestSuccessful: function(status) { - return status >= 200 && status <= 299; - } - }); - return client; - } -]); - -angular.module('Tasks').service('ICalFactory', [ - function() { - 'use strict'; - - // creates a new ICAL root element with a product id property - return { - new: function() { - var root = new ICAL.Component(['vcalendar', [], []]); - - var version = angular.element('#app').attr('data-appVersion'); - root.updatePropertyWithValue('prodid', '-//Nextcloud Tasks v' + version); - - return root; - } - }; - } -]); - -angular.module('Tasks').factory('Loading', [ - function() { - 'use strict'; - var Loading = (function() { - function Loading() { - this.count = 0; - } - - Loading.prototype.increase = function() { - return this.count += 1; - }; - - Loading.prototype.decrease = function() { - return this.count -= 1; - }; - - Loading.prototype.getCount = function() { - return this.count; - }; - - Loading.prototype.isLoading = function() { - return this.count > 0; - }; - - return Loading; - - })(); - return new Loading(); - } -]); - -(function() { - 'use strict'; - angular.module('Tasks').factory('_Model', [ - function() { - var Model; - Model = (function() { - function Model() { - this._data = []; - this._dataMap = {}; - this._filterCache = {}; - } - - Model.prototype.handle = function(data) { - var item, _i, _len, _results; - _results = []; - for (_i = 0, _len = data.length; _i < _len; _i++) { - item = data[_i]; - _results.push(this.add(item)); - } - return _results; - }; - - Model.prototype.add = function(data, clearCache) { - if (clearCache === null) { - clearCache = true; - } - if (clearCache) { - this._invalidateCache(); - } - if (angular.isDefined(this._dataMap[data.id])) { - return this.update(data, clearCache); - } else { - this._data.push(data); - this._dataMap[data.id] = data; - } - }; - - Model.prototype.update = function(data, clearCache) { - var entry, key, value, _results; - if (clearCache === null) { - clearCache = true; - } - if (clearCache) { - this._invalidateCache(); - } - entry = this.getById(data.id); - _results = []; - for (key in data) { - value = data[key]; - if (key === 'id') { - continue; - } else { - _results.push(entry[key] = value); - } - } - return _results; - }; - - Model.prototype.getById = function(id) { - return this._dataMap[id]; - }; - - Model.prototype.getAll = function() { - return this._data; - }; - - Model.prototype.removeById = function(id, clearCache) { - var counter, data, entry, _i, _len, _ref; - if (clearCache === null) { - clearCache = true; - } - _ref = this._data; - for (counter = _i = 0, _len = _ref.length; _i < _len; counter = ++_i) { - entry = _ref[counter]; - if (entry.id === id) { - this._data.splice(counter, 1); - data = this._dataMap[id]; - delete this._dataMap[id]; - if (clearCache) { - this._invalidateCache(); - } - return data; - } - } - }; - - Model.prototype.clear = function() { - this._data.length = 0; - this._dataMap = {}; - return this._invalidateCache(); - }; - - Model.prototype._invalidateCache = function() { - this._filterCache = {}; - }; - - Model.prototype.get = function(query) { - var hash; - hash = query.hashCode(); - if (!angular.isDefined(this._filterCache[hash])) { - this._filterCache[hash] = query.exec(this._data); - } - return this._filterCache[hash]; - }; - - Model.prototype.size = function() { - return this._data.length; - }; - - return Model; - - })(); - return Model; - } - ]); - -}).call(this); - -angular.module('Tasks').factory('Calendar', ['$rootScope', '$filter', '$window', function($rootScope, $filter, $window) { - 'use strict'; - - function Calendar(url, props, uri) { - var _this = this; - - props.color = props['{http://apple.com/ns/ical/}calendar-color']; - if (typeof props.color !== 'undefined') { - if (props.color.length === 9) { - props.color = props.color.substr(0,7); - } - } else { - props.color = '#1d2d44'; - } - - angular.extend(this, { - _propertiesBackup: {}, - _properties: { - url: url, - uri: uri, - enabled: props['{http://owncloud.org/ns}calendar-enabled'] === '1', - displayname: props['{DAV:}displayname'] || t('tasks','Unnamed'), - color: props.color, - order: parseInt(props['{http://apple.com/ns/ical/}calendar-order']) || 0, - components: { - vevent: false, - vjournal: false, - vtodo: false - }, - writable: props.canWrite, - shareable: props.canWrite, - sharedWith: { - users: [], - groups: [] - }, - owner: '', - loadedCompleted: false - }, - _updatedProperties: [] - }); - this._propertiesBackup = angular.copy(this._properties); - - // angular.extend(this, { - // tmpId: null, - // fcEventSource: { - // events: function (start, end, timezone, callback) { - // // console.log('querying events ...'); - // // TimezoneService.get(timezone).then(function(tz) { - // // _this.list.loading = true; - // // $rootScope.$broadcast('reloadCalendarList'); - - // // VEventService.getAll(_this, start, end).then(function(events) { - // // var vevents = []; - // // for (var i = 0; i < events.length; i++) { - // // vevents = vevents.concat(events[i].getFcEvent(start, end, tz)); - // // } - - // // callback(vevents); - - // // _this.list.loading = false; - // // $rootScope.$broadcast('reloadCalendarList'); - // // }); - // // }); - // }, - // editable: this._properties.writable, - // calendar: this - // }, - // list: { - // edit: false, - // loading: this.enabled, - // locked: false, - // editingShares: false - // } - // }); - - var components = props['{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set']; - for (var i=0; i < components.length; i++) { - var name = components[i].attributes.getNamedItem('name').textContent.toLowerCase(); - if (this._properties.components.hasOwnProperty(name)) { - this._properties.components[name] = true; - } - } - - var shares = props['{http://owncloud.org/ns}invite']; - if (typeof shares !== 'undefined') { - for (var j=0; j < shares.length; j++) { - var href = shares[j].getElementsByTagNameNS('DAV:', 'href'); - if (href.length === 0) { - continue; - } - href = href[0].textContent; - - var access = shares[j].getElementsByTagNameNS('http://owncloud.org/ns', 'access'); - if (access.length === 0) { - continue; - } - access = access[0]; - - var readWrite = access.getElementsByTagNameNS('http://owncloud.org/ns', 'read-write'); - readWrite = readWrite.length !== 0; - - if (href.startsWith('principal:principals/users/')) { - this._properties.sharedWith.users.push({ - id: href.substr(27), - displayname: href.substr(27), - writable: readWrite - }); - } else if (href.startsWith('principal:principals/groups/')) { - this._properties.sharedWith.groups.push({ - id: href.substr(28), - displayname: href.substr(28), - writable: readWrite - }); - } - } - } - - var owner = props['{DAV:}owner']; - if (typeof owner !== 'undefined' && owner.length !== 0) { - owner = owner[0].textContent.slice(0, -1); - if (owner.startsWith('/remote.php/dav/principals/users/')) { - this._properties.owner = owner.substr(33); - } - } - - // this.tmpId = RandomStringService.generate(); - } - - Calendar.prototype = { - get url() { - return this._properties.url; - }, - get caldav() { - return $window.location.origin + this.url; - }, - get exportUrl() { - var url = this.url; - // cut off last slash to have a fancy name for the ics - if (url.slice(url.length - 1) === '/') { - url = url.slice(0, url.length - 1); - } - url += '?export'; - return url; - }, - get enabled() { - return this._properties.enabled; - }, - get uri() { - return this._properties.uri; - }, - get components() { - return this._properties.components; - }, - set enabled(enabled) { - this._properties.enabled = enabled; - this._setUpdated('enabled'); - }, - get displayname() { - return this._properties.displayname; - }, - set displayname(displayname) { - this._properties.displayname = displayname; - this._setUpdated('displayname'); - }, - get color() { - return this._properties.color; - }, - set color(color) { - this._properties.color = color; - this._setUpdated('color'); - }, - get sharedWith() { - return this._properties.sharedWith; - }, - set sharedWith(sharedWith) { - this._properties.sharedWith = sharedWith; - }, - get textColor() { - var color = this.color; - var fallbackColor = '#fff'; - var c; - switch (color.length) { - case 4: - c = color.match(/^#([0-9a-f]{3})$/i)[1]; - if (c) { - return this._generateTextColor( - parseInt(c.charAt(0),16)*0x11, - parseInt(c.charAt(1),16)*0x11, - parseInt(c.charAt(2),16)*0x11 - ); - } - return fallbackColor; - - case 7: - case 9: - var regex = new RegExp('^#([0-9a-f]{' + (color.length - 1) + '})$', 'i'); - c = color.match(regex)[1]; - if (c) { - return this._generateTextColor( - parseInt(c.substr(0,2),16), - parseInt(c.substr(2,2),16), - parseInt(c.substr(4,2),16) - ); - } - return fallbackColor; - - default: - return fallbackColor; - } - }, - get order() { - return this._properties.order; - }, - set order(order) { - this._properties.order = order; - this._setUpdated('order'); - }, - get writable() { - return this._properties.writable; - }, - get shareable() { - return this._properties.shareable; - }, - get owner() { - return this._properties.owner; - }, - get loadedCompleted() { - return this._properties.loadedCompleted; - }, - set loadedCompleted(loadedCompleted) { - this._properties.loadedCompleted = loadedCompleted; - }, - _setUpdated: function(propName) { - if (this._updatedProperties.indexOf(propName) === -1) { - this._updatedProperties.push(propName); - } - }, - get updatedProperties() { - return this._updatedProperties; - }, - resetUpdatedProperties: function() { - this._updatedProperties = []; - }, - prepareUpdate: function() { - this._propertiesBackup = angular.copy(this._properties); - }, - resetToPreviousState: function() { - this._properties = angular.copy(this._propertiesBackup); - this._propertiesBackup = {}; - }, - dropPreviousState: function() { - this._propertiesBackup = {}; - }, - toggleSharesEditor: function() { - this.list.editingShares = !this.list.editingShares; - }, - _generateTextColor: function(r,g,b) { - var brightness = (((r * 299) + (g * 587) + (b * 114)) / 1000); - return (brightness > 130) ? '#000000' : '#FAFAFA'; - } - }; - - return Calendar; -}]); - -(function() { - 'use strict'; - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - angular.module('Tasks').factory('CollectionsModel', [ - 'TasksModel', '_Model', function(TasksModel, _Model) { - var CollectionsModel; - CollectionsModel = (function(_super) { - __extends(CollectionsModel, _super); - - function CollectionsModel(_$tasksmodel) { - this._$tasksmodel = _$tasksmodel; - this._nameCache = {}; - CollectionsModel.__super__.constructor.call(this); - } - - CollectionsModel.prototype.add = function(data, clearCache) { - if (clearCache === null) { - clearCache = true; - } - this._nameCache[data.displayname] = data; - if (angular.isDefined(data.id)) { - return CollectionsModel.__super__.add.call(this, data, clearCache); - } - }; - - CollectionsModel.prototype.getCount = function(collectionID, filter) { - var count, task, tasks, _i, _len; - if (filter === null) { - filter = ''; - } - count = 0; - tasks = this._$tasksmodel.filteredTasks(filter); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - count += this._$tasksmodel.filterTasks(task, collectionID) && !task.related; - } - return count; - }; - - return CollectionsModel; - - })(_Model); - return new CollectionsModel(TasksModel); - } - ]); - -}).call(this); - -(function() { - 'use strict'; - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - angular.module('Tasks').factory('ListsModel', [ - 'TasksModel', '_Model', function(TasksModel, _Model) { - var ListsModel; - ListsModel = (function(_super) { - __extends(ListsModel, _super); - - function ListsModel(_$tasksmodel) { - this._$tasksmodel = _$tasksmodel; - this._tmpUriCache = {}; - this._data = []; - this._dataMap = {}; - this._filterCache = {}; - } - - ListsModel.prototype.add = function(calendar, clearCache) { - var updateByUri; - if (clearCache === null) { - clearCache = true; - } - updateByUri = angular.isDefined(calendar.uri) && angular.isDefined(this.getByUri(calendar.uri)); - if (updateByUri) { - return this.update(calendar, clearCache); - } else { - if (angular.isDefined(calendar.uri)) { - if (clearCache) { - this._invalidateCache(); - } - if (!angular.isDefined(this._dataMap[calendar.uri])) { - this._data.push(calendar); - this._dataMap[calendar.uri] = calendar; - } - } - } - }; - - ListsModel.prototype.getByUri = function(uri) { - return this._dataMap[uri]; - }; - - ListsModel.prototype.update = function(list, clearCache) { - var tmplist; - if (clearCache === null) { - clearCache = true; - } - tmplist = this._tmpIdCache[list.tmpID]; - if (angular.isDefined(list.id) && angular.isDefined(tmplist) && angular.isUndefined(tmplist.id)) { - tmplist.id = list.id; - this._dataMap[list.id] = tmplist; - } - list["void"] = false; - return ListsModel.__super__.update.call(this, list, clearCache); - }; - - ListsModel.prototype["delete"] = function(calendar, clearCache) { - var counter, data, entry, _i, _len, _ref; - if (clearCache === null) { - clearCache = true; - } - _ref = this._data; - for (counter = _i = 0, _len = _ref.length; _i < _len; counter = ++_i) { - entry = _ref[counter]; - if (entry === calendar) { - this._data.splice(counter, 1); - data = this._dataMap[calendar.uri]; - delete this._dataMap[calendar.uri]; - if (clearCache) { - this._invalidateCache(); - } - return data; - } - } - }; - - ListsModel.prototype.getStandardList = function() { - var calendars; - if (this.size()) { - calendars = this.getAll(); - return calendars[0]; - } - }; - - ListsModel.prototype.isNameAlreadyTaken = function(displayname, uri) { - var calendar, calendars, ret, _i, _len; - calendars = this.getAll(); - ret = false; - for (_i = 0, _len = calendars.length; _i < _len; _i++) { - calendar = calendars[_i]; - if (calendar.displayname === displayname && calendar.uri !== uri) { - ret = true; - } - } - return ret; - }; - - ListsModel.prototype.getCount = function(calendarID, collectionID, filter) { - var count, task, tasks, _i, _len; - if (filter === null) { - filter = ''; - } - count = 0; - tasks = this._$tasksmodel.filteredTasks(filter); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - count += this._$tasksmodel.filterTasks(task, collectionID) && task.calendar.uri === calendarID && !task.related; - } - // if (collectionID === 'completed' && filter === '') { - // count += this.notLoaded(calendarID); - // } - return count; - }; - - ListsModel.prototype.loadedCompleted = function(calendarID) { - if (angular.isUndefined(this.getById(calendarID))) { - return false; - } else { - return this.getById(calendarID).loadedCompleted; - } - }; - - ListsModel.prototype.setLoadedCompleted = function(calendarID) { - this.getById(calendarID).loadedCompleted = true; - }; - - ListsModel.prototype.getColor = function(calendarID) { - if (angular.isUndefined(this.getById(calendarID))) { - return '#CCCCCC'; - } else { - return this.getById(calendarID).calendarcolor; - } - }; - - ListsModel.prototype.getName = function(calendarID) { - if (angular.isUndefined(this.getById(calendarID))) { - return ''; - } else { - return this.getById(calendarID).displayname; - } - }; - - return ListsModel; - - })(_Model); - return new ListsModel(TasksModel); - } - ]); - -}).call(this); - -(function() { - 'use strict'; - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - angular.module('Tasks').factory('SettingsModel', [ - '_Model', function(_Model) { - var SettingsModel; - SettingsModel = (function(_super) { - __extends(SettingsModel, _super); - - function SettingsModel() { - this._nameCache = {}; - SettingsModel.__super__.constructor.call(this); - } - - SettingsModel.prototype.add = function(data, clearCache) { - if (clearCache === null) { - clearCache = true; - } - this._nameCache[data.displayname] = data; - if (angular.isDefined(data.id)) { - return SettingsModel.__super__.add.call(this, data, clearCache); - } else { - return this._data.push(data); - } - }; - - SettingsModel.prototype.toggle = function(type, setting) { - var set; - set = this.getById(type); - this.getById(type)[setting] = !set[setting]; - }; - - return SettingsModel; - - })(_Model); - return new SettingsModel(); - } - ]); - -}).call(this); - -(function() { - 'use strict'; - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - angular.module('Tasks').factory('TasksModel', [ - '_Model', function(_Model) { - var TasksModel = (function(_super) { - __extends(TasksModel, _super); - - function TasksModel() { - this._tmpIdCache = {}; - TasksModel.__super__.constructor.call(this); - } - - TasksModel.prototype.ad = function(task, clearCache) { - if (clearCache === null) { - clearCache = true; - } - var updateByUri = angular.isDefined(task.uri) && angular.isDefined(this.getByUri(task.uri)); - if (updateByUri) { - return this.update(task, clearCache); - } else { - if (angular.isDefined(task.uri)) { - if (clearCache) { - this._invalidateCache(); - } - if (!angular.isDefined(this._dataMap[task.uri])) { - this._data.push(task); - this._dataMap[task.uri] = task; - } - } - } - }; - - TasksModel.prototype.getByUri = function(uri) { - return this._dataMap[uri]; - }; - - TasksModel.prototype.update = function(task, clearCache) { - - var entry, key, value, _results; - if (clearCache === null) { - clearCache = true; - } - if (clearCache) { - this._invalidateCache(); - } - entry = this.getByUri(task.uri); - entry.components = task.components; - entry.components.toString(); - return entry; - }; - - TasksModel.prototype.removeById = function(taskID) { - return TasksModel.__super__.removeById.call(this, taskID); - }; - - TasksModel.prototype["delete"] = function(task, clearCache) { - var counter, data, entry, _i, _len, _ref; - if (clearCache === null) { - clearCache = true; - } - _ref = this._data; - for (counter = _i = 0, _len = _ref.length; _i < _len; counter = ++_i) { - entry = _ref[counter]; - if (entry === task) { - this._data.splice(counter, 1); - data = this._dataMap[task.uri]; - delete this._dataMap[task.uri]; - if (clearCache) { - this._invalidateCache(); - } - return data; - } - } - }; - - TasksModel.prototype.removeByList = function(listID) { - var id, task, taskIDs, tasks, _i, _j, _len, _len1, _results; - tasks = this.getAll(); - taskIDs = []; - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (task.calendarid === listID) { - taskIDs.push(task.id); - } - } - _results = []; - for (_j = 0, _len1 = taskIDs.length; _j < _len1; _j++) { - id = taskIDs[_j]; - _results.push(this.removeById(id)); - } - return _results; - }; - - TasksModel.prototype.taskAtDay = function(task, date) { - var diff, due, duediff, start, startdiff; - start = moment(task.start, "YYYYMMDDTHHmmss"); - due = moment(task.due, "YYYYMMDDTHHmmss"); - if (start.isValid() && !due.isValid()) { - diff = start.diff(moment().startOf('day'), 'days', true); - if (!date && diff < date + 1) { - return true; - } else if (diff < date + 1 && diff >= date) { - return true; - } - } - if (due.isValid() && !start.isValid()) { - diff = due.diff(moment().startOf('day'), 'days', true); - if (!date && diff < date + 1) { - return true; - } else if (diff < date + 1 && diff >= date) { - return true; - } - } - if (start.isValid() && due.isValid()) { - startdiff = start.diff(moment().startOf('day'), 'days', true); - duediff = due.diff(moment().startOf('day'), 'days', true); - if (!date && (startdiff < date + 1 || duediff < date + 1)) { - return true; - } else if (startdiff < date + 1 && startdiff >= date && duediff >= date) { - return true; - } else if (duediff < date + 1 && duediff >= date && startdiff >= date) { - return true; - } - } - return false; - }; - - TasksModel.prototype.isLoaded = function(task) { - if (this.getById(task.id)) { - return true; - } else { - return false; - } - }; - - TasksModel.prototype.hasSubtasks = function(uid) { - var task, tasks, _i, _len; - tasks = this.getAll(); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (task.related === uid) { - return true; - } - } - return false; - }; - - TasksModel.prototype.hasCompletedSubtasks = function(uid) { - var task, tasks, _i, _len; - tasks = this.getAll(); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (task.related === uid && task.completed) { - return true; - } - } - return false; - }; - - TasksModel.prototype.hasNoParent = function(task) { - var t, tasks, _i, _len; - if (!task.related) { - return true; - } else { - tasks = this.getAll(); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - t = tasks[_i]; - if (task.related === t.uid && task !== t) { - return false; - } - } - return true; - } - }; - - TasksModel.prototype.getIdByUid = function(uid) { - var task, tasks, _i, _len; - tasks = this.getAll(); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (task.uid === uid) { - return task.id; - } - } - return false; - }; - - TasksModel.prototype.getByUid = function(uid) { - var task, tasks, _i, _len; - tasks = this.getAll(); - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (task.uid === uid) { - return task; - } - } - return null; - }; - - TasksModel.prototype.getChildren = function(task) { - var children, t, tasks, _i, _len; - tasks = this.getAll(); - children = []; - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - t = tasks[_i]; - if (t.related === task.uid && t !== task) { - children.push(t); - } - } - return children; - }; - - TasksModel.prototype.getDescendantIDs = function(task) { - var child, children, descendantIDs, _i, _len; - children = this.getChildren(task); - descendantIDs = []; - for (_i = 0, _len = children.length; _i < _len; _i++) { - child = children[_i]; - descendantIDs = descendantIDs.concat(child.uri); - descendantIDs = descendantIDs.concat(this.getDescendantIDs(child)); - } - return descendantIDs; - }; - - TasksModel.prototype.filterTasks = function(task, filter) { - switch (filter) { - case 'completed': - return task.completed === true; - case 'all': - return task.completed === false; - case 'current': - return task.completed === false && this.current(task.start, task.due); - case 'starred': - return task.completed === false && task.priority > 5; - case 'today': - return task.completed === false && (this.today(task.start) || this.today(task.due)); - case 'week': - return task.completed === false && (this.week(task.start) || this.week(task.due)); - default: - return '' + task.calendar.uri === '' + filter; - } - }; - - TasksModel.prototype.filteredTasks = function(needle) { - var ancestors, parentID, ret, task, tasks, _i, _len; - ret = []; - tasks = this.getAll(); - if (!needle) { - ret = tasks; - } else { - for (_i = 0, _len = tasks.length; _i < _len; _i++) { - task = tasks[_i]; - if (this.filterTasksByString(task, needle)) { - if (this.objectExists(task, ret)) { - continue; - } - ret.push(task); - parentID = this.getIdByUid(task.related); - ancestors = this.getAncestor(parentID, ret); - if (ancestors) { - ret = ret.concat(ancestors); - } - } - } - } - return ret; - }; - - TasksModel.prototype.objectExists = function(task, ret) { - var re, _i, _len; - for (_i = 0, _len = ret.length; _i < _len; _i++) { - re = ret[_i]; - if (re.id === task.id) { - return true; - } - } - return false; - }; - - TasksModel.prototype.filterTasksByString = function(task, filter) { - var category, comment, key, keys, value, _i, _j, _len, _len1, _ref, _ref1; - keys = ['name', 'note', 'location', 'categories', 'comments']; - filter = filter.toLowerCase(); - for (key in task) { - value = task[key]; - if (__indexOf.call(keys, key) >= 0) { - if (key === 'comments') { - _ref = task.comments; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - comment = _ref[_i]; - if (comment.comment.toLowerCase().indexOf(filter) !== -1) { - return true; - } - } - } else if (key === 'categories') { - _ref1 = task.categories; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - category = _ref1[_j]; - if (category.toLowerCase().indexOf(filter) !== -1) { - return true; - } - } - } else if (value.toLowerCase().indexOf(filter) !== -1) { - return true; - } - } - } - return false; - }; - - TasksModel.prototype.setReminder = function(taskID, reminder) { - return this.update({ - id: taskID, - reminder: reminder - }); - }; - - TasksModel.prototype.overdue = function(due) { - return moment(due, "YYYYMMDDTHHmmss").isValid() && moment(due, "YYYYMMDDTHHmmss").diff(moment()) < 0; - }; - - TasksModel.prototype.due = function(due) { - return moment(due, 'YYYYMMDDTHHmmss').isValid(); - }; - - TasksModel.prototype.today = function(due) { - return moment(due, "YYYYMMDDTHHmmss").isValid() && moment(due, "YYYYMMDDTHHmmss").diff(moment().startOf('day'), 'days', true) < 1; - }; - - TasksModel.prototype.week = function(due) { - return moment(due, "YYYYMMDDTHHmmss").isValid() && moment(due, "YYYYMMDDTHHmmss").diff(moment().startOf('day'), 'days', true) < 7; - }; - - TasksModel.prototype.current = function(start, due) { - return !moment(start, "YYYYMMDDTHHmmss").isValid() || moment(start, "YYYYMMDDTHHmmss").diff(moment(), 'days', true) < 0 || moment(due, "YYYYMMDDTHHmmss").diff(moment(), 'days', true) < 0; - }; - - TasksModel.prototype.addComment = function(comment) { - var task; - task = this.getById(comment.taskID); - if (task.comments) { - task.comments.push(comment); - } else { - task.comments = [comment]; - } - }; - - TasksModel.prototype.updateComment = function(comment) { - var com, i, task, _i, _len, _ref, _results; - task = this.getById(comment.taskID); - i = 0; - _ref = task.comments; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - com = _ref[_i]; - if (com.tmpID === comment.tmpID) { - task.comments[i] = comment; - break; - } - _results.push(i++); - } - return _results; - }; - - TasksModel.prototype.deleteComment = function(taskID, commentID) { - var comment, i, task, _i, _len, _ref, _results; - task = this.getById(taskID); - i = 0; - _ref = task.comments; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - comment = _ref[_i]; - if (comment.id === commentID) { - task.comments.splice(i, 1); - break; - } - _results.push(i++); - } - return _results; - }; - - return TasksModel; - - })(_Model); - return new TasksModel(); - } - ]); - -}).call(this); - -angular.module('Tasks').factory('VTodo', ['$filter', 'ICalFactory', 'RandomStringService', - function($filter, icalfactory, RandomStringService) { - 'use strict'; - - function VTodo(calendar, props, uri) { - var _this = this; - - angular.extend(this, { - calendar: calendar, - data: props['{urn:ietf:params:xml:ns:caldav}calendar-data'], - uri: uri, - etag: props['{DAV:}getetag'] || null, - timers: [], - loaded: false - }); - - this.jCal = ICAL.parse(this.data); - this.components = new ICAL.Component(this.jCal); - - if (this.components.jCal.length === 0) { - throw "invalid calendar"; - } - } - - VTodo.prototype = { - get summary() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('summary'); - }, - set summary(summary) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('summary', summary); - this.updateLastModified(); - this.data = this.components.toString(); - }, - get priority() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - var priority = vtodos[0].getFirstPropertyValue('priority'); - return (10 - priority) % 10; - }, - set priority(priority) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('priority', (10 - priority) % 10); - this.updateLastModified(); - this.data = this.components.toString(); - }, - get complete() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('percent-complete') || 0; - }, - set complete(complete) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('percent-complete', complete); - this.updateLastModified(); - this.data = this.components.toString(); - if (complete < 100) { - this.completed = null; - if (complete === 0) { - this.status = 'NEEDS-ACTION'; - } else { - this.status = 'IN-PROCESS'; - } - } else { - this.completed = ICAL.Time.now(); - this.status = 'COMPLETED'; - } - }, - get completed() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - var comp = vtodos[0].getFirstPropertyValue('completed'); - if (comp) { - return true; - } else { - return false; - } - }, - set completed(completed) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - if (completed) { - vtodos[0].updatePropertyWithValue('completed', completed); - } else { - vtodos[0].removeProperty('completed'); - } - this.updateLastModified(); - this.data = this.components.toString(); - }, - get completed_date() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - var comp = vtodos[0].getFirstPropertyValue('completed'); - if (comp) { - return comp.toJSDate(); - } else { - return null; - } - }, - get status() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('status'); - }, - set status(status) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('status', status); - this.updateLastModified(); - this.data = this.components.toString(); - }, - get note() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('description') || ''; - }, - set note(note) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('description', note); - this.updateLastModified(); - this.data = this.components.toString(); - }, - get uid() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('uid') || ''; - }, - get related() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('related-to') || null; - }, - set related(related) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - if (related) { - vtodos[0].updatePropertyWithValue('related-to', related); - } else { - vtodos[0].removeProperty('related-to'); - } - this.updateLastModified(); - this.data = this.components.toString(); - }, - get hideSubtasks() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return +vtodos[0].getFirstPropertyValue('x-oc-hidesubtasks') || 0; - }, - set hideSubtasks(hide) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('x-oc-hidesubtasks', +hide); - this.updateLastModified(); - this.data = this.components.toString(); - }, - get hideCompletedSubtasks() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return +vtodos[0].getFirstPropertyValue('x-oc-hidecompletedsubtasks') || 0; - }, - set hideCompletedSubtasks(hide) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('x-oc-hidecompletedsubtasks', +hide); - this.updateLastModified(); - this.data = this.components.toString(); - }, - get reminder() { - return null; - }, - get categories() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - var categories = vtodos[0].getFirstProperty('categories'); - if (categories) { - return categories.getValues(); - } else { - return []; - } - }, - set categories(cats) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - var categories = vtodos[0].getFirstProperty('categories'); - if (cats.length > 0) { - if (categories) { - categories.setValues(cats); - } else { - var prop = new ICAL.Property('categories'); - prop.setValues(cats); - categories = vtodos[0].addProperty(prop); - } - } else { - vtodos[0].removeProperty('categories'); - } - this.updateLastModified(); - this.data = this.components.toString(); - }, - get start() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('dtstart'); - }, - set start(start) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - if (start) { - vtodos[0].updatePropertyWithValue('dtstart', start); - } else { - vtodos[0].removeProperty('dtstart'); - } - this.updateLastModified(); - this.data = this.components.toString(); - }, - get due() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - return vtodos[0].getFirstPropertyValue('due'); - }, - set due(due) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - if (due) { - vtodos[0].updatePropertyWithValue('due', due); - } else { - vtodos[0].removeProperty('due'); - } - this.updateLastModified(); - this.data = this.components.toString(); - }, - get allDay() { - var vtodos = this.components.getAllSubcomponents('vtodo'); - var start = vtodos[0].getFirstPropertyValue('dtstart'); - var due = vtodos[0].getFirstPropertyValue('due'); - var d = due ? due : start; - return d!=null && d.isDate; - }, - set allDay(allDay) { - var vtodos = this.components.getAllSubcomponents('vtodo'); - var start = vtodos[0].getFirstPropertyValue('dtstart'); - if(start) { - start.isDate = allDay; - vtodos[0].updatePropertyWithValue('dtstart', start); - } - var due = vtodos[0].getFirstPropertyValue('due'); - if(due) { - due.isDate = allDay; - vtodos[0].updatePropertyWithValue('due', due); - } - this.updateLastModified(); - this.data = this.components.toString(); - }, - get comments() { - return null; - }, - get loadedCompleted () { - return this.loaded; - }, - set loadedCompleted (loadedCompleted) { - this.loaded = loadedCompleted; - }, - updateLastModified () { - var vtodos = this.components.getAllSubcomponents('vtodo'); - vtodos[0].updatePropertyWithValue('last-modified', ICAL.Time.now()); - vtodos[0].updatePropertyWithValue('dtstamp', ICAL.Time.now()); - } - }; - - VTodo.create = function(task) { - var comp = icalfactory.new(); - - var vtodo = new ICAL.Component('vtodo'); - comp.addSubcomponent(vtodo); - vtodo.updatePropertyWithValue('created', ICAL.Time.now()); - vtodo.updatePropertyWithValue('dtstamp', ICAL.Time.now()); - vtodo.updatePropertyWithValue('last-modified', ICAL.Time.now()); - vtodo.updatePropertyWithValue('uid', RandomStringService.generate()); - vtodo.updatePropertyWithValue('summary', task.summary); - vtodo.updatePropertyWithValue('priority', task.priority); - vtodo.updatePropertyWithValue('percent-complete', task.complete); - vtodo.updatePropertyWithValue('x-oc-hidesubtasks', 0); - if (task.related) { - vtodo.updatePropertyWithValue('related-to', task.related); - } - if (task.note) { - vtodo.updatePropertyWithValue('description', task.note); - } - if (task.due) { - vtodo.updatePropertyWithValue('due', task.due); - } - if (task.start) { - vtodo.updatePropertyWithValue('dtstart', task.start); - } - - return new VTodo(task.calendar, { - '{urn:ietf:params:xml:ns:caldav}calendar-data': comp.toString(), - '{DAV:}getetag': null - }, null); - }; - - return VTodo; -}]); - -angular.module('Tasks').factory('Persistence', [ - 'Request', 'Loading', '$rootScope', '$q', 'CalendarService', function(Request, Loading, $rootScope, $q, CalendarService) { - 'use strict'; - var Persistence = (function() { - function Persistence(_request, _Loading, _$rootScope, _CalendarService) { - this._request = _request; - this._Loading = _Loading; - this._$rootScope = _$rootScope; - this._CalendarService = _CalendarService; - } - - Persistence.prototype.init = function() { - var successCallback, - _this = this; - this.deferred = $q.defer(); - successCallback = function() { - return _this.deferred.resolve(); - }; - this.getCollections(); - this.getSettings(); - return this.deferred.promise; - }; - - Persistence.prototype.getCollections = function(onSuccess, showLoading) { - var failureCallbackWrapper, params, successCallbackWrapper, - _this = this; - if (showLoading === null) { - showLoading = true; - } - if (!onSuccess) { - onSuccess = function() {}; - } - if (showLoading) { - this._Loading.increase(); - successCallbackWrapper = function(data) { - onSuccess(); - return _this._Loading.decrease(); - }; - failureCallbackWrapper = function(data) { - return _this._Loading.decrease(); - }; - } else { - successCallbackWrapper = function(data) { - return onSuccess(); - }; - failureCallbackWrapper = function(data) {}; - } - params = { - onSuccess: successCallbackWrapper, - onFailure: failureCallbackWrapper - }; - return this._request.get('/apps/tasks/collections', params); - }; - - Persistence.prototype.getSettings = function(onSuccess, showLoading) { - var failureCallbackWrapper, params, successCallbackWrapper, - _this = this; - if (showLoading === null) { - showLoading = true; - } - if (!onSuccess) { - onSuccess = function() {}; - } - if (showLoading) { - this._Loading.increase(); - successCallbackWrapper = function(data) { - onSuccess(); - return _this._Loading.decrease(); - }; - failureCallbackWrapper = function(data) { - return _this._Loading.decrease(); - }; - } else { - successCallbackWrapper = function(data) { - return onSuccess(); - }; - failureCallbackWrapper = function(data) {}; - } - params = { - onSuccess: successCallbackWrapper, - onFailure: failureCallbackWrapper - }; - return this._request.get('/apps/tasks/settings', params); - }; - - Persistence.prototype.setVisibility = function(collectionID, visibility) { - var params = { - routeParams: { - collectionID: collectionID, - visibility: visibility - } - }; - return this._request.post('/apps/tasks/collection/{collectionID}/visibility/{visibility}', params); - }; - - Persistence.prototype.setting = function(type, setting, value) { - var params = { - routeParams: { - type: type, - setting: setting, - value: value - } - }; - return this._request.post('/apps/tasks/settings/{type}/{setting}/{value}', params); - }; - return Persistence; - })(); - return new Persistence(Request, Loading, $rootScope, CalendarService); - } -]); - -angular.module('Tasks').factory('Publisher', [ - 'CollectionsModel', 'SettingsModel', function(CollectionsModel, SettingsModel) { - 'use strict'; - var Publisher = (function() { - function Publisher(_$collectionsmodel, _$settingsmodel) { - this._$collectionsmodel = _$collectionsmodel; - this._$settingsmodel = _$settingsmodel; - this._subscriptions = {}; - this.subscribeObjectTo(this._$collectionsmodel, 'collections'); - this.subscribeObjectTo(this._$settingsmodel, 'settings'); - } - - Publisher.prototype.subscribeObjectTo = function(object, name) { - var base = this._subscriptions; - if (!base[name]) { - base[name] = []; - } - return this._subscriptions[name].push(object); - }; - - Publisher.prototype.publishDataTo = function(data, name) { - var ref, results, subscriber, _i, _len; - ref = this._subscriptions[name] || []; - results = []; - for (_i = 0, _len = ref.length; _i < _len; _i++) { - subscriber = ref[_i]; - results.push(subscriber.handle(data)); - } - return results; - }; - return Publisher; - })(); - return new Publisher(CollectionsModel, SettingsModel); - } -]); - -angular.module('Tasks').factory('RandomStringService', function () { - 'use strict'; - - return { - generate: function() { - return Math.random().toString(36).substr(2); - } - }; -}); - -angular.module('Tasks').factory('Request', [ - '$http', 'Publisher', function($http, Publisher) { - 'use strict'; - var Request = (function() { - function Request($http, publisher) { - this.$http = $http; - this.publisher = publisher; - this.count = 0; - this.initialized = false; - this.shelvedRequests = []; - this.initialized = true; - this._executeShelvedRequests(); - } - - Request.prototype.request = function(route, data) { - var defaultConfig, defaultData, url; - if (data === null) { - data = {}; - } - defaultData = { - routeParams: {}, - data: {}, - onSuccess: function() { - return {}; - }, - onFailure: function() { - return {}; - }, - config: {} - }; - angular.extend(defaultData, data); - if (!this.initialized) { - this._shelveRequest(route, defaultData); - return; - } - url = OC.generateUrl(route, defaultData.routeParams); - defaultConfig = { - url: url, - data: defaultData.data - }; - angular.extend(defaultConfig, defaultData.config); - if (defaultConfig.method === 'GET') { - defaultConfig.params = defaultConfig.data; - } - return this.$http(defaultConfig).then((function(_this) { - return function(response) { - var name, ref, value; - ref = response.data.data; - for (name in ref) { - value = ref[name]; - _this.publisher.publishDataTo(value, name); - } - return defaultData.onSuccess(response.data, response.status, response.headers, response.config); - }; - })(this)).catch(function(response) { - return defaultData.onFailure(response.data, response.status, response.headers, response.config); - }); - }; - - Request.prototype.post = function(route, data) { - if (data === null) { - data = {}; - } - if (!data.config) { - data.config = {}; - } - data.config.method = 'POST'; - return this.request(route, data); - }; - - Request.prototype.get = function(route, data) { - if (data === null) { - data = {}; - } - if (!data.config) { - data.config = {}; - } - data.config.method = 'GET'; - return this.request(route, data); - }; - - Request.prototype.put = function(route, data) { - if (data === null) { - data = {}; - } - if (!data.config) { - data.config = {}; - } - data.config.method = 'PUT'; - return this.request(route, data); - }; - - Request.prototype["delete"] = function(route, data) { - if (data === null) { - data = {}; - } - if (!data.config) { - data.config = {}; - } - data.config.method = 'DELETE'; - return this.request(route, data); - }; - - Request.prototype._shelveRequest = function(route, data) { - var request = { - route: route, - data: data - }; - return this.shelvedRequests.push(request); - }; - - Request.prototype._executeShelvedRequests = function() { - var r, ref, results, _i, _len; - ref = this.shelvedRequests; - results = []; - for (_i = 0, _len = ref.length; _i < _len; _i++) { - r = ref[_i]; - results.push(this.request(r.route, r.data)); - } - return results; - }; - return Request; - })(); - return new Request($http, Publisher); - } -]); - -angular.module('Tasks').factory('Status', [ - function() { - 'use strict'; - var Status; - Status = (function() { - function Status() { - this._$status = { - addingList: false, - focusTaskInput: false - }; - } - - Status.prototype.getStatus = function() { - return this._$status; - }; - - return Status; - - })(); - return new Status(); - } -]); - -angular.module('Tasks').service('VTodoService', ['DavClient', 'RandomStringService', '$timeout', function(DavClient, RandomStringService, $timeout) { - 'use strict'; - - var _this = this; - - this.getAll = function(calendar, completed, parent) { - if (completed === null) { - completed = false; - } - if (parent === null) { - parent = false; - } - var xmlDoc = document.implementation.createDocument('', '', null); - var cCalQuery = xmlDoc.createElement('c:calendar-query'); - cCalQuery.setAttribute('xmlns:c', 'urn:ietf:params:xml:ns:caldav'); - cCalQuery.setAttribute('xmlns:d', 'DAV:'); - cCalQuery.setAttribute('xmlns:a', 'http://apple.com/ns/ical/'); - cCalQuery.setAttribute('xmlns:o', 'http://owncloud.org/ns'); - xmlDoc.appendChild(cCalQuery); - - var dProp = xmlDoc.createElement('d:prop'); - cCalQuery.appendChild(dProp); - - var dGetEtag = xmlDoc.createElement('d:getetag'); - dProp.appendChild(dGetEtag); - - var cCalendarData = xmlDoc.createElement('c:calendar-data'); - dProp.appendChild(cCalendarData); - - var cFilter = xmlDoc.createElement('c:filter'); - cCalQuery.appendChild(cFilter); - - var cCompFilterVCal = xmlDoc.createElement('c:comp-filter'); - cCompFilterVCal.setAttribute('name', 'VCALENDAR'); - cFilter.appendChild(cCompFilterVCal); - - var cCompFilterVTodo = xmlDoc.createElement('c:comp-filter'); - cCompFilterVTodo.setAttribute('name', 'VTODO'); - cCompFilterVCal.appendChild(cCompFilterVTodo); - - var cPropFilterCompleted = xmlDoc.createElement('c:prop-filter'); - cPropFilterCompleted.setAttribute('name', 'COMPLETED'); - cCompFilterVTodo.appendChild(cPropFilterCompleted); - - if (!completed) { - var cIsNotDefined = xmlDoc.createElement('c:is-not-defined'); - cPropFilterCompleted.appendChild(cIsNotDefined); - } - - if (parent) { - var cPropFilterRelated = xmlDoc.createElement('c:prop-filter'); - cPropFilterRelated.setAttribute('name', 'RELATED-TO'); - cCompFilterVTodo.appendChild(cPropFilterRelated); - var cTextMatch = xmlDoc.createElement('c:text-match'); - var cTextMatchValue = xmlDoc.createTextNode(parent.uid); - cTextMatch.appendChild(cTextMatchValue); - cPropFilterRelated.appendChild(cTextMatch); - } - - // var cPropFilterStatus = xmlDoc.createElement('c:prop-filter'); - // cPropFilterStatus.setAttribute('name', 'STATUS'); - // cCompFilterVTodo.appendChild(cPropFilterStatus); - - // var cTextMatch = xmlDoc.createElement('c:text-match'); - // cTextMatch.setAttribute('negate-condition', 'yes'); - // var cTextMatchValue = xmlDoc.createTextNode('CANCELLED'); - // cTextMatch.appendChild(cTextMatchValue); - // cPropFilterStatus.appendChild(cTextMatch); - - // var cTimeRange = xmlDoc.createElement('c:time-range'); - // cTimeRange.setAttribute('start', this._getTimeRangeStamp(start)); - // cTimeRange.setAttribute('end', this._getTimeRangeStamp(end)); - // cCompFilterVTodo.appendChild(cTimeRange); - - var url = calendar.url; - var headers = { - 'Content-Type': 'application/xml; charset=utf-8', - 'Depth': 1, - 'requesttoken': OC.requestToken - }; - var body = cCalQuery.outerHTML; - - return DavClient.request('REPORT', url, headers, body).then(function(response) { - if (!DavClient.wasRequestSuccessful(response.status)) { - //TODO - something went wrong - return; - } - - var vTodos = []; - - for (var i in response.body) { - var object = response.body[i]; - var properties = object.propStat[0].properties; - - var uri = object.href.substr(object.href.lastIndexOf('/') + 1); - - var vTodo = { - calendar: calendar, - properties: properties, - uri: uri - }; - vTodos.push(vTodo); - } - - return vTodos; - }); - }; - - this.get = function(calendar, uri) { - var url = calendar.url + uri; - return DavClient.request('GET', url, {'requesttoken' : OC.requestToken}, '').then(function(response) { - var vTodo = { - calendar: calendar, - properties: { - '{urn:ietf:params:xml:ns:caldav}calendar-data': response.body, - '{DAV:}getetag': response.xhr.getResponseHeader('ETag')}, - uri: uri - }; - return vTodo; - }); - }; - - this.create = function(calendar, data, returnTodo) { - if (typeof returnTodo === 'undefined') { - returnTodo = true; - } - - var headers = { - 'Content-Type': 'text/calendar; charset=utf-8', - 'requesttoken': OC.requestToken - }; - var uri = this._generateRandomUri(); - var url = calendar.url + uri; - - return DavClient.request('PUT', url, headers, data).then(function(response) { - if (!DavClient.wasRequestSuccessful(response.status)) { - console.log(response); - return false; - // TODO - something went wrong, do smth about it - } - - return returnTodo ? - _this.get(calendar, uri) : - true; - }); - }; - - this.update = function(task) { - var url = task.calendar.url + task.uri; - var headers = { - 'Content-Type': 'text/calendar; charset=utf-8', - 'If-Match': task.etag, - 'requesttoken': OC.requestToken - }; - $timeout.cancel(task.timers.update); - return DavClient.request('PUT', url, headers, task.data).then(function(response) { - task.etag = response.xhr.getResponseHeader('ETag'); - return DavClient.wasRequestSuccessful(response.status); - }); - }; - - this.delete = function(task) { - var url = task.calendar.url + task.uri; - var headers = { - 'If-Match': task.etag, - 'requesttoken': OC.requestToken - }; - - return DavClient.request('DELETE', url, headers, '').then(function(response) { - return DavClient.wasRequestSuccessful(response.status); - }); - }; - - this._generateRandomUri = function() { - var uri = 'Nextcloud-'; - uri += RandomStringService.generate(); - uri += RandomStringService.generate(); - uri += '.ics'; - - return uri; - }; - - // this._getTimeRangeStamp = function(momentObject) { - // return momentObject.format('YYYYMMDD') + 'T' + momentObject.format('HHmmss') + 'Z'; - // }; - -}]); diff --git a/js/public/app.min.js b/js/public/app.min.js new file mode 100644 index 000000000..b2b9df884 --- /dev/null +++ b/js/public/app.min.js @@ -0,0 +1,4 @@ +!function(e,r,s){"use strict";angular.module("Tasks",["ngRoute","ngAnimate","ui.select","ngSanitize","dndLists"]).config(["$provide","$routeProvider","$interpolateProvider","$httpProvider",function(t,e,n,s){t.value("Config",{markReadTimeout:500,taskUpdateInterval:6e5}),s.defaults.headers.common.requesttoken=r,e.when("/calendars/:calendarID",{}).when("/calendars/:calendarID/edit/:listparameter",{}).when("/calendars/:calendarID/tasks/:taskID",{}).when("/calendars/:calendarID/tasks/:taskID/settings",{}).when("/calendars/:calendarID/tasks/:taskID/edit/:parameter",{}).when("/collections/:collectionID/tasks/:taskID",{}).when("/collections/:collectionID/tasks/:taskID/settings",{}).when("/collections/:collectionID/tasks/:taskID/edit/:parameter",{}).when("/collections/:collectionID",{}).when("/search/:searchString",{}).when("/search/:searchString/tasks/:taskID",{}).when("/search/:searchString/tasks/:taskID/edit/:parameter",{}).otherwise({redirectTo:"/collections/all"})}]),angular.module("Tasks").run(["$document","$rootScope","Config","$timeout","ListsBusinessLayer","TasksBusinessLayer","SearchBusinessLayer",function(e,n,r,s,a,o,i){var u,c=!1;return(u=function(){var t;return t=function(){return s(u,r.taskUpdateInterval)},c=!0,t()}).call(),OCA.Search.tasks=i,e.click(function(t){n.$broadcast("documentClicked",t)}),moment.locale("details",{calendar:{lastDay:"["+t("tasks","Due yesterday")+"], HH:mm",sameDay:"["+t("tasks","Due today")+"], HH:mm",nextDay:"["+t("tasks","Due tomorrow")+"], HH:mm",lastWeek:"["+t("tasks","Due on")+"] MMM DD, YYYY, HH:mm",nextWeek:"["+t("tasks","Due on")+"] MMM DD, YYYY, HH:mm",sameElse:"["+t("tasks","Due on")+"] MMM DD, YYYY, HH:mm"}}),moment.locale("details_allday",{calendar:{lastDay:"["+t("tasks","Due yesterday")+"]",sameDay:"["+t("tasks","Due today")+"]",nextDay:"["+t("tasks","Due tomorrow")+"]",lastWeek:"["+t("tasks","Due on")+"] MMM DD, YYYY",nextWeek:"["+t("tasks","Due on")+"] MMM DD, YYYY",sameElse:"["+t("tasks","Due on")+"] MMM DD, YYYY"}}),moment.locale("start",{calendar:{lastDay:"["+t("tasks","Started yesterday")+"], HH:mm",sameDay:"["+t("tasks","Starts today")+"], HH:mm",nextDay:"["+t("tasks","Starts tomorrow")+"], HH:mm",lastWeek:"["+t("tasks","Started on")+"] MMM DD, YYYY, HH:mm",nextWeek:"["+t("tasks","Starts on")+"] MMM DD, YYYY, HH:mm",sameElse:function(){return this.diff(moment())>0?"["+t("tasks","Starts on")+"] MMM DD, YYYY, HH:mm":"["+t("tasks","Started on")+"] MMM DD, YYYY, HH:mm"}}}),moment.locale("start_allday",{calendar:{lastDay:"["+t("tasks","Started yesterday")+"]",sameDay:"["+t("tasks","Starts today")+"]",nextDay:"["+t("tasks","Starts tomorrow")+"]",lastWeek:"["+t("tasks","Started on")+"] MMM DD, YYYY",nextWeek:"["+t("tasks","Starts on")+"] MMM DD, YYYY",sameElse:function(){return this.diff(moment())>0?"["+t("tasks","Starts on")+"] MMM DD, YYYY":"["+t("tasks","Started on")+"] MMM DD, YYYY"}}}),moment.locale("reminder",{calendar:{lastDay:t("tasks","[Remind me yesterday at ]HH:mm"),sameDay:t("tasks","[Remind me today at ]HH:mm"),nextDay:t("tasks","[Remind me tomorrow at ]HH:mm"),lastWeek:t("tasks","[Remind me on ]MMM DD, YYYY,[ at ]HH:mm"),nextWeek:t("tasks","[Remind me on ]MMM DD, YYYY,[ at ]HH:mm"),sameElse:t("tasks","[Remind me on ]MMM DD, YYYY,[ at ]HH:mm")}}),moment.locale("tasks",{calendar:{lastDay:"["+t("tasks","Yesterday")+"]",sameDay:"["+t("tasks","Today")+"]",nextDay:"["+t("tasks","Tomorrow")+"]",lastWeek:"DD.MM.YYYY",nextWeek:"DD.MM.YYYY",sameElse:"DD.MM.YYYY"}}),moment.locale("details_short",{calendar:{lastDay:"["+t("tasks","Yesterday")+"]",sameDay:"["+t("tasks","Today")+"]",nextDay:"["+t("tasks","Tomorrow")+"]",lastWeek:"MMM DD, YYYY",nextWeek:"MMM DD, YYYY",sameElse:"MMM DD, YYYY"}}),moment.locale("list_week",{calendar:{lastDay:"["+t("tasks","Yesterday")+"]",sameDay:"["+t("tasks","Today")+"], MMM. DD",nextDay:"["+t("tasks","Tomorrow")+"], MMM. DD",lastWeek:"ddd, MMM. DD",nextWeek:"ddd, MMM. DD",sameElse:"ddd, MMM. DD"}}),moment.locale("en",{relativeTime:{future:t("tasks","in %s"),past:t("tasks","%s ago"),s:t("tasks","seconds"),m:t("tasks","a minute"),mm:t("tasks","%d minutes"),h:t("tasks","an hour"),hh:t("tasks","%d hours"),d:t("tasks","a day"),dd:t("tasks","%d days"),M:t("tasks","a month"),MM:t("tasks","%d months"),y:t("tasks","a year"),yy:t("tasks","%d years")}})}]),angular.module("Tasks").controller("AppController",["$scope","$rootScope","ListsBusinessLayer","$route","Status","$timeout","$location","$routeParams","Loading","SettingsModel","Persistence",function(t,n,r,s,a,o,i,u,c,l,d){return new(function(){function n(n,r,s,a,o,i,u,c,l,d,p){this._$scope=n,this._$listsbusinesslayer=s,this._$route=a,this._$status=o,this._$timeout=i,this._$location=u,this._$routeparams=c,this._Loading=l,this._$settingsmodel=d,this._persistence=p,this._$scope.status=this._$status.getStatus(),this._$scope.route=this._$routeparams,this._$scope.status.newListName="",this._$scope.settingsmodel=this._$settingsmodel,this._$listsbusinesslayer.init().then(function(e){Promise.all(e).then(function(){t.$apply()})}),this._persistence.init(),this._$scope.closeAll=function(t){(e(t.target).closest(".close-all").length||e(t.currentTarget).is(e(t.target).closest(".handler")))&&(angular.isUndefined(n.route.calendarID)?angular.isUndefined(n.route.collectionID)?u.path("/collections/all"):u.path("/collections/"+n.route.collectionID):("name"===n.route.listparameter&&r.$broadcast("cancelEditCalendar",n.route.calendarID),u.path("/calendars/"+n.route.calendarID)),n.status.addingList=!1,n.status.focusTaskInput=!1,n.status.newListName=""),e(t.target).closest(".newList").length||(n.status.addingList=!1,n.status.newListName=""),e(t.target).closest(".add-subtask").length||(n.status.addSubtaskTo=null,n.status.focusSubtaskInput=!1)},this._$scope.isLoading=function(){return l.isLoading()}}return n}())(t,n,r,s,a,o,i,u,c,l,d)}]),angular.module("Tasks").controller("DetailsController",["$scope","$window","TasksModel","TasksBusinessLayer","$route","$location","$timeout","$routeParams","SettingsModel","Loading","ListsModel",function(n,r,s,a,o,i,u,c,l,d,p){return new(function(){function r(r,s,a,o,u,c,l,d,p,m,h){this._$scope=r,this._$window=s,this._$tasksmodel=a,this._$listsmodel=h,this._tasksbusinesslayer=o,this._$route=u,this._$location=c,this._$timeout=l,this._$routeparams=d,this._$settingsmodel=p,this._Loading=m,this._$scope.task=a.getById(r.route.taskID),this._$scope.found=!0,this._$scope.$on("$routeChangeSuccess",function(){var t=a.getByUri(r.route.taskID);angular.isUndefined(t)||null===t?void 0!==r.route.taskID&&(r.found=!1):(r.task=t,r.task.cats=t.categories,r.found=!0)}),this._$scope.settingsmodel=this._$settingsmodel,this._$scope.settingsmodel.add({id:"various",categories:[]}),this._$scope.isAddingComment=!1,this._$scope.timers=[],this._$scope.durations=[{name:t("tasks","week"),names:t("tasks","weeks"),id:"week"},{name:t("tasks","day"),names:t("tasks","days"),id:"day"},{name:t("tasks","hour"),names:t("tasks","hours"),id:"hour"},{name:t("tasks","minute"),names:t("tasks","minutes"),id:"minute"},{name:t("tasks","second"),names:t("tasks","seconds"),id:"second"}],this._$scope.loadTask=function(t){var e=a.getByUri(r.route.taskID);angular.isUndefined(e)||null===e||(r.task=e,r.found=!0)},this._$scope.TaskState=function(){return r.found?"found":m.isLoading()?"loading":null},this._$scope.params=[{name:t("tasks","before beginning"),invert:!0,related:"START",id:"10"},{name:t("tasks","after beginning"),invert:!1,related:"START",id:"00"},{name:t("tasks","before end"),invert:!0,related:"END",id:"11"},{name:t("tasks","after end"),invert:!1,related:"END",id:"01"}],this._$scope.filterParams=function(t){var e;if(e=a.getById(r.route.taskID),!angular.isUndefined(e)&&null!==e)return e.due&&e.start?t:e.start?t.slice(0,2):t.slice(2)},this._$scope.deleteTask=function(t){return l(function(){return o.deleteTask(t).then(function(){return n.$apply()})},500)},this._$scope.triggerUpdate=function(t){o.triggerUpdate(t)},this._$scope.editName=function(t,n){n.calendar.writable&&(e(t.target).is("a")||r.setEditRoute("name"))},this._$scope.editDueDate=function(t,n){n.calendar.writable&&e(t.currentTarget).is(e(t.target).closest(".handler"))&&(r.setEditRoute("duedate"),o.initDueDate(n))},this._$scope.editStart=function(t,n){n.calendar.writable&&e(t.currentTarget).is(e(t.target).closest(".handler"))&&(r.setEditRoute("startdate"),o.initStartDate(n))},this._$scope.editReminder=function(t,n){if(n.calendar.writable&&e(t.currentTarget).is(e(t.target).closest(".handler")))return r.setEditRoute("reminer"),o.initReminder(r.route.taskID)},this._$scope.editNote=function(t,n){n.calendar.writable&&e(t.currentTarget).is(e(t.target).closest(".handler"))&&(e(t.target).is("a")||r.setEditRoute("note"))},this._$scope.editPriority=function(t,n){n.calendar.writable&&e(t.currentTarget).is(e(t.target).closest(".handler"))&&r.setEditRoute("priority")},this._$scope.editPercent=function(t,n){n.calendar.writable&&e(t.currentTarget).is(e(t.target).closest(".handler"))&&r.setEditRoute("percent")},this._$scope.endEdit=function(t){(e(t.target).closest(".end-edit").length||e(t.currentTarget).is(e(t.target).closest(".handler")))&&r.resetRoute()},this._$scope.endName=function(t){if(13===t.keyCode&&(t.preventDefault(),r.resetRoute()),27===t.keyCode)return r.resetRoute()},this._$scope.setEditRoute=function(t){var e=r.route.calendarID,n=r.route.collectionID;e?i.path("/calendars/"+e+"/tasks/"+r.route.taskID+"/edit/"+t):n&&i.path("/collections/"+n+"/tasks/"+r.route.taskID+"/edit/"+t)},this._$scope.resetRoute=function(){var t=r.route.calendarID,e=r.route.collectionID;t?i.path("/calendars/"+t+"/tasks/"+r.route.taskID):e&&i.path("/collections/"+e+"/tasks/"+r.route.taskID)},this._$scope.deletePercent=function(t){return o.setPercentComplete(t,0)},this._$scope.deleteReminder=function(){return o.deleteReminderDate(r.route.taskID)},this._$scope.toggleCompleted=function(t){t.completed?o.setPercentComplete(t,0):o.setPercentComplete(t,100)},this._$scope.setPercentComplete=function(t,e){o.setPercentComplete(t,e)},this._$scope.toggleStarred=function(t){t.priority>5?o.setPriority(t,0):o.setPriority(t,9)},this._$scope.deletePriority=function(t){return o.setPriority(t,0)},this._$scope.isDue=function(t){return a.due(t)},this._$scope.isOverDue=function(t){return a.overdue(t)},this._$scope.setstartday=function(t){return o.setStart(r.task,moment(t,"MM/DD/YYYY"),"day")},this._$scope.setstarttime=function(t){return o.setStart(r.task,moment(t,"HH:mm"),"time")},this._$scope.deleteStartDate=function(t){o.deleteStartDate(t)},this._$scope.setdueday=function(t){return o.setDue(r.task,moment(t,"MM/DD/YYYY"),"day")},this._$scope.setduetime=function(t){return o.setDue(r.task,moment(t,"HH:mm"),"time")},this._$scope.deleteDueDate=function(t){o.deleteDueDate(t)},this._$scope.isAllDayPossible=function(t){return!angular.isUndefined(t)&&t.calendar.writable&&(t.due||t.start)},this._$scope.toggleAllDay=function(t){o.setAllDay(t,!t.allDay)},this._$scope.setreminderday=function(t){return o.setReminderDate(r.route.taskID,moment(t,"MM/DD/YYYY"),"day")},this._$scope.setremindertime=function(t){return o.setReminderDate(r.route.taskID,moment(t,"HH:mm"),"time")},this._$scope.reminderType=function(t){if(!angular.isUndefined(t))return null===t.reminder?moment(t.start,"YYYYMMDDTHHmmss").isValid()||moment(t.due,"YYYYMMDDTHHmmss").isValid()?"DURATION":"DATE-TIME":t.reminder.type},this._$scope.changeReminderType=function(t){return o.checkReminderDate(t.id),"DURATION"===this.reminderType(t)?t.reminder?t.reminder.type="DATE-TIME":t.reminder={type:"DATE-TIME"}:t.reminder?t.reminder.type="DURATION":t.reminder={type:"DURATION"},o.setReminder(t.id)},this._$scope.setReminderDuration=function(t){return o.setReminder(r.route.taskID)},this._$scope.addComment=function(){var t;r.CommentContent&&(r.isAddingComment=!0,t={tmpID:"newComment"+Date.now(),comment:r.CommentContent,taskID:r.route.taskID,time:moment().format("YYYYMMDDTHHmmss"),name:e("#expandDisplayName").text()},o.addComment(t,function(t){a.updateComment(t),r.isAddingComment=!1},function(){r.isAddingComment=!1}),r.CommentContent="")},this._$scope.sendComment=function(t){if(13===t.keyCode)return r.addComment()},this._$scope.deleteComment=function(t){return o.deleteComment(r.route.taskID,t)},this._$scope.commentStrings=function(){return{button:t("tasks","Comment"),input:t("tasks","Add a comment")}},this._$scope.addCategory=function(t,e){r.task.categories=r.task.cats;var n=r.settingsmodel.getById("various").categories;n.indexOf(t)<0&&n.push(t),o.doUpdate(r.task)},this._$scope.removeCategory=function(t,e){r.task.categories=r.task.cats,o.doUpdate(r.task)}}return r}())(n,r,s,a,o,i,u,c,l,d,p)}]),angular.module("Tasks").controller("ListController",["$scope","$rootScope","$window","$routeParams","ListsModel","TasksBusinessLayer","CollectionsModel","ListsBusinessLayer","$location","SearchBusinessLayer","CalendarService","TasksModel","$timeout",function(n,r,s,a,o,i,u,c,l,d,p,m,h){return new(function(){function r(r,a,o,i,u,c,l,d,p,m,h,f,g){this._$scope=r,this._$window=o,this._$routeParams=i,this._$listsmodel=u,this._$tasksmodel=f,this._$tasksbusinesslayer=c,this._$collectionsmodel=l,this._$listsbusinesslayer=d,this.$location=p,this._$timeout=g,this._$searchbusinesslayer=m,this._$calendarservice=h,this._$scope.collections=this._$collectionsmodel.getAll(),this._$scope.calendars=this._$listsmodel.getAll(),this._$scope.draggedTasks=[],this._$scope.TasksBusinessLayer=this._$tasksbusinesslayer,this._$scope.nameError=!1,this._$scope.color="#31CC7C",this._$scope.deleteMessage=function(e){return t("tasks",'This will delete the Calendar "%s" and all of its entries.').replace("%s",e.displayname)},this._$scope.delete=function(t){return d.delete(t).then(function(){return p.path("/calendars/"+u.getStandardList().uri),n.$apply()})},this._$scope.startCreate=function(){r.status.addingList=!0,r.nameError=!1,e(".hasTooltip").tooltip("hide"),g(function(){e("#newList").focus()},50)},this._$scope.create=function(){r.isNameAllowed(r.status.newListName).allowed&&(r.status.addingList=!1,r.isAddingList=!0,d.add(r.status.newListName,r.color).then(function(t){return p.path("/calendars/"+t.uri),n.$apply()}),r.status.newListName="")},this._$scope.cancelCreate=function(){e(".hasTooltip").tooltip("hide"),r.nameError=!1,r.status.addingList=!1,r.status.newListName=""},this._$scope.startEdit=function(t){r.status.addingList=!1,r.nameError=!1,e(".hasTooltip").tooltip("hide"),t.prepareUpdate(),p.path("/calendars/"+r.route.calendarID+"/edit/name"),g(function(){e("#list_"+t.uri+" input.edit").focus()},50)},this._$scope.showCalDAVUrl=function(t){r.status.addingList=!1,r.nameError=!1,p.path("/calendars/"+r.route.calendarID+"/edit/caldav"),g(function(){e("#list_"+t.uri+" input.caldav").focus()},50)},this._$scope.hideCalDAVUrl=function(){p.path("/calendars/"+r.route.calendarID)},this._$scope.download=function(t){var e=t.url;"/"===e.slice(e.length-1)&&(e=e.slice(0,e.length-1)),e+="?export",s.open(e)},this._$scope.checkNew=function(t,e){r.checkName(t,e)},this._$scope.checkEdit=function(t,e){r.checkName(t,e.displayname,e.uri),27===t.keyCode&&r.cancelEdit(e)},this._$scope.checkName=function(t,n,s){var a=r.isNameAllowed(n,s),o=e(t.currentTarget);a.allowed?(o.tooltip("hide"),r.nameError=!1):(o.attr("title",a.msg).tooltip({placement:"bottom",trigger:"manual"}).tooltip("fixTitle").tooltip("show"),r.nameError=!0),27===t.keyCode&&(t.preventDefault(),o.tooltip("hide"),r.status.addingList=!1,r.status.newListName="",r.nameError=!1)},a.$on("cancelEditCalendar",function(t,e){var n=u.getByUri(e);r.cancelEdit(n)}),this._$scope.cancelEdit=function(t){t.resetToPreviousState(),e(".hasTooltip").tooltip("hide"),r.nameError=!1,p.path("/calendars/"+r.route.calendarID)},this._$scope.saveEdit=function(t){r.isNameAllowed(t.displayname,t.uri).allowed&&(d.rename(t),p.path("/calendars/"+r.route.calendarID))},this._$scope.isNameAllowed=function(e,n){var r={allowed:!1,msg:""};return u.isNameAlreadyTaken(e,n)?r.msg=t("tasks",'The name "%s" is already used.').replace("%s",e):e?r.allowed=!0:r.msg=t("tasks","An empty name is not allowed."),r},this._$scope.getCollectionCount=function(t){var e;return e=m.getFilter(),l.getCount(t,e)},this._$scope.hideCollection=function(t){var e;switch(e=l.getById(t),e.show){case 0:return!0;case 1:return!1;case 2:return this.getCollectionCount(t)<1}},this._$scope.getCollectionString=function(t){var e;return"completed"!==t?(e=m.getFilter(),l.getCount(t,e)):""},this._$scope.getListCount=function(t,e){var n;return n=m.getFilter(),u.getCount(t,e,n)},this._$scope.dragoverList=function(t,n){var r=e(t.target).closest("li.list").attr("calendarID");return u.getByUri(r).writable},this._$scope.dropList=function(t,n,s){if("move"===t.dataTransfer.dropEffect){var a=f.getByUri(s.uri),o=e(t.target).closest("li.list").attr("calendarID"),i=u.getByUri(o);c.changeCalendar(a,i).then(function(){r.$apply()})}return!0},this._$scope.dragoverCollection=function(t,n){if("copy"===t.dataTransfer.effectAllowed||"copyMove"===t.dataTransfer.effectAllowed&&t.ctrlKey)return!1;var r;return"starred"===(r=e(t.target).closest("li.collection").attr("collectionID"))||"completed"===r||"today"===r},this._$scope.dropCollection=function(t,n,r){if("move"===t.dataTransfer.dropEffect){var s=e(t.target).closest("li.collection").attr("collectionID");c.changeCollection(r.uri,s)}return!0}}return r}())(n,r,s,a,o,i,u,c,l,d,p,m,h)}]),angular.module("Tasks").controller("SettingsController",["$scope","$window","Status","$location","CollectionsModel","SettingsBusinessLayer","SettingsModel",function(e,n,r,s,a,o,i){return new(function(){function e(e,n,r,s,a,o,i){this._$scope=e,this._$window=n,this._$status=r,this._$location=s,this._$collectionsmodel=a,this._$settingsbusinesslayer=o,this._$settingsmodel=i,this._$scope.status=this._$status.getStatus(),this._$scope.collections=this._$collectionsmodel.getAll(),this._$scope.settingsmodel=this._$settingsmodel,this._$scope.collectionOptions=[{id:0,name:t("tasks","Hidden")},{id:1,name:t("tasks","Visible")},{id:2,name:t("tasks","Automatic")}],this._$scope.startOfWeekOptions=[{id:0,name:t("tasks","Sunday")},{id:1,name:t("tasks","Monday")},{id:2,name:t("tasks","Tuesday")},{id:3,name:t("tasks","Wednesday")},{id:4,name:t("tasks","Thursday")},{id:5,name:t("tasks","Friday")},{id:6,name:t("tasks","Saturday")}],this._$scope.setVisibility=function(t){var e;return e=a.getById(t),o.setVisibility(t,e.show)},this._$scope.setStartOfWeek=function(){return o.set("various","startOfWeek",i.getById("various").startOfWeek)}}return e}())(e,n,r,s,a,o,i)}]),function(){var r=[].indexOf||function(t){for(var e=0,n=this.length;e=0)&&t.hideSubtasks)},this._$scope.showInput=function(){var t=a.route.collectionID,e=c.getByUri(a.route.calendarID);return"completed"!==t&&"week"!==t&&(!angular.isDefined(e)||e.writable)},this._$scope.focusTaskInput=function(){a.status.focusTaskInput=!0},this._$scope.focusSubtaskInput=function(){a.status.focusSubtaskInput=!0},this._$scope.openDetails=function(t,n){var r=a.route.calendarID,o=a.route.collectionID;if(null===n||e(n.currentTarget).is(e(n.target).closest(".handler"))){var i=u.getByUri(t);i.loadedCompleted||d.getAll(i.calendar,!0,i).then(function(){i.loadedCompleted=!0,s.$apply()}),r?p.path("/calendars/"+r+"/tasks/"+t):o&&p.path("/collections/"+o+"/tasks/"+t)}},this._$scope.toggleCompleted=function(t){t.completed?d.setPercentComplete(t,0):d.setPercentComplete(t,100)},this._$scope.toggleStarred=function(t){t.priority>5?d.setPriority(t,0):d.setPriority(t,9)},this._$scope.toggleHidden=function(){return m.toggle("various","showHidden")},this._$scope.filterTasks=function(t,e){return function(t){return u.filterTasks(t,e)}},this._$scope.getSubTasks=function(t,e){var n,r,s,a;for(n=[],s=0,a=t.length;s0&&(n=!0)}}t.propStat[0].properties.canWrite=n},this._isUriAlreadyTaken=function(t){return-1!==this._takenUrls.indexOf(this._CALENDAR_HOME+t+"/")},this._suggestUri=function(t){var e=t.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"");if(!this._isUriAlreadyTaken(e))return e;if(-1===e.indexOf("-")&&(e+="-1",!this._isUriAlreadyTaken(e)))return e;for(;this._isUriAlreadyTaken(e);){var n=e.lastIndexOf("-"),r=e.substr(0,n),s=e.substr(n+1);s.match(/^\d+$/)?(s=parseInt(s),s++,e=r+"-"+s):""===s?e+="1":e=e="-1"}return e}}]),angular.module("Tasks").service("DavClient",[function(){var t;return t=new dav.Client({baseUrl:OC.linkToRemote("dav/calendars"),xmlNamespaces:{"DAV:":"d","urn:ietf:params:xml:ns:caldav":"c","http://apple.com/ns/ical/":"aapl","http://owncloud.org/ns":"oc","http://nextcloud.com/ns":"nc","http://calendarserver.org/ns/":"cs"}}),angular.extend(t,{NS_DAV:"DAV:",NS_IETF:"urn:ietf:params:xml:ns:caldav",NS_APPLE:"http://apple.com/ns/ical/",NS_OWNCLOUD:"http://owncloud.org/ns",NS_NEXTCLOUD:"http://nextcloud.com/ns",NS_CALENDARSERVER:"http://calendarserver.org/ns/",buildUrl:function(t){return window.location.protocol+"//"+window.location.host+t},wasRequestSuccessful:function(t){return t>=200&&t<=299}}),t}]),angular.module("Tasks").service("ICalFactory",[function(){return{new:function(){var t=new ICAL.Component(["vcalendar",[],[]]),e=angular.element("#app").attr("data-appVersion");return t.updatePropertyWithValue("prodid","-//Nextcloud Tasks v"+e),t}}}]),angular.module("Tasks").factory("Loading",[function(){return new(function(){function t(){this.count=0}return t.prototype.increase=function(){return this.count+=1},t.prototype.decrease=function(){return this.count-=1},t.prototype.getCount=function(){return this.count},t.prototype.isLoading=function(){return this.count>0},t}())}]),function(){angular.module("Tasks").factory("_Model",[function(){return function(){function t(){this._data=[],this._dataMap={},this._filterCache={}}return t.prototype.handle=function(t){var e,n,r,s;for(s=[],n=0,r=t.length;n').append(s.removeClass("template")),n.data("result",r),n.find("span.title").text(r.name),r.starred&&n.find("span.task-star").addClass("task-starred"),r.completed&&(n.find("div.task-item").addClass("done"),n.find("span.task-checkbox").addClass("svg-checkmark")),r.complete&&n.find("div.percentdone").css({width:r.complete+"%","background-color":""+t._$listsmodel.getColor(r.calendarid)}),r.note&&n.find("div.title-wrapper").addClass("attachment"),n)},OC.Plugins.register("OCA.Search",this)},n}())(n,r,s,a,o,i)}])}.call(void 0),angular.module("Tasks").factory("SettingsBusinessLayer",["Persistence","SettingsModel",function(t,e){return new(function(){function t(t,e){this._persistence=t,this._$settingsmodel=e}return t.prototype.updateModel=function(){var t;return t=function(){},this._persistence.getCollections(t,!0)},t.prototype.setVisibility=function(t,e){return this._persistence.setVisibility(t,e)},t.prototype.toggle=function(t,e){this._$settingsmodel.toggle(t,e);var n=this._$settingsmodel.getById(t)[e];return this._persistence.setting(t,e,+n)},t.prototype.set=function(t,e,n){return this._persistence.setting(t,e,n)},t}())(t,e)}]),angular.module("Tasks").factory("TasksBusinessLayer",["TasksModel","Persistence","VTodoService","VTodo","$timeout",function(t,e,n,r,s){return new(function(){function e(t,e,n,r,s){this._$tasksmodel=t,this._persistence=e,this._$vtodoservice=n}return e.prototype.getAll=function(e,n,s){return this._$vtodoservice.getAll(e,n,s).then(function(e){var n,s,a,o;for(o=[],s=0,a=e.length;s130?"#000000":"#FAFAFA"}},s}]),function(){var t={}.hasOwnProperty,e=function(e,n){function r(){this.constructor=e}for(var s in n)t.call(n,s)&&(e[s]=n[s]);return r.prototype=n.prototype,e.prototype=new r,e.__super__=n.prototype,e};angular.module("Tasks").factory("CollectionsModel",["TasksModel","_Model",function(t,n){return new(function(t){function n(t){this._$tasksmodel=t,this._nameCache={},n.__super__.constructor.call(this)}return e(n,t),n.prototype.add=function(t,e){if(null===e&&(e=!0),this._nameCache[t.displayname]=t,angular.isDefined(t.id))return n.__super__.add.call(this,t,e)},n.prototype.getCount=function(t,e){var n,r,s,a,o;for(null===e&&(e=""),n=0,s=this._$tasksmodel.filteredTasks(e),a=0,o=s.length;a=e)return!0}if(r.isValid()&&!a.isValid()){if(n=r.diff(moment().startOf("day"),"days",!0),!e&&n=e)return!0}if(a.isValid()&&r.isValid()){if(o=a.diff(moment().startOf("day"),"days",!0),s=r.diff(moment().startOf("day"),"days",!0),!e&&(o=e&&s>=e)return!0;if(s=e&&o>=e)return!0}return!1},r.prototype.isLoaded=function(t){return!!this.getById(t.id)},r.prototype.hasSubtasks=function(t){var e,n,r,s;for(n=this.getAll(),r=0,s=n.length;r5;case"today":return!1===t.completed&&(this.today(t.start)||this.today(t.due));case"week":return!1===t.completed&&(this.week(t.start)||this.week(t.due));default:return""+t.calendar.uri==""+e}},r.prototype.filteredTasks=function(t){var e,n,r,s,a,o,i;if(r=[],a=this.getAll(),t){for(o=0,i=a.length;o=0)if("comments"===a){for(p=t.comments,u=0,l=p.length;u0)if(n)n.setValues(t);else{var r=new ICAL.Property("categories");r.setValues(t),n=e[0].addProperty(r)}else e[0].removeProperty("categories");this.updateLastModified(),this.data=this.components.toString()},get start(){return this.components.getAllSubcomponents("vtodo")[0].getFirstPropertyValue("dtstart")},set start(t){var e=this.components.getAllSubcomponents("vtodo");t?e[0].updatePropertyWithValue("dtstart",t):e[0].removeProperty("dtstart"),this.updateLastModified(),this.data=this.components.toString()},get due(){return this.components.getAllSubcomponents("vtodo")[0].getFirstPropertyValue("due")},set due(t){var e=this.components.getAllSubcomponents("vtodo");t?e[0].updatePropertyWithValue("due",t):e[0].removeProperty("due"),this.updateLastModified(),this.data=this.components.toString()},get allDay(){var t=this.components.getAllSubcomponents("vtodo"),e=t[0].getFirstPropertyValue("dtstart"),n=t[0].getFirstPropertyValue("due"),r=n||e;return null!=r&&r.isDate},set allDay(t){var e=this.components.getAllSubcomponents("vtodo"),n=e[0].getFirstPropertyValue("dtstart");n&&(n.isDate=t,e[0].updatePropertyWithValue("dtstart",n));var r=e[0].getFirstPropertyValue("due");r&&(r.isDate=t,e[0].updatePropertyWithValue("due",r)),this.updateLastModified(),this.data=this.components.toString()},get comments(){return null},get loadedCompleted(){return this.loaded},set loadedCompleted(t){this.loaded=t},updateLastModified:function(){var t=this.components.getAllSubcomponents("vtodo");t[0].updatePropertyWithValue("last-modified",ICAL.Time.now()),t[0].updatePropertyWithValue("dtstamp",ICAL.Time.now())}},r.create=function(t){var s=e.new(),a=new ICAL.Component("vtodo");return s.addSubcomponent(a),a.updatePropertyWithValue("created",ICAL.Time.now()),a.updatePropertyWithValue("dtstamp",ICAL.Time.now()),a.updatePropertyWithValue("last-modified",ICAL.Time.now()),a.updatePropertyWithValue("uid",n.generate()),a.updatePropertyWithValue("summary",t.summary),a.updatePropertyWithValue("priority",t.priority),a.updatePropertyWithValue("percent-complete",t.complete),a.updatePropertyWithValue("x-oc-hidesubtasks",0),t.related&&a.updatePropertyWithValue("related-to",t.related),t.note&&a.updatePropertyWithValue("description",t.note),t.due&&a.updatePropertyWithValue("due",t.due),t.start&&a.updatePropertyWithValue("dtstart",t.start),new r(t.calendar,{"{urn:ietf:params:xml:ns:caldav}calendar-data":s.toString(),"{DAV:}getetag":null},null)},r}])}(jQuery,oc_requesttoken); +//# sourceMappingURL=app.min.js.map diff --git a/js/public/app.min.js.map b/js/public/app.min.js.map new file mode 100644 index 000000000..fa92eb107 --- /dev/null +++ b/js/public/app.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["app.js","controllers/appcontroller.js","controllers/detailscontroller.js","controllers/listcontroller.js","controllers/settingscontroller.js","controllers/taskscontroller.js","directives/appnavigationentryutils.js","directives/autofocusoninsert.js","directives/avatar.js","directives/colorpickerDirective.js","directives/confirmation.js","directives/datepicker.js","directives/occlickfocus.js","directives/timepicker.js","directives/watchtop.js","filters/counterFormatter.js","filters/dateDetails.js","filters/dateDetailsShort.js","filters/dateFromNow.js","filters/dateTaskList.js","filters/day.js","filters/dayTaskList.js","filters/percentDetails.js","filters/priorityDetails.js","filters/reminderDetails.js","filters/startDetails.js","filters/timeTaskList.js","services/calendarservice.js","services/davclient.js","services/icalfactory.js","services/loading.js","services/model.js","services/persistence.js","services/publisher.js","services/randomstringservice.js","services/request.js","services/status.js","services/vtodoservice.js","services/businesslayer/listsbusinesslayer.js","services/businesslayer/searchbusinesslayer.js","services/businesslayer/settingsbusinesslayer.js","services/businesslayer/tasksbusinesslayer.js","services/models/calendar.js","services/models/collectionsmodel.js","services/models/listsmodel.js","services/models/settingsmodel.js","services/models/tasksmodel.js","services/models/vtodo.js"],"names":["$","oc_requesttoken","undefined","config","$provide","$routeProvider","$interpolateProvider","$httpProvider","value","defaults","headers","common","requesttoken","when","otherwise","_update","run","$document","$rootScope","Config","$timeout","TasksBusinessLayer","ListsBusinessLayer","SearchBusinessLayer","timeOutUpdate","init","taskUpdateInterval","OCA","Search","tasks","moment","locale","event","calendar","$broadcast","sameDay","lastWeek","t","nextWeek","sameElse","diff","this","m","mm","h","hh","d","dd","M","MM","y","yy","AppController","controller","$scope","$route","status","$location","$routeParams","Loading","SettingsModel","Persistence","_$listsbusinesslayer","_$route","_$scope","_$status","_$timeout","_$location","_$routeparams","_Loading","_$settingsmodel","_persistence","newListName","settingsmodel","then","Promise","results","all","target","listparameter","length","route","calendarID","is","$event","closest","angular","isUndefined","path","collectionID","focusTaskInput","addingList","addSubtaskTo","isLoading","DetailsController","$window","TasksModel","ListsModel","_$window","_$tasksmodel","_tasksbusinesslayer","_$listsmodel","task","getById","taskID","getByUri","cats","categories","found","add","id","isAddingComment","names","timers","durations","name","loadTask","TaskState","related","params","invert","slice","start","deleteTask","$apply","editName","writable","setEditRoute","currentTarget","initDueDate","initStartDate","initReminder","endEdit","resetRoute","keyCode","type","deletePercent","deleteReminder","deleteReminderDate","toggleCompleted","setPercentComplete","toggleStarred","complete","setPriority","isDue","date","isOverDue","overdue","setstartday","setstarttime","setStart","deleteStartDate","setdueday","setduetime","setDue","deleteDueDate","isAllDayPossible","toggleAllDay","setAllDay","allDay","due","setreminderday","setremindertime","setReminderDate","reminderType","reminder","isValid","setReminder","addComment","comment","CommentContent","tmpID","time","Date","now","data","sendComment","deleteComment","commentStrings","commentID","input","button","addCategory","default_categories","indexOf","category","model","doUpdate","push","removeCategory","ListController","CollectionsModel","CalendarService","_$routeParams","_$tasksbusinesslayer","_$collectionsmodel","_$searchbusinesslayer","_$calendarservice","collections","draggedTasks","nameError","getAll","color","deleteMessage","replace","displayname","getStandardList","uri","startCreate","tooltip","isAddingList","startEdit","prepareUpdate","download","url","open","checkNew","checkEdit","cancelEdit","checkName","allowed","$input","isNameAllowed","check","preventDefault","msg","placement","trigger","$on","s","calendarUri","resetToPreviousState","saveEdit","rename","isNameAlreadyTaken","getCount","filter","hideCollection","collection","show","getFilter","dragoverList","listID","index","attr","dropList","item","changeCalendar","dragoverCollection","effectAllowed","dataTransfer","ctrlKey","dropCollection","changeCollection","dropEffect","SettingsController","Status","SettingsBusinessLayer","_$settingsbusinesslayer","collectionOptions","getStatus","startOfWeekOptions","setVisibility","setStartOfWeek","set","__indexOf","i","l","module","TasksController","_settingsbusinesslayer","_searchbusinesslayer","VTodo","vtodo","_vtodo","calendars","days","isAddingTask","focusInputField","addTask","taskName","_ref","parent","summary","priority","completed","note","startOf","format","openDetails","focusSubtaskInput","subtaskName","getAddString","isDefined","showSubtaskInput","taskname","hideSubtasks","uid","descendantIDs","loadedCompleted","toggle","filterTasks","getSubTasks","_i","_len","hideCompletedSubtasks","ret","hasNoParent","hasCompletedSubtasks","toggleSubtasks","toggleCompletedSubtasks","filterTasksByString","filteredTasks","dayHasEntry","taskAtDay","day","filterLists","getCountString","checkTaskInput","setLoadedCompleted","sortDue","sortStart","sortOrder","getSortOrderIcon","order","sortDirection","dropAsSubtask","parentID","changeParent","removeClass","newCalendar","queries","makeRootTask","children","addClass","allow","dragStart","dragEnd","directive","elm","find","menu","toggleClass","scope","focus","avatar","userid","$observe","size","saturation","hue","isArray","lightness","huePrime","red","chroma","Math","abs","floor","blue","secondComponent","green","lightnessAdjustment","rgbToHex","round","r","g","b","Array","listofcolours","toString","parseInt","randColour","String","random","hslToRgb","toHsl","prototype","forEach","hsl","hash","hslcolour","restrict","templateUrl","filePath","colors","selected","element","randomizeColour","pick","confirmationFunction","confirmationMessage","ConfirmationController","$element","$attrs","$compile","countdown","message","hasClass","stopPropagation","activate","bind","e","html","documentClick","unbind","onSelect","datepicker","inst","beforeShow","marginLeft","outerWidth","dp","css","margin-left","left","startOfWeek","minDate","options","selector","click","timeout","timepicker","atPosition","myPosition","minuteText","hourText","$watch","divTop","prev","outerHeight","count","isDate","fromNow","percent","string","ds","duration","token","_this","service","DavClient","Calendar","discoverHome","callback","propFind","buildUrl","OC","linkToRemoteBase","NS_DAV","requestToken","response","props","propStat","wasRequestSuccessful","textContent","_currentUserPrincipal","NS_IETF","body","properties","_CALENDAR_HOME","split","_PROPERTIES","NS_APPLE","NS_OWNCLOUD","responseCode","getResponseCodeFromHTTPResponse","doesSupportVTodo","components","attributes","getNamedItem","j","toLowerCase","get","href","substr","create","document","cMkcalendar","setAttribute","createDocument","createElement","xmlDoc","appendChild","dProp","dSet","_createXMLForProperty","outerHTML","_suggestUri","request","enabled","_takenUrls","update","dPropUpdate","updatedProperties","resetUpdatedProperties","delete","oShare","shareType","shareWith","existingShare","implementation","oSet","dHref","Share","SHARE_TYPE_USER","SHARE_TYPE_GROUP","oSummary","owner","oRW","Content-Type","users","sharedWith","oRemove","user","groups","propName","oEnabled","dDisplayname","aOrder","aColor","cComponents","cComp","toUpperCase","acl","canWrite","getElementsByTagNameNS","k","writeNode","_isUriAlreadyTaken","lastPart","positionLastDash","match","firstPart","client","xmlNamespaces","dav","Client","linkToRemote","DAV:","urn:ietf:params:xml:ns:caldav","http://apple.com/ns/ical/","http://owncloud.org/ns","http://nextcloud.com/ns","NS_NEXTCLOUD","NS_CALENDARSERVER","location","protocol","window","host","root","updatePropertyWithValue","version","factory","decrease","Model","_dataMap","_filterCache","_data","_results","clearCache","_invalidateCache","entry","key","removeById","counter","splice","query","hashCode","exec","Request","$q","_$rootScope","_CalendarService","deferred","defer","successCallback","getCollections","getSettings","resolve","successCallbackWrapper","onSuccess","showLoading","failureCallbackWrapper","_request","onFailure","visibility","routeParams","setting","post","Publisher","_subscriptions","subscribeObjectTo","object","base","publishDataTo","ref","subscriber","handle","generate","$http","publisher","initialized","shelvedRequests","_executeShelvedRequests","defaultConfig","defaultData","extend","method","catch","put","_shelveRequest","RandomStringService","cCalQuery","dGetEtag","cCalendarData","cFilter","cCompFilterVCal","cCompFilterVTodo","cPropFilterCompleted","cIsNotDefined","cTextMatch","cPropFilterRelated","cTextMatchValue","createTextNode","Depth","vTodos","lastIndexOf","vTodo","{urn:ietf:params:xml:ns:caldav}calendar-data","{DAV:}getetag","xhr","getResponseHeader","returnTodo","_generateRandomUri","console","log","cancel","etag","__bind","fn","me","setFilter","attach","initialize","_$searchString","search","setRenderer","result","renderTaskResult","$row","$template","calendarid","isLoaded","clone","append","text","width","background-color","getColor","success","updateModel","VTodoService","_$vtodoservice","_$vtodo","ad","getTask","uncompleteParents","percentComplete","triggerUpdate","completeChildren","child","getChildren","getByUid","setHideSubtasks","hide","setHideCompletedSubtasks","momentToICALTime","asDate","ICAL","Time","fromDateString","reference","isAfter","olddue","year","month","hour","minute","isBefore","isSame","subtract","oldstart","checkReminderDate","second","p","newreminder","reminderdate","action","rel","seg","week","secondsToSegments","w","newTask","newVTodo","requests","$filter","vjournal","vevent","shareable","_updatedProperties","_properties","hasOwnProperty","shares","access","readWrite","startsWith","origin","_setUpdated","c","regex","_generateTextColor","_propertiesBackup","copy","dropPreviousState","toggleSharesEditor","list","brightness","editingShares","__hasProp","call","__extends","ctor","constructor","_Model","__super__","_super","_nameCache","updateByUri","tmplist","_tmpIdCache","calendarcolor","getName","removeByList","_len1","taskIDs","_j","startdiff","duediff","getDescendantIDs","concat","current","today","needle","ancestors","objectExists","getAncestor","re","keys","_ref1","comments","updateComment","com","icalfactory","loaded","jCal","Component","getAllSubcomponents","getFirstPropertyValue","updateLastModified","vtodos","removeProperty","completed_date","toJSDate","comp","getFirstProperty","getValues","setValues","prop","Property","addProperty","addSubcomponent"],"mappings":"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","file":"app.min.js","sourcesContent":["'use strict';\n\nangular.module('Tasks', ['ngRoute', 'ngAnimate', 'ui.select', 'ngSanitize', 'dndLists']).config(['$provide', '$routeProvider', '$interpolateProvider', '$httpProvider', function ($provide, $routeProvider, $interpolateProvider, $httpProvider) {\n\t'use strict';\n\n\tvar config;\n\t$provide.value('Config', config = {\n\t\tmarkReadTimeout: 500,\n\t\ttaskUpdateInterval: 1000 * 600\n\t});\n\t$httpProvider.defaults.headers.common.requesttoken = oc_requesttoken;\n\t$routeProvider.when('/calendars/:calendarID', {}).when('/calendars/:calendarID/edit/:listparameter', {}).when('/calendars/:calendarID/tasks/:taskID', {}).when('/calendars/:calendarID/tasks/:taskID/settings', {}).when('/calendars/:calendarID/tasks/:taskID/edit/:parameter', {}).when('/collections/:collectionID/tasks/:taskID', {}).when('/collections/:collectionID/tasks/:taskID/settings', {}).when('/collections/:collectionID/tasks/:taskID/edit/:parameter', {}).when('/collections/:collectionID', {}).when('/search/:searchString', {}).when('/search/:searchString/tasks/:taskID', {}).when('/search/:searchString/tasks/:taskID/edit/:parameter', {}).otherwise({\n\t\tredirectTo: '/collections/all'\n\t});\n}]);\n\nangular.module('Tasks').run(['$document', '$rootScope', 'Config', '$timeout', 'ListsBusinessLayer', 'TasksBusinessLayer', 'SearchBusinessLayer', function ($document, $rootScope, Config, $timeout, TasksBusinessLayer, ListsBusinessLayer, SearchBusinessLayer) {\n\t'use strict';\n\n\tvar _update;\n\tvar init = false;\n\t(_update = function update() {\n\t\tvar timeOutUpdate;\n\t\ttimeOutUpdate = function timeOutUpdate() {\n\t\t\treturn $timeout(_update, Config.taskUpdateInterval);\n\t\t};\n\t\tinit = true;\n\t\treturn timeOutUpdate();\n\t}).call();\n\tOCA.Search.tasks = SearchBusinessLayer;\n\t$document.click(function (event) {\n\t\t$rootScope.$broadcast('documentClicked', event);\n\t});\n\tmoment.locale('details', {\n\t\tcalendar: {\n\t\t\tlastDay: '[' + t('tasks', 'Due yesterday') + '], HH:mm',\n\t\t\tsameDay: '[' + t('tasks', 'Due today') + '], HH:mm',\n\t\t\tnextDay: '[' + t('tasks', 'Due tomorrow') + '], HH:mm',\n\t\t\tlastWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY, HH:mm',\n\t\t\tnextWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY, HH:mm',\n\t\t\tsameElse: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY, HH:mm'\n\t\t}\n\t});\n\tmoment.locale('details_allday', {\n\t\tcalendar: {\n\t\t\tlastDay: '[' + t('tasks', 'Due yesterday') + ']',\n\t\t\tsameDay: '[' + t('tasks', 'Due today') + ']',\n\t\t\tnextDay: '[' + t('tasks', 'Due tomorrow') + ']',\n\t\t\tlastWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY',\n\t\t\tnextWeek: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY',\n\t\t\tsameElse: '[' + t('tasks', 'Due on') + '] MMM DD, YYYY'\n\t\t}\n\t});\n\tmoment.locale('start', {\n\t\tcalendar: {\n\t\t\tlastDay: '[' + t('tasks', 'Started yesterday') + '], HH:mm',\n\t\t\tsameDay: '[' + t('tasks', 'Starts today') + '], HH:mm',\n\t\t\tnextDay: '[' + t('tasks', 'Starts tomorrow') + '], HH:mm',\n\t\t\tlastWeek: '[' + t('tasks', 'Started on') + '] MMM DD, YYYY, HH:mm',\n\t\t\tnextWeek: '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY, HH:mm',\n\t\t\tsameElse: function sameElse() {\n\t\t\t\tif (this.diff(moment()) > 0) {\n\t\t\t\t\treturn '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY, HH:mm';\n\t\t\t\t} else {\n\t\t\t\t\treturn '[' + t('tasks', 'Started on') + '] MMM DD, YYYY, HH:mm';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\tmoment.locale('start_allday', {\n\t\tcalendar: {\n\t\t\tlastDay: '[' + t('tasks', 'Started yesterday') + ']',\n\t\t\tsameDay: '[' + t('tasks', 'Starts today') + ']',\n\t\t\tnextDay: '[' + t('tasks', 'Starts tomorrow') + ']',\n\t\t\tlastWeek: '[' + t('tasks', 'Started on') + '] MMM DD, YYYY',\n\t\t\tnextWeek: '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY',\n\t\t\tsameElse: function sameElse() {\n\t\t\t\tif (this.diff(moment()) > 0) {\n\t\t\t\t\treturn '[' + t('tasks', 'Starts on') + '] MMM DD, YYYY';\n\t\t\t\t} else {\n\t\t\t\t\treturn '[' + t('tasks', 'Started on') + '] MMM DD, YYYY';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\tmoment.locale('reminder', {\n\t\tcalendar: {\n\t\t\tlastDay: t('tasks', '[Remind me yesterday at ]HH:mm'),\n\t\t\tsameDay: t('tasks', '[Remind me today at ]HH:mm'),\n\t\t\tnextDay: t('tasks', '[Remind me tomorrow at ]HH:mm'),\n\t\t\tlastWeek: t('tasks', '[Remind me on ]MMM DD, YYYY,[ at ]HH:mm'),\n\t\t\tnextWeek: t('tasks', '[Remind me on ]MMM DD, YYYY,[ at ]HH:mm'),\n\t\t\tsameElse: t('tasks', '[Remind me on ]MMM DD, YYYY,[ at ]HH:mm')\n\t\t}\n\t});\n\tmoment.locale('tasks', {\n\t\tcalendar: {\n\t\t\tlastDay: '[' + t('tasks', 'Yesterday') + ']',\n\t\t\tsameDay: '[' + t('tasks', 'Today') + ']',\n\t\t\tnextDay: '[' + t('tasks', 'Tomorrow') + ']',\n\t\t\tlastWeek: 'DD.MM.YYYY',\n\t\t\tnextWeek: 'DD.MM.YYYY',\n\t\t\tsameElse: 'DD.MM.YYYY'\n\t\t}\n\t});\n\tmoment.locale('details_short', {\n\t\tcalendar: {\n\t\t\tlastDay: '[' + t('tasks', 'Yesterday') + ']',\n\t\t\tsameDay: '[' + t('tasks', 'Today') + ']',\n\t\t\tnextDay: '[' + t('tasks', 'Tomorrow') + ']',\n\t\t\tlastWeek: 'MMM DD, YYYY',\n\t\t\tnextWeek: 'MMM DD, YYYY',\n\t\t\tsameElse: 'MMM DD, YYYY'\n\t\t}\n\t});\n\tmoment.locale('list_week', {\n\t\tcalendar: {\n\t\t\tlastDay: '[' + t('tasks', 'Yesterday') + ']',\n\t\t\tsameDay: '[' + t('tasks', 'Today') + '], MMM. DD',\n\t\t\tnextDay: '[' + t('tasks', 'Tomorrow') + '], MMM. DD',\n\t\t\tlastWeek: 'ddd, MMM. DD',\n\t\t\tnextWeek: 'ddd, MMM. DD',\n\t\t\tsameElse: 'ddd, MMM. DD'\n\t\t}\n\t});\n\treturn moment.locale('en', {\n\t\trelativeTime: {\n\t\t\tfuture: t('tasks', \"in %s\"),\n\t\t\tpast: t('tasks', \"%s ago\"),\n\t\t\ts: t('tasks', \"seconds\"),\n\t\t\tm: t('tasks', \"a minute\"),\n\t\t\tmm: t('tasks', \"%d minutes\"),\n\t\t\th: t('tasks', \"an hour\"),\n\t\t\thh: t('tasks', \"%d hours\"),\n\t\t\td: t('tasks', \"a day\"),\n\t\t\tdd: t('tasks', \"%d days\"),\n\t\t\tM: t('tasks', \"a month\"),\n\t\t\tMM: t('tasks', \"%d months\"),\n\t\t\ty: t('tasks', \"a year\"),\n\t\t\tyy: t('tasks', \"%d years\")\n\t\t}\n\t});\n}]);","'use strict';\n\nangular.module('Tasks').controller('AppController', ['$scope', '$rootScope', 'ListsBusinessLayer', '$route', 'Status', '$timeout', '$location', '$routeParams', 'Loading', 'SettingsModel', 'Persistence', function ($scope, $rootScope, ListsBusinessLayer, $route, status, $timeout, $location, $routeParams, Loading, SettingsModel, Persistence) {\n\t'use strict';\n\n\tvar AppController = function () {\n\t\tfunction AppController(_$scope, $rootScope, _$listsbusinesslayer, _$route, _$status, _$timeout, _$location, _$routeparams, _Loading, _$settingsmodel, _persistence) {\n\t\t\tthis._$scope = _$scope;\n\t\t\tthis._$listsbusinesslayer = _$listsbusinesslayer;\n\t\t\tthis._$route = _$route;\n\t\t\tthis._$status = _$status;\n\t\t\tthis._$timeout = _$timeout;\n\t\t\tthis._$location = _$location;\n\t\t\tthis._$routeparams = _$routeparams;\n\t\t\tthis._Loading = _Loading;\n\t\t\tthis._$settingsmodel = _$settingsmodel;\n\t\t\tthis._persistence = _persistence;\n\t\t\tthis._$scope.status = this._$status.getStatus();\n\t\t\tthis._$scope.route = this._$routeparams;\n\t\t\tthis._$scope.status.newListName = \"\";\n\t\t\tthis._$scope.settingsmodel = this._$settingsmodel;\n\n\t\t\tthis._$listsbusinesslayer.init().then(function (results) {\n\t\t\t\tPromise.all(results).then(function () {\n\t\t\t\t\t$scope.$apply();\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tthis._persistence.init();\n\n\t\t\tthis._$scope.closeAll = function ($event) {\n\t\t\t\tif ($($event.target).closest('.close-all').length || $($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\tif (!angular.isUndefined(_$scope.route.calendarID)) {\n\t\t\t\t\t\tif (_$scope.route.listparameter === 'name') {\n\t\t\t\t\t\t\t$rootScope.$broadcast('cancelEditCalendar', _$scope.route.calendarID);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_$location.path('/calendars/' + _$scope.route.calendarID);\n\t\t\t\t\t} else if (!angular.isUndefined(_$scope.route.collectionID)) {\n\t\t\t\t\t\t_$location.path('/collections/' + _$scope.route.collectionID);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_$location.path('/collections/all');\n\t\t\t\t\t}\n\t\t\t\t\t_$scope.status.addingList = false;\n\t\t\t\t\t_$scope.status.focusTaskInput = false;\n\t\t\t\t\t_$scope.status.newListName = \"\";\n\t\t\t\t}\n\t\t\t\tif (!$($event.target).closest('.newList').length) {\n\t\t\t\t\t_$scope.status.addingList = false;\n\t\t\t\t\t_$scope.status.newListName = \"\";\n\t\t\t\t}\n\t\t\t\tif (!$($event.target).closest('.add-subtask').length) {\n\t\t\t\t\t_$scope.status.addSubtaskTo = null;\n\t\t\t\t\t_$scope.status.focusSubtaskInput = false;\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.isLoading = function () {\n\t\t\t\treturn _Loading.isLoading();\n\t\t\t};\n\t\t}\n\t\treturn AppController;\n\t}();\n\treturn new AppController($scope, $rootScope, ListsBusinessLayer, $route, status, $timeout, $location, $routeParams, Loading, SettingsModel, Persistence);\n}]);","'use strict';\n\nangular.module('Tasks').controller('DetailsController', ['$scope', '$window', 'TasksModel', 'TasksBusinessLayer', '$route', '$location', '$timeout', '$routeParams', 'SettingsModel', 'Loading', 'ListsModel', function ($scope, $window, TasksModel, TasksBusinessLayer, $route, $location, $timeout, $routeParams, SettingsModel, Loading, ListsModel) {\n\t'use strict';\n\n\tvar DetailsController = function () {\n\t\tfunction DetailsController(_$scope, _$window, _$tasksmodel, _tasksbusinesslayer, _$route, _$location, _$timeout, _$routeparams, _$settingsmodel, _Loading, _$listsmodel) {\n\t\t\tthis._$scope = _$scope;\n\t\t\tthis._$window = _$window;\n\t\t\tthis._$tasksmodel = _$tasksmodel;\n\t\t\tthis._$listsmodel = _$listsmodel;\n\t\t\tthis._tasksbusinesslayer = _tasksbusinesslayer;\n\t\t\tthis._$route = _$route;\n\t\t\tthis._$location = _$location;\n\t\t\tthis._$timeout = _$timeout;\n\t\t\tthis._$routeparams = _$routeparams;\n\t\t\tthis._$settingsmodel = _$settingsmodel;\n\t\t\tthis._Loading = _Loading;\n\t\t\tthis._$scope.task = _$tasksmodel.getById(_$scope.route.taskID);\n\t\t\tthis._$scope.found = true;\n\t\t\tthis._$scope.$on('$routeChangeSuccess', function () {\n\t\t\t\tvar task = _$tasksmodel.getByUri(_$scope.route.taskID);\n\n\t\t\t\tif (!(angular.isUndefined(task) || task === null)) {\n\t\t\t\t\t_$scope.task = task;\n\t\t\t\t\t// Bind categories to task.cats as angular.ui/ui-select seems to have problems with Getter/Setter\n\t\t\t\t\t_$scope.task.cats = task.categories;\n\t\t\t\t\t_$scope.found = true;\n\t\t\t\t} else if (_$scope.route.taskID !== void 0) {\n\t\t\t\t\t_$scope.found = false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._$scope.settingsmodel = this._$settingsmodel;\n\t\t\tthis._$scope.settingsmodel.add({\n\t\t\t\t'id': 'various',\n\t\t\t\t'categories': []\n\t\t\t});\n\t\t\tthis._$scope.isAddingComment = false;\n\t\t\tthis._$scope.timers = [];\n\t\t\tthis._$scope.durations = [{\n\t\t\t\tname: t('tasks', 'week'),\n\t\t\t\tnames: t('tasks', 'weeks'),\n\t\t\t\tid: 'week'\n\t\t\t}, {\n\t\t\t\tname: t('tasks', 'day'),\n\t\t\t\tnames: t('tasks', 'days'),\n\t\t\t\tid: 'day'\n\t\t\t}, {\n\t\t\t\tname: t('tasks', 'hour'),\n\t\t\t\tnames: t('tasks', 'hours'),\n\t\t\t\tid: 'hour'\n\t\t\t}, {\n\t\t\t\tname: t('tasks', 'minute'),\n\t\t\t\tnames: t('tasks', 'minutes'),\n\t\t\t\tid: 'minute'\n\t\t\t}, {\n\t\t\t\tname: t('tasks', 'second'),\n\t\t\t\tnames: t('tasks', 'seconds'),\n\t\t\t\tid: 'second'\n\t\t\t}];\n\t\t\tthis._$scope.loadTask = function (taskID) {\n\t\t\t\tvar task = _$tasksmodel.getByUri(_$scope.route.taskID);\n\t\t\t\tif (!(angular.isUndefined(task) || task === null)) {\n\t\t\t\t\t_$scope.task = task;\n\t\t\t\t\t_$scope.found = true;\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.TaskState = function () {\n\t\t\t\tif (_$scope.found) {\n\t\t\t\t\treturn 'found';\n\t\t\t\t} else {\n\t\t\t\t\tif (_Loading.isLoading()) {\n\t\t\t\t\t\treturn 'loading';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.params = [{\n\t\t\t\tname: t('tasks', 'before beginning'),\n\t\t\t\tinvert: true,\n\t\t\t\trelated: 'START',\n\t\t\t\tid: \"10\"\n\t\t\t}, {\n\t\t\t\tname: t('tasks', 'after beginning'),\n\t\t\t\tinvert: false,\n\t\t\t\trelated: 'START',\n\t\t\t\tid: \"00\"\n\t\t\t}, {\n\t\t\t\tname: t('tasks', 'before end'),\n\t\t\t\tinvert: true,\n\t\t\t\trelated: 'END',\n\t\t\t\tid: \"11\"\n\t\t\t}, {\n\t\t\t\tname: t('tasks', 'after end'),\n\t\t\t\tinvert: false,\n\t\t\t\trelated: 'END',\n\t\t\t\tid: \"01\"\n\t\t\t}];\n\t\t\tthis._$scope.filterParams = function (params) {\n\t\t\t\tvar task;\n\t\t\t\ttask = _$tasksmodel.getById(_$scope.route.taskID);\n\t\t\t\tif (!(angular.isUndefined(task) || task === null)) {\n\t\t\t\t\tif (task.due && task.start) {\n\t\t\t\t\t\treturn params;\n\t\t\t\t\t} else if (task.start) {\n\t\t\t\t\t\treturn params.slice(0, 2);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn params.slice(2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.deleteTask = function (task) {\n\t\t\t\treturn _$timeout(function () {\n\t\t\t\t\treturn _tasksbusinesslayer.deleteTask(task).then(function () {\n\t\t\t\t\t\treturn $scope.$apply();\n\t\t\t\t\t});\n\t\t\t\t}, 500);\n\t\t\t};\n\t\t\tthis._$scope.triggerUpdate = function (task) {\n\t\t\t\t_tasksbusinesslayer.triggerUpdate(task);\n\t\t\t};\n\t\t\tthis._$scope.editName = function ($event, task) {\n\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\tif (!$($event.target).is('a')) {\n\t\t\t\t\t\t_$scope.setEditRoute('name');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.editDueDate = function ($event, task) {\n\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\tif ($($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t\t_$scope.setEditRoute('duedate');\n\t\t\t\t\t\t_tasksbusinesslayer.initDueDate(task);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.editStart = function ($event, task) {\n\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\tif ($($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t\t_$scope.setEditRoute('startdate');\n\t\t\t\t\t\t_tasksbusinesslayer.initStartDate(task);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.editReminder = function ($event, task) {\n\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\tif ($($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t\t_$scope.setEditRoute('reminer');\n\t\t\t\t\t\treturn _tasksbusinesslayer.initReminder(_$scope.route.taskID);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.editNote = function ($event, task) {\n\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\tif ($($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t\tif (!$($event.target).is('a')) {\n\t\t\t\t\t\t\t_$scope.setEditRoute('note');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.editPriority = function ($event, task) {\n\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\tif ($($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t\t_$scope.setEditRoute('priority');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.editPercent = function ($event, task) {\n\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\tif ($($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t\t_$scope.setEditRoute('percent');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.endEdit = function ($event) {\n\t\t\t\tif ($($event.target).closest('.end-edit').length || $($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t_$scope.resetRoute();\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.endName = function ($event) {\n\t\t\t\tif ($event.keyCode === 13) {\n\t\t\t\t\t$event.preventDefault();\n\t\t\t\t\t_$scope.resetRoute();\n\t\t\t\t}\n\t\t\t\tif ($event.keyCode === 27) {\n\t\t\t\t\treturn _$scope.resetRoute();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.setEditRoute = function (type) {\n\t\t\t\tvar calendarID = _$scope.route.calendarID;\n\t\t\t\tvar collectionID = _$scope.route.collectionID;\n\t\t\t\tif (calendarID) {\n\t\t\t\t\t$location.path('/calendars/' + calendarID + '/tasks/' + _$scope.route.taskID + '/edit/' + type);\n\t\t\t\t} else if (collectionID) {\n\t\t\t\t\t$location.path('/collections/' + collectionID + '/tasks/' + _$scope.route.taskID + '/edit/' + type);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.resetRoute = function () {\n\t\t\t\tvar calendarID = _$scope.route.calendarID;\n\t\t\t\tvar collectionID = _$scope.route.collectionID;\n\t\t\t\tif (calendarID) {\n\t\t\t\t\t$location.path('/calendars/' + calendarID + '/tasks/' + _$scope.route.taskID);\n\t\t\t\t} else if (collectionID) {\n\t\t\t\t\t$location.path('/collections/' + collectionID + '/tasks/' + _$scope.route.taskID);\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.deletePercent = function (task) {\n\t\t\t\treturn _tasksbusinesslayer.setPercentComplete(task, 0);\n\t\t\t};\n\t\t\tthis._$scope.deleteReminder = function () {\n\t\t\t\treturn _tasksbusinesslayer.deleteReminderDate(_$scope.route.taskID);\n\t\t\t};\n\n\t\t\tthis._$scope.toggleCompleted = function (task) {\n\t\t\t\tif (task.completed) {\n\t\t\t\t\t_tasksbusinesslayer.setPercentComplete(task, 0);\n\t\t\t\t} else {\n\t\t\t\t\t_tasksbusinesslayer.setPercentComplete(task, 100);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.setPercentComplete = function (task, complete) {\n\t\t\t\t_tasksbusinesslayer.setPercentComplete(task, complete);\n\t\t\t};\n\n\t\t\tthis._$scope.toggleStarred = function (task) {\n\t\t\t\tif (task.priority > 5) {\n\t\t\t\t\t_tasksbusinesslayer.setPriority(task, 0);\n\t\t\t\t} else {\n\t\t\t\t\t_tasksbusinesslayer.setPriority(task, 9);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.deletePriority = function (task) {\n\t\t\t\treturn _tasksbusinesslayer.setPriority(task, 0);\n\t\t\t};\n\t\t\tthis._$scope.isDue = function (date) {\n\t\t\t\treturn _$tasksmodel.due(date);\n\t\t\t};\n\t\t\tthis._$scope.isOverDue = function (date) {\n\t\t\t\treturn _$tasksmodel.overdue(date);\n\t\t\t};\n\n\t\t\tthis._$scope.setstartday = function (date) {\n\t\t\t\treturn _tasksbusinesslayer.setStart(_$scope.task, moment(date, 'MM/DD/YYYY'), 'day');\n\t\t\t};\n\t\t\tthis._$scope.setstarttime = function (date) {\n\t\t\t\treturn _tasksbusinesslayer.setStart(_$scope.task, moment(date, 'HH:mm'), 'time');\n\t\t\t};\n\t\t\tthis._$scope.deleteStartDate = function (task) {\n\t\t\t\t_tasksbusinesslayer.deleteStartDate(task);\n\t\t\t};\n\n\t\t\tthis._$scope.setdueday = function (date) {\n\t\t\t\treturn _tasksbusinesslayer.setDue(_$scope.task, moment(date, 'MM/DD/YYYY'), 'day');\n\t\t\t};\n\t\t\tthis._$scope.setduetime = function (date) {\n\t\t\t\treturn _tasksbusinesslayer.setDue(_$scope.task, moment(date, 'HH:mm'), 'time');\n\t\t\t};\n\t\t\tthis._$scope.deleteDueDate = function (task) {\n\t\t\t\t_tasksbusinesslayer.deleteDueDate(task);\n\t\t\t};\n\n\t\t\tthis._$scope.isAllDayPossible = function (task) {\n\t\t\t\treturn !angular.isUndefined(task) && task.calendar.writable && (task.due || task.start);\n\t\t\t};\n\t\t\tthis._$scope.toggleAllDay = function (task) {\n\t\t\t\t_tasksbusinesslayer.setAllDay(task, !task.allDay);\n\t\t\t};\n\n\t\t\tthis._$scope.setreminderday = function (date) {\n\t\t\t\treturn _tasksbusinesslayer.setReminderDate(_$scope.route.taskID, moment(date, 'MM/DD/YYYY'), 'day');\n\t\t\t};\n\t\t\tthis._$scope.setremindertime = function (date) {\n\t\t\t\treturn _tasksbusinesslayer.setReminderDate(_$scope.route.taskID, moment(date, 'HH:mm'), 'time');\n\t\t\t};\n\t\t\tthis._$scope.reminderType = function (task) {\n\t\t\t\tif (!angular.isUndefined(task)) {\n\t\t\t\t\tif (task.reminder === null) {\n\t\t\t\t\t\tif (moment(task.start, \"YYYYMMDDTHHmmss\").isValid() || moment(task.due, \"YYYYMMDDTHHmmss\").isValid()) {\n\t\t\t\t\t\t\treturn 'DURATION';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn 'DATE-TIME';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn task.reminder.type;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.changeReminderType = function (task) {\n\t\t\t\t_tasksbusinesslayer.checkReminderDate(task.id);\n\t\t\t\tif (this.reminderType(task) === 'DURATION') {\n\t\t\t\t\tif (task.reminder) {\n\t\t\t\t\t\ttask.reminder.type = 'DATE-TIME';\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttask.reminder = {\n\t\t\t\t\t\t\ttype: 'DATE-TIME'\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (task.reminder) {\n\t\t\t\t\t\ttask.reminder.type = 'DURATION';\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttask.reminder = {\n\t\t\t\t\t\t\ttype: 'DURATION'\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn _tasksbusinesslayer.setReminder(task.id);\n\t\t\t};\n\t\t\tthis._$scope.setReminderDuration = function (taskID) {\n\t\t\t\treturn _tasksbusinesslayer.setReminder(_$scope.route.taskID);\n\t\t\t};\n\t\t\tthis._$scope.addComment = function () {\n\t\t\t\tvar comment,\n\t\t\t\t _this = this;\n\t\t\t\tif (_$scope.CommentContent) {\n\t\t\t\t\t_$scope.isAddingComment = true;\n\t\t\t\t\tcomment = {\n\t\t\t\t\t\ttmpID: 'newComment' + Date.now(),\n\t\t\t\t\t\tcomment: _$scope.CommentContent,\n\t\t\t\t\t\ttaskID: _$scope.route.taskID,\n\t\t\t\t\t\ttime: moment().format('YYYYMMDDTHHmmss'),\n\t\t\t\t\t\tname: $('#expandDisplayName').text()\n\t\t\t\t\t};\n\t\t\t\t\t_tasksbusinesslayer.addComment(comment, function (data) {\n\t\t\t\t\t\t_$tasksmodel.updateComment(data);\n\t\t\t\t\t\t_$scope.isAddingComment = false;\n\t\t\t\t\t}, function () {\n\t\t\t\t\t\t_$scope.isAddingComment = false;\n\t\t\t\t\t});\n\t\t\t\t\t_$scope.CommentContent = '';\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.sendComment = function (event) {\n\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\treturn _$scope.addComment();\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._$scope.deleteComment = function (commentID) {\n\t\t\t\treturn _tasksbusinesslayer.deleteComment(_$scope.route.taskID, commentID);\n\t\t\t};\n\t\t\tthis._$scope.commentStrings = function () {\n\t\t\t\treturn {\n\t\t\t\t\tbutton: t('tasks', 'Comment'),\n\t\t\t\t\tinput: t('tasks', 'Add a comment')\n\t\t\t\t};\n\t\t\t};\n\t\t\tthis._$scope.addCategory = function (category, model) {\n\t\t\t\t_$scope.task.categories = _$scope.task.cats;\n\t\t\t\tvar default_categories = _$scope.settingsmodel.getById('various').categories;\n\t\t\t\tif (default_categories.indexOf(category) < 0) {\n\t\t\t\t\tdefault_categories.push(category);\n\t\t\t\t}\n\t\t\t\t_tasksbusinesslayer.doUpdate(_$scope.task);\n\t\t\t};\n\t\t\tthis._$scope.removeCategory = function (category, model) {\n\t\t\t\t_$scope.task.categories = _$scope.task.cats;\n\t\t\t\t_tasksbusinesslayer.doUpdate(_$scope.task);\n\t\t\t};\n\t\t}\n\n\t\treturn DetailsController;\n\t}();\n\treturn new DetailsController($scope, $window, TasksModel, TasksBusinessLayer, $route, $location, $timeout, $routeParams, SettingsModel, Loading, ListsModel);\n}]);","'use strict';\n\nangular.module('Tasks').controller('ListController', ['$scope', '$rootScope', '$window', '$routeParams', 'ListsModel', 'TasksBusinessLayer', 'CollectionsModel', 'ListsBusinessLayer', '$location', 'SearchBusinessLayer', 'CalendarService', 'TasksModel', '$timeout', function ($scope, $rootScope, $window, $routeParams, ListsModel, TasksBusinessLayer, CollectionsModel, ListsBusinessLayer, $location, SearchBusinessLayer, CalendarService, TasksModel, $timeout) {\n\t'use strict';\n\n\tvar ListController;\n\tListController = function () {\n\t\tfunction ListController(_$scope, $rootScope, _$window, _$routeParams, _$listsmodel, _$tasksbusinesslayer, _$collectionsmodel, _$listsbusinesslayer, $location, _$searchbusinesslayer, _$calendarservice, _$tasksmodel, _$timeout) {\n\n\t\t\tthis._$scope = _$scope;\n\t\t\tthis._$window = _$window;\n\t\t\tthis._$routeParams = _$routeParams;\n\t\t\tthis._$listsmodel = _$listsmodel;\n\t\t\tthis._$tasksmodel = _$tasksmodel;\n\t\t\tthis._$tasksbusinesslayer = _$tasksbusinesslayer;\n\t\t\tthis._$collectionsmodel = _$collectionsmodel;\n\t\t\tthis._$listsbusinesslayer = _$listsbusinesslayer;\n\t\t\tthis.$location = $location;\n\t\t\tthis._$timeout = _$timeout;\n\t\t\tthis._$searchbusinesslayer = _$searchbusinesslayer;\n\t\t\tthis._$calendarservice = _$calendarservice;\n\t\t\tthis._$scope.collections = this._$collectionsmodel.getAll();\n\t\t\tthis._$scope.calendars = this._$listsmodel.getAll();\n\t\t\tthis._$scope.draggedTasks = [];\n\t\t\tthis._$scope.TasksBusinessLayer = this._$tasksbusinesslayer;\n\t\t\tthis._$scope.nameError = false;\n\t\t\tthis._$scope.color = '#31CC7C';\n\n\t\t\tthis._$scope.deleteMessage = function (calendar) {\n\t\t\t\treturn t('tasks', 'This will delete the Calendar \"%s\" and all of its entries.').replace('%s', calendar.displayname);\n\t\t\t};\n\n\t\t\tthis._$scope[\"delete\"] = function (calendar) {\n\t\t\t\treturn _$listsbusinesslayer[\"delete\"](calendar).then(function () {\n\t\t\t\t\t$location.path('/calendars/' + _$listsmodel.getStandardList().uri);\n\t\t\t\t\treturn $scope.$apply();\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tthis._$scope.startCreate = function () {\n\t\t\t\t_$scope.status.addingList = true;\n\t\t\t\t_$scope.nameError = false;\n\t\t\t\t$('.hasTooltip').tooltip('hide');\n\t\t\t\t_$timeout(function () {\n\t\t\t\t\t$('#newList').focus();\n\t\t\t\t}, 50);\n\t\t\t};\n\n\t\t\tthis._$scope.create = function () {\n\t\t\t\tvar check = _$scope.isNameAllowed(_$scope.status.newListName);\n\t\t\t\tif (check.allowed) {\n\t\t\t\t\t_$scope.status.addingList = false;\n\t\t\t\t\t_$scope.isAddingList = true;\n\t\t\t\t\t_$listsbusinesslayer.add(_$scope.status.newListName, _$scope.color).then(function (calendar) {\n\t\t\t\t\t\t$location.path('/calendars/' + calendar.uri);\n\t\t\t\t\t\treturn $scope.$apply();\n\t\t\t\t\t});\n\t\t\t\t\t_$scope.status.newListName = '';\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.cancelCreate = function () {\n\t\t\t\t$('.hasTooltip').tooltip('hide');\n\t\t\t\t_$scope.nameError = false;\n\t\t\t\t_$scope.status.addingList = false;\n\t\t\t\t_$scope.status.newListName = \"\";\n\t\t\t};\n\n\t\t\tthis._$scope.startEdit = function (calendar) {\n\t\t\t\t_$scope.status.addingList = false;\n\t\t\t\t_$scope.nameError = false;\n\t\t\t\t$('.hasTooltip').tooltip('hide');\n\t\t\t\tcalendar.prepareUpdate();\n\t\t\t\t$location.path('/calendars/' + _$scope.route.calendarID + '/edit/name');\n\t\t\t\t_$timeout(function () {\n\t\t\t\t\t$('#list_' + calendar.uri + ' input.edit').focus();\n\t\t\t\t}, 50);\n\t\t\t};\n\n\t\t\tthis._$scope.showCalDAVUrl = function (calendar) {\n\t\t\t\t_$scope.status.addingList = false;\n\t\t\t\t_$scope.nameError = false;\n\t\t\t\t$location.path('/calendars/' + _$scope.route.calendarID + '/edit/caldav');\n\t\t\t\t_$timeout(function () {\n\t\t\t\t\t$('#list_' + calendar.uri + ' input.caldav').focus();\n\t\t\t\t}, 50);\n\t\t\t};\n\n\t\t\tthis._$scope.hideCalDAVUrl = function () {\n\t\t\t\t$location.path('/calendars/' + _$scope.route.calendarID);\n\t\t\t};\n\n\t\t\tthis._$scope.download = function (calendar) {\n\t\t\t\tvar url = calendar.url;\n\t\t\t\t// cut off last slash to have a fancy name for the ics\n\t\t\t\tif (url.slice(url.length - 1) === '/') {\n\t\t\t\t\turl = url.slice(0, url.length - 1);\n\t\t\t\t}\n\t\t\t\turl += '?export';\n\t\t\t\t$window.open(url);\n\t\t\t};\n\n\t\t\tthis._$scope.checkNew = function (event, name) {\n\t\t\t\t_$scope.checkName(event, name);\n\t\t\t};\n\n\t\t\tthis._$scope.checkEdit = function (event, calendar) {\n\t\t\t\t_$scope.checkName(event, calendar.displayname, calendar.uri);\n\t\t\t\tif (event.keyCode === 27) {\n\t\t\t\t\t_$scope.cancelEdit(calendar);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.checkName = function (event, name, uri) {\n\t\t\t\tvar check = _$scope.isNameAllowed(name, uri);\n\t\t\t\tvar $input = $(event.currentTarget);\n\t\t\t\tif (!check.allowed) {\n\t\t\t\t\t$input.attr('title', check.msg).tooltip({ placement: 'bottom', trigger: 'manual' }).tooltip('fixTitle').tooltip('show');\n\t\t\t\t\t_$scope.nameError = true;\n\t\t\t\t} else {\n\t\t\t\t\t$input.tooltip('hide');\n\t\t\t\t\t_$scope.nameError = false;\n\t\t\t\t}\n\t\t\t\tif (event.keyCode === 27) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t$input.tooltip('hide');\n\t\t\t\t\t_$scope.status.addingList = false;\n\t\t\t\t\t_$scope.status.newListName = \"\";\n\t\t\t\t\t_$scope.nameError = false;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t$rootScope.$on('cancelEditCalendar', function (s, calendarUri) {\n\t\t\t\tvar calendar = _$listsmodel.getByUri(calendarUri);\n\t\t\t\t_$scope.cancelEdit(calendar);\n\t\t\t});\n\n\t\t\tthis._$scope.cancelEdit = function (calendar) {\n\t\t\t\tcalendar.resetToPreviousState();\n\t\t\t\t$('.hasTooltip').tooltip('hide');\n\t\t\t\t_$scope.nameError = false;\n\t\t\t\t$location.path('/calendars/' + _$scope.route.calendarID);\n\t\t\t};\n\n\t\t\tthis._$scope.saveEdit = function (calendar) {\n\t\t\t\tvar check = _$scope.isNameAllowed(calendar.displayname, calendar.uri);\n\t\t\t\tif (check.allowed) {\n\t\t\t\t\t_$listsbusinesslayer.rename(calendar);\n\t\t\t\t\t$location.path('/calendars/' + _$scope.route.calendarID);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.isNameAllowed = function (name, uri) {\n\t\t\t\tvar check = {\n\t\t\t\t\tallowed: false,\n\t\t\t\t\tmsg: ''\n\t\t\t\t};\n\t\t\t\tif (_$listsmodel.isNameAlreadyTaken(name, uri)) {\n\t\t\t\t\tcheck.msg = t('tasks', 'The name \"%s\" is already used.').replace('%s', name);\n\t\t\t\t} else if (!name) {\n\t\t\t\t\tcheck.msg = t('tasks', 'An empty name is not allowed.');\n\t\t\t\t} else {\n\t\t\t\t\tcheck.allowed = true;\n\t\t\t\t}\n\t\t\t\treturn check;\n\t\t\t};\n\n\t\t\tthis._$scope.getCollectionCount = function (collectionID) {\n\t\t\t\tvar filter;\n\t\t\t\tfilter = _$searchbusinesslayer.getFilter();\n\t\t\t\treturn _$collectionsmodel.getCount(collectionID, filter);\n\t\t\t};\n\n\t\t\tthis._$scope.hideCollection = function (collectionID) {\n\t\t\t\tvar collection;\n\t\t\t\tcollection = _$collectionsmodel.getById(collectionID);\n\t\t\t\tswitch (collection.show) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturn false;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturn this.getCollectionCount(collectionID) < 1;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.getCollectionString = function (collectionID) {\n\t\t\t\tvar filter;\n\t\t\t\tif (collectionID !== 'completed') {\n\t\t\t\t\tfilter = _$searchbusinesslayer.getFilter();\n\t\t\t\t\treturn _$collectionsmodel.getCount(collectionID, filter);\n\t\t\t\t} else {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._$scope.getListCount = function (listID, type) {\n\t\t\t\tvar filter;\n\t\t\t\tfilter = _$searchbusinesslayer.getFilter();\n\t\t\t\treturn _$listsmodel.getCount(listID, type, filter);\n\t\t\t};\n\n\t\t\tthis._$scope.dragoverList = function ($event, index) {\n\t\t\t\tvar calendarID = $($event.target).closest('li.list').attr('calendarID');\n\t\t\t\tvar calendar = _$listsmodel.getByUri(calendarID);\n\t\t\t\treturn calendar.writable;\n\t\t\t};\n\n\t\t\tthis._$scope.dropList = function ($event, index, item) {\n\t\t\t\tif ($event.dataTransfer.dropEffect === 'move') {\n\t\t\t\t\t// we can't simply use item as task, since the directive seems to not copy all properties --> task.calendar.uri == undefined\n\t\t\t\t\tvar task = _$tasksmodel.getByUri(item.uri);\n\t\t\t\t\tvar calendarID = $($event.target).closest('li.list').attr('calendarID');\n\t\t\t\t\tvar calendar = _$listsmodel.getByUri(calendarID);\n\t\t\t\t\t_$tasksbusinesslayer.changeCalendar(task, calendar).then(function () {\n\t\t\t\t\t\t_$scope.$apply();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\tthis._$scope.dragoverCollection = function ($event, index) {\n\t\t\t\tif ($event.dataTransfer.effectAllowed === 'copy' || $event.dataTransfer.effectAllowed === 'copyMove' && $event.ctrlKey) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tvar collectionID;\n\t\t\t\tcollectionID = $($event.target).closest('li.collection').attr('collectionID');\n\t\t\t\treturn collectionID === 'starred' || collectionID === 'completed' || collectionID === 'today';\n\t\t\t};\n\n\t\t\tthis._$scope.dropCollection = function ($event, index, item) {\n\t\t\t\tif ($event.dataTransfer.dropEffect === 'move') {\n\t\t\t\t\tvar collectionID = $($event.target).closest('li.collection').attr('collectionID');\n\t\t\t\t\t_$tasksbusinesslayer.changeCollection(item.uri, collectionID);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\n\t\treturn ListController;\n\t}();\n\treturn new ListController($scope, $rootScope, $window, $routeParams, ListsModel, TasksBusinessLayer, CollectionsModel, ListsBusinessLayer, $location, SearchBusinessLayer, CalendarService, TasksModel, $timeout);\n}]);","'use strict';\n\nangular.module('Tasks').controller('SettingsController', ['$scope', '$window', 'Status', '$location', 'CollectionsModel', 'SettingsBusinessLayer', 'SettingsModel', function ($scope, $window, Status, $location, CollectionsModel, SettingsBusinessLayer, SettingsModel) {\n 'use strict';\n\n var SettingsController;\n SettingsController = function () {\n function SettingsController(_$scope, _$window, _$status, _$location, _$collectionsmodel, _$settingsbusinesslayer, _$settingsmodel) {\n var _this = this;\n this._$scope = _$scope;\n this._$window = _$window;\n this._$status = _$status;\n this._$location = _$location;\n this._$collectionsmodel = _$collectionsmodel;\n this._$settingsbusinesslayer = _$settingsbusinesslayer;\n this._$settingsmodel = _$settingsmodel;\n this._$scope.status = this._$status.getStatus();\n this._$scope.collections = this._$collectionsmodel.getAll();\n this._$scope.settingsmodel = this._$settingsmodel;\n this._$scope.collectionOptions = [{\n id: 0,\n name: t('tasks', 'Hidden')\n }, {\n id: 1,\n name: t('tasks', 'Visible')\n }, {\n id: 2,\n name: t('tasks', 'Automatic')\n }];\n this._$scope.startOfWeekOptions = [{\n id: 0,\n name: t('tasks', 'Sunday')\n }, {\n id: 1,\n name: t('tasks', 'Monday')\n }, {\n id: 2,\n name: t('tasks', 'Tuesday')\n }, {\n id: 3,\n name: t('tasks', 'Wednesday')\n }, {\n id: 4,\n name: t('tasks', 'Thursday')\n }, {\n id: 5,\n name: t('tasks', 'Friday')\n }, {\n id: 6,\n name: t('tasks', 'Saturday')\n }];\n this._$scope.setVisibility = function (collectionID) {\n var collection;\n collection = _$collectionsmodel.getById(collectionID);\n return _$settingsbusinesslayer.setVisibility(collectionID, collection.show);\n };\n this._$scope.setStartOfWeek = function () {\n return _$settingsbusinesslayer.set('various', 'startOfWeek', _$settingsmodel.getById('various').startOfWeek);\n };\n }\n\n return SettingsController;\n }();\n return new SettingsController($scope, $window, Status, $location, CollectionsModel, SettingsBusinessLayer, SettingsModel);\n}]);","'use strict';\n\n(function () {\n\t'use strict';\n\n\tvar __indexOf = [].indexOf || function (item) {\n\t\tfor (var i = 0, l = this.length; i < l; i++) {\n\t\t\tif (i in this && this[i] === item) return i;\n\t\t}return -1;\n\t};\n\n\tangular.module('Tasks').controller('TasksController', ['$scope', '$window', '$routeParams', 'TasksModel', 'ListsModel', 'CollectionsModel', 'TasksBusinessLayer', '$location', 'SettingsBusinessLayer', 'SearchBusinessLayer', 'VTodo', 'SettingsModel', function ($scope, $window, $routeParams, TasksModel, ListsModel, CollectionsModel, TasksBusinessLayer, $location, SettingsBusinessLayer, SearchBusinessLayer, VTodo, SettingsModel) {\n\t\tvar TasksController;\n\t\tTasksController = function () {\n\t\t\tfunction TasksController(_$scope, _$window, _$routeParams, _$tasksmodel, _$listsmodel, _$collectionsmodel, _tasksbusinesslayer, $location, _settingsbusinesslayer, _searchbusinesslayer, vtodo, _$settingsmodel) {\n\t\t\t\tvar _this = this;\n\t\t\t\tthis._$scope = _$scope;\n\t\t\t\tthis._$window = _$window;\n\t\t\t\tthis._$routeParams = _$routeParams;\n\t\t\t\tthis._$tasksmodel = _$tasksmodel;\n\t\t\t\tthis._$listsmodel = _$listsmodel;\n\t\t\t\tthis._$collectionsmodel = _$collectionsmodel;\n\t\t\t\tthis._tasksbusinesslayer = _tasksbusinesslayer;\n\t\t\t\tthis.$location = $location;\n\t\t\t\tthis._settingsbusinesslayer = _settingsbusinesslayer;\n\t\t\t\tthis._searchbusinesslayer = _searchbusinesslayer;\n\t\t\t\tthis._vtodo = vtodo;\n\t\t\t\tthis._$scope.tasks = this._$tasksmodel.getAll();\n\t\t\t\tthis._$scope.draggedTasks = [];\n\t\t\t\tthis._$scope.calendars = this._$listsmodel.getAll();\n\t\t\t\tthis._$scope.days = [0, 1, 2, 3, 4, 5, 6];\n\t\t\t\tthis._$scope.isAddingTask = false;\n\t\t\t\tthis._$scope.focusInputField = false;\n\t\t\t\tthis._$scope.TasksModel = this._$tasksmodel;\n\t\t\t\tthis._$scope.TasksBusinessLayer = this._tasksbusinesslayer;\n\t\t\t\tthis._$settingsmodel = _$settingsmodel;\n\n\t\t\t\tthis._$scope.addTask = function (taskName, related, calendar, parent) {\n\t\t\t\t\tvar _ref,\n\t\t\t\t\t _this = this;\n\t\t\t\t\tif (calendar === null) {\n\t\t\t\t\t\tcalendar = '';\n\t\t\t\t\t}\n\t\t\t\t\t_$scope.isAddingTask = true;\n\t\t\t\t\tvar task = {\n\t\t\t\t\t\tcalendar: null,\n\t\t\t\t\t\trelated: related,\n\t\t\t\t\t\tsummary: taskName,\n\t\t\t\t\t\tpriority: '0',\n\t\t\t\t\t\tdue: false,\n\t\t\t\t\t\tstart: false,\n\t\t\t\t\t\treminder: null,\n\t\t\t\t\t\tcompleted: false,\n\t\t\t\t\t\tcomplete: '0',\n\t\t\t\t\t\tnote: ''\n\t\t\t\t\t};\n\t\t\t\t\tif ((_ref = _$scope.route.collectionID) === 'starred' || _ref === 'today' || _ref === 'week' || _ref === 'all' || _ref === 'completed' || _ref === 'current') {\n\t\t\t\t\t\tif (related) {\n\t\t\t\t\t\t\ttask.calendar = calendar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttask.calendar = _$listsmodel.getStandardList();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (_$scope.route.collectionID === 'starred') {\n\t\t\t\t\t\t\ttask.priority = '1';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (_$scope.route.collectionID === 'today') {\n\t\t\t\t\t\t\ttask.due = moment().startOf('day').format(\"YYYY-MM-DDTHH:mm:ss\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (_$scope.route.collectionID === 'current') {\n\t\t\t\t\t\t\ttask.start = moment().format(\"YYYY-MM-DDTHH:mm:ss\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttask.calendar = _$listsmodel.getByUri(_$scope.route.calendarID);\n\t\t\t\t\t}\n\t\t\t\t\ttask = VTodo.create(task);\n\t\t\t\t\t_tasksbusinesslayer.add(task).then(function (task) {\n\t\t\t\t\t\t_$scope.isAddingTask = false;\n\t\t\t\t\t\t_$scope.openDetails(task.uri, null);\n\t\t\t\t\t\treturn $scope.$apply();\n\t\t\t\t\t});\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t_tasksbusinesslayer.setHideSubtasks(parent, 0);\n\t\t\t\t\t}\n\t\t\t\t\t_$scope.status.focusTaskInput = false;\n\t\t\t\t\t_$scope.status.focusSubtaskInput = false;\n\t\t\t\t\t_$scope.status.addSubtaskTo = null;\n\t\t\t\t\t_$scope.status.taskName = '';\n\t\t\t\t\t_$scope.status.subtaskName = '';\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getAddString = function () {\n\t\t\t\t\tvar calendar = _$listsmodel.getStandardList();\n\t\t\t\t\tif (angular.isDefined(calendar)) {\n\t\t\t\t\t\tif (angular.isDefined(_$scope.route.collectionID)) {\n\t\t\t\t\t\t\tswitch (_$scope.route.collectionID) {\n\t\t\t\t\t\t\t\tcase 'starred':\n\t\t\t\t\t\t\t\t\treturn t('tasks', 'Add an important item in \"%s\"...').replace('%s', calendar.displayname);\n\t\t\t\t\t\t\t\tcase 'today':\n\t\t\t\t\t\t\t\t\treturn t('tasks', 'Add an item due today in \"%s\"...').replace('%s', calendar.displayname);\n\t\t\t\t\t\t\t\tcase 'all':\n\t\t\t\t\t\t\t\t\treturn t('tasks', 'Add an item in \"%s\"...').replace('%s', calendar.displayname);\n\t\t\t\t\t\t\t\tcase 'current':\n\t\t\t\t\t\t\t\t\treturn t('tasks', 'Add a current item in \"%s\"...').replace('%s', calendar.displayname);\n\t\t\t\t\t\t\t\tcase 'completed':\n\t\t\t\t\t\t\t\tcase 'week':\n\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (angular.isDefined(_$listsmodel.getByUri(_$scope.route.calendarID))) {\n\t\t\t\t\t\t\t\treturn t('tasks', 'Add an item in \"%s\"...').replace('%s', _$listsmodel.getByUri(_$scope.route.calendarID).displayname);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getSubAddString = function (taskname) {\n\t\t\t\t\treturn t('tasks', 'Add a subtask to \"%s\"...').replace('%s', taskname);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.showSubtaskInput = function (uid) {\n\t\t\t\t\t_$scope.status.addSubtaskTo = uid;\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.hideSubtasks = function (task) {\n\t\t\t\t\tvar taskID = _$scope.route.taskID;\n\t\t\t\t\tvar descendantIDs = _$tasksmodel.getDescendantIDs(task);\n\t\t\t\t\tif (task.uri === taskID) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (__indexOf.call(descendantIDs, taskID) >= 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn task.hideSubtasks;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.showInput = function () {\n\t\t\t\t\tvar collectionID = _$scope.route.collectionID;\n\t\t\t\t\tvar calendar = _$listsmodel.getByUri(_$scope.route.calendarID);\n\t\t\t\t\tif (collectionID === 'completed' || collectionID === 'week') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif (angular.isDefined(calendar)) {\n\t\t\t\t\t\treturn calendar.writable;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.focusTaskInput = function () {\n\t\t\t\t\t_$scope.status.focusTaskInput = true;\n\t\t\t\t};\n\t\t\t\tthis._$scope.focusSubtaskInput = function () {\n\t\t\t\t\t_$scope.status.focusSubtaskInput = true;\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.openDetails = function (id, $event) {\n\t\t\t\t\tvar calendarID = _$scope.route.calendarID;\n\t\t\t\t\tvar collectionID = _$scope.route.collectionID;\n\t\t\t\t\tif ($event === null || $($event.currentTarget).is($($event.target).closest('.handler'))) {\n\t\t\t\t\t\tvar parent = _$tasksmodel.getByUri(id);\n\t\t\t\t\t\tif (!parent.loadedCompleted) {\n\t\t\t\t\t\t\t_tasksbusinesslayer.getAll(parent.calendar, true, parent).then(function () {\n\t\t\t\t\t\t\t\tparent.loadedCompleted = true;\n\t\t\t\t\t\t\t\t$scope.$apply();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (calendarID) {\n\t\t\t\t\t\t\t$location.path('/calendars/' + calendarID + '/tasks/' + id);\n\t\t\t\t\t\t} else if (collectionID) {\n\t\t\t\t\t\t\t$location.path('/collections/' + collectionID + '/tasks/' + id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.toggleCompleted = function (task) {\n\t\t\t\t\tif (task.completed) {\n\t\t\t\t\t\t_tasksbusinesslayer.setPercentComplete(task, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_tasksbusinesslayer.setPercentComplete(task, 100);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.toggleStarred = function (task) {\n\t\t\t\t\tif (task.priority > 5) {\n\t\t\t\t\t\t_tasksbusinesslayer.setPriority(task, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_tasksbusinesslayer.setPriority(task, 9);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.toggleHidden = function () {\n\t\t\t\t\treturn _settingsbusinesslayer.toggle('various', 'showHidden');\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.filterTasks = function (task, filter) {\n\t\t\t\t\treturn function (task) {\n\t\t\t\t\t\treturn _$tasksmodel.filterTasks(task, filter);\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getSubTasks = function (tasks, parent) {\n\t\t\t\t\tvar ret, task, _i, _len;\n\t\t\t\t\tret = [];\n\t\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\t\tif (task.related === parent.uid && task !== parent && !(parent.hideCompletedSubtasks && task.completed)) {\n\t\t\t\t\t\t\tret.push(task);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn ret;\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.hasNoParent = function (task) {\n\t\t\t\t\treturn function (task) {\n\t\t\t\t\t\treturn _$tasksmodel.hasNoParent(task);\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.hasSubtasks = function (task) {\n\t\t\t\t\treturn _$tasksmodel.hasSubtasks(task.uid);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.hasCompletedSubtasks = function (task) {\n\t\t\t\t\treturn _$tasksmodel.hasCompletedSubtasks(task.uid);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.toggleSubtasks = function (task) {\n\t\t\t\t\t_tasksbusinesslayer.setHideSubtasks(task, !task.hideSubtasks);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.toggleCompletedSubtasks = function (task) {\n\t\t\t\t\t_tasksbusinesslayer.setHideCompletedSubtasks(task, !task.hideCompletedSubtasks);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.filterTasksByString = function (task) {\n\t\t\t\t\treturn function (task) {\n\t\t\t\t\t\tvar filter = _searchbusinesslayer.getFilter();\n\t\t\t\t\t\treturn _$tasksmodel.filterTasksByString(task, filter);\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.filteredTasks = function () {\n\t\t\t\t\tvar filter;\n\t\t\t\t\tfilter = _searchbusinesslayer.getFilter();\n\t\t\t\t\treturn _$tasksmodel.filteredTasks(filter);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.dayHasEntry = function () {\n\t\t\t\t\treturn function (date) {\n\t\t\t\t\t\tvar filter, task, tasks, _i, _len;\n\t\t\t\t\t\tfilter = _searchbusinesslayer.getFilter();\n\t\t\t\t\t\ttasks = _$tasksmodel.filteredTasks(filter);\n\t\t\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\t\t\tif (task.completed || !_$tasksmodel.hasNoParent(task)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (_$tasksmodel.taskAtDay(task, date)) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tthis._$scope.taskAtDay = function (task, day) {\n\t\t\t\t\treturn function (task) {\n\t\t\t\t\t\treturn _$tasksmodel.taskAtDay(task, day);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tthis._$scope.filterLists = function () {\n\t\t\t\t\treturn function (calendar) {\n\t\t\t\t\t\treturn _$scope.getCount(calendar.uri, _$scope.route.collectionID);\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getCount = function (calendarID, type) {\n\t\t\t\t\tvar filter = _searchbusinesslayer.getFilter();\n\t\t\t\t\treturn _$listsmodel.getCount(calendarID, type, filter);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getCountString = function (calendarID, type) {\n\t\t\t\t\tvar filter = _searchbusinesslayer.getFilter();\n\t\t\t\t\treturn n('tasks', '%n Completed Task', '%n Completed Tasks', _$listsmodel.getCount(calendarID, type, filter));\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.checkTaskInput = function ($event) {\n\t\t\t\t\tif ($event.keyCode === 27) {\n\t\t\t\t\t\t$($event.currentTarget).blur();\n\t\t\t\t\t\t_$scope.status.taskName = '';\n\t\t\t\t\t\t_$scope.status.subtaskName = '';\n\t\t\t\t\t\t_$scope.status.addSubtaskTo = null;\n\t\t\t\t\t\t_$scope.status.focusTaskInput = false;\n\t\t\t\t\t\t_$scope.status.focusSubtaskInput = false;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getCompletedTasks = function (calendarID) {\n\t\t\t\t\tvar calendar = _$listsmodel.getById(calendarID);\n\t\t\t\t\t_tasksbusinesslayer.getAll(calendar, true).then(function () {\n\t\t\t\t\t\t_$listsmodel.setLoadedCompleted(calendarID);\n\t\t\t\t\t\t$scope.$apply();\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.loadedCompleted = function (calendarID) {\n\t\t\t\t\treturn _$listsmodel.loadedCompleted(calendarID);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.sortDue = function (task) {\n\t\t\t\t\tif (task.due === null) {\n\t\t\t\t\t\treturn 'last';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn task.due;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.sortStart = function (task) {\n\t\t\t\t\tif (task.start === null) {\n\t\t\t\t\t\treturn 'last';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn task.start;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getSortOrder = function () {\n\t\t\t\t\tswitch (_$scope.settingsmodel.getById('various').sortOrder) {\n\t\t\t\t\t\tcase 'due':\n\t\t\t\t\t\t\treturn _$scope.sortDue;\n\t\t\t\t\t\tcase 'start':\n\t\t\t\t\t\t\treturn _$scope.sortStart;\n\t\t\t\t\t\tcase 'priority':\n\t\t\t\t\t\t\treturn '-priority';\n\t\t\t\t\t\tcase 'alphabetically':\n\t\t\t\t\t\t\treturn 'summary';\n\t\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t\treturn 'manual';\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn ['completed', _$scope.sortDue, '-priority', _$scope.sortStart, 'summary'];\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.getSortOrderIcon = function () {\n\t\t\t\t\tswitch (_$scope.settingsmodel.getById('various').sortOrder) {\n\t\t\t\t\t\tcase 'due':\n\t\t\t\t\t\tcase 'start':\n\t\t\t\t\t\t\treturn 'ico-calendar';\n\t\t\t\t\t\tcase 'priority':\n\t\t\t\t\t\t\treturn 'ico-star';\n\t\t\t\t\t\tcase 'alphabetically':\n\t\t\t\t\t\t\treturn 'ico-alphabetically';\n\t\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t\treturn 'ico-manual';\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn 'ico-menu';\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.setSortOrder = function ($event, order) {\n\t\t\t\t\t_$scope.settingsmodel.getById('various').sortDirection = _$scope.settingsmodel.getById('various').sortOrder === order ? +!_$scope.settingsmodel.getById('various').sortDirection : 0;\n\t\t\t\t\t_$scope.settingsmodel.getById('various').sortOrder = order;\n\t\t\t\t\t_settingsbusinesslayer.set('various', 'sortOrder', order);\n\t\t\t\t\t_settingsbusinesslayer.set('various', 'sortDirection', _$scope.settingsmodel.getById('various').sortDirection);\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.dropAsSubtask = function ($event, item, index) {\n\t\t\t\t\tif ($event.dataTransfer.dropEffect === 'move') {\n\t\t\t\t\t\tvar parentID = $($event.target).closest('.task-item').attr('taskID');\n\t\t\t\t\t\tvar task = _$tasksmodel.getByUri(item.uri);\n\t\t\t\t\t\tvar parent = _$tasksmodel.getByUri(parentID);\n\t\t\t\t\t\t_tasksbusinesslayer.changeParent(task, parent);\n\t\t\t\t\t}\n\t\t\t\t\t$('.subtasks-container').removeClass('dropzone-visible');\n\t\t\t\t\treturn true;\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.dropAsRootTask = function ($event, item, index) {\n\t\t\t\t\tif ($event.dataTransfer.dropEffect === 'move') {\n\t\t\t\t\t\tvar task = _$tasksmodel.getByUri(item.uri);\n\t\t\t\t\t\tvar collectionID = $($event.target).closest('ol[dnd-list]').attr('collectionID');\n\t\t\t\t\t\tvar calendarID = $($event.target).closest('ol[dnd-list]').attr('calendarID');\n\t\t\t\t\t\tvar newCalendar = _$listsmodel.getByUri(calendarID);\n\t\t\t\t\t\tvar queries = _tasksbusinesslayer.makeRootTask(task, newCalendar, collectionID);\n\t\t\t\t\t\tPromise.all(queries).then(function () {\n\t\t\t\t\t\t\t$scope.$apply();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t$('.subtasks-container').removeClass('dropzone-visible');\n\t\t\t\t\treturn true;\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.dragover = function ($event, item, index) {\n\t\t\t\t\t$('.subtasks-container').removeClass('dropzone-visible');\n\t\t\t\t\tvar calendarID = $($event.target).closest('ol[dnd-list]').attr('calendarID');\n\t\t\t\t\tvar calendar = _$listsmodel.getByUri(calendarID);\n\t\t\t\t\tif (calendar.writable) {\n\t\t\t\t\t\t$($event.target).closest('.task-item').children('.subtasks-container').addClass('dropzone-visible');\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.allow = function (task) {\n\t\t\t\t\tif (task.calendar.writable) {\n\t\t\t\t\t\treturn \"copyMove\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn \"copy\";\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.dragStart = function ($event) {\n\t\t\t\t\tif ($event.dataTransfer.effectAllowed === 'copy' || $event.dataTransfer.effectAllowed === 'copyMove' && $event.ctrlKey) {\n\t\t\t\t\t\t$($event.target).addClass('copy');\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis._$scope.dragEnd = function ($event) {\n\t\t\t\t\t$($event.target).removeClass('copy');\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn TasksController;\n\t\t}();\n\t\treturn new TasksController($scope, $window, $routeParams, TasksModel, ListsModel, CollectionsModel, TasksBusinessLayer, $location, SettingsBusinessLayer, SearchBusinessLayer, VTodo, SettingsModel);\n\t}]);\n}).call(undefined);","'use strict';\n\nangular.module('Tasks').directive('appNavigationEntryUtils', function () {\n 'use strict';\n\n return {\n restrict: 'C',\n link: function link(scope, elm) {\n var button, menu;\n menu = elm.siblings('.app-navigation-entry-menu');\n button = $(elm).find('.app-navigation-entry-utils-menu-button button');\n button.click(function () {\n menu.toggleClass('open');\n });\n scope.$on('documentClicked', function (scope, event) {\n if (event.target !== button[0]) {\n menu.removeClass('open');\n }\n });\n }\n };\n});","'use strict';\n\nangular.module('Tasks').directive('autofocusOnInsert', function () {\n 'use strict';\n\n return function (scope, elm) {\n return elm.focus();\n };\n});","'use strict';\n\nangular.module('Tasks').directive('avatar', function () {\n 'use strict';\n\n return {\n restrict: 'A',\n scope: false,\n link: function link(scope, elm, attr) {\n return attr.$observe('userid', function () {\n if (attr.userid) {\n return elm.avatar(attr.userid, attr.size);\n }\n });\n }\n };\n});","'use strict';\n\nvar hslToRgb = function hslToRgb(hue, saturation, lightness) {\n\t'use strict';\n\t// based on algorithm from http://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n\n\tif (Array.isArray(hue)) {\n\t\tsaturation = hue[1];\n\t\tlightness = hue[2];\n\t\thue = hue[0];\n\t}\n\tif (hue === undefined) {\n\t\treturn [0, 0, 0];\n\t}\n\tsaturation /= 100;\n\tlightness /= 100;\n\n\tvar chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n\tvar huePrime = hue / 60;\n\tvar secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n\n\thuePrime = Math.floor(huePrime);\n\tvar red;\n\tvar green;\n\tvar blue;\n\n\tif (huePrime === 0) {\n\t\tred = chroma;\n\t\tgreen = secondComponent;\n\t\tblue = 0;\n\t} else if (huePrime === 1) {\n\t\tred = secondComponent;\n\t\tgreen = chroma;\n\t\tblue = 0;\n\t} else if (huePrime === 2) {\n\t\tred = 0;\n\t\tgreen = chroma;\n\t\tblue = secondComponent;\n\t} else if (huePrime === 3) {\n\t\tred = 0;\n\t\tgreen = secondComponent;\n\t\tblue = chroma;\n\t} else if (huePrime === 4) {\n\t\tred = secondComponent;\n\t\tgreen = 0;\n\t\tblue = chroma;\n\t} else if (huePrime === 5) {\n\t\tred = chroma;\n\t\tgreen = 0;\n\t\tblue = secondComponent;\n\t}\n\n\tvar lightnessAdjustment = lightness - chroma / 2;\n\tred += lightnessAdjustment;\n\tgreen += lightnessAdjustment;\n\tblue += lightnessAdjustment;\n\n\treturn [Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255)];\n};\n\nvar rgbToHex = function rgbToHex(r, g, b) {\n\t'use strict';\n\n\tif (Array.isArray(r)) {\n\t\tg = r[1];\n\t\tb = r[2];\n\t\tr = r[0];\n\t}\n\treturn '#' + parseInt(r, 10).toString(16) + parseInt(g, 10).toString(16) + parseInt(b, 10).toString(16);\n};\n\nvar listofcolours = ['#31CC7C', '#317CCC', '#FF7A66', '#F1DB50', '#7C31CC', '#CC317C', '#3A3B3D', '#CACBCD'];\n\nvar randColour = function randColour() {\n\t'use strict';\n\n\tif (typeof String.prototype.toHsl === 'function') {\n\t\treturn rgbToHex(hslToRgb(Math.random().toString().toHsl()));\n\t} else {\n\t\treturn listofcolours[Math.floor(Math.random() * listofcolours.length)];\n\t}\n};\n\nangular.module('Tasks').directive('colorpicker', function () {\n\t'use strict';\n\n\tif (typeof String.prototype.toHsl === 'function') {\n\t\tvar hsl = \"\";\n\t\tvar hslcolour = \"\";\n\t\t//\t\t 0 40 80 120 160 200 240 280 320\n\t\tlistofcolours = [\"15\", \"9\", \"4\", \"b\", \"6\", \"11\", \"74\", \"f\", \"57\"];\n\t\tlistofcolours.forEach(function (hash, index) {\n\t\t\thsl = hash.toHsl();\n\t\t\thslcolour = hslToRgb(hsl);\n\t\t\tlistofcolours[index] = rgbToHex(hslcolour);\n\t\t});\n\t}\n\treturn {\n\t\tscope: {\n\t\t\tselected: '=',\n\t\t\tcustomizedColors: '=colors'\n\t\t},\n\t\trestrict: 'AE',\n\t\ttemplateUrl: OC.filePath('tasks', 'templates', 'colorpicker.html'),\n\t\tlink: function link(scope, element, attr) {\n\t\t\tscope.colors = scope.customizedColors || listofcolours;\n\t\t\tscope.selected = scope.selected || scope.colors[0];\n\t\t\tscope.random = \"#000000\";\n\n\t\t\tscope.randomizeColour = function () {\n\t\t\t\tscope.random = randColour();\n\t\t\t\tscope.pick(scope.random);\n\t\t\t};\n\n\t\t\tscope.pick = function (color) {\n\t\t\t\tscope.selected = color;\n\t\t\t};\n\t\t}\n\t};\n});","'use strict';\n\nangular.module('Tasks').directive('confirmation', function () {\n\t'use strict';\n\n\treturn {\n\t\tpriority: -1,\n\t\trestrict: 'A',\n\t\ttemplateUrl: OC.generateUrl('/apps/tasks/templates/confirmation', {}),\n\t\tscope: {\n\t\t\tconfirmationFunction: \"&confirmation\",\n\t\t\tconfirmationMessage: \"&confirmationMessage\"\n\n\t\t},\n\t\tcontroller: 'ConfirmationController'\n\t};\n});\n\nangular.module('Tasks').controller('ConfirmationController', ['$scope', '$rootScope', '$element', '$attrs', '$compile', '$document', '$window', '$timeout', function ($scope, $rootScope, $element, $attrs, $compile, $document, $window, $timeout) {\n\t'use strict';\n\n\tvar ConfirmationController = function () {\n\t\tfunction ConfirmationController(_$scope, $rootScope, $element, $attrs, $compile, $document, $window, $timeout) {\n\t\t\tthis._$scope = _$scope;\n\t\t\tthis._$scope.countdown = 3;\n\n\t\t\t$element.bind('click', function (e) {\n\t\t\t\t_$scope.countdown = 3;\n\t\t\t\t$element.removeClass('active');\n\t\t\t\tvar message = _$scope.confirmationMessage() ? _$scope.confirmationMessage() : \"Are you sure?\";\n\t\t\t\tif ($element.hasClass('confirmed')) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\te.stopPropagation();\n\t\t\t\t_$scope.activate();\n\t\t\t\t$element.children('.confirmation-confirm').tooltip({ title: message, container: 'body', placement: 'right' });\n\t\t\t\t$element.addClass(\"confirmed\");\n\t\t\t});\n\n\t\t\t$element.children('.confirmation-confirm').bind('click', function (e) {\n\t\t\t\tif ($element.hasClass('confirmed active')) {\n\t\t\t\t\t_$scope.confirmationFunction();\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._$scope.documentClick = function () {\n\t\t\t\t$element.removeClass(\"confirmed\");\n\t\t\t};\n\n\t\t\tthis._$scope.activate = function () {\n\t\t\t\tif (_$scope.countdown) {\n\t\t\t\t\t$element.find('.countdown').html(_$scope.countdown + ' s');\n\t\t\t\t\t$timeout(function () {\n\t\t\t\t\t\t_$scope.activate();\n\t\t\t\t\t}, 1000);\n\t\t\t\t\t_$scope.countdown--;\n\t\t\t\t} else {\n\t\t\t\t\t$element.addClass('active');\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t$document.bind('click', _$scope.documentClick);\n\t\t\t$document.bind('touchend', _$scope.documentClick);\n\n\t\t\t$scope.$on('$destroy', function () {\n\t\t\t\t$document.unbind('click', _$scope.documentClick);\n\t\t\t\t$document.unbind('touchend', _$scope.documentClick);\n\t\t\t});\n\t\t}\n\t\treturn ConfirmationController;\n\t}();\n\treturn new ConfirmationController($scope, $rootScope, $element, $attrs, $compile, $document, $window, $timeout);\n}]);","'use strict';\n\nangular.module('Tasks').directive('datepicker', function () {\n\t'use strict';\n\n\treturn {\n\t\trestrict: 'A',\n\t\tscope: false,\n\t\tlink: function link(scope, elm, attr) {\n\t\t\treturn elm.datepicker({\n\t\t\t\tonSelect: function onSelect(date, inst) {\n\t\t\t\t\tscope['set' + attr.datepicker + 'day'](date);\n\t\t\t\t\treturn scope.$apply();\n\t\t\t\t},\n\t\t\t\tbeforeShow: function beforeShow(input, inst) {\n\t\t\t\t\tvar dp, marginLeft;\n\t\t\t\t\tdp = $(inst).datepicker('widget');\n\t\t\t\t\tmarginLeft = -Math.abs($(input).outerWidth() - dp.outerWidth()) / 2 + 'px';\n\t\t\t\t\tdp.css({\n\t\t\t\t\t\t'margin-left': marginLeft\n\t\t\t\t\t});\n\t\t\t\t\t$(\"div.ui-datepicker:before\").css({\n\t\t\t\t\t\t'left': 100 + 'px'\n\t\t\t\t\t});\n\t\t\t\t\treturn $('.hasDatepicker').datepicker(\"option\", \"firstDay\", scope.settingsmodel.getById('various').startOfWeek);\n\t\t\t\t},\n\t\t\t\tbeforeShowDay: function beforeShowDay(date) {\n\t\t\t\t\tif (moment(date).startOf('day').diff(moment(scope.task[attr.datepicker], \"YYYYMMDDTHHmmss\").startOf('day'), 'days') === 0) {\n\t\t\t\t\t\treturn [1, \"selected\"];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn [1, \"\"];\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tminDate: null\n\t\t\t});\n\t\t}\n\t};\n});","'use strict';\n\nangular.module('Tasks').directive('ocClickFocus', ['$timeout', function ($timeout) {\n 'use strict';\n\n return function (scope, elm, attr) {\n var options;\n options = scope.$eval(attr.ocClickFocus);\n if (angular.isDefined(options) && angular.isDefined(options.selector)) {\n return elm.click(function () {\n if (angular.isDefined(options.timeout)) {\n return $timeout(function () {\n return $(options.selector).focus();\n }, options.timeout);\n } else {\n return $(options.selector).focus();\n }\n });\n }\n };\n}]);","'use strict';\n\nangular.module('Tasks').directive('timepicker', function () {\n 'use strict';\n\n return {\n restrict: 'A',\n link: function link(scope, elm, attr) {\n return elm.timepicker({\n onSelect: function onSelect(date, inst) {\n scope['set' + attr.timepicker + 'time'](date);\n return scope.$apply();\n },\n myPosition: 'center top',\n atPosition: 'center bottom',\n hourText: t('tasks', 'Hours'),\n minuteText: t('tasks', 'Minutes')\n });\n }\n };\n});","'use strict';\n\nangular.module('Tasks').directive('watchTop', function () {\n 'use strict';\n\n return {\n restrict: 'A',\n link: function link(scope, element, attr) {\n ({\n scope: {\n \"divTop\": \"=\"\n }\n });\n return scope.$watch(function () {\n scope.divTop = element.prev().outerHeight(true);\n });\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('counterFormatter', function () {\n 'use strict';\n\n return function (count) {\n switch (false) {\n case count !== 0:\n return '';\n case count < 999:\n return '999+';\n default:\n return count;\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('dateDetails', function () {\n 'use strict';\n\n return function (due) {\n if (moment(due, \"YYYYMMDDTHHmmss\").isValid()) {\n return moment(due, \"YYYYMMDDTHHmmss\").locale(due.isDate ? 'details_allday' : 'details').calendar();\n } else {\n return t('tasks', 'Set due date');\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('dateDetailsShort', function () {\n 'use strict';\n\n return function (reminder) {\n if (moment(reminder, \"YYYYMMDDTHHmmss\").isValid()) {\n return moment(reminder, \"YYYYMMDDTHHmmss\").locale('details_short').calendar();\n } else {\n return '';\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('dateFromNow', function () {\n 'use strict';\n\n return function (due) {\n if (moment(due, \"YYYYMMDDTHHmmss\").isValid()) {\n return moment(due, \"YYYYMMDDTHHmmss\").fromNow();\n } else {\n return '';\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('dateTaskList', function () {\n 'use strict';\n\n return function (due) {\n if (moment(due, \"YYYYMMDDTHHmmss\").isValid()) {\n return moment(due, \"YYYYMMDDTHHmmss\").locale('tasks').calendar();\n } else {\n return '';\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('day', function () {\n 'use strict';\n\n return function (i) {\n return moment().add('days', i).locale('list_week').calendar();\n };\n});","'use strict';\n\nangular.module('Tasks').filter('dayTaskList', function () {\n 'use strict';\n\n return function (due) {\n if (moment(due, \"YYYYMMDDTHHmmss\").isValid()) {\n return moment(due, \"YYYYMMDDTHHmmss\").locale('tasks').calendar();\n } else {\n return '';\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('percentDetails', function () {\n 'use strict';\n\n return function (percent) {\n return t('tasks', '%s %% completed').replace('%s', percent).replace('%%', '%');\n };\n});","'use strict';\n\nangular.module('Tasks').filter('priorityDetails', function () {\n 'use strict';\n\n return function (priority) {\n var string;\n string = t('tasks', 'priority %s: ').replace('%s', priority);\n if (+priority === 6 || +priority === 7 || +priority === 8 || +priority === 9) {\n return string + ' ' + t('tasks', 'high');\n } else if (+priority === 5) {\n return string + ' ' + t('tasks', 'medium');\n } else if (+priority === 1 || +priority === 2 || +priority === 3 || +priority === 4) {\n return string + ' ' + t('tasks', 'low');\n } else {\n return t('tasks', 'no priority assigned');\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('reminderDetails', function () {\n\t'use strict';\n\n\treturn function (reminder, scope) {\n\t\tvar ds, time, token, _i, _len, _ref;\n\t\tif (!(angular.isUndefined(reminder) || reminder === null)) {\n\t\t\tif (reminder.type === 'DATE-TIME' && moment(reminder.date, \"YYYYMMDDTHHmmss\").isValid()) {\n\t\t\t\treturn moment(reminder.date, \"YYYYMMDDTHHmmss\").locale('reminder').calendar();\n\t\t\t} else if (reminder.type === 'DURATION' && reminder.duration) {\n\t\t\t\tds = t('tasks', 'Remind me');\n\t\t\t\t_ref = scope.durations;\n\t\t\t\tfor (_i = 0, _len = _ref.length; _i < _len; _i++) {\n\t\t\t\t\ttoken = _ref[_i];\n\t\t\t\t\tif (+reminder.duration[token.id]) {\n\t\t\t\t\t\ttime = 1;\n\t\t\t\t\t\tds += ' ' + reminder.duration[token.id] + ' ';\n\t\t\t\t\t\tif (+reminder.duration[token.id] === 1) {\n\t\t\t\t\t\t\tds += token.name;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tds += token.names;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!time) {\n\t\t\t\t\tif (reminder.duration.params.related === 'END') {\n\t\t\t\t\t\tds += ' ' + t('tasks', 'at the end');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tds += ' ' + t('tasks', 'at the beginning');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (reminder.duration.params.invert) {\n\t\t\t\t\t\tif (reminder.duration.params.related === 'END') {\n\t\t\t\t\t\t\tds += ' ' + t('tasks', 'before end');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tds += ' ' + t('tasks', 'before beginning');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (reminder.duration.params.related === 'END') {\n\t\t\t\t\t\t\tds += ' ' + t('tasks', 'after end');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tds += ' ' + t('tasks', 'after beginning');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn ds;\n\t\t\t} else {\n\t\t\t\treturn t('tasks', 'Remind me');\n\t\t\t}\n\t\t} else {\n\t\t\treturn t('tasks', 'Remind me');\n\t\t}\n\t};\n});","'use strict';\n\nangular.module('Tasks').filter('startDetails', function () {\n 'use strict';\n\n return function (due) {\n if (moment(due, \"YYYYMMDDTHHmmss\").isValid()) {\n return moment(due, \"YYYYMMDDTHHmmss\").locale(due.isDate ? 'start_allday' : 'start').calendar();\n } else {\n return t('tasks', 'Set start date');\n }\n };\n});","'use strict';\n\nangular.module('Tasks').filter('timeTaskList', function () {\n 'use strict';\n\n return function (due) {\n if (moment(due, \"YYYYMMDDTHHmmss\").isValid()) {\n return moment(due, \"YYYYMMDDTHHmmss\").format('HH:mm');\n } else {\n return '';\n }\n };\n});","'use strict';\n\nangular.module('Tasks').service('CalendarService', ['DavClient', 'Calendar', function (DavClient, Calendar) {\n\t'use strict';\n\n\tvar _this = this;\n\n\tthis._CALENDAR_HOME = null;\n\n\tthis._currentUserPrincipal = null;\n\n\tthis._takenUrls = [];\n\n\tthis._PROPERTIES = ['{' + DavClient.NS_DAV + '}displayname', '{' + DavClient.NS_IETF + '}calendar-description', '{' + DavClient.NS_IETF + '}calendar-timezone', '{' + DavClient.NS_APPLE + '}calendar-order', '{' + DavClient.NS_APPLE + '}calendar-color', '{' + DavClient.NS_IETF + '}supported-calendar-component-set', '{' + DavClient.NS_OWNCLOUD + '}calendar-enabled', '{' + DavClient.NS_DAV + '}acl', '{' + DavClient.NS_DAV + '}owner', '{' + DavClient.NS_OWNCLOUD + '}invite'];\n\n\tfunction discoverHome(callback) {\n\t\treturn DavClient.propFind(DavClient.buildUrl(OC.linkToRemoteBase('dav')), ['{' + DavClient.NS_DAV + '}current-user-principal'], 0, { 'requesttoken': OC.requestToken }).then(function (response) {\n\t\t\tif (!DavClient.wasRequestSuccessful(response.status)) {\n\t\t\t\tthrow \"CalDAV client could not be initialized - Querying current-user-principal failed\";\n\t\t\t}\n\n\t\t\tif (response.body.propStat.length < 1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar props = response.body.propStat[0].properties;\n\t\t\t_this._currentUserPrincipal = props['{' + DavClient.NS_DAV + '}current-user-principal'][0].textContent;\n\n\t\t\treturn DavClient.propFind(DavClient.buildUrl(_this._currentUserPrincipal), ['{' + DavClient.NS_IETF + '}calendar-home-set'], 0, { 'requesttoken': OC.requestToken }).then(function (response) {\n\t\t\t\tif (!DavClient.wasRequestSuccessful(response.status)) {\n\t\t\t\t\tthrow \"CalDAV client could not be initialized - Querying calendar-home-set failed\";\n\t\t\t\t}\n\n\t\t\t\tif (response.body.propStat.length < 1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar props = response.body.propStat[0].properties;\n\t\t\t\t_this._CALENDAR_HOME = props['{' + DavClient.NS_IETF + '}calendar-home-set'][0].textContent;\n\n\t\t\t\treturn callback();\n\t\t\t});\n\t\t});\n\t}\n\n\tfunction getResponseCodeFromHTTPResponse(t) {\n\t\treturn parseInt(t.split(' ')[1]);\n\t}\n\n\tthis.getAll = function () {\n\t\tif (this._CALENDAR_HOME === null) {\n\t\t\treturn discoverHome(function () {\n\t\t\t\treturn _this.getAll();\n\t\t\t});\n\t\t}\n\n\t\tvar prom = DavClient.propFind(DavClient.buildUrl(this._CALENDAR_HOME), this._PROPERTIES, 1, { 'requesttoken': OC.requestToken }).then(function (response) {\n\t\t\tvar calendars = [];\n\n\t\t\tif (!DavClient.wasRequestSuccessful(response.status)) {\n\t\t\t\tthrow \"CalDAV client could not be initialized - Querying calendars failed\";\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < response.body.length; i++) {\n\t\t\t\tvar body = response.body[i];\n\t\t\t\tif (body.propStat.length < 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t_this._takenUrls.push(body.href);\n\n\t\t\t\tvar responseCode = getResponseCodeFromHTTPResponse(body.propStat[0].status);\n\t\t\t\tif (!DavClient.wasRequestSuccessful(responseCode)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar doesSupportVTodo = false;\n\t\t\t\tvar components = body.propStat[0].properties['{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set'];\n\t\t\t\tif (components) {\n\t\t\t\t\tfor (var j = 0; j < components.length; j++) {\n\t\t\t\t\t\tvar name = components[j].attributes.getNamedItem('name').textContent.toLowerCase();\n\t\t\t\t\t\tif (name === 'vtodo') {\n\t\t\t\t\t\t\tdoesSupportVTodo = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!doesSupportVTodo) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t_this._getACLFromResponse(body);\n\n\t\t\t\tvar uri = body.href.substr(_this._CALENDAR_HOME.length).replace(/[^\\w\\-]+/g, '');\n\n\t\t\t\tvar calendar = new Calendar(body.href, body.propStat[0].properties, uri);\n\t\t\t\tcalendars.push(calendar);\n\t\t\t}\n\n\t\t\treturn calendars;\n\t\t});\n\t\treturn prom;\n\t};\n\n\tthis.get = function (url) {\n\t\tif (this._CALENDAR_HOME === null) {\n\t\t\treturn discoverHome(function () {\n\t\t\t\treturn _this.get(url);\n\t\t\t});\n\t\t}\n\n\t\treturn DavClient.propFind(DavClient.buildUrl(url), this._PROPERTIES, 0, { 'requesttoken': OC.requestToken }).then(function (response) {\n\t\t\tvar body = response.body;\n\t\t\tif (body.propStat.length < 1) {\n\t\t\t\t//TODO - something went wrong\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar responseCode = getResponseCodeFromHTTPResponse(body.propStat[0].status);\n\t\t\tif (!DavClient.wasRequestSuccessful(responseCode)) {\n\t\t\t\t//TODO - something went wrong\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_this._getACLFromResponse(body);\n\n\t\t\tvar uri = body.href.substr(_this._CALENDAR_HOME.length).replace(/[^\\w\\-]+/g, '');\n\n\t\t\treturn new Calendar(body.href, body.propStat[0].properties, uri);\n\t\t});\n\t};\n\n\tthis.create = function (name, color, components) {\n\t\tif (this._CALENDAR_HOME === null) {\n\t\t\treturn discoverHome(function () {\n\t\t\t\treturn _this.create(name, color);\n\t\t\t});\n\t\t}\n\n\t\tif (typeof components === 'undefined') {\n\t\t\tcomponents = ['vtodo'];\n\t\t}\n\n\t\tvar xmlDoc = document.implementation.createDocument('', '', null);\n\t\tvar cMkcalendar = xmlDoc.createElement('c:mkcalendar');\n\t\tcMkcalendar.setAttribute('xmlns:c', 'urn:ietf:params:xml:ns:caldav');\n\t\tcMkcalendar.setAttribute('xmlns:d', 'DAV:');\n\t\tcMkcalendar.setAttribute('xmlns:a', 'http://apple.com/ns/ical/');\n\t\tcMkcalendar.setAttribute('xmlns:o', 'http://owncloud.org/ns');\n\t\txmlDoc.appendChild(cMkcalendar);\n\n\t\tvar dSet = xmlDoc.createElement('d:set');\n\t\tcMkcalendar.appendChild(dSet);\n\n\t\tvar dProp = xmlDoc.createElement('d:prop');\n\t\tdSet.appendChild(dProp);\n\n\t\tdProp.appendChild(this._createXMLForProperty(xmlDoc, 'displayname', name));\n\t\tdProp.appendChild(this._createXMLForProperty(xmlDoc, 'enabled', true));\n\t\tdProp.appendChild(this._createXMLForProperty(xmlDoc, 'color', color));\n\t\tdProp.appendChild(this._createXMLForProperty(xmlDoc, 'components', components));\n\n\t\tvar body = cMkcalendar.outerHTML;\n\n\t\tvar uri = this._suggestUri(name);\n\t\tvar url = this._CALENDAR_HOME + uri + '/';\n\t\tvar headers = {\n\t\t\t'Content-Type': 'application/xml; charset=utf-8',\n\t\t\t'requesttoken': OC.requestToken\n\t\t};\n\n\t\treturn DavClient.request('MKCALENDAR', url, headers, body).then(function (response) {\n\t\t\tif (response.status === 201) {\n\t\t\t\t_this._takenUrls.push(url);\n\t\t\t\treturn _this.get(url).then(function (calendar) {\n\t\t\t\t\tcalendar.enabled = true;\n\t\t\t\t\treturn _this.update(calendar);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tthis.update = function (calendar) {\n\t\tvar xmlDoc = document.implementation.createDocument('', '', null);\n\t\tvar dPropUpdate = xmlDoc.createElement('d:propertyupdate');\n\t\tdPropUpdate.setAttribute('xmlns:c', 'urn:ietf:params:xml:ns:caldav');\n\t\tdPropUpdate.setAttribute('xmlns:d', 'DAV:');\n\t\tdPropUpdate.setAttribute('xmlns:a', 'http://apple.com/ns/ical/');\n\t\tdPropUpdate.setAttribute('xmlns:o', 'http://owncloud.org/ns');\n\t\txmlDoc.appendChild(dPropUpdate);\n\n\t\tvar dSet = xmlDoc.createElement('d:set');\n\t\tdPropUpdate.appendChild(dSet);\n\n\t\tvar dProp = xmlDoc.createElement('d:prop');\n\t\tdSet.appendChild(dProp);\n\n\t\tvar updatedProperties = calendar.updatedProperties;\n\t\tcalendar.resetUpdatedProperties();\n\t\tfor (var i = 0; i < updatedProperties.length; i++) {\n\t\t\tdProp.appendChild(this._createXMLForProperty(xmlDoc, updatedProperties[i], calendar[updatedProperties[i]]));\n\t\t}\n\n\t\tvar url = calendar.url;\n\t\tvar body = dPropUpdate.outerHTML;\n\t\tvar headers = {\n\t\t\t'Content-Type': 'application/xml; charset=utf-8',\n\t\t\t'requesttoken': OC.requestToken\n\t\t};\n\n\t\treturn DavClient.request('PROPPATCH', url, headers, body).then(function (response) {\n\t\t\treturn calendar;\n\t\t});\n\t};\n\n\tthis.delete = function (calendar) {\n\t\treturn DavClient.request('DELETE', calendar.url, { 'requesttoken': OC.requestToken }, '').then(function (response) {\n\t\t\tif (response.status === 204) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// TODO - handle error case\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t};\n\n\tthis.share = function (calendar, shareType, shareWith, writable, existingShare) {\n\t\tvar xmlDoc = document.implementation.createDocument('', '', null);\n\t\tvar oShare = xmlDoc.createElement('o:share');\n\t\toShare.setAttribute('xmlns:d', 'DAV:');\n\t\toShare.setAttribute('xmlns:o', 'http://owncloud.org/ns');\n\t\txmlDoc.appendChild(oShare);\n\n\t\tvar oSet = xmlDoc.createElement('o:set');\n\t\toShare.appendChild(oSet);\n\n\t\tvar dHref = xmlDoc.createElement('d:href');\n\t\tif (shareType === OC.Share.SHARE_TYPE_USER) {\n\t\t\tdHref.textContent = 'principal:principals/users/';\n\t\t} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\tdHref.textContent = 'principal:principals/groups/';\n\t\t}\n\t\tdHref.textContent += shareWith;\n\t\toSet.appendChild(dHref);\n\n\t\tvar oSummary = xmlDoc.createElement('o:summary');\n\t\toSummary.textContent = t('calendar', '{calendar} shared by {owner}', {\n\t\t\tcalendar: calendar.displayname,\n\t\t\towner: calendar.owner\n\t\t});\n\t\toSet.appendChild(oSummary);\n\n\t\tif (writable) {\n\t\t\tvar oRW = xmlDoc.createElement('o:read-write');\n\t\t\toSet.appendChild(oRW);\n\t\t}\n\n\t\tvar headers = {\n\t\t\t'Content-Type': 'application/xml; charset=utf-8',\n\t\t\trequesttoken: oc_requesttoken\n\t\t};\n\t\tvar body = oShare.outerHTML;\n\t\treturn DavClient.request('POST', calendar.url, headers, body).then(function (response) {\n\t\t\tif (response.status === 200) {\n\t\t\t\tif (!existingShare) {\n\t\t\t\t\tif (shareType === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\tcalendar.sharedWith.users.push({\n\t\t\t\t\t\t\tid: shareWith,\n\t\t\t\t\t\t\tdisplayname: shareWith,\n\t\t\t\t\t\t\twritable: writable\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\tcalendar.sharedWith.groups.push({\n\t\t\t\t\t\t\tid: shareWith,\n\t\t\t\t\t\t\tdisplayname: shareWith,\n\t\t\t\t\t\t\twritable: writable\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tthis.unshare = function (calendar, shareType, shareWith) {\n\t\tvar xmlDoc = document.implementation.createDocument('', '', null);\n\t\tvar oShare = xmlDoc.createElement('o:share');\n\t\toShare.setAttribute('xmlns:d', 'DAV:');\n\t\toShare.setAttribute('xmlns:o', 'http://owncloud.org/ns');\n\t\txmlDoc.appendChild(oShare);\n\n\t\tvar oRemove = xmlDoc.createElement('o:remove');\n\t\toShare.appendChild(oRemove);\n\n\t\tvar dHref = xmlDoc.createElement('d:href');\n\t\tif (shareType === OC.Share.SHARE_TYPE_USER) {\n\t\t\tdHref.textContent = 'principal:principals/users/';\n\t\t} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\tdHref.textContent = 'principal:principals/groups/';\n\t\t}\n\t\tdHref.textContent += shareWith;\n\t\toRemove.appendChild(dHref);\n\n\t\tvar headers = {\n\t\t\t'Content-Type': 'application/xml; charset=utf-8',\n\t\t\trequesttoken: oc_requesttoken\n\t\t};\n\t\tvar body = oShare.outerHTML;\n\t\treturn DavClient.request('POST', calendar.url, headers, body).then(function (response) {\n\t\t\tif (response.status === 200) {\n\t\t\t\tif (shareType === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\tcalendar.sharedWith.users = calendar.sharedWith.users.filter(function (user) {\n\t\t\t\t\t\treturn user.id !== shareWith;\n\t\t\t\t\t});\n\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\tcalendar.sharedWith.groups = calendar.sharedWith.groups.filter(function (groups) {\n\t\t\t\t\t\treturn groups.id !== shareWith;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t//todo - remove entry from calendar object\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t};\n\n\tthis._createXMLForProperty = function (xmlDoc, propName, value) {\n\t\tswitch (propName) {\n\t\t\tcase 'enabled':\n\t\t\t\tvar oEnabled = xmlDoc.createElement('o:calendar-enabled');\n\t\t\t\toEnabled.textContent = value ? '1' : '0';\n\t\t\t\treturn oEnabled;\n\n\t\t\tcase 'displayname':\n\t\t\t\tvar dDisplayname = xmlDoc.createElement('d:displayname');\n\t\t\t\tdDisplayname.textContent = value;\n\t\t\t\treturn dDisplayname;\n\n\t\t\tcase 'order':\n\t\t\t\tvar aOrder = xmlDoc.createElement('a:calendar-color');\n\t\t\t\taOrder.textContent = value;\n\t\t\t\treturn aOrder;\n\n\t\t\tcase 'color':\n\t\t\t\tvar aColor = xmlDoc.createElement('a:calendar-color');\n\t\t\t\taColor.textContent = value;\n\t\t\t\treturn aColor;\n\n\t\t\tcase 'components':\n\t\t\t\tvar cComponents = xmlDoc.createElement('c:supported-calendar-component-set');\n\t\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\t\tvar cComp = xmlDoc.createElement('c:comp');\n\t\t\t\t\tcComp.setAttribute('name', value[i].toUpperCase());\n\t\t\t\t\tcComponents.appendChild(cComp);\n\t\t\t\t}\n\t\t\t\treturn cComponents;\n\t\t}\n\t};\n\n\tthis._getACLFromResponse = function (body) {\n\t\tvar canWrite = false;\n\t\tvar acl = body.propStat[0].properties['{' + DavClient.NS_DAV + '}acl'];\n\t\tif (acl) {\n\t\t\tfor (var k = 0; k < acl.length; k++) {\n\t\t\t\tvar href = acl[k].getElementsByTagNameNS('DAV:', 'href');\n\t\t\t\tif (href.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\thref = href[0].textContent;\n\t\t\t\tif (href !== _this._currentUserPrincipal) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tvar writeNode = acl[k].getElementsByTagNameNS('DAV:', 'write');\n\t\t\t\tif (writeNode.length > 0) {\n\t\t\t\t\tcanWrite = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbody.propStat[0].properties.canWrite = canWrite;\n\t};\n\n\tthis._isUriAlreadyTaken = function (uri) {\n\t\treturn this._takenUrls.indexOf(this._CALENDAR_HOME + uri + '/') !== -1;\n\t};\n\n\tthis._suggestUri = function (displayname) {\n\t\tvar uri = displayname.toString().toLowerCase().replace(/\\s+/g, '-') // Replace spaces with -\n\t\t.replace(/[^\\w\\-]+/g, '') // Remove all non-word chars\n\t\t.replace(/\\-\\-+/g, '-') // Replace multiple - with single -\n\t\t.replace(/^-+/, '') // Trim - from start of text\n\t\t.replace(/-+$/, ''); // Trim - from end of text\n\n\t\tif (!this._isUriAlreadyTaken(uri)) {\n\t\t\treturn uri;\n\t\t}\n\n\t\tif (uri.indexOf('-') === -1) {\n\t\t\turi = uri + '-1';\n\t\t\tif (!this._isUriAlreadyTaken(uri)) {\n\t\t\t\treturn uri;\n\t\t\t}\n\t\t}\n\n\t\twhile (this._isUriAlreadyTaken(uri)) {\n\t\t\tvar positionLastDash = uri.lastIndexOf('-');\n\t\t\tvar firstPart = uri.substr(0, positionLastDash);\n\t\t\tvar lastPart = uri.substr(positionLastDash + 1);\n\n\t\t\tif (lastPart.match(/^\\d+$/)) {\n\t\t\t\tlastPart = parseInt(lastPart);\n\t\t\t\tlastPart++;\n\n\t\t\t\turi = firstPart + '-' + lastPart;\n\t\t\t} else if (lastPart === '') {\n\t\t\t\turi = uri + '1';\n\t\t\t} else {\n\t\t\t\turi = uri = '-1';\n\t\t\t}\n\t\t}\n\n\t\treturn uri;\n\t};\n}]);","'use strict';\n\nangular.module('Tasks').service('DavClient', [function () {\n\t'use strict';\n\n\tvar client;\n\tclient = new dav.Client({\n\t\tbaseUrl: OC.linkToRemote('dav/calendars'),\n\t\txmlNamespaces: {\n\t\t\t'DAV:': 'd',\n\t\t\t'urn:ietf:params:xml:ns:caldav': 'c',\n\t\t\t'http://apple.com/ns/ical/': 'aapl',\n\t\t\t'http://owncloud.org/ns': 'oc',\n\t\t\t'http://nextcloud.com/ns': 'nc',\n\t\t\t'http://calendarserver.org/ns/': 'cs'\n\t\t}\n\t});\n\tangular.extend(client, {\n\t\tNS_DAV: 'DAV:',\n\t\tNS_IETF: 'urn:ietf:params:xml:ns:caldav',\n\t\tNS_APPLE: 'http://apple.com/ns/ical/',\n\t\tNS_OWNCLOUD: 'http://owncloud.org/ns',\n\t\tNS_NEXTCLOUD: 'http://nextcloud.com/ns',\n\t\tNS_CALENDARSERVER: 'http://calendarserver.org/ns/',\n\t\tbuildUrl: function buildUrl(path) {\n\t\t\treturn window.location.protocol + '//' + window.location.host + path;\n\t\t},\n\t\twasRequestSuccessful: function wasRequestSuccessful(status) {\n\t\t\treturn status >= 200 && status <= 299;\n\t\t}\n\t});\n\treturn client;\n}]);","'use strict';\n\nangular.module('Tasks').service('ICalFactory', [function () {\n 'use strict';\n\n // creates a new ICAL root element with a product id property\n\n return {\n new: function _new() {\n var root = new ICAL.Component(['vcalendar', [], []]);\n\n var version = angular.element('#app').attr('data-appVersion');\n root.updatePropertyWithValue('prodid', '-//Nextcloud Tasks v' + version);\n\n return root;\n }\n };\n}]);","'use strict';\n\nangular.module('Tasks').factory('Loading', [function () {\n\t'use strict';\n\n\tvar Loading = function () {\n\t\tfunction Loading() {\n\t\t\tthis.count = 0;\n\t\t}\n\n\t\tLoading.prototype.increase = function () {\n\t\t\treturn this.count += 1;\n\t\t};\n\n\t\tLoading.prototype.decrease = function () {\n\t\t\treturn this.count -= 1;\n\t\t};\n\n\t\tLoading.prototype.getCount = function () {\n\t\t\treturn this.count;\n\t\t};\n\n\t\tLoading.prototype.isLoading = function () {\n\t\t\treturn this.count > 0;\n\t\t};\n\n\t\treturn Loading;\n\t}();\n\treturn new Loading();\n}]);","'use strict';\n\n(function () {\n\t'use strict';\n\n\tangular.module('Tasks').factory('_Model', [function () {\n\t\tvar Model;\n\t\tModel = function () {\n\t\t\tfunction Model() {\n\t\t\t\tthis._data = [];\n\t\t\t\tthis._dataMap = {};\n\t\t\t\tthis._filterCache = {};\n\t\t\t}\n\n\t\t\tModel.prototype.handle = function (data) {\n\t\t\t\tvar item, _i, _len, _results;\n\t\t\t\t_results = [];\n\t\t\t\tfor (_i = 0, _len = data.length; _i < _len; _i++) {\n\t\t\t\t\titem = data[_i];\n\t\t\t\t\t_results.push(this.add(item));\n\t\t\t\t}\n\t\t\t\treturn _results;\n\t\t\t};\n\n\t\t\tModel.prototype.add = function (data, clearCache) {\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\tif (clearCache) {\n\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t}\n\t\t\t\tif (angular.isDefined(this._dataMap[data.id])) {\n\t\t\t\t\treturn this.update(data, clearCache);\n\t\t\t\t} else {\n\t\t\t\t\tthis._data.push(data);\n\t\t\t\t\tthis._dataMap[data.id] = data;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tModel.prototype.update = function (data, clearCache) {\n\t\t\t\tvar entry, key, value, _results;\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\tif (clearCache) {\n\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t}\n\t\t\t\tentry = this.getById(data.id);\n\t\t\t\t_results = [];\n\t\t\t\tfor (key in data) {\n\t\t\t\t\tvalue = data[key];\n\t\t\t\t\tif (key === 'id') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_results.push(entry[key] = value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn _results;\n\t\t\t};\n\n\t\t\tModel.prototype.getById = function (id) {\n\t\t\t\treturn this._dataMap[id];\n\t\t\t};\n\n\t\t\tModel.prototype.getAll = function () {\n\t\t\t\treturn this._data;\n\t\t\t};\n\n\t\t\tModel.prototype.removeById = function (id, clearCache) {\n\t\t\t\tvar counter, data, entry, _i, _len, _ref;\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\t_ref = this._data;\n\t\t\t\tfor (counter = _i = 0, _len = _ref.length; _i < _len; counter = ++_i) {\n\t\t\t\t\tentry = _ref[counter];\n\t\t\t\t\tif (entry.id === id) {\n\t\t\t\t\t\tthis._data.splice(counter, 1);\n\t\t\t\t\t\tdata = this._dataMap[id];\n\t\t\t\t\t\tdelete this._dataMap[id];\n\t\t\t\t\t\tif (clearCache) {\n\t\t\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tModel.prototype.clear = function () {\n\t\t\t\tthis._data.length = 0;\n\t\t\t\tthis._dataMap = {};\n\t\t\t\treturn this._invalidateCache();\n\t\t\t};\n\n\t\t\tModel.prototype._invalidateCache = function () {\n\t\t\t\tthis._filterCache = {};\n\t\t\t};\n\n\t\t\tModel.prototype.get = function (query) {\n\t\t\t\tvar hash;\n\t\t\t\thash = query.hashCode();\n\t\t\t\tif (!angular.isDefined(this._filterCache[hash])) {\n\t\t\t\t\tthis._filterCache[hash] = query.exec(this._data);\n\t\t\t\t}\n\t\t\t\treturn this._filterCache[hash];\n\t\t\t};\n\n\t\t\tModel.prototype.size = function () {\n\t\t\t\treturn this._data.length;\n\t\t\t};\n\n\t\t\treturn Model;\n\t\t}();\n\t\treturn Model;\n\t}]);\n}).call(undefined);","'use strict';\n\nangular.module('Tasks').factory('Persistence', ['Request', 'Loading', '$rootScope', '$q', 'CalendarService', function (Request, Loading, $rootScope, $q, CalendarService) {\n\t'use strict';\n\n\tvar Persistence = function () {\n\t\tfunction Persistence(_request, _Loading, _$rootScope, _CalendarService) {\n\t\t\tthis._request = _request;\n\t\t\tthis._Loading = _Loading;\n\t\t\tthis._$rootScope = _$rootScope;\n\t\t\tthis._CalendarService = _CalendarService;\n\t\t}\n\n\t\tPersistence.prototype.init = function () {\n\t\t\tvar successCallback,\n\t\t\t _this = this;\n\t\t\tthis.deferred = $q.defer();\n\t\t\tsuccessCallback = function successCallback() {\n\t\t\t\treturn _this.deferred.resolve();\n\t\t\t};\n\t\t\tthis.getCollections();\n\t\t\tthis.getSettings();\n\t\t\treturn this.deferred.promise;\n\t\t};\n\n\t\tPersistence.prototype.getCollections = function (onSuccess, showLoading) {\n\t\t\tvar failureCallbackWrapper,\n\t\t\t params,\n\t\t\t successCallbackWrapper,\n\t\t\t _this = this;\n\t\t\tif (showLoading === null) {\n\t\t\t\tshowLoading = true;\n\t\t\t}\n\t\t\tif (!onSuccess) {\n\t\t\t\tonSuccess = function onSuccess() {};\n\t\t\t}\n\t\t\tif (showLoading) {\n\t\t\t\tthis._Loading.increase();\n\t\t\t\tsuccessCallbackWrapper = function successCallbackWrapper(data) {\n\t\t\t\t\tonSuccess();\n\t\t\t\t\treturn _this._Loading.decrease();\n\t\t\t\t};\n\t\t\t\tfailureCallbackWrapper = function failureCallbackWrapper(data) {\n\t\t\t\t\treturn _this._Loading.decrease();\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tsuccessCallbackWrapper = function successCallbackWrapper(data) {\n\t\t\t\t\treturn onSuccess();\n\t\t\t\t};\n\t\t\t\tfailureCallbackWrapper = function failureCallbackWrapper(data) {};\n\t\t\t}\n\t\t\tparams = {\n\t\t\t\tonSuccess: successCallbackWrapper,\n\t\t\t\tonFailure: failureCallbackWrapper\n\t\t\t};\n\t\t\treturn this._request.get('/apps/tasks/collections', params);\n\t\t};\n\n\t\tPersistence.prototype.getSettings = function (onSuccess, showLoading) {\n\t\t\tvar failureCallbackWrapper,\n\t\t\t params,\n\t\t\t successCallbackWrapper,\n\t\t\t _this = this;\n\t\t\tif (showLoading === null) {\n\t\t\t\tshowLoading = true;\n\t\t\t}\n\t\t\tif (!onSuccess) {\n\t\t\t\tonSuccess = function onSuccess() {};\n\t\t\t}\n\t\t\tif (showLoading) {\n\t\t\t\tthis._Loading.increase();\n\t\t\t\tsuccessCallbackWrapper = function successCallbackWrapper(data) {\n\t\t\t\t\tonSuccess();\n\t\t\t\t\treturn _this._Loading.decrease();\n\t\t\t\t};\n\t\t\t\tfailureCallbackWrapper = function failureCallbackWrapper(data) {\n\t\t\t\t\treturn _this._Loading.decrease();\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tsuccessCallbackWrapper = function successCallbackWrapper(data) {\n\t\t\t\t\treturn onSuccess();\n\t\t\t\t};\n\t\t\t\tfailureCallbackWrapper = function failureCallbackWrapper(data) {};\n\t\t\t}\n\t\t\tparams = {\n\t\t\t\tonSuccess: successCallbackWrapper,\n\t\t\t\tonFailure: failureCallbackWrapper\n\t\t\t};\n\t\t\treturn this._request.get('/apps/tasks/settings', params);\n\t\t};\n\n\t\tPersistence.prototype.setVisibility = function (collectionID, visibility) {\n\t\t\tvar params = {\n\t\t\t\trouteParams: {\n\t\t\t\t\tcollectionID: collectionID,\n\t\t\t\t\tvisibility: visibility\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn this._request.post('/apps/tasks/collection/{collectionID}/visibility/{visibility}', params);\n\t\t};\n\n\t\tPersistence.prototype.setting = function (type, setting, value) {\n\t\t\tvar params = {\n\t\t\t\trouteParams: {\n\t\t\t\t\ttype: type,\n\t\t\t\t\tsetting: setting,\n\t\t\t\t\tvalue: value\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn this._request.post('/apps/tasks/settings/{type}/{setting}/{value}', params);\n\t\t};\n\t\treturn Persistence;\n\t}();\n\treturn new Persistence(Request, Loading, $rootScope, CalendarService);\n}]);","'use strict';\n\nangular.module('Tasks').factory('Publisher', ['CollectionsModel', 'SettingsModel', function (CollectionsModel, SettingsModel) {\n\t'use strict';\n\n\tvar Publisher = function () {\n\t\tfunction Publisher(_$collectionsmodel, _$settingsmodel) {\n\t\t\tthis._$collectionsmodel = _$collectionsmodel;\n\t\t\tthis._$settingsmodel = _$settingsmodel;\n\t\t\tthis._subscriptions = {};\n\t\t\tthis.subscribeObjectTo(this._$collectionsmodel, 'collections');\n\t\t\tthis.subscribeObjectTo(this._$settingsmodel, 'settings');\n\t\t}\n\n\t\tPublisher.prototype.subscribeObjectTo = function (object, name) {\n\t\t\tvar base = this._subscriptions;\n\t\t\tif (!base[name]) {\n\t\t\t\tbase[name] = [];\n\t\t\t}\n\t\t\treturn this._subscriptions[name].push(object);\n\t\t};\n\n\t\tPublisher.prototype.publishDataTo = function (data, name) {\n\t\t\tvar ref, results, subscriber, _i, _len;\n\t\t\tref = this._subscriptions[name] || [];\n\t\t\tresults = [];\n\t\t\tfor (_i = 0, _len = ref.length; _i < _len; _i++) {\n\t\t\t\tsubscriber = ref[_i];\n\t\t\t\tresults.push(subscriber.handle(data));\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\t\treturn Publisher;\n\t}();\n\treturn new Publisher(CollectionsModel, SettingsModel);\n}]);","'use strict';\n\nangular.module('Tasks').factory('RandomStringService', function () {\n 'use strict';\n\n return {\n generate: function generate() {\n return Math.random().toString(36).substr(2);\n }\n };\n});","'use strict';\n\nangular.module('Tasks').factory('Request', ['$http', 'Publisher', function ($http, Publisher) {\n\t'use strict';\n\n\tvar Request = function () {\n\t\tfunction Request($http, publisher) {\n\t\t\tthis.$http = $http;\n\t\t\tthis.publisher = publisher;\n\t\t\tthis.count = 0;\n\t\t\tthis.initialized = false;\n\t\t\tthis.shelvedRequests = [];\n\t\t\tthis.initialized = true;\n\t\t\tthis._executeShelvedRequests();\n\t\t}\n\n\t\tRequest.prototype.request = function (route, data) {\n\t\t\tvar defaultConfig, defaultData, url;\n\t\t\tif (data === null) {\n\t\t\t\tdata = {};\n\t\t\t}\n\t\t\tdefaultData = {\n\t\t\t\trouteParams: {},\n\t\t\t\tdata: {},\n\t\t\t\tonSuccess: function onSuccess() {\n\t\t\t\t\treturn {};\n\t\t\t\t},\n\t\t\t\tonFailure: function onFailure() {\n\t\t\t\t\treturn {};\n\t\t\t\t},\n\t\t\t\tconfig: {}\n\t\t\t};\n\t\t\tangular.extend(defaultData, data);\n\t\t\tif (!this.initialized) {\n\t\t\t\tthis._shelveRequest(route, defaultData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\turl = OC.generateUrl(route, defaultData.routeParams);\n\t\t\tdefaultConfig = {\n\t\t\t\turl: url,\n\t\t\t\tdata: defaultData.data\n\t\t\t};\n\t\t\tangular.extend(defaultConfig, defaultData.config);\n\t\t\tif (defaultConfig.method === 'GET') {\n\t\t\t\tdefaultConfig.params = defaultConfig.data;\n\t\t\t}\n\t\t\treturn this.$http(defaultConfig).then(function (_this) {\n\t\t\t\treturn function (response) {\n\t\t\t\t\tvar name, ref, value;\n\t\t\t\t\tref = response.data.data;\n\t\t\t\t\tfor (name in ref) {\n\t\t\t\t\t\tvalue = ref[name];\n\t\t\t\t\t\t_this.publisher.publishDataTo(value, name);\n\t\t\t\t\t}\n\t\t\t\t\treturn defaultData.onSuccess(response.data, response.status, response.headers, response.config);\n\t\t\t\t};\n\t\t\t}(this)).catch(function (response) {\n\t\t\t\treturn defaultData.onFailure(response.data, response.status, response.headers, response.config);\n\t\t\t});\n\t\t};\n\n\t\tRequest.prototype.post = function (route, data) {\n\t\t\tif (data === null) {\n\t\t\t\tdata = {};\n\t\t\t}\n\t\t\tif (!data.config) {\n\t\t\t\tdata.config = {};\n\t\t\t}\n\t\t\tdata.config.method = 'POST';\n\t\t\treturn this.request(route, data);\n\t\t};\n\n\t\tRequest.prototype.get = function (route, data) {\n\t\t\tif (data === null) {\n\t\t\t\tdata = {};\n\t\t\t}\n\t\t\tif (!data.config) {\n\t\t\t\tdata.config = {};\n\t\t\t}\n\t\t\tdata.config.method = 'GET';\n\t\t\treturn this.request(route, data);\n\t\t};\n\n\t\tRequest.prototype.put = function (route, data) {\n\t\t\tif (data === null) {\n\t\t\t\tdata = {};\n\t\t\t}\n\t\t\tif (!data.config) {\n\t\t\t\tdata.config = {};\n\t\t\t}\n\t\t\tdata.config.method = 'PUT';\n\t\t\treturn this.request(route, data);\n\t\t};\n\n\t\tRequest.prototype[\"delete\"] = function (route, data) {\n\t\t\tif (data === null) {\n\t\t\t\tdata = {};\n\t\t\t}\n\t\t\tif (!data.config) {\n\t\t\t\tdata.config = {};\n\t\t\t}\n\t\t\tdata.config.method = 'DELETE';\n\t\t\treturn this.request(route, data);\n\t\t};\n\n\t\tRequest.prototype._shelveRequest = function (route, data) {\n\t\t\tvar request = {\n\t\t\t\troute: route,\n\t\t\t\tdata: data\n\t\t\t};\n\t\t\treturn this.shelvedRequests.push(request);\n\t\t};\n\n\t\tRequest.prototype._executeShelvedRequests = function () {\n\t\t\tvar r, ref, results, _i, _len;\n\t\t\tref = this.shelvedRequests;\n\t\t\tresults = [];\n\t\t\tfor (_i = 0, _len = ref.length; _i < _len; _i++) {\n\t\t\t\tr = ref[_i];\n\t\t\t\tresults.push(this.request(r.route, r.data));\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\t\treturn Request;\n\t}();\n\treturn new Request($http, Publisher);\n}]);","'use strict';\n\nangular.module('Tasks').factory('Status', [function () {\n 'use strict';\n\n var Status;\n Status = function () {\n function Status() {\n this._$status = {\n addingList: false,\n focusTaskInput: false\n };\n }\n\n Status.prototype.getStatus = function () {\n return this._$status;\n };\n\n return Status;\n }();\n return new Status();\n}]);","'use strict';\n\nangular.module('Tasks').service('VTodoService', ['DavClient', 'RandomStringService', '$timeout', function (DavClient, RandomStringService, $timeout) {\n\t'use strict';\n\n\tvar _this = this;\n\n\tthis.getAll = function (calendar, completed, parent) {\n\t\tif (completed === null) {\n\t\t\tcompleted = false;\n\t\t}\n\t\tif (parent === null) {\n\t\t\tparent = false;\n\t\t}\n\t\tvar xmlDoc = document.implementation.createDocument('', '', null);\n\t\tvar cCalQuery = xmlDoc.createElement('c:calendar-query');\n\t\tcCalQuery.setAttribute('xmlns:c', 'urn:ietf:params:xml:ns:caldav');\n\t\tcCalQuery.setAttribute('xmlns:d', 'DAV:');\n\t\tcCalQuery.setAttribute('xmlns:a', 'http://apple.com/ns/ical/');\n\t\tcCalQuery.setAttribute('xmlns:o', 'http://owncloud.org/ns');\n\t\txmlDoc.appendChild(cCalQuery);\n\n\t\tvar dProp = xmlDoc.createElement('d:prop');\n\t\tcCalQuery.appendChild(dProp);\n\n\t\tvar dGetEtag = xmlDoc.createElement('d:getetag');\n\t\tdProp.appendChild(dGetEtag);\n\n\t\tvar cCalendarData = xmlDoc.createElement('c:calendar-data');\n\t\tdProp.appendChild(cCalendarData);\n\n\t\tvar cFilter = xmlDoc.createElement('c:filter');\n\t\tcCalQuery.appendChild(cFilter);\n\n\t\tvar cCompFilterVCal = xmlDoc.createElement('c:comp-filter');\n\t\tcCompFilterVCal.setAttribute('name', 'VCALENDAR');\n\t\tcFilter.appendChild(cCompFilterVCal);\n\n\t\tvar cCompFilterVTodo = xmlDoc.createElement('c:comp-filter');\n\t\tcCompFilterVTodo.setAttribute('name', 'VTODO');\n\t\tcCompFilterVCal.appendChild(cCompFilterVTodo);\n\n\t\tvar cPropFilterCompleted = xmlDoc.createElement('c:prop-filter');\n\t\tcPropFilterCompleted.setAttribute('name', 'COMPLETED');\n\t\tcCompFilterVTodo.appendChild(cPropFilterCompleted);\n\n\t\tif (!completed) {\n\t\t\tvar cIsNotDefined = xmlDoc.createElement('c:is-not-defined');\n\t\t\tcPropFilterCompleted.appendChild(cIsNotDefined);\n\t\t}\n\n\t\tif (parent) {\n\t\t\tvar cPropFilterRelated = xmlDoc.createElement('c:prop-filter');\n\t\t\tcPropFilterRelated.setAttribute('name', 'RELATED-TO');\n\t\t\tcCompFilterVTodo.appendChild(cPropFilterRelated);\n\t\t\tvar cTextMatch = xmlDoc.createElement('c:text-match');\n\t\t\tvar cTextMatchValue = xmlDoc.createTextNode(parent.uid);\n\t\t\tcTextMatch.appendChild(cTextMatchValue);\n\t\t\tcPropFilterRelated.appendChild(cTextMatch);\n\t\t}\n\n\t\t// var cPropFilterStatus = xmlDoc.createElement('c:prop-filter');\n\t\t// cPropFilterStatus.setAttribute('name', 'STATUS');\n\t\t// cCompFilterVTodo.appendChild(cPropFilterStatus);\n\n\t\t// var cTextMatch = xmlDoc.createElement('c:text-match');\n\t\t// cTextMatch.setAttribute('negate-condition', 'yes');\n\t\t// var cTextMatchValue = xmlDoc.createTextNode('CANCELLED');\n\t\t// cTextMatch.appendChild(cTextMatchValue);\n\t\t// cPropFilterStatus.appendChild(cTextMatch);\n\n\t\t// var cTimeRange = xmlDoc.createElement('c:time-range');\n\t\t// cTimeRange.setAttribute('start', this._getTimeRangeStamp(start));\n\t\t// cTimeRange.setAttribute('end', this._getTimeRangeStamp(end));\n\t\t// cCompFilterVTodo.appendChild(cTimeRange);\n\n\t\tvar url = calendar.url;\n\t\tvar headers = {\n\t\t\t'Content-Type': 'application/xml; charset=utf-8',\n\t\t\t'Depth': 1,\n\t\t\t'requesttoken': OC.requestToken\n\t\t};\n\t\tvar body = cCalQuery.outerHTML;\n\n\t\treturn DavClient.request('REPORT', url, headers, body).then(function (response) {\n\t\t\tif (!DavClient.wasRequestSuccessful(response.status)) {\n\t\t\t\t//TODO - something went wrong\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar vTodos = [];\n\n\t\t\tfor (var i in response.body) {\n\t\t\t\tvar object = response.body[i];\n\t\t\t\tvar properties = object.propStat[0].properties;\n\n\t\t\t\tvar uri = object.href.substr(object.href.lastIndexOf('/') + 1);\n\n\t\t\t\tvar vTodo = {\n\t\t\t\t\tcalendar: calendar,\n\t\t\t\t\tproperties: properties,\n\t\t\t\t\turi: uri\n\t\t\t\t};\n\t\t\t\tvTodos.push(vTodo);\n\t\t\t}\n\n\t\t\treturn vTodos;\n\t\t});\n\t};\n\n\tthis.get = function (calendar, uri) {\n\t\tvar url = calendar.url + uri;\n\t\treturn DavClient.request('GET', url, { 'requesttoken': OC.requestToken }, '').then(function (response) {\n\t\t\tvar vTodo = {\n\t\t\t\tcalendar: calendar,\n\t\t\t\tproperties: {\n\t\t\t\t\t'{urn:ietf:params:xml:ns:caldav}calendar-data': response.body,\n\t\t\t\t\t'{DAV:}getetag': response.xhr.getResponseHeader('ETag') },\n\t\t\t\turi: uri\n\t\t\t};\n\t\t\treturn vTodo;\n\t\t});\n\t};\n\n\tthis.create = function (calendar, data, returnTodo) {\n\t\tif (typeof returnTodo === 'undefined') {\n\t\t\treturnTodo = true;\n\t\t}\n\n\t\tvar headers = {\n\t\t\t'Content-Type': 'text/calendar; charset=utf-8',\n\t\t\t'requesttoken': OC.requestToken\n\t\t};\n\t\tvar uri = this._generateRandomUri();\n\t\tvar url = calendar.url + uri;\n\n\t\treturn DavClient.request('PUT', url, headers, data).then(function (response) {\n\t\t\tif (!DavClient.wasRequestSuccessful(response.status)) {\n\t\t\t\tconsole.log(response);\n\t\t\t\treturn false;\n\t\t\t\t// TODO - something went wrong, do smth about it\n\t\t\t}\n\n\t\t\treturn returnTodo ? _this.get(calendar, uri) : true;\n\t\t});\n\t};\n\n\tthis.update = function (task) {\n\t\tvar url = task.calendar.url + task.uri;\n\t\tvar headers = {\n\t\t\t'Content-Type': 'text/calendar; charset=utf-8',\n\t\t\t'If-Match': task.etag,\n\t\t\t'requesttoken': OC.requestToken\n\t\t};\n\t\t$timeout.cancel(task.timers.update);\n\t\treturn DavClient.request('PUT', url, headers, task.data).then(function (response) {\n\t\t\ttask.etag = response.xhr.getResponseHeader('ETag');\n\t\t\treturn DavClient.wasRequestSuccessful(response.status);\n\t\t});\n\t};\n\n\tthis.delete = function (task) {\n\t\tvar url = task.calendar.url + task.uri;\n\t\tvar headers = {\n\t\t\t'If-Match': task.etag,\n\t\t\t'requesttoken': OC.requestToken\n\t\t};\n\n\t\treturn DavClient.request('DELETE', url, headers, '').then(function (response) {\n\t\t\treturn DavClient.wasRequestSuccessful(response.status);\n\t\t});\n\t};\n\n\tthis._generateRandomUri = function () {\n\t\tvar uri = 'Nextcloud-';\n\t\turi += RandomStringService.generate();\n\t\turi += RandomStringService.generate();\n\t\turi += '.ics';\n\n\t\treturn uri;\n\t};\n\n\t// this._getTimeRangeStamp = function(momentObject) {\n\t// \treturn momentObject.format('YYYYMMDD') + 'T' + momentObject.format('HHmmss') + 'Z';\n\t// };\n}]);","'use strict';\n\nangular.module('Tasks').factory('ListsBusinessLayer', ['ListsModel', 'Persistence', 'TasksBusinessLayer', 'CalendarService', function (ListsModel, Persistence, TasksBusinessLayer, CalendarService) {\n\t'use strict';\n\n\tvar ListsBusinessLayer;\n\tListsBusinessLayer = function () {\n\t\tfunction ListsBusinessLayer(_$listsmodel, _persistence, _$tasksbusinesslayer, _$calendarservice) {\n\t\t\tthis._$listsmodel = _$listsmodel;\n\t\t\tthis._persistence = _persistence;\n\t\t\tthis._$tasksbusinesslayer = _$tasksbusinesslayer;\n\t\t\tthis._$calendarservice = _$calendarservice;\n\t\t}\n\n\t\tListsBusinessLayer.prototype.init = function () {\n\t\t\treturn this._$calendarservice.getAll().then(function (calendars) {\n\t\t\t\tvar calendar, _i, _len, _results;\n\t\t\t\t_results = [];\n\t\t\t\tfor (_i = 0, _len = calendars.length; _i < _len; _i++) {\n\t\t\t\t\tcalendar = calendars[_i];\n\t\t\t\t\tListsModel.add(calendar);\n\t\t\t\t\t_results.push(TasksBusinessLayer.getAll(calendar));\n\t\t\t\t}\n\t\t\t\treturn _results;\n\t\t\t});\n\t\t};\n\n\t\tListsBusinessLayer.prototype.add = function (calendar, color) {\n\t\t\treturn this._$calendarservice.create(calendar, color, ['vtodo']).then(function (calendar) {\n\t\t\t\tListsModel.add(calendar);\n\t\t\t\treturn calendar;\n\t\t\t});\n\t\t};\n\n\t\tListsBusinessLayer.prototype[\"delete\"] = function (calendar) {\n\t\t\treturn this._$calendarservice[\"delete\"](calendar).then(function () {\n\t\t\t\treturn ListsModel[\"delete\"](calendar);\n\t\t\t});\n\t\t};\n\n\t\tListsBusinessLayer.prototype.rename = function (calendar) {\n\t\t\tthis._$calendarservice.update(calendar).then(function (calendar) {\n\t\t\t\tcalendar.dropPreviousState();\n\t\t\t});\n\t\t};\n\n\t\treturn ListsBusinessLayer;\n\t}();\n\treturn new ListsBusinessLayer(ListsModel, Persistence, TasksBusinessLayer, CalendarService);\n}]);","'use strict';\n\n(function () {\n\t'use strict';\n\n\tvar __bind = function __bind(fn, me) {\n\t\treturn function () {\n\t\t\treturn fn.apply(me, arguments);\n\t\t};\n\t};\n\n\tangular.module('Tasks').factory('SearchBusinessLayer', ['ListsModel', 'Persistence', 'TasksModel', '$rootScope', '$routeParams', '$location', function (ListsModel, Persistence, TasksModel, $rootScope, $routeParams, $location) {\n\t\tvar SearchBusinessLayer;\n\t\tSearchBusinessLayer = function () {\n\t\t\tfunction SearchBusinessLayer(_$listsmodel, _persistence, _$tasksmodel, _$rootScope, _$routeparams, _$location) {\n\t\t\t\tthis._$listsmodel = _$listsmodel;\n\t\t\t\tthis._persistence = _persistence;\n\t\t\t\tthis._$tasksmodel = _$tasksmodel;\n\t\t\t\tthis._$rootScope = _$rootScope;\n\t\t\t\tthis._$routeparams = _$routeparams;\n\t\t\t\tthis._$location = _$location;\n\t\t\t\tthis.getFilter = __bind(this.getFilter, this);\n\t\t\t\tthis.setFilter = __bind(this.setFilter, this);\n\t\t\t\tthis.attach = __bind(this.attach, this);\n\t\t\t\tthis.initialize();\n\t\t\t\tthis._$searchString = '';\n\t\t\t}\n\n\t\t\tSearchBusinessLayer.prototype.attach = function (search) {\n\t\t\t\tvar _this = this;\n\t\t\t\tsearch.setFilter('tasks', function (query) {\n\t\t\t\t\treturn _this._$rootScope.$apply(function () {\n\t\t\t\t\t\treturn _this.setFilter(query);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tsearch.setRenderer('task', this.renderTaskResult.bind(this));\n\t\t\t\treturn search.setHandler('task', this.handleTaskClick.bind(this));\n\t\t\t};\n\n\t\t\tSearchBusinessLayer.prototype.setFilter = function (query) {\n\t\t\t\tthis._$searchString = query;\n\t\t\t};\n\n\t\t\tSearchBusinessLayer.prototype.getFilter = function () {\n\t\t\t\treturn this._$searchString;\n\t\t\t};\n\n\t\t\tSearchBusinessLayer.prototype.initialize = function () {\n\t\t\t\tvar _this = this;\n\t\t\t\tthis.handleTaskClick = function ($row, result, event) {\n\t\t\t\t\treturn _this._$location.path('/lists/' + result.calendarid + '/tasks/' + result.id);\n\t\t\t\t};\n\t\t\t\tthis.renderTaskResult = function ($row, result) {\n\t\t\t\t\tvar $template;\n\t\t\t\t\tif (!_this._$tasksmodel.filterTasks(result, _this._$routeparams.listID) || !_this._$tasksmodel.isLoaded(result)) {\n\t\t\t\t\t\t$template = $('div.task-item.template');\n\t\t\t\t\t\t$template = $template.clone();\n\t\t\t\t\t\t$row = $('').append($template.removeClass('template'));\n\t\t\t\t\t\t$row.data('result', result);\n\t\t\t\t\t\t$row.find('span.title').text(result.name);\n\t\t\t\t\t\tif (result.starred) {\n\t\t\t\t\t\t\t$row.find('span.task-star').addClass('task-starred');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (result.completed) {\n\t\t\t\t\t\t\t$row.find('div.task-item').addClass('done');\n\t\t\t\t\t\t\t$row.find('span.task-checkbox').addClass('svg-checkmark');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (result.complete) {\n\t\t\t\t\t\t\t$row.find('div.percentdone').css({\n\t\t\t\t\t\t\t\t'width': result.complete + '%',\n\t\t\t\t\t\t\t\t'background-color': '' + _this._$listsmodel.getColor(result.calendarid)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (result.note) {\n\t\t\t\t\t\t\t$row.find('div.title-wrapper').addClass('attachment');\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $row;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\treturn OC.Plugins.register('OCA.Search', this);\n\t\t\t};\n\n\t\t\treturn SearchBusinessLayer;\n\t\t}();\n\t\treturn new SearchBusinessLayer(ListsModel, Persistence, TasksModel, $rootScope, $routeParams, $location);\n\t}]);\n}).call(undefined);","'use strict';\n\nangular.module('Tasks').factory('SettingsBusinessLayer', ['Persistence', 'SettingsModel', function (Persistence, SettingsModel) {\n\t'use strict';\n\n\tvar SettingsBusinessLayer = function () {\n\t\tfunction SettingsBusinessLayer(_persistence, _$settingsmodel) {\n\t\t\tthis._persistence = _persistence;\n\t\t\tthis._$settingsmodel = _$settingsmodel;\n\t\t}\n\n\t\tSettingsBusinessLayer.prototype.updateModel = function () {\n\t\t\tvar success,\n\t\t\t _this = this;\n\t\t\tsuccess = function success() {};\n\t\t\treturn this._persistence.getCollections(success, true);\n\t\t};\n\n\t\tSettingsBusinessLayer.prototype.setVisibility = function (collectionID, visibility) {\n\t\t\treturn this._persistence.setVisibility(collectionID, visibility);\n\t\t};\n\n\t\tSettingsBusinessLayer.prototype.toggle = function (type, setting) {\n\t\t\tthis._$settingsmodel.toggle(type, setting);\n\t\t\tvar value = this._$settingsmodel.getById(type)[setting];\n\t\t\treturn this._persistence.setting(type, setting, +value);\n\t\t};\n\n\t\tSettingsBusinessLayer.prototype.set = function (type, setting, value) {\n\t\t\treturn this._persistence.setting(type, setting, value);\n\t\t};\n\n\t\treturn SettingsBusinessLayer;\n\t}();\n\treturn new SettingsBusinessLayer(Persistence, SettingsModel);\n}]);","'use strict';\n\nangular.module('Tasks').factory('TasksBusinessLayer', ['TasksModel', 'Persistence', 'VTodoService', 'VTodo', '$timeout', function (TasksModel, Persistence, VTodoService, VTodo, $timeout) {\n\t'use strict';\n\n\tvar TasksBusinessLayer;\n\tTasksBusinessLayer = function () {\n\t\tfunction TasksBusinessLayer(_$tasksmodel, _persistence, _$vtodoservice, _$vtodo, $timeout) {\n\t\t\tthis._$tasksmodel = _$tasksmodel;\n\t\t\tthis._persistence = _persistence;\n\t\t\tthis._$vtodoservice = _$vtodoservice;\n\t\t}\n\n\t\tTasksBusinessLayer.prototype.getAll = function (calendar, completed, parent) {\n\t\t\treturn this._$vtodoservice.getAll(calendar, completed, parent).then(function (tasks) {\n\t\t\t\tvar task, _i, _len, _results;\n\t\t\t\t_results = [];\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tvar vTodo = new VTodo(task.calendar, task.properties, task.uri);\n\t\t\t\t\t_results.push(TasksModel.ad(vTodo));\n\t\t\t\t}\n\t\t\t\treturn _results;\n\t\t\t});\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.add = function (task) {\n\t\t\treturn this._$vtodoservice.create(task.calendar, task.data).then(function (task) {\n\t\t\t\tvar vTodo = new VTodo(task.calendar, task.properties, task.uri);\n\t\t\t\tTasksModel.ad(vTodo);\n\t\t\t\treturn vTodo;\n\t\t\t});\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.getTask = function (calendar, uri) {\n\t\t\treturn this._$vtodoservice.get(calendar, uri).then(function (task) {\n\t\t\t\tTasksModel.ad(task);\n\t\t\t\treturn task;\n\t\t\t});\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setPriority = function (task, priority) {\n\t\t\tif (task.calendar.writable) {\n\t\t\t\ttask.priority = priority;\n\t\t\t\tthis.doUpdate(task);\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setPercentComplete = function (task, percentComplete) {\n\t\t\tif (task.calendar.writable) {\n\t\t\t\tif (percentComplete < 100) {\n\t\t\t\t\tthis.uncompleteParents(task.related);\n\t\t\t\t} else {\n\t\t\t\t\tthis.completeChildren(task);\n\t\t\t\t}\n\t\t\t\ttask.complete = percentComplete;\n\t\t\t\tthis.triggerUpdate(task);\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.triggerUpdate = function (task, duration) {\n\t\t\tif (!duration) {\n\t\t\t\tduration = 1000;\n\t\t\t}\n\t\t\tif (task.timers.update) {\n\t\t\t\t$timeout.cancel(task.timers.update);\n\t\t\t}\n\t\t\ttask.timers.update = $timeout(function (task) {\n\t\t\t\tVTodoService.update(task);\n\t\t\t}, duration, true, task);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.doUpdate = function (task) {\n\t\t\treturn this._$vtodoservice.update(task);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.completeChildren = function (task) {\n\t\t\tvar child, _i, _len;\n\t\t\tvar children = this._$tasksmodel.getChildren(task);\n\t\t\tvar _results = [];\n\t\t\tfor (_i = 0, _len = children.length; _i < _len; _i++) {\n\t\t\t\tchild = children[_i];\n\t\t\t\t_results.push(this.setPercentComplete(child, 100));\n\t\t\t}\n\t\t\treturn _results;\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.uncompleteParents = function (uid) {\n\t\t\tif (uid) {\n\t\t\t\tvar parent = this._$tasksmodel.getByUid(uid);\n\t\t\t\tif (parent.completed) {\n\t\t\t\t\treturn this.setPercentComplete(parent, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setHideSubtasks = function (task, hide) {\n\t\t\ttask.hideSubtasks = hide;\n\t\t\tif (task.calendar.writable) {\n\t\t\t\tthis.doUpdate(task);\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setHideCompletedSubtasks = function (task, hide) {\n\t\t\ttask.hideCompletedSubtasks = hide;\n\t\t\tif (task.calendar.writable) {\n\t\t\t\tthis.doUpdate(task);\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.deleteTask = function (task) {\n\t\t\tvar child, children, _i, _len;\n\t\t\tchildren = this._$tasksmodel.getChildren(task);\n\t\t\tfor (_i = 0, _len = children.length; _i < _len; _i++) {\n\t\t\t\tchild = children[_i];\n\t\t\t\tthis.deleteTask(child);\n\t\t\t}\n\t\t\treturn this._$vtodoservice[\"delete\"](task).then(function () {\n\t\t\t\treturn TasksModel[\"delete\"](task);\n\t\t\t});\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.momentToICALTime = function (moment, asDate) {\n\t\t\tif (asDate) {\n\t\t\t\treturn ICAL.Time.fromDateString(moment.format('YYYY-MM-DD'));\n\t\t\t} else {\n\t\t\t\treturn ICAL.Time.fromDateTimeString(moment.format('YYYY-MM-DDTHH:mm:ss'));\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.initDueDate = function (task) {\n\t\t\tvar start = moment(task.start, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tvar due = moment(task.due, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tif (!due.isValid()) {\n\t\t\t\tvar reference = start.isAfter() ? start : moment();\n\t\t\t\tif (task.allDay) {\n\t\t\t\t\treference.startOf('day').add(1, 'd');\n\t\t\t\t} else {\n\t\t\t\t\treference.startOf('hour').add(1, 'h');\n\t\t\t\t}\n\t\t\t\treturn this.setDue(task, reference, 'all');\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setDue = function (task, date, type) {\n\t\t\tif (type === null) {\n\t\t\t\ttype = 'day';\n\t\t\t}\n\t\t\tvar allDay = task.allDay;\n\t\t\tvar start = moment(task.start, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tvar olddue = moment(task.due, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tvar due = olddue.clone();\n\t\t\tif (type === 'day') {\n\t\t\t\tif (moment(due).isValid()) {\n\t\t\t\t\tdue.year(date.year()).month(date.month()).date(date.date());\n\t\t\t\t} else {\n\t\t\t\t\tdue = date.add(12, 'h');\n\t\t\t\t}\n\t\t\t} else if (type === 'time') {\n\t\t\t\tif (moment(due).isValid()) {\n\t\t\t\t\tdue.hour(date.hour()).minute(date.minute());\n\t\t\t\t} else {\n\t\t\t\t\tdue = date;\n\t\t\t\t}\n\t\t\t} else if (type === 'all') {\n\t\t\t\tdue = date;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (due.isBefore(start) || due.isSame(start)) {\n\t\t\t\tstart.subtract(olddue.diff(due), 'ms');\n\t\t\t\ttask.start = this.momentToICALTime(start, allDay);\n\t\t\t}\n\t\t\ttask.due = this.momentToICALTime(due, allDay);\n\t\t\t// this.checkReminderDate(task);\n\t\t\tthis.doUpdate(task);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.deleteDueDate = function (task) {\n\t\t\t// var reminder = task.reminder;\n\t\t\t// if (reminder !== null && reminder.type === 'DURATION' && reminder.duration.params.related === 'END') {\n\t\t\t// this.deleteReminderDate(task);\n\t\t\t// }\n\t\t\ttask.due = null;\n\t\t\tthis.doUpdate(task);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.initStartDate = function (task) {\n\t\t\tvar start = moment(task.start, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tvar due = moment(task.due, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tif (!start.isValid()) {\n\t\t\t\tvar reference = moment().add(1, 'h');\n\t\t\t\tif (due.isBefore(reference)) {\n\t\t\t\t\treference = due.subtract(1, 'm');\n\t\t\t\t}\n\t\t\t\treference.startOf(task.allDay ? 'day' : 'hour');\n\t\t\t\treturn this.setStart(task, reference, 'all');\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setStart = function (task, date, type) {\n\t\t\tif (type === null) {\n\t\t\t\ttype = 'day';\n\t\t\t}\n\t\t\tvar allDay = task.allDay;\n\t\t\tvar due = moment(task.due, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tvar oldstart = moment(task.start, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\tvar start = oldstart.clone();\n\t\t\tif (type === 'day') {\n\t\t\t\tif (moment(start).isValid()) {\n\t\t\t\t\tstart.year(date.year()).month(date.month()).date(date.date());\n\t\t\t\t} else {\n\t\t\t\t\tstart = date.add(12, 'h');\n\t\t\t\t}\n\t\t\t} else if (type === 'time') {\n\t\t\t\tif (moment(start).isValid()) {\n\t\t\t\t\tstart.hour(date.hour()).minute(date.minute());\n\t\t\t\t} else {\n\t\t\t\t\tstart = date;\n\t\t\t\t}\n\t\t\t} else if (type === 'all') {\n\t\t\t\tstart = date;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (start.isAfter(due) || start.isSame(due)) {\n\t\t\t\tdue.add(start.diff(oldstart), 'ms');\n\t\t\t\ttask.due = this.momentToICALTime(due, allDay);\n\t\t\t}\n\t\t\ttask.start = this.momentToICALTime(start, allDay);\n\t\t\t// this.checkReminderDate(taskID);\n\t\t\tthis.doUpdate(task);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.deleteStartDate = function (task) {\n\t\t\t// var reminder = task.reminder;\n\t\t\t// if (reminder !== null && reminder.type === 'DURATION' && reminder.duration.params.related === 'START') {\n\t\t\t// this.deleteReminderDate(task);\n\t\t\t// }\n\t\t\ttask.start = null;\n\t\t\tthis.doUpdate(task);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setAllDay = function (task, allDay) {\n\t\t\ttask.allDay = allDay;\n\t\t\tif (allDay) {\n\t\t\t\tvar due = moment(task.due, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\t\tvar start = moment(task.start, \"YYYY-MM-DDTHH:mm:ss\");\n\t\t\t\tif (start.isAfter(due) || start.isSame(due)) {\n\t\t\t\t\tstart = moment(due).subtract(1, 'day');\n\t\t\t\t\ttask.start = this.momentToICALTime(start, allDay);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.doUpdate(task);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.initReminder = function (taskID) {\n\t\t\tvar p, task;\n\t\t\tif (!this.checkReminderDate(taskID)) {\n\t\t\t\ttask = this._$tasksmodel.getById(taskID);\n\t\t\t\ttask.reminder = {\n\t\t\t\t\ttype: 'DURATION',\n\t\t\t\t\taction: 'DISPLAY',\n\t\t\t\t\tduration: {\n\t\t\t\t\t\ttoken: 'week',\n\t\t\t\t\t\tweek: 0,\n\t\t\t\t\t\tday: 0,\n\t\t\t\t\t\thour: 0,\n\t\t\t\t\t\tminute: 0,\n\t\t\t\t\t\tsecond: 0,\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tinvert: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tif (moment(task.start, \"YYYYMMDDTHHmmss\").isValid()) {\n\t\t\t\t\tp = task.reminder.duration.params;\n\t\t\t\t\tp.related = 'START';\n\t\t\t\t\tp.id = '10';\n\t\t\t\t} else if (moment(task.due, \"YYYYMMDDTHHmmss\").isValid()) {\n\t\t\t\t\tp = task.reminder.duration.params;\n\t\t\t\t\tp.related = 'END';\n\t\t\t\t\tp.id = '11';\n\t\t\t\t} else {\n\t\t\t\t\ttask.reminder.type = 'DATE-TIME';\n\t\t\t\t\ttask.reminder.date = moment().startOf('hour').add(1, 'h').format('YYYYMMDDTHHmmss');\n\t\t\t\t}\n\t\t\t\treturn this.setReminder(taskID);\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setReminderDate = function (taskID, date, type) {\n\t\t\tvar newreminder, reminder, reminderdate;\n\t\t\tif (type === null) {\n\t\t\t\ttype = 'day';\n\t\t\t}\n\t\t\treminder = this._$tasksmodel.getById(taskID).reminder;\n\t\t\tnewreminder = {\n\t\t\t\ttype: 'DATE-TIME',\n\t\t\t\taction: 'DISPLAY',\n\t\t\t\tduration: null\n\t\t\t};\n\t\t\tif (type === 'day') {\n\t\t\t\tif (this.checkReminderDate(taskID) || reminder === null) {\n\t\t\t\t\treminderdate = moment(reminder.date, \"YYYYMMDDTHHmmss\");\n\t\t\t\t\tnewreminder.action = reminder.action;\n\t\t\t\t\tif (reminderdate.isValid() && reminder.type === 'DATE-TIME') {\n\t\t\t\t\t\treminderdate.year(date.year()).month(date.month()).date(date.date());\n\t\t\t\t\t} else {\n\t\t\t\t\t\treminderdate = date.add(12, 'h');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treminderdate = date.add(12, 'h');\n\t\t\t\t}\n\t\t\t} else if (type === 'time') {\n\t\t\t\tif (this.checkReminderDate(taskID) || reminder === null) {\n\t\t\t\t\treminderdate = moment(reminder.date, \"YYYYMMDDTHHmmss\");\n\t\t\t\t\tnewreminder.action = reminder.action;\n\t\t\t\t\tif (reminderdate.isValid() && reminder.type === 'DATE-TIME') {\n\t\t\t\t\t\treminderdate.hour(date.hour()).minute(date.minute());\n\t\t\t\t\t} else {\n\t\t\t\t\t\treminderdate = date;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treminderdate = date;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewreminder.date = reminderdate.format('YYYYMMDDTHHmmss');\n\t\t\tthis._$tasksmodel.setReminder(taskID, newreminder);\n\t\t\treturn this._persistence.setReminder(taskID, newreminder);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.setReminder = function (taskID) {\n\t\t\tvar reminder;\n\t\t\tif (this.checkReminderDate(taskID)) {\n\t\t\t\treminder = this._$tasksmodel.getById(taskID).reminder;\n\t\t\t\treturn this._persistence.setReminder(taskID, reminder);\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.checkReminderDate = function (taskID) {\n\t\t\tvar d, date, duration, rel, related, reminder, seg, task, token;\n\t\t\ttask = this._$tasksmodel.getById(taskID);\n\t\t\treminder = task.reminder;\n\t\t\tif (reminder !== null && reminder.type === 'DURATION') {\n\t\t\t\tif (!reminder.duration) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else if (reminder.duration.params.related === 'START') {\n\t\t\t\t\ttoken = 'start';\n\t\t\t\t} else if (reminder.duration.params.related === 'END') {\n\t\t\t\t\ttoken = 'due';\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tdate = moment(task[token], \"YYYYMMDDTHHmmss\");\n\t\t\t\tduration = reminder.duration;\n\t\t\t\td = {\n\t\t\t\t\tw: duration.week,\n\t\t\t\t\td: duration.day,\n\t\t\t\t\th: duration.hour,\n\t\t\t\t\tm: duration.minute,\n\t\t\t\t\ts: duration.second\n\t\t\t\t};\n\t\t\t\tif (duration.params.invert) {\n\t\t\t\t\tdate = date.subtract(d);\n\t\t\t\t} else {\n\t\t\t\t\tdate = date.add(d);\n\t\t\t\t}\n\t\t\t\ttask.reminder.date = date.format('YYYYMMDDTHHmmss');\n\t\t\t} else if (reminder !== null && reminder.type === 'DATE-TIME') {\n\t\t\t\tduration = reminder.duration;\n\t\t\t\tdate = moment(reminder.date, \"YYYYMMDDTHHmmss\");\n\t\t\t\tif (!date.isValid()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (duration) {\n\t\t\t\t\tif (duration.params.related === 'START') {\n\t\t\t\t\t\trelated = moment(task.start, \"YYYYMMDDTHHmmss\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelated = moment(task.due, \"YYYYMMDDTHHmmss\");\n\t\t\t\t\t}\n\t\t\t\t\tseg = this.secondsToSegments(date.diff(related, 'seconds'));\n\t\t\t\t\tduration.params.invert = seg.invert;\n\t\t\t\t\tduration.token = 'week';\n\t\t\t\t\tduration.week = seg.week;\n\t\t\t\t\tduration.day = seg.day;\n\t\t\t\t\tduration.hour = seg.hour;\n\t\t\t\t\tduration.minute = seg.minute;\n\t\t\t\t\tduration.second = seg.second;\n\t\t\t\t} else {\n\t\t\t\t\tif (task.start) {\n\t\t\t\t\t\trelated = moment(task.start, \"YYYYMMDDTHHmmss\");\n\t\t\t\t\t\trel = 'START';\n\t\t\t\t\t\td = 0;\n\t\t\t\t\t} else if (task.due) {\n\t\t\t\t\t\trelated = moment(task.due, \"YYYYMMDDTHHmmss\");\n\t\t\t\t\t\trel = 'END';\n\t\t\t\t\t\td = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tseg = this.secondsToSegments(date.diff(related, 'seconds'));\n\t\t\t\t\treminder.duration = {\n\t\t\t\t\t\ttoken: 'week',\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\trelated: rel,\n\t\t\t\t\t\t\tinvert: seg.invert,\n\t\t\t\t\t\t\tid: +seg.invert + '' + d\n\t\t\t\t\t\t},\n\t\t\t\t\t\tweek: seg.week,\n\t\t\t\t\t\tday: seg.day,\n\t\t\t\t\t\thour: seg.hour,\n\t\t\t\t\t\tminute: seg.minute,\n\t\t\t\t\t\tsecond: seg.second\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.secondsToSegments = function (s) {\n\t\t\tvar d, h, i, m, w;\n\t\t\tif (s < 0) {\n\t\t\t\ts *= -1;\n\t\t\t\ti = true;\n\t\t\t} else {\n\t\t\t\ti = false;\n\t\t\t}\n\t\t\tw = Math.floor(s / 604800);\n\t\t\ts -= w * 604800;\n\t\t\td = Math.floor(s / 86400);\n\t\t\ts -= d * 86400;\n\t\t\th = Math.floor(s / 3600);\n\t\t\ts -= h * 3600;\n\t\t\tm = Math.floor(s / 60);\n\t\t\ts -= m * 60;\n\t\t\treturn {\n\t\t\t\tweek: w,\n\t\t\t\tday: d,\n\t\t\t\thour: h,\n\t\t\t\tminute: m,\n\t\t\t\tsecond: s,\n\t\t\t\tinvert: i\n\t\t\t};\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.deleteReminderDate = function (taskID) {\n\t\t\tthis._$tasksmodel.setReminder(taskID, null);\n\t\t\treturn this._persistence.setReminder(taskID, false);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.changeCalendar = function (task, newCalendar) {\n\t\t\tif (task.calendar !== newCalendar && newCalendar.writable) {\n\t\t\t\tvar newTask = angular.copy(task);\n\t\t\t\tnewTask.calendar = newCalendar;\n\t\t\t\tif (!TasksModel.hasNoParent(newTask)) {\n\t\t\t\t\tvar parent = TasksModel.getByUid(newTask.related);\n\t\t\t\t\tif (parent.calendar.uri !== newTask.calendar.uri) {\n\t\t\t\t\t\tnewTask.related = null;\n\t\t\t\t\t\tTasksBusinessLayer.prototype.setPercentComplete(newTask, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn VTodoService.create(newCalendar, newTask.data).then(function (newVTodo) {\n\t\t\t\t\tvar vTodo = new VTodo(newVTodo.calendar, newVTodo.properties, newVTodo.uri);\n\t\t\t\t\tTasksModel.ad(vTodo);\n\t\t\t\t\treturn VTodoService[\"delete\"](task).then(function () {\n\t\t\t\t\t\tTasksModel[\"delete\"](task);\n\t\t\t\t\t\tvar queries = [];\n\t\t\t\t\t\tvar children = TasksModel.getChildren(newTask);\n\t\t\t\t\t\tvar _i, _len, child;\n\t\t\t\t\t\tfor (_i = 0, _len = children.length; _i < _len; _i++) {\n\t\t\t\t\t\t\tchild = children[_i];\n\t\t\t\t\t\t\tif (child.calendar.uri !== newTask.calendar.uri) {\n\t\t\t\t\t\t\t\tqueries.push(TasksBusinessLayer.prototype.changeCalendar(child, newTask.calendar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn Promise.all(queries);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn Promise.resolve(true);\n\t\t\t}\n\t\t};\n\n\t\t// called from outside\n\t\tTasksBusinessLayer.prototype.changeCollection = function (taskID, collectionID) {\n\t\t\tvar task = this._$tasksmodel.getById(taskID);\n\t\t\tswitch (collectionID) {\n\t\t\t\tcase 'starred':\n\t\t\t\t\ttask.priority = 9;\n\t\t\t\t\treturn this.doUpdate(task);\n\t\t\t\tcase 'completed':\n\t\t\t\t\treturn this.setPercentComplete(task, 100);\n\t\t\t\tcase 'uncompleted':\n\t\t\t\t\tif (task.completed) {\n\t\t\t\t\t\treturn this.setPercentComplete(task, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'today':\n\t\t\t\t\treturn this.setDue(task, moment().startOf('day').add(12, 'h'), 'all');\n\t\t\t\tcase 'week':\n\t\t\t\tcase 'all':\n\t\t\t\t\treturn false;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.changeParent = function (task, parent) {\n\t\t\tif (parent.calendar.writable) {\n\t\t\t\ttask.related = parent.uid;\n\t\t\t\tparent.hideSubtasks = 0;\n\t\t\t\tif (parent.completed && !task.completed) {\n\t\t\t\t\tthis.setPercentComplete(parent, 0);\n\t\t\t\t} else {\n\t\t\t\t\tthis.doUpdate(parent);\n\t\t\t\t}\n\t\t\t\tif (parent.calendar.uri !== task.calendar.uri) {\n\t\t\t\t\tthis.changeCalendar(task, parent.calendar);\n\t\t\t\t} else {\n\t\t\t\t\tthis.doUpdate(task);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.makeRootTask = function (task, newCalendar, collectionID) {\n\t\t\tif (newCalendar.writable) {\n\t\t\t\tvar requests = [];\n\t\t\t\ttask.related = null;\n\t\t\t\tif (collectionID !== \"completed\" && task.completed) {\n\t\t\t\t\ttask.complete = 0;\n\t\t\t\t}\n\t\t\t\trequests.push(this.changeCollection(task.uri, collectionID));\n\t\t\t\tif (task.calendar !== newCalendar) {\n\t\t\t\t\trequests.push(this.changeCalendar(task, newCalendar));\n\t\t\t\t} else {\n\t\t\t\t\trequests.push(this.doUpdate(task));\n\t\t\t\t}\n\t\t\t\treturn requests;\n\t\t\t}\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.addComment = function (comment, onSuccess, onFailure) {\n\t\t\tvar success,\n\t\t\t _this = this;\n\t\t\tif (!onSuccess) {\n\t\t\t\tonSuccess = function onSuccess() {};\n\t\t\t}\n\t\t\tif (!onFailure) {\n\t\t\t\tonFailure = function onFailure() {};\n\t\t\t}\n\t\t\tthis._$tasksmodel.addComment(comment);\n\t\t\tsuccess = function success(response) {\n\t\t\t\tif (response.status === 'error') {\n\t\t\t\t\treturn onFailure();\n\t\t\t\t} else {\n\t\t\t\t\treturn onSuccess(response.data);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn this._persistence.addComment(comment, success);\n\t\t};\n\n\t\tTasksBusinessLayer.prototype.deleteComment = function (taskID, commentID) {\n\t\t\tthis._$tasksmodel.deleteComment(taskID, commentID);\n\t\t\treturn this._persistence.deleteComment(taskID, commentID);\n\t\t};\n\n\t\treturn TasksBusinessLayer;\n\t}();\n\treturn new TasksBusinessLayer(TasksModel, Persistence, VTodoService, VTodo, $timeout);\n}]);","'use strict';\n\nangular.module('Tasks').factory('Calendar', ['$rootScope', '$filter', '$window', function ($rootScope, $filter, $window) {\n\t'use strict';\n\n\tfunction Calendar(url, props, uri) {\n\t\tvar _this = this;\n\n\t\tprops.color = props['{http://apple.com/ns/ical/}calendar-color'];\n\t\tif (typeof props.color !== 'undefined') {\n\t\t\tif (props.color.length === 9) {\n\t\t\t\tprops.color = props.color.substr(0, 7);\n\t\t\t}\n\t\t} else {\n\t\t\tprops.color = '#1d2d44';\n\t\t}\n\n\t\tangular.extend(this, {\n\t\t\t_propertiesBackup: {},\n\t\t\t_properties: {\n\t\t\t\turl: url,\n\t\t\t\turi: uri,\n\t\t\t\tenabled: props['{http://owncloud.org/ns}calendar-enabled'] === '1',\n\t\t\t\tdisplayname: props['{DAV:}displayname'] || t('tasks', 'Unnamed'),\n\t\t\t\tcolor: props.color,\n\t\t\t\torder: parseInt(props['{http://apple.com/ns/ical/}calendar-order']) || 0,\n\t\t\t\tcomponents: {\n\t\t\t\t\tvevent: false,\n\t\t\t\t\tvjournal: false,\n\t\t\t\t\tvtodo: false\n\t\t\t\t},\n\t\t\t\twritable: props.canWrite,\n\t\t\t\tshareable: props.canWrite,\n\t\t\t\tsharedWith: {\n\t\t\t\t\tusers: [],\n\t\t\t\t\tgroups: []\n\t\t\t\t},\n\t\t\t\towner: '',\n\t\t\t\tloadedCompleted: false\n\t\t\t},\n\t\t\t_updatedProperties: []\n\t\t});\n\t\tthis._propertiesBackup = angular.copy(this._properties);\n\n\t\t// angular.extend(this, {\n\t\t// \ttmpId: null,\n\t\t// \tfcEventSource: {\n\t\t// \t\tevents: function (start, end, timezone, callback) {\n\t\t// \t\t\t// console.log('querying events ...');\n\t\t// \t\t\t// TimezoneService.get(timezone).then(function(tz) {\n\t\t// \t\t\t// \t_this.list.loading = true;\n\t\t// \t\t\t// \t$rootScope.$broadcast('reloadCalendarList');\n\n\t\t// \t\t\t// \tVEventService.getAll(_this, start, end).then(function(events) {\n\t\t// \t\t\t// \t\tvar vevents = [];\n\t\t// \t\t\t// \t\tfor (var i = 0; i < events.length; i++) {\n\t\t// \t\t\t// \t\t\tvevents = vevents.concat(events[i].getFcEvent(start, end, tz));\n\t\t// \t\t\t// \t\t}\n\n\t\t// \t\t\t// \t\tcallback(vevents);\n\n\t\t// \t\t\t// \t\t_this.list.loading = false;\n\t\t// \t\t\t// \t\t$rootScope.$broadcast('reloadCalendarList');\n\t\t// \t\t\t// \t});\n\t\t// \t\t\t// });\n\t\t// \t\t},\n\t\t// \t\teditable: this._properties.writable,\n\t\t// \t\tcalendar: this\n\t\t// \t},\n\t\t// \tlist: {\n\t\t// \t\tedit: false,\n\t\t// \t\tloading: this.enabled,\n\t\t// \t\tlocked: false,\n\t\t// \t\teditingShares: false\n\t\t// \t}\n\t\t// });\n\n\t\tvar components = props['{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set'];\n\t\tfor (var i = 0; i < components.length; i++) {\n\t\t\tvar name = components[i].attributes.getNamedItem('name').textContent.toLowerCase();\n\t\t\tif (this._properties.components.hasOwnProperty(name)) {\n\t\t\t\tthis._properties.components[name] = true;\n\t\t\t}\n\t\t}\n\n\t\tvar shares = props['{http://owncloud.org/ns}invite'];\n\t\tif (typeof shares !== 'undefined') {\n\t\t\tfor (var j = 0; j < shares.length; j++) {\n\t\t\t\tvar href = shares[j].getElementsByTagNameNS('DAV:', 'href');\n\t\t\t\tif (href.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\thref = href[0].textContent;\n\n\t\t\t\tvar access = shares[j].getElementsByTagNameNS('http://owncloud.org/ns', 'access');\n\t\t\t\tif (access.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taccess = access[0];\n\n\t\t\t\tvar readWrite = access.getElementsByTagNameNS('http://owncloud.org/ns', 'read-write');\n\t\t\t\treadWrite = readWrite.length !== 0;\n\n\t\t\t\tif (href.startsWith('principal:principals/users/')) {\n\t\t\t\t\tthis._properties.sharedWith.users.push({\n\t\t\t\t\t\tid: href.substr(27),\n\t\t\t\t\t\tdisplayname: href.substr(27),\n\t\t\t\t\t\twritable: readWrite\n\t\t\t\t\t});\n\t\t\t\t} else if (href.startsWith('principal:principals/groups/')) {\n\t\t\t\t\tthis._properties.sharedWith.groups.push({\n\t\t\t\t\t\tid: href.substr(28),\n\t\t\t\t\t\tdisplayname: href.substr(28),\n\t\t\t\t\t\twritable: readWrite\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar owner = props['{DAV:}owner'];\n\t\tif (typeof owner !== 'undefined' && owner.length !== 0) {\n\t\t\towner = owner[0].textContent.slice(0, -1);\n\t\t\tif (owner.startsWith('/remote.php/dav/principals/users/')) {\n\t\t\t\tthis._properties.owner = owner.substr(33);\n\t\t\t}\n\t\t}\n\n\t\t// this.tmpId = RandomStringService.generate();\n\t}\n\n\tCalendar.prototype = {\n\t\tget url() {\n\t\t\treturn this._properties.url;\n\t\t},\n\t\tget caldav() {\n\t\t\treturn $window.location.origin + this.url;\n\t\t},\n\t\tget exportUrl() {\n\t\t\tvar url = this.url;\n\t\t\t// cut off last slash to have a fancy name for the ics\n\t\t\tif (url.slice(url.length - 1) === '/') {\n\t\t\t\turl = url.slice(0, url.length - 1);\n\t\t\t}\n\t\t\turl += '?export';\n\t\t\treturn url;\n\t\t},\n\t\tget enabled() {\n\t\t\treturn this._properties.enabled;\n\t\t},\n\t\tget uri() {\n\t\t\treturn this._properties.uri;\n\t\t},\n\t\tget components() {\n\t\t\treturn this._properties.components;\n\t\t},\n\t\tset enabled(enabled) {\n\t\t\tthis._properties.enabled = enabled;\n\t\t\tthis._setUpdated('enabled');\n\t\t},\n\t\tget displayname() {\n\t\t\treturn this._properties.displayname;\n\t\t},\n\t\tset displayname(displayname) {\n\t\t\tthis._properties.displayname = displayname;\n\t\t\tthis._setUpdated('displayname');\n\t\t},\n\t\tget color() {\n\t\t\treturn this._properties.color;\n\t\t},\n\t\tset color(color) {\n\t\t\tthis._properties.color = color;\n\t\t\tthis._setUpdated('color');\n\t\t},\n\t\tget sharedWith() {\n\t\t\treturn this._properties.sharedWith;\n\t\t},\n\t\tset sharedWith(sharedWith) {\n\t\t\tthis._properties.sharedWith = sharedWith;\n\t\t},\n\t\tget textColor() {\n\t\t\tvar color = this.color;\n\t\t\tvar fallbackColor = '#fff';\n\t\t\tvar c;\n\t\t\tswitch (color.length) {\n\t\t\t\tcase 4:\n\t\t\t\t\tc = color.match(/^#([0-9a-f]{3})$/i)[1];\n\t\t\t\t\tif (c) {\n\t\t\t\t\t\treturn this._generateTextColor(parseInt(c.charAt(0), 16) * 0x11, parseInt(c.charAt(1), 16) * 0x11, parseInt(c.charAt(2), 16) * 0x11);\n\t\t\t\t\t}\n\t\t\t\t\treturn fallbackColor;\n\n\t\t\t\tcase 7:\n\t\t\t\tcase 9:\n\t\t\t\t\tvar regex = new RegExp('^#([0-9a-f]{' + (color.length - 1) + '})$', 'i');\n\t\t\t\t\tc = color.match(regex)[1];\n\t\t\t\t\tif (c) {\n\t\t\t\t\t\treturn this._generateTextColor(parseInt(c.substr(0, 2), 16), parseInt(c.substr(2, 2), 16), parseInt(c.substr(4, 2), 16));\n\t\t\t\t\t}\n\t\t\t\t\treturn fallbackColor;\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn fallbackColor;\n\t\t\t}\n\t\t},\n\t\tget order() {\n\t\t\treturn this._properties.order;\n\t\t},\n\t\tset order(order) {\n\t\t\tthis._properties.order = order;\n\t\t\tthis._setUpdated('order');\n\t\t},\n\t\tget writable() {\n\t\t\treturn this._properties.writable;\n\t\t},\n\t\tget shareable() {\n\t\t\treturn this._properties.shareable;\n\t\t},\n\t\tget owner() {\n\t\t\treturn this._properties.owner;\n\t\t},\n\t\tget loadedCompleted() {\n\t\t\treturn this._properties.loadedCompleted;\n\t\t},\n\t\tset loadedCompleted(loadedCompleted) {\n\t\t\tthis._properties.loadedCompleted = loadedCompleted;\n\t\t},\n\t\t_setUpdated: function _setUpdated(propName) {\n\t\t\tif (this._updatedProperties.indexOf(propName) === -1) {\n\t\t\t\tthis._updatedProperties.push(propName);\n\t\t\t}\n\t\t},\n\t\tget updatedProperties() {\n\t\t\treturn this._updatedProperties;\n\t\t},\n\t\tresetUpdatedProperties: function resetUpdatedProperties() {\n\t\t\tthis._updatedProperties = [];\n\t\t},\n\t\tprepareUpdate: function prepareUpdate() {\n\t\t\tthis._propertiesBackup = angular.copy(this._properties);\n\t\t},\n\t\tresetToPreviousState: function resetToPreviousState() {\n\t\t\tthis._properties = angular.copy(this._propertiesBackup);\n\t\t\tthis._propertiesBackup = {};\n\t\t},\n\t\tdropPreviousState: function dropPreviousState() {\n\t\t\tthis._propertiesBackup = {};\n\t\t},\n\t\ttoggleSharesEditor: function toggleSharesEditor() {\n\t\t\tthis.list.editingShares = !this.list.editingShares;\n\t\t},\n\t\t_generateTextColor: function _generateTextColor(r, g, b) {\n\t\t\tvar brightness = (r * 299 + g * 587 + b * 114) / 1000;\n\t\t\treturn brightness > 130 ? '#000000' : '#FAFAFA';\n\t\t}\n\t};\n\n\treturn Calendar;\n}]);","'use strict';\n\n(function () {\n\t'use strict';\n\n\tvar __hasProp = {}.hasOwnProperty,\n\t __extends = function __extends(child, parent) {\n\t\tfor (var key in parent) {\n\t\t\tif (__hasProp.call(parent, key)) child[key] = parent[key];\n\t\t}function ctor() {\n\t\t\tthis.constructor = child;\n\t\t}ctor.prototype = parent.prototype;child.prototype = new ctor();child.__super__ = parent.prototype;return child;\n\t};\n\n\tangular.module('Tasks').factory('CollectionsModel', ['TasksModel', '_Model', function (TasksModel, _Model) {\n\t\tvar CollectionsModel;\n\t\tCollectionsModel = function (_super) {\n\t\t\t__extends(CollectionsModel, _super);\n\n\t\t\tfunction CollectionsModel(_$tasksmodel) {\n\t\t\t\tthis._$tasksmodel = _$tasksmodel;\n\t\t\t\tthis._nameCache = {};\n\t\t\t\tCollectionsModel.__super__.constructor.call(this);\n\t\t\t}\n\n\t\t\tCollectionsModel.prototype.add = function (data, clearCache) {\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\tthis._nameCache[data.displayname] = data;\n\t\t\t\tif (angular.isDefined(data.id)) {\n\t\t\t\t\treturn CollectionsModel.__super__.add.call(this, data, clearCache);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tCollectionsModel.prototype.getCount = function (collectionID, filter) {\n\t\t\t\tvar count, task, tasks, _i, _len;\n\t\t\t\tif (filter === null) {\n\t\t\t\t\tfilter = '';\n\t\t\t\t}\n\t\t\t\tcount = 0;\n\t\t\t\ttasks = this._$tasksmodel.filteredTasks(filter);\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tcount += this._$tasksmodel.filterTasks(task, collectionID) && !task.related;\n\t\t\t\t}\n\t\t\t\treturn count;\n\t\t\t};\n\n\t\t\treturn CollectionsModel;\n\t\t}(_Model);\n\t\treturn new CollectionsModel(TasksModel);\n\t}]);\n}).call(undefined);","'use strict';\n\n(function () {\n\t'use strict';\n\n\tvar __hasProp = {}.hasOwnProperty,\n\t __extends = function __extends(child, parent) {\n\t\tfor (var key in parent) {\n\t\t\tif (__hasProp.call(parent, key)) child[key] = parent[key];\n\t\t}function ctor() {\n\t\t\tthis.constructor = child;\n\t\t}ctor.prototype = parent.prototype;child.prototype = new ctor();child.__super__ = parent.prototype;return child;\n\t};\n\n\tangular.module('Tasks').factory('ListsModel', ['TasksModel', '_Model', function (TasksModel, _Model) {\n\t\tvar ListsModel;\n\t\tListsModel = function (_super) {\n\t\t\t__extends(ListsModel, _super);\n\n\t\t\tfunction ListsModel(_$tasksmodel) {\n\t\t\t\tthis._$tasksmodel = _$tasksmodel;\n\t\t\t\tthis._tmpUriCache = {};\n\t\t\t\tthis._data = [];\n\t\t\t\tthis._dataMap = {};\n\t\t\t\tthis._filterCache = {};\n\t\t\t}\n\n\t\t\tListsModel.prototype.add = function (calendar, clearCache) {\n\t\t\t\tvar updateByUri;\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\tupdateByUri = angular.isDefined(calendar.uri) && angular.isDefined(this.getByUri(calendar.uri));\n\t\t\t\tif (updateByUri) {\n\t\t\t\t\treturn this.update(calendar, clearCache);\n\t\t\t\t} else {\n\t\t\t\t\tif (angular.isDefined(calendar.uri)) {\n\t\t\t\t\t\tif (clearCache) {\n\t\t\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!angular.isDefined(this._dataMap[calendar.uri])) {\n\t\t\t\t\t\t\tthis._data.push(calendar);\n\t\t\t\t\t\t\tthis._dataMap[calendar.uri] = calendar;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tListsModel.prototype.getByUri = function (uri) {\n\t\t\t\treturn this._dataMap[uri];\n\t\t\t};\n\n\t\t\tListsModel.prototype.update = function (list, clearCache) {\n\t\t\t\tvar tmplist;\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\ttmplist = this._tmpIdCache[list.tmpID];\n\t\t\t\tif (angular.isDefined(list.id) && angular.isDefined(tmplist) && angular.isUndefined(tmplist.id)) {\n\t\t\t\t\ttmplist.id = list.id;\n\t\t\t\t\tthis._dataMap[list.id] = tmplist;\n\t\t\t\t}\n\t\t\t\tlist[\"void\"] = false;\n\t\t\t\treturn ListsModel.__super__.update.call(this, list, clearCache);\n\t\t\t};\n\n\t\t\tListsModel.prototype[\"delete\"] = function (calendar, clearCache) {\n\t\t\t\tvar counter, data, entry, _i, _len, _ref;\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\t_ref = this._data;\n\t\t\t\tfor (counter = _i = 0, _len = _ref.length; _i < _len; counter = ++_i) {\n\t\t\t\t\tentry = _ref[counter];\n\t\t\t\t\tif (entry === calendar) {\n\t\t\t\t\t\tthis._data.splice(counter, 1);\n\t\t\t\t\t\tdata = this._dataMap[calendar.uri];\n\t\t\t\t\t\tdelete this._dataMap[calendar.uri];\n\t\t\t\t\t\tif (clearCache) {\n\t\t\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tListsModel.prototype.getStandardList = function () {\n\t\t\t\tvar calendars;\n\t\t\t\tif (this.size()) {\n\t\t\t\t\tcalendars = this.getAll();\n\t\t\t\t\treturn calendars[0];\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tListsModel.prototype.isNameAlreadyTaken = function (displayname, uri) {\n\t\t\t\tvar calendar, calendars, ret, _i, _len;\n\t\t\t\tcalendars = this.getAll();\n\t\t\t\tret = false;\n\t\t\t\tfor (_i = 0, _len = calendars.length; _i < _len; _i++) {\n\t\t\t\t\tcalendar = calendars[_i];\n\t\t\t\t\tif (calendar.displayname === displayname && calendar.uri !== uri) {\n\t\t\t\t\t\tret = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t\t};\n\n\t\t\tListsModel.prototype.getCount = function (calendarID, collectionID, filter) {\n\t\t\t\tvar count, task, tasks, _i, _len;\n\t\t\t\tif (filter === null) {\n\t\t\t\t\tfilter = '';\n\t\t\t\t}\n\t\t\t\tcount = 0;\n\t\t\t\ttasks = this._$tasksmodel.filteredTasks(filter);\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tcount += this._$tasksmodel.filterTasks(task, collectionID) && task.calendar.uri === calendarID && !task.related;\n\t\t\t\t}\n\t\t\t\t// if (collectionID === 'completed' && filter === '') {\n\t\t\t\t// count += this.notLoaded(calendarID);\n\t\t\t\t// }\n\t\t\t\treturn count;\n\t\t\t};\n\n\t\t\tListsModel.prototype.loadedCompleted = function (calendarID) {\n\t\t\t\tif (angular.isUndefined(this.getById(calendarID))) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn this.getById(calendarID).loadedCompleted;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tListsModel.prototype.setLoadedCompleted = function (calendarID) {\n\t\t\t\tthis.getById(calendarID).loadedCompleted = true;\n\t\t\t};\n\n\t\t\tListsModel.prototype.getColor = function (calendarID) {\n\t\t\t\tif (angular.isUndefined(this.getById(calendarID))) {\n\t\t\t\t\treturn '#CCCCCC';\n\t\t\t\t} else {\n\t\t\t\t\treturn this.getById(calendarID).calendarcolor;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tListsModel.prototype.getName = function (calendarID) {\n\t\t\t\tif (angular.isUndefined(this.getById(calendarID))) {\n\t\t\t\t\treturn '';\n\t\t\t\t} else {\n\t\t\t\t\treturn this.getById(calendarID).displayname;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn ListsModel;\n\t\t}(_Model);\n\t\treturn new ListsModel(TasksModel);\n\t}]);\n}).call(undefined);","'use strict';\n\n(function () {\n\t'use strict';\n\n\tvar __hasProp = {}.hasOwnProperty,\n\t __extends = function __extends(child, parent) {\n\t\tfor (var key in parent) {\n\t\t\tif (__hasProp.call(parent, key)) child[key] = parent[key];\n\t\t}function ctor() {\n\t\t\tthis.constructor = child;\n\t\t}ctor.prototype = parent.prototype;child.prototype = new ctor();child.__super__ = parent.prototype;return child;\n\t};\n\n\tangular.module('Tasks').factory('SettingsModel', ['_Model', function (_Model) {\n\t\tvar SettingsModel;\n\t\tSettingsModel = function (_super) {\n\t\t\t__extends(SettingsModel, _super);\n\n\t\t\tfunction SettingsModel() {\n\t\t\t\tthis._nameCache = {};\n\t\t\t\tSettingsModel.__super__.constructor.call(this);\n\t\t\t}\n\n\t\t\tSettingsModel.prototype.add = function (data, clearCache) {\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\tthis._nameCache[data.displayname] = data;\n\t\t\t\tif (angular.isDefined(data.id)) {\n\t\t\t\t\treturn SettingsModel.__super__.add.call(this, data, clearCache);\n\t\t\t\t} else {\n\t\t\t\t\treturn this._data.push(data);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tSettingsModel.prototype.toggle = function (type, setting) {\n\t\t\t\tvar set;\n\t\t\t\tset = this.getById(type);\n\t\t\t\tthis.getById(type)[setting] = !set[setting];\n\t\t\t};\n\n\t\t\treturn SettingsModel;\n\t\t}(_Model);\n\t\treturn new SettingsModel();\n\t}]);\n}).call(undefined);","'use strict';\n\n(function () {\n\t'use strict';\n\n\tvar __hasProp = {}.hasOwnProperty,\n\t __extends = function __extends(child, parent) {\n\t\tfor (var key in parent) {\n\t\t\tif (__hasProp.call(parent, key)) child[key] = parent[key];\n\t\t}function ctor() {\n\t\t\tthis.constructor = child;\n\t\t}ctor.prototype = parent.prototype;child.prototype = new ctor();child.__super__ = parent.prototype;return child;\n\t},\n\t __indexOf = [].indexOf || function (item) {\n\t\tfor (var i = 0, l = this.length; i < l; i++) {\n\t\t\tif (i in this && this[i] === item) return i;\n\t\t}return -1;\n\t};\n\n\tangular.module('Tasks').factory('TasksModel', ['_Model', function (_Model) {\n\t\tvar TasksModel = function (_super) {\n\t\t\t__extends(TasksModel, _super);\n\n\t\t\tfunction TasksModel() {\n\t\t\t\tthis._tmpIdCache = {};\n\t\t\t\tTasksModel.__super__.constructor.call(this);\n\t\t\t}\n\n\t\t\tTasksModel.prototype.ad = function (task, clearCache) {\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\tvar updateByUri = angular.isDefined(task.uri) && angular.isDefined(this.getByUri(task.uri));\n\t\t\t\tif (updateByUri) {\n\t\t\t\t\treturn this.update(task, clearCache);\n\t\t\t\t} else {\n\t\t\t\t\tif (angular.isDefined(task.uri)) {\n\t\t\t\t\t\tif (clearCache) {\n\t\t\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!angular.isDefined(this._dataMap[task.uri])) {\n\t\t\t\t\t\t\tthis._data.push(task);\n\t\t\t\t\t\t\tthis._dataMap[task.uri] = task;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTasksModel.prototype.getByUri = function (uri) {\n\t\t\t\treturn this._dataMap[uri];\n\t\t\t};\n\n\t\t\tTasksModel.prototype.update = function (task, clearCache) {\n\n\t\t\t\tvar entry, key, value, _results;\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\tif (clearCache) {\n\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t}\n\t\t\t\tentry = this.getByUri(task.uri);\n\t\t\t\tentry.components = task.components;\n\t\t\t\tentry.components.toString();\n\t\t\t\treturn entry;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.removeById = function (taskID) {\n\t\t\t\treturn TasksModel.__super__.removeById.call(this, taskID);\n\t\t\t};\n\n\t\t\tTasksModel.prototype[\"delete\"] = function (task, clearCache) {\n\t\t\t\tvar counter, data, entry, _i, _len, _ref;\n\t\t\t\tif (clearCache === null) {\n\t\t\t\t\tclearCache = true;\n\t\t\t\t}\n\t\t\t\t_ref = this._data;\n\t\t\t\tfor (counter = _i = 0, _len = _ref.length; _i < _len; counter = ++_i) {\n\t\t\t\t\tentry = _ref[counter];\n\t\t\t\t\tif (entry === task) {\n\t\t\t\t\t\tthis._data.splice(counter, 1);\n\t\t\t\t\t\tdata = this._dataMap[task.uri];\n\t\t\t\t\t\tdelete this._dataMap[task.uri];\n\t\t\t\t\t\tif (clearCache) {\n\t\t\t\t\t\t\tthis._invalidateCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTasksModel.prototype.removeByList = function (listID) {\n\t\t\t\tvar id, task, taskIDs, tasks, _i, _j, _len, _len1, _results;\n\t\t\t\ttasks = this.getAll();\n\t\t\t\ttaskIDs = [];\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tif (task.calendarid === listID) {\n\t\t\t\t\t\ttaskIDs.push(task.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_results = [];\n\t\t\t\tfor (_j = 0, _len1 = taskIDs.length; _j < _len1; _j++) {\n\t\t\t\t\tid = taskIDs[_j];\n\t\t\t\t\t_results.push(this.removeById(id));\n\t\t\t\t}\n\t\t\t\treturn _results;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.taskAtDay = function (task, date) {\n\t\t\t\tvar diff, due, duediff, start, startdiff;\n\t\t\t\tstart = moment(task.start, \"YYYYMMDDTHHmmss\");\n\t\t\t\tdue = moment(task.due, \"YYYYMMDDTHHmmss\");\n\t\t\t\tif (start.isValid() && !due.isValid()) {\n\t\t\t\t\tdiff = start.diff(moment().startOf('day'), 'days', true);\n\t\t\t\t\tif (!date && diff < date + 1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (diff < date + 1 && diff >= date) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (due.isValid() && !start.isValid()) {\n\t\t\t\t\tdiff = due.diff(moment().startOf('day'), 'days', true);\n\t\t\t\t\tif (!date && diff < date + 1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (diff < date + 1 && diff >= date) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (start.isValid() && due.isValid()) {\n\t\t\t\t\tstartdiff = start.diff(moment().startOf('day'), 'days', true);\n\t\t\t\t\tduediff = due.diff(moment().startOf('day'), 'days', true);\n\t\t\t\t\tif (!date && (startdiff < date + 1 || duediff < date + 1)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (startdiff < date + 1 && startdiff >= date && duediff >= date) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (duediff < date + 1 && duediff >= date && startdiff >= date) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.isLoaded = function (task) {\n\t\t\t\tif (this.getById(task.id)) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTasksModel.prototype.hasSubtasks = function (uid) {\n\t\t\t\tvar task, tasks, _i, _len;\n\t\t\t\ttasks = this.getAll();\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tif (task.related === uid) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.hasCompletedSubtasks = function (uid) {\n\t\t\t\tvar task, tasks, _i, _len;\n\t\t\t\ttasks = this.getAll();\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tif (task.related === uid && task.completed) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.hasNoParent = function (task) {\n\t\t\t\tvar t, tasks, _i, _len;\n\t\t\t\tif (!task.related) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\ttasks = this.getAll();\n\t\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\t\tt = tasks[_i];\n\t\t\t\t\t\tif (task.related === t.uid && task !== t) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTasksModel.prototype.getIdByUid = function (uid) {\n\t\t\t\tvar task, tasks, _i, _len;\n\t\t\t\ttasks = this.getAll();\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tif (task.uid === uid) {\n\t\t\t\t\t\treturn task.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.getByUid = function (uid) {\n\t\t\t\tvar task, tasks, _i, _len;\n\t\t\t\ttasks = this.getAll();\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\tif (task.uid === uid) {\n\t\t\t\t\t\treturn task;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.getChildren = function (task) {\n\t\t\t\tvar children, t, tasks, _i, _len;\n\t\t\t\ttasks = this.getAll();\n\t\t\t\tchildren = [];\n\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\tt = tasks[_i];\n\t\t\t\t\tif (t.related === task.uid && t !== task) {\n\t\t\t\t\t\tchildren.push(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn children;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.getDescendantIDs = function (task) {\n\t\t\t\tvar child, children, descendantIDs, _i, _len;\n\t\t\t\tchildren = this.getChildren(task);\n\t\t\t\tdescendantIDs = [];\n\t\t\t\tfor (_i = 0, _len = children.length; _i < _len; _i++) {\n\t\t\t\t\tchild = children[_i];\n\t\t\t\t\tdescendantIDs = descendantIDs.concat(child.uri);\n\t\t\t\t\tdescendantIDs = descendantIDs.concat(this.getDescendantIDs(child));\n\t\t\t\t}\n\t\t\t\treturn descendantIDs;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.filterTasks = function (task, filter) {\n\t\t\t\tswitch (filter) {\n\t\t\t\t\tcase 'completed':\n\t\t\t\t\t\treturn task.completed === true;\n\t\t\t\t\tcase 'all':\n\t\t\t\t\t\treturn task.completed === false;\n\t\t\t\t\tcase 'current':\n\t\t\t\t\t\treturn task.completed === false && this.current(task.start, task.due);\n\t\t\t\t\tcase 'starred':\n\t\t\t\t\t\treturn task.completed === false && task.priority > 5;\n\t\t\t\t\tcase 'today':\n\t\t\t\t\t\treturn task.completed === false && (this.today(task.start) || this.today(task.due));\n\t\t\t\t\tcase 'week':\n\t\t\t\t\t\treturn task.completed === false && (this.week(task.start) || this.week(task.due));\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn '' + task.calendar.uri === '' + filter;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTasksModel.prototype.filteredTasks = function (needle) {\n\t\t\t\tvar ancestors, parentID, ret, task, tasks, _i, _len;\n\t\t\t\tret = [];\n\t\t\t\ttasks = this.getAll();\n\t\t\t\tif (!needle) {\n\t\t\t\t\tret = tasks;\n\t\t\t\t} else {\n\t\t\t\t\tfor (_i = 0, _len = tasks.length; _i < _len; _i++) {\n\t\t\t\t\t\ttask = tasks[_i];\n\t\t\t\t\t\tif (this.filterTasksByString(task, needle)) {\n\t\t\t\t\t\t\tif (this.objectExists(task, ret)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tret.push(task);\n\t\t\t\t\t\t\tparentID = this.getIdByUid(task.related);\n\t\t\t\t\t\t\tancestors = this.getAncestor(parentID, ret);\n\t\t\t\t\t\t\tif (ancestors) {\n\t\t\t\t\t\t\t\tret = ret.concat(ancestors);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.objectExists = function (task, ret) {\n\t\t\t\tvar re, _i, _len;\n\t\t\t\tfor (_i = 0, _len = ret.length; _i < _len; _i++) {\n\t\t\t\t\tre = ret[_i];\n\t\t\t\t\tif (re.id === task.id) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.filterTasksByString = function (task, filter) {\n\t\t\t\tvar category, comment, key, keys, value, _i, _j, _len, _len1, _ref, _ref1;\n\t\t\t\tkeys = ['name', 'note', 'location', 'categories', 'comments'];\n\t\t\t\tfilter = filter.toLowerCase();\n\t\t\t\tfor (key in task) {\n\t\t\t\t\tvalue = task[key];\n\t\t\t\t\tif (__indexOf.call(keys, key) >= 0) {\n\t\t\t\t\t\tif (key === 'comments') {\n\t\t\t\t\t\t\t_ref = task.comments;\n\t\t\t\t\t\t\tfor (_i = 0, _len = _ref.length; _i < _len; _i++) {\n\t\t\t\t\t\t\t\tcomment = _ref[_i];\n\t\t\t\t\t\t\t\tif (comment.comment.toLowerCase().indexOf(filter) !== -1) {\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (key === 'categories') {\n\t\t\t\t\t\t\t_ref1 = task.categories;\n\t\t\t\t\t\t\tfor (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {\n\t\t\t\t\t\t\t\tcategory = _ref1[_j];\n\t\t\t\t\t\t\t\tif (category.toLowerCase().indexOf(filter) !== -1) {\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (value.toLowerCase().indexOf(filter) !== -1) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.setReminder = function (taskID, reminder) {\n\t\t\t\treturn this.update({\n\t\t\t\t\tid: taskID,\n\t\t\t\t\treminder: reminder\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tTasksModel.prototype.overdue = function (due) {\n\t\t\t\treturn moment(due, \"YYYYMMDDTHHmmss\").isValid() && moment(due, \"YYYYMMDDTHHmmss\").diff(moment()) < 0;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.due = function (due) {\n\t\t\t\treturn moment(due, 'YYYYMMDDTHHmmss').isValid();\n\t\t\t};\n\n\t\t\tTasksModel.prototype.today = function (due) {\n\t\t\t\treturn moment(due, \"YYYYMMDDTHHmmss\").isValid() && moment(due, \"YYYYMMDDTHHmmss\").diff(moment().startOf('day'), 'days', true) < 1;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.week = function (due) {\n\t\t\t\treturn moment(due, \"YYYYMMDDTHHmmss\").isValid() && moment(due, \"YYYYMMDDTHHmmss\").diff(moment().startOf('day'), 'days', true) < 7;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.current = function (start, due) {\n\t\t\t\treturn !moment(start, \"YYYYMMDDTHHmmss\").isValid() || moment(start, \"YYYYMMDDTHHmmss\").diff(moment(), 'days', true) < 0 || moment(due, \"YYYYMMDDTHHmmss\").diff(moment(), 'days', true) < 0;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.addComment = function (comment) {\n\t\t\t\tvar task;\n\t\t\t\ttask = this.getById(comment.taskID);\n\t\t\t\tif (task.comments) {\n\t\t\t\t\ttask.comments.push(comment);\n\t\t\t\t} else {\n\t\t\t\t\ttask.comments = [comment];\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTasksModel.prototype.updateComment = function (comment) {\n\t\t\t\tvar com, i, task, _i, _len, _ref, _results;\n\t\t\t\ttask = this.getById(comment.taskID);\n\t\t\t\ti = 0;\n\t\t\t\t_ref = task.comments;\n\t\t\t\t_results = [];\n\t\t\t\tfor (_i = 0, _len = _ref.length; _i < _len; _i++) {\n\t\t\t\t\tcom = _ref[_i];\n\t\t\t\t\tif (com.tmpID === comment.tmpID) {\n\t\t\t\t\t\ttask.comments[i] = comment;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t_results.push(i++);\n\t\t\t\t}\n\t\t\t\treturn _results;\n\t\t\t};\n\n\t\t\tTasksModel.prototype.deleteComment = function (taskID, commentID) {\n\t\t\t\tvar comment, i, task, _i, _len, _ref, _results;\n\t\t\t\ttask = this.getById(taskID);\n\t\t\t\ti = 0;\n\t\t\t\t_ref = task.comments;\n\t\t\t\t_results = [];\n\t\t\t\tfor (_i = 0, _len = _ref.length; _i < _len; _i++) {\n\t\t\t\t\tcomment = _ref[_i];\n\t\t\t\t\tif (comment.id === commentID) {\n\t\t\t\t\t\ttask.comments.splice(i, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t_results.push(i++);\n\t\t\t\t}\n\t\t\t\treturn _results;\n\t\t\t};\n\n\t\t\treturn TasksModel;\n\t\t}(_Model);\n\t\treturn new TasksModel();\n\t}]);\n}).call(undefined);","'use strict';\n\nangular.module('Tasks').factory('VTodo', ['$filter', 'ICalFactory', 'RandomStringService', function ($filter, icalfactory, RandomStringService) {\n\t'use strict';\n\n\tfunction VTodo(calendar, props, uri) {\n\t\tvar _this = this;\n\n\t\tangular.extend(this, {\n\t\t\tcalendar: calendar,\n\t\t\tdata: props['{urn:ietf:params:xml:ns:caldav}calendar-data'],\n\t\t\turi: uri,\n\t\t\tetag: props['{DAV:}getetag'] || null,\n\t\t\ttimers: [],\n\t\t\tloaded: false\n\t\t});\n\n\t\tthis.jCal = ICAL.parse(this.data);\n\t\tthis.components = new ICAL.Component(this.jCal);\n\n\t\tif (this.components.jCal.length === 0) {\n\t\t\tthrow \"invalid calendar\";\n\t\t}\n\t}\n\n\tVTodo.prototype = {\n\t\tget summary() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('summary');\n\t\t},\n\t\tset summary(summary) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('summary', summary);\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget priority() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvar priority = vtodos[0].getFirstPropertyValue('priority');\n\t\t\treturn (10 - priority) % 10;\n\t\t},\n\t\tset priority(priority) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('priority', (10 - priority) % 10);\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget complete() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('percent-complete') || 0;\n\t\t},\n\t\tset complete(complete) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('percent-complete', complete);\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t\tif (complete < 100) {\n\t\t\t\tthis.completed = null;\n\t\t\t\tif (complete === 0) {\n\t\t\t\t\tthis.status = 'NEEDS-ACTION';\n\t\t\t\t} else {\n\t\t\t\t\tthis.status = 'IN-PROCESS';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.completed = ICAL.Time.now();\n\t\t\t\tthis.status = 'COMPLETED';\n\t\t\t}\n\t\t},\n\t\tget completed() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvar comp = vtodos[0].getFirstPropertyValue('completed');\n\t\t\tif (comp) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tset completed(completed) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tif (completed) {\n\t\t\t\tvtodos[0].updatePropertyWithValue('completed', completed);\n\t\t\t} else {\n\t\t\t\tvtodos[0].removeProperty('completed');\n\t\t\t}\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget completed_date() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvar comp = vtodos[0].getFirstPropertyValue('completed');\n\t\t\tif (comp) {\n\t\t\t\treturn comp.toJSDate();\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t},\n\t\tget status() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('status');\n\t\t},\n\t\tset status(status) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('status', status);\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget note() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('description') || '';\n\t\t},\n\t\tset note(note) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('description', note);\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget uid() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('uid') || '';\n\t\t},\n\t\tget related() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('related-to') || null;\n\t\t},\n\t\tset related(related) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tif (related) {\n\t\t\t\tvtodos[0].updatePropertyWithValue('related-to', related);\n\t\t\t} else {\n\t\t\t\tvtodos[0].removeProperty('related-to');\n\t\t\t}\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget hideSubtasks() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn +vtodos[0].getFirstPropertyValue('x-oc-hidesubtasks') || 0;\n\t\t},\n\t\tset hideSubtasks(hide) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('x-oc-hidesubtasks', +hide);\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget hideCompletedSubtasks() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn +vtodos[0].getFirstPropertyValue('x-oc-hidecompletedsubtasks') || 0;\n\t\t},\n\t\tset hideCompletedSubtasks(hide) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('x-oc-hidecompletedsubtasks', +hide);\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget reminder() {\n\t\t\treturn null;\n\t\t},\n\t\tget categories() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvar categories = vtodos[0].getFirstProperty('categories');\n\t\t\tif (categories) {\n\t\t\t\treturn categories.getValues();\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t},\n\t\tset categories(cats) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvar categories = vtodos[0].getFirstProperty('categories');\n\t\t\tif (cats.length > 0) {\n\t\t\t\tif (categories) {\n\t\t\t\t\tcategories.setValues(cats);\n\t\t\t\t} else {\n\t\t\t\t\tvar prop = new ICAL.Property('categories');\n\t\t\t\t\tprop.setValues(cats);\n\t\t\t\t\tcategories = vtodos[0].addProperty(prop);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvtodos[0].removeProperty('categories');\n\t\t\t}\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget start() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('dtstart');\n\t\t},\n\t\tset start(start) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tif (start) {\n\t\t\t\tvtodos[0].updatePropertyWithValue('dtstart', start);\n\t\t\t} else {\n\t\t\t\tvtodos[0].removeProperty('dtstart');\n\t\t\t}\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget due() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\treturn vtodos[0].getFirstPropertyValue('due');\n\t\t},\n\t\tset due(due) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tif (due) {\n\t\t\t\tvtodos[0].updatePropertyWithValue('due', due);\n\t\t\t} else {\n\t\t\t\tvtodos[0].removeProperty('due');\n\t\t\t}\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget allDay() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvar start = vtodos[0].getFirstPropertyValue('dtstart');\n\t\t\tvar due = vtodos[0].getFirstPropertyValue('due');\n\t\t\tvar d = due ? due : start;\n\t\t\treturn d != null && d.isDate;\n\t\t},\n\t\tset allDay(allDay) {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvar start = vtodos[0].getFirstPropertyValue('dtstart');\n\t\t\tif (start) {\n\t\t\t\tstart.isDate = allDay;\n\t\t\t\tvtodos[0].updatePropertyWithValue('dtstart', start);\n\t\t\t}\n\t\t\tvar due = vtodos[0].getFirstPropertyValue('due');\n\t\t\tif (due) {\n\t\t\t\tdue.isDate = allDay;\n\t\t\t\tvtodos[0].updatePropertyWithValue('due', due);\n\t\t\t}\n\t\t\tthis.updateLastModified();\n\t\t\tthis.data = this.components.toString();\n\t\t},\n\t\tget comments() {\n\t\t\treturn null;\n\t\t},\n\t\tget loadedCompleted() {\n\t\t\treturn this.loaded;\n\t\t},\n\t\tset loadedCompleted(loadedCompleted) {\n\t\t\tthis.loaded = loadedCompleted;\n\t\t},\n\t\tupdateLastModified: function updateLastModified() {\n\t\t\tvar vtodos = this.components.getAllSubcomponents('vtodo');\n\t\t\tvtodos[0].updatePropertyWithValue('last-modified', ICAL.Time.now());\n\t\t\tvtodos[0].updatePropertyWithValue('dtstamp', ICAL.Time.now());\n\t\t}\n\t};\n\n\tVTodo.create = function (task) {\n\t\tvar comp = icalfactory.new();\n\n\t\tvar vtodo = new ICAL.Component('vtodo');\n\t\tcomp.addSubcomponent(vtodo);\n\t\tvtodo.updatePropertyWithValue('created', ICAL.Time.now());\n\t\tvtodo.updatePropertyWithValue('dtstamp', ICAL.Time.now());\n\t\tvtodo.updatePropertyWithValue('last-modified', ICAL.Time.now());\n\t\tvtodo.updatePropertyWithValue('uid', RandomStringService.generate());\n\t\tvtodo.updatePropertyWithValue('summary', task.summary);\n\t\tvtodo.updatePropertyWithValue('priority', task.priority);\n\t\tvtodo.updatePropertyWithValue('percent-complete', task.complete);\n\t\tvtodo.updatePropertyWithValue('x-oc-hidesubtasks', 0);\n\t\tif (task.related) {\n\t\t\tvtodo.updatePropertyWithValue('related-to', task.related);\n\t\t}\n\t\tif (task.note) {\n\t\t\tvtodo.updatePropertyWithValue('description', task.note);\n\t\t}\n\t\tif (task.due) {\n\t\t\tvtodo.updatePropertyWithValue('due', task.due);\n\t\t}\n\t\tif (task.start) {\n\t\t\tvtodo.updatePropertyWithValue('dtstart', task.start);\n\t\t}\n\n\t\treturn new VTodo(task.calendar, {\n\t\t\t'{urn:ietf:params:xml:ns:caldav}calendar-data': comp.toString(),\n\t\t\t'{DAV:}getetag': null\n\t\t}, null);\n\t};\n\n\treturn VTodo;\n}]);"]} \ No newline at end of file diff --git a/js/yarn.lock b/js/yarn.lock index 120a1acc0..d2d490c43 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -2,17 +2,79 @@ # yarn lockfile v1 +"@gulp-sourcemaps/identity-map@1.X": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.1.tgz#cfa23bc5840f9104ce32a65e74db7e7a974bbee1" + dependencies: + acorn "^5.0.3" + css "^2.2.1" + normalize-path "^2.1.1" + source-map "^0.5.6" + through2 "^2.0.3" + +"@gulp-sourcemaps/map-sources@1.X": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" + dependencies: + normalize-path "^2.0.1" + through2 "^2.0.3" + abbrev@1: version "1.1.0" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" -ajv@^4.9.1: +accepts@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +acorn@4.X: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.3: + version "5.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" + +acorn@~2.6.4: + version "2.6.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.6.4.tgz#eb1f45b4a43fa31d03701a5ec46f3b52673e90ee" + +after@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +alter@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/alter/-/alter-0.2.0.tgz#c7588808617572034aae62480af26b1d4d1cb3cd" + dependencies: + stable "~0.1.3" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -25,20 +87,96 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -argparse@^1.0.2, argparse@^1.0.7: +ansi-styles@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +aproba@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" dependencies: sprintf-js "~1.0.2" +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-each@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" + array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" -arrify@^1.0.1: +array-slice@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + +array-slice@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.0.0.tgz#e73034f00dcc1f40876008fd20feae77bd4b7c2f" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + +arrify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" @@ -51,9 +189,9 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -async@^1.2.1, async@^1.5.0, async@~1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" async@^2.4.1: version "2.5.0" @@ -69,6 +207,21 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +atob@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" + +autoprefixer@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.3.tgz#0e8d337976d6f13644db9f8813b4c42f3d1ccc34" + dependencies: + browserslist "^2.4.0" + caniuse-lite "^1.0.30000718" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^6.0.10" + postcss-value-parser "^3.2.3" + aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" @@ -77,34 +230,468 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.2, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.6" + trim-right "^1.0.1" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-regenerator@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-es2015@^6.14.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.24.1" + babel-plugin-transform-es2015-classes "^6.24.1" + babel-plugin-transform-es2015-computed-properties "^6.24.1" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.24.1" + babel-plugin-transform-es2015-for-of "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.24.1" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-plugin-transform-es2015-modules-systemjs "^6.24.1" + babel-plugin-transform-es2015-modules-umd "^6.24.1" + babel-plugin-transform-es2015-object-super "^6.24.1" + babel-plugin-transform-es2015-parameters "^6.24.1" + babel-plugin-transform-es2015-shorthand-properties "^6.24.1" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.24.1" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.24.1" + babel-plugin-transform-regenerator "^6.24.1" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + +base64id@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" dependencies: tweetnacl "^0.14.3" -beeper@^1.1.0: +beeper@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" -body-parser@~1.14.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.14.2.tgz#1015cb1fe2c443858259581db53332f8d0cf50f9" +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + dependencies: + callsite "1.0.0" + +binary-extensions@^1.0.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" + +blob@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" dependencies: - bytes "2.2.0" - content-type "~1.0.1" - debug "~2.2.0" + inherits "~2.0.0" + +bluebird@^3.1.1, bluebird@^3.3.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + +body-parser@^1.16.1: + version "1.17.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.17.2.tgz#f8892abc8f9e627d42aedafbca66bf5ab99104ee" + dependencies: + bytes "2.4.0" + content-type "~1.0.2" + debug "2.6.7" depd "~1.1.0" - http-errors "~1.3.1" - iconv-lite "0.4.13" + http-errors "~1.6.1" + iconv-lite "0.4.15" on-finished "~2.3.0" - qs "5.2.0" - raw-body "~2.1.5" - type-is "~1.6.10" + qs "6.4.0" + raw-body "~2.2.0" + type-is "~1.6.15" boom@2.x.x: version "2.10.1" @@ -116,25 +703,58 @@ bower@*: version "1.8.0" resolved "https://registry.yarnpkg.com/bower/-/bower-1.8.0.tgz#55dbebef0ad9155382d9e9d3e497c1372345b44a" -brace-expansion@^1.1.7: +brace-expansion@^1.0.0, brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: balanced-match "^1.0.0" concat-map "0.0.1" +braces@^0.1.2: + version "0.1.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" + dependencies: + expand-range "^0.1.0" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browserslist@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.4.0.tgz#693ee93d01e66468a6348da5498e011f578f87f8" + dependencies: + caniuse-lite "^1.0.30000718" + electron-to-chromium "^1.3.18" + +bufferstreams@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bufferstreams/-/bufferstreams-1.0.1.tgz#cfb1ad9568d3ba3cfe935ba9abdd952de88aab2a" + dependencies: + readable-stream "^1.0.33" + +bufferstreams@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/bufferstreams/-/bufferstreams-1.1.1.tgz#0161373060ac5988eff99058731114f6e195d51e" + dependencies: + readable-stream "^2.0.2" + builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -bytes@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588" - bytes@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" @@ -142,7 +762,11 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" -camelcase@^2.0.0: +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0, camelcase@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" @@ -150,11 +774,22 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" +caniuse-lite@^1.0.30000718: + version "1.0.30000721" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000721.tgz#931a21a7bd85016300328d21f126d84b73437d35" + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3, chalk@~1.1.1: +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -164,6 +799,33 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3, chalk@~1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.1, chalk@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +chokidar@^1.4.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + clap@^1.0.9: version "1.2.0" resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857" @@ -177,7 +839,15 @@ cli@~1.0.0: exit "0.1.2" glob "^7.1.1" -cliui@^3.2.0: +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.0.3, cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" dependencies: @@ -189,10 +859,29 @@ clone-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" +clone-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-regexp/-/clone-regexp-1.0.0.tgz#eae0a2413f55c0942f818c229fefce845d7f3b1c" + dependencies: + is-regexp "^1.0.0" + is-supported-regexp-flag "^1.0.0" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + clone-stats@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + clone@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" @@ -219,24 +908,52 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -coffee-script@~1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.10.0.tgz#12938bcf9be1948fa006f92e0c4c9e81705108c0" +color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" colors@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" -colors@~1.1.2: +colors@^1.1.0, colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" +combine-lists@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" + dependencies: + lodash "^4.5.0" + combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" dependencies: delayed-stream "~1.0.0" +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -249,20 +966,80 @@ concat-stream@1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" +concat-with-sourcemaps@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz#f55b3be2aeb47601b10a2d5259ccfb70fd2f1dd6" + dependencies: + source-map "^0.5.1" + +connect@^3.6.0: + version "3.6.3" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.3.tgz#f7320d46a25b4be7b483a2236517f24b1e27e301" + dependencies: + debug "2.6.8" + finalhandler "1.0.4" + parseurl "~1.3.1" + utils-merge "1.0.0" + console-browserify@1.1.x: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" dependencies: date-now "^0.1.4" -content-type@~1.0.1: +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +consolidate@^0.14.1: + version "0.14.5" + resolved "https://registry.yarnpkg.com/consolidate/-/consolidate-0.14.5.tgz#5a25047bc76f73072667c8cb52c989888f494c63" + dependencies: + bluebird "^3.1.1" + +content-type@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" +convert-source-map@1.X, convert-source-map@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +convert-source-map@~1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +copy-props@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-1.6.0.tgz#f0324bbee99771101e7b3ada112f313c393db8ed" + dependencies: + each-props "^1.2.1" + is-plain-object "^2.0.1" + +core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^2.1.3: + version "2.2.2" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -281,6 +1058,15 @@ css-selector-parser@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/css-selector-parser/-/css-selector-parser-1.3.0.tgz#5f1ad43e2d8eefbfdc304fcd39a521664943e3eb" +css@2.X, css@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" + dependencies: + inherits "^2.0.1" + source-map "^0.1.38" + source-map-resolve "^0.3.0" + urix "^0.1.0" + cssmin@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/cssmin/-/cssmin-0.4.3.tgz#c9194077e0ebdacd691d5f59015b9d819f38d015" @@ -302,10 +1088,20 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + cycle@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -320,39 +1116,127 @@ dateformat@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" -dateformat@~1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" +debug-fabulous@>=0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.1.1.tgz#1b970878c9fa4fbd1c88306eab323c830c58f1d6" dependencies: - get-stdin "^4.0.1" - meow "^3.3.0" + debug "2.3.0" + memoizee "^0.4.5" + object-assign "4.1.0" -debug@2.2.0, debug@~2.2.0: +debug@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" -decamelize@^1.1.1, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +debug@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.0.tgz#3912dc55d7167fc3af17d2b85c13f93deaedaa43" + dependencies: + ms "0.7.2" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" +debug@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" -depd@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" +debug@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" + dependencies: + ms "2.0.0" -dom-serializer@0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" +debug@2.6.8, debug@^2.2.0, debug@^2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: - domelementtype "~1.1.1" - entities "~1.1.1" + ms "2.0.0" -domelementtype@1: +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.0.tgz#6ef4a09b05f98b0e358d6d93d4ca3caec6672803" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +defaults@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@1.1.1, depd@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +deprecated@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" + +detect-file@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" + dependencies: + fs-exists-sync "^0.1.0" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-newline@2.X: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + +dom-serialize@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1: version "1.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" @@ -373,14 +1257,18 @@ domutils@1.5: dom-serializer "0" domelementtype "1" -duplexify@^3.1.2: - version "3.5.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.1.tgz#4e1516be68838bc90a49994f0b39a6e5960befcd" +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" + readable-stream "~1.1.9" + +each-props@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.1.tgz#fc138f51e3a2774286d4858e02d6e7de462de158" + dependencies: + is-plain-object "^2.0.1" + object.defaults "^1.1.0" ecc-jsbn@~0.1.1: version "0.1.1" @@ -392,11 +1280,62 @@ ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" - dependencies: - once "^1.4.0" +electron-to-chromium@^1.3.18: + version "1.3.20" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.20.tgz#2eedd5ccbae7ddc557f68ad1fce9c172e915e4e5" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +end-of-stream@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" + dependencies: + once "~1.3.0" + +engine.io-client@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" + dependencies: + component-emitter "1.2.1" + component-inherit "0.0.3" + debug "2.3.3" + engine.io-parser "1.3.2" + has-cors "1.1.0" + indexof "0.0.1" + parsejson "0.0.3" + parseqs "0.0.5" + parseuri "0.0.5" + ws "1.1.2" + xmlhttprequest-ssl "1.5.3" + yeast "0.1.2" + +engine.io-parser@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" + dependencies: + after "0.8.2" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.5" + blob "0.0.4" + has-binary "0.1.7" + wtf-8 "1.0.0" + +engine.io@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" + dependencies: + accepts "1.3.3" + base64id "1.0.0" + cookie "0.3.1" + debug "2.3.3" + engine.io-parser "1.3.2" + ws "1.1.2" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" entities@1.0: version "1.0.0" @@ -412,11 +1351,50 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +es5-ext@^0.10.14, es5-ext@^0.10.30, es5-ext@^0.10.9, es5-ext@~0.10.14, es5-ext@~0.10.2: + version "0.10.30" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.30.tgz#7141a16836697dbabfaaaeee41495ce29f52c939" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2, es6-iterator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-promise@^3.1.2: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + es6-promise@~4.0.3: version "4.0.5" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" -escape-string-regexp@^1.0.2: +es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -428,9 +1406,20 @@ esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" -eventemitter2@~0.4.13: - version "0.4.14" - resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +eventemitter3@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" execa@^0.7.0: version "0.7.0" @@ -444,14 +1433,65 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -exit@0.1.2, exit@0.1.x, exit@~0.1.1: +execall@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execall/-/execall-1.0.0.tgz#73d0904e395b3cab0658b08d09ec25307f29bb73" + dependencies: + clone-regexp "^1.0.0" + +exit@0.1.2, exit@0.1.x: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" -extend@~3.0.0: +expand-braces@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" + dependencies: + array-slice "^0.2.3" + array-unique "^0.2.1" + braces "^0.1.2" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" + dependencies: + is-number "^0.1.1" + repeat-string "^0.2.2" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + +expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + dependencies: + homedir-polyfill "^1.0.1" + +extend@^3.0.0, extend@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + extract-zip@~1.6.5: version "1.6.5" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.5.tgz#99a06735b6ea20ea9b705d779acffcc87cff0440" @@ -469,11 +1509,12 @@ eyes@0.1.x: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" -faye-websocket@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" +fancy-log@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" dependencies: - websocket-driver ">=0.5.1" + chalk "^1.1.1" + time-stamp "^1.0.0" fd-slicer@~1.0.1: version "1.0.1" @@ -481,6 +1522,43 @@ fd-slicer@~1.0.1: dependencies: pend "~1.2.0" +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.4.tgz#18574f2e7c4b98b8ae3b230c21f201f31bdb3fb7" + dependencies: + debug "2.6.8" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-index@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -494,12 +1572,68 @@ find-up@^2.0.0: dependencies: locate-path "^2.0.0" +findup-sync@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" + dependencies: + detect-file "^0.1.0" + is-glob "^2.0.1" + micromatch "^2.3.7" + resolve-dir "^0.1.0" + findup-sync@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" dependencies: glob "~5.0.0" +fined@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.1.0.tgz#b37dc844b76a2f5e7081e884f7c0ae344f153476" + dependencies: + expand-tilde "^2.0.2" + is-plain-object "^2.0.3" + object.defaults "^1.1.0" + object.pick "^1.2.0" + parse-filepath "^1.0.1" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flagged-respawn@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" + +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + dependencies: + for-in "^1.0.1" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -512,6 +1646,10 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + fs-extra@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" @@ -520,15 +1658,58 @@ fs-extra@~1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" +fs-readfile-promise@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fs-readfile-promise/-/fs-readfile-promise-2.0.1.tgz#80023823981f9ffffe01609e8be668f69ae49e70" + dependencies: + graceful-fs "^4.1.2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -gaze@^1.0.0: +fsevents@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.36" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" dependencies: - globule "^1.0.0" + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" + dependencies: + globule "~0.1.0" get-caller-file@^1.0.1: version "1.0.2" @@ -538,21 +1719,66 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" +get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" -getobject@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/getobject/-/getobject-0.1.0.tgz#047a449789fa160d018f5486ed91320b6ec7885c" - getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" -glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-stream@^3.1.5: + version "3.1.18" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^1.0.0" + +glob-watcher@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" + dependencies: + gaze "^0.5.1" + +glob2base@^0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + +glob@^4.3.1: + version "4.5.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -563,6 +1789,14 @@ glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@~3.1.21: + version "3.1.21" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" + dependencies: + graceful-fs "~1.2.0" + inherits "1" + minimatch "~0.2.11" + glob@~5.0.0: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -573,142 +1807,267 @@ glob@~5.0.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@~7.0.0: - version "7.0.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" + global-prefix "^0.1.4" + is-windows "^0.2.0" -globule@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.0.tgz#1dc49c6822dd9e8a2fa00ba2a295006e8664bd09" +global-prefix@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" dependencies: - glob "~7.1.1" - lodash "~4.17.4" - minimatch "~3.0.2" + homedir-polyfill "^1.0.0" + ini "^1.3.4" + is-windows "^0.2.0" + which "^1.2.12" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" -grunt-cli@^1.2.0, grunt-cli@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.2.0.tgz#562b119ebb069ddb464ace2845501be97b35b6a8" +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" dependencies: - findup-sync "~0.3.0" - grunt-known-options "~1.1.0" - nopt "~3.0.6" - resolve "~1.1.0" + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" -grunt-concurrent@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/grunt-concurrent/-/grunt-concurrent-2.3.1.tgz#1e3db38ccef5a3da1195e61d631fe7e321344d23" +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" dependencies: - arrify "^1.0.1" - async "^1.2.1" - indent-string "^2.0.0" - pad-stream "^1.0.0" + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" -grunt-contrib-concat@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz#61509863084e871d7e86de48c015259ed97745bd" - dependencies: - chalk "^1.0.0" - source-map "^0.5.3" +globjoin@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" -grunt-contrib-jshint@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/grunt-contrib-jshint/-/grunt-contrib-jshint-1.1.0.tgz#369d909b2593c40e8be79940b21340850c7939ac" +globule@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" dependencies: - chalk "^1.1.1" - hooker "^0.2.3" - jshint "~2.9.4" + glob "~3.1.21" + lodash "~1.0.1" + minimatch "~0.2.11" -grunt-contrib-watch@^1.0.0: +glogg@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/grunt-contrib-watch/-/grunt-contrib-watch-1.0.0.tgz#84a1a7a1d6abd26ed568413496c73133e990018f" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" dependencies: - async "^1.5.0" - gaze "^1.0.0" - lodash "^3.10.1" - tiny-lr "^0.2.1" + sparkles "^1.0.0" -grunt-karma@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/grunt-karma/-/grunt-karma-2.0.0.tgz#753583d115dfdc055fe57e58f96d6b3c7e612118" +graceful-fs@4.X, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +graceful-fs@^3.0.0: + version "3.0.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" dependencies: - lodash "^3.10.1" + natives "^1.1.0" -grunt-known-options@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/grunt-known-options/-/grunt-known-options-1.1.0.tgz#a4274eeb32fa765da5a7a3b1712617ce3b144149" +graceful-fs@~1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" -grunt-legacy-log-utils@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz#a7b8e2d0fb35b5a50f4af986fc112749ebc96f3d" +gulp-babel@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-6.1.2.tgz#7c0176e4ba3f244c60588a0c4b320a45d1adefce" dependencies: - chalk "~1.1.1" - lodash "~4.3.0" + babel-core "^6.0.2" + gulp-util "^3.0.0" + object-assign "^4.0.1" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" -grunt-legacy-log@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz#fb86f1809847bc07dc47843f9ecd6cacb62df2d5" +gulp-cli@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-1.4.0.tgz#6f5bbe2cd0bdb4849d12cf9e1246a5861f8b4f88" + dependencies: + archy "^1.0.0" + chalk "^1.1.0" + copy-props "^1.4.1" + fancy-log "^1.1.0" + gulplog "^1.0.0" + interpret "^1.0.0" + liftoff "^2.3.0" + lodash.isfunction "^3.0.8" + lodash.isplainobject "^4.0.4" + lodash.sortby "^4.5.0" + matchdep "^1.0.0" + mute-stdout "^1.0.0" + pretty-hrtime "^1.0.0" + semver-greatest-satisfied-range "^1.0.0" + tildify "^1.0.0" + v8flags "^2.0.9" + wreck "^6.3.0" + yargs "^3.28.0" + +gulp-concat@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353" + dependencies: + concat-with-sourcemaps "^1.0.0" + through2 "^2.0.0" + vinyl "^2.0.0" + +gulp-jshint@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/gulp-jshint/-/gulp-jshint-2.0.4.tgz#f382b18564b1072def0c9aaf753c146dadb4f0e8" dependencies: - colors "~1.1.2" - grunt-legacy-log-utils "~1.0.0" - hooker "~0.2.3" - lodash "~3.10.1" - underscore.string "~3.2.3" + gulp-util "^3.0.0" + lodash "^4.12.0" + minimatch "^3.0.3" + rcloader "^0.2.2" + through2 "^2.0.0" -grunt-legacy-util@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz#386aa78dc6ed50986c2b18957265b1b48abb9b86" +gulp-ng-annotate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/gulp-ng-annotate/-/gulp-ng-annotate-2.0.0.tgz#84a83db1f016520bd70f9a5cfa9f3fe89e25a205" + dependencies: + bufferstreams "^1.1.0" + gulp-util "^3.0.7" + merge "^1.2.0" + ng-annotate "^1.2.1" + through2 "^2.0.1" + vinyl-sourcemaps-apply "^0.2.1" + +gulp-npm-files@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/gulp-npm-files/-/gulp-npm-files-0.1.3.tgz#075150e2099bc04b958540a881c6d15ed968565b" + +gulp-sourcemaps@^2.4.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.1.tgz#833a4e28f0b8f4661075032cd782417f7cd8fb0b" + dependencies: + "@gulp-sourcemaps/identity-map" "1.X" + "@gulp-sourcemaps/map-sources" "1.X" + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous ">=0.1.1" + detect-newline "2.X" + graceful-fs "4.X" + source-map "0.X" + strip-bom-string "1.X" + through2 "2.X" + vinyl "1.X" + +gulp-strip-banner@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/gulp-strip-banner/-/gulp-strip-banner-0.0.2.tgz#8d3c046552c13d2d844692349f2db985c61c952b" + dependencies: + gulp-util "^3.0.1" + strip-comments "^0.3.2" + through2 "^0.6.1" + +gulp-stylelint@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/gulp-stylelint/-/gulp-stylelint-4.0.0.tgz#440fa7e6c447e92644700e1e2a06a73e6e457750" dependencies: - async "~1.5.2" - exit "~0.1.1" - getobject "~0.1.0" - hooker "~0.2.3" - lodash "~4.3.0" - underscore.string "~3.2.3" - which "~1.2.1" + chalk "^2.0.1" + deep-extend "^0.5.0" + gulp-util "^3.0.8" + mkdirp "^0.5.1" + promise "^8.0.1" + strip-ansi "^4.0.0" + stylelint "^8.0.0" + through2 "^2.0.3" -grunt-svg-sprite@1.3.7: +gulp-svg-sprite@1.3.7: version "1.3.7" - resolved "https://registry.yarnpkg.com/grunt-svg-sprite/-/grunt-svg-sprite-1.3.7.tgz#e6fe2a7de7f3c0657836ff9401c34cd58e03d8c4" + resolved "https://registry.yarnpkg.com/gulp-svg-sprite/-/gulp-svg-sprite-1.3.7.tgz#cdf7fb359cdd8beb9fcd3d2d6affe61e54fca69e" dependencies: - chalk "^1.1.3" - prettysize "^0.1.0" + gulp-util "^3.0.8" svg-sprite "~1.3.7" + through2 "^2.0.3" + vinyl "^2.0.2" -grunt-wrap@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/grunt-wrap/-/grunt-wrap-0.3.1.tgz#75120979a2f2fe96242fb08b00f65ead2f56c966" +gulp-uglify@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541" + dependencies: + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash "^4.13.1" + make-error-cause "^1.1.1" + through2 "^2.0.0" + uglify-js "~2.8.10" + uglify-save-license "^0.4.1" + vinyl-sourcemaps-apply "^0.2.0" -grunt@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.0.1.tgz#e8778764e944b18f32bb0f10b9078475c9dfb56b" +gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.3, gulp-util@^3.0.7, gulp-util@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" dependencies: - coffee-script "~1.10.0" - dateformat "~1.0.12" - eventemitter2 "~0.4.13" - exit "~0.1.1" - findup-sync "~0.3.0" - glob "~7.0.0" - grunt-cli "~1.2.0" - grunt-known-options "~1.1.0" - grunt-legacy-log "~1.0.0" - grunt-legacy-util "~1.0.0" - iconv-lite "~0.4.13" - js-yaml "~3.5.2" - minimatch "~3.0.0" - nopt "~3.0.6" - path-is-absolute "~1.0.0" - rimraf "~2.2.8" + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp-wrap@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/gulp-wrap/-/gulp-wrap-0.13.0.tgz#90fb0b4a27a266433832ff7c6122db5c1ee894c6" + dependencies: + consolidate "^0.14.1" + es6-promise "^3.1.2" + fs-readfile-promise "^2.0.1" + gulp-util "^3.0.3" + js-yaml "^3.2.6" + lodash "^4.11.1" + node.extend "^1.1.2" + through2 "^2.0.1" + tryit "^1.0.1" + vinyl-bufferstream "^1.0.1" + +gulp@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" + dependencies: + archy "^1.0.0" + chalk "^1.0.0" + deprecated "^0.0.1" + gulp-util "^3.0.0" + interpret "^1.0.0" + liftoff "^2.1.0" + minimist "^1.1.0" + orchestrator "^0.3.0" + pretty-hrtime "^1.0.0" + semver "^4.1.0" + tildify "^1.0.0" + v8flags "^2.0.2" + vinyl-fs "^0.3.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" har-schema@^1.0.5: version "1.0.5" @@ -727,6 +2086,34 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" +has-binary@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" + dependencies: + isarray "0.0.1" + +has-cors@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + hasha@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" @@ -747,14 +2134,27 @@ hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" -hooker@^0.2.3, hooker@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/hooker/-/hooker-0.2.3.tgz#b834f723cc4a242aa65963459df6d984c5d3d959" +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" hosted-git-info@^2.1.4: version "2.5.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" +html-tags@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-2.0.0.tgz#10b30a386085f43cede353cc8fa7cb0deeea668b" + htmlparser2@3.8.x: version "3.8.3" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" @@ -765,12 +2165,21 @@ htmlparser2@3.8.x: entities "1.0" readable-stream "1.1" -http-errors@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.3.1.tgz#197e22cdebd4198585e8694ef6786197b91ed942" +http-errors@~1.6.1: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" dependencies: - inherits "~2.0.1" - statuses "1" + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-proxy@^1.13.0: + version "1.16.2" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" + dependencies: + eventemitter3 "1.x.x" + requires-port "1.x.x" http-signature@~1.1.0: version "1.1.1" @@ -780,20 +2189,32 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" -iconv-lite@0.4.13: - version "0.4.13" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +iconv-lite@0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" + +ignore@^3.3.3: + version "3.3.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6" -iconv-lite@~0.4.13: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" -indent-string@^2.0.0, indent-string@^2.1.0: +indent-string@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" dependencies: repeating "^2.0.0" +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -801,28 +2222,81 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" +ini@^1.3.4, ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" -irregular-plurals@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.3.0.tgz#7af06931bdf74be33dcf585a13e06fccc16caecf" +is-absolute@^0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" dependencies: builtin-modules "^1.0.0" +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" @@ -839,47 +2313,146 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-promise@^2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + +is-relative@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" +is-supported-regexp-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.0.tgz#8b520c85fae7a253382d4b02652e045576e13bb8" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" +is-unc-path@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9" + dependencies: + unc-path-regex "^0.1.0" + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + +is@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is/-/is-3.2.1.tgz#d0ac2ad55eb7b0bec926a5266f6c662aaa83dca5" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" -isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isbinaryfile@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + isstream@0.1.x, isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -js-yaml@^3.8.4: +js-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.2.6, js-yaml@^3.4.3, js-yaml@^3.8.4: version "3.9.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" dependencies: argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@~3.5.2: - version "3.5.5" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.5.5.tgz#0377c38017cabc7322b0d1fbcd25a491641f2fbe" - dependencies: - argparse "^1.0.2" - esprima "^2.6.0" + esprima "^4.0.0" js-yaml@~3.7.0: version "3.7.0" @@ -892,18 +2465,15 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" -jshint-stylish@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/jshint-stylish/-/jshint-stylish-2.2.1.tgz#242082a2c035ae03fd81044e0570cc4208cf6e61" - dependencies: - beeper "^1.1.0" - chalk "^1.0.0" - log-symbols "^1.0.0" - plur "^2.1.0" - string-length "^1.0.0" - text-table "^0.2.0" +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" -jshint@~2.9.4: +jshint@^2.9.4: version "2.9.5" resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.9.5.tgz#1e7252915ce681b40827ee14248c46d34e9aa62c" dependencies: @@ -930,6 +2500,14 @@ json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -949,25 +2527,87 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +karma@^1.3.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.1.tgz#85cc08e9e0a22d7ce9cca37c4a1be824f6a2b1ae" + dependencies: + bluebird "^3.3.0" + body-parser "^1.16.1" + chokidar "^1.4.1" + colors "^1.1.0" + combine-lists "^1.0.0" + connect "^3.6.0" + core-js "^2.2.0" + di "^0.0.1" + dom-serialize "^2.2.0" + expand-braces "^0.1.1" + glob "^7.1.1" + graceful-fs "^4.1.2" + http-proxy "^1.13.0" + isbinaryfile "^3.0.0" + lodash "^3.8.0" + log4js "^0.6.31" + mime "^1.3.4" + minimatch "^3.0.2" + optimist "^0.6.1" + qjobs "^1.1.4" + range-parser "^1.2.0" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "1.7.3" + source-map "^0.5.3" + tmp "0.0.31" + useragent "^2.1.12" + kew@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + klaw@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" optionalDependencies: graceful-fs "^4.1.9" +known-css-properties@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.2.0.tgz#899c94be368e55b42d7db8d5be7d73a4a4a41454" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" dependencies: invert-kv "^1.0.0" -livereload-js@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.2.2.tgz#6c87257e648ab475bc24ea257457edcc1f8d0bc2" +liftoff@^2.1.0, liftoff@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" + dependencies: + extend "^3.0.0" + findup-sync "^0.4.2" + fined "^1.0.1" + flagged-respawn "^0.3.2" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.mapvalues "^4.4.0" + rechoir "^0.6.2" + resolve "^1.1.7" load-json-file@^1.0.0: version "1.1.0" @@ -1008,6 +2648,10 @@ lodash._basecallback@^3.0.0: lodash.isarray "^3.0.0" lodash.pairs "^3.0.0" +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + lodash._baseeach@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz#cf8706572ca144e8d9d75227c990da982f932af3" @@ -1026,6 +2670,14 @@ lodash._baseisequal@^3.0.0: lodash.istypedarray "^3.0.0" lodash.keys "^3.0.0" +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" @@ -1034,12 +2686,46 @@ lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + lodash._topath@^3.0.0: version "3.8.1" resolved "https://registry.yarnpkg.com/lodash._topath/-/lodash._topath-3.8.1.tgz#3ec5e2606014f4cb97f755fe6914edd8bfc00eac" dependencies: lodash.isarray "^3.0.0" +lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.clonedeep@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -1048,6 +2734,22 @@ lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" +lodash.isfunction@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.8.tgz#4db709fc81bc4a8fd7127a458a5346c5cdce2c6b" + +lodash.isobject@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" + +lodash.isplainobject@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + lodash.istypedarray@^3.0.0: version "3.0.6" resolved "https://registry.yarnpkg.com/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz#c9a477498607501d8e8494d283b87c39281cef62" @@ -1070,6 +2772,14 @@ lodash.map@^3.0.0: lodash.isarray "^3.0.0" lodash.keys "^3.0.0" +lodash.mapvalues@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + +lodash.merge@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" + lodash.pairs@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.pairs/-/lodash.pairs-3.0.1.tgz#bbe08d5786eeeaa09a15c91ebf0dcb7d2be326a9" @@ -1085,28 +2795,74 @@ lodash.pluck@^3.1.2: lodash.isarray "^3.0.0" lodash.map "^3.0.0" +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.sortby@^4.5.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash@3.7.x: version "3.7.0" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.7.0.tgz#3678bd8ab995057c07ade836ed2ef087da811d45" -lodash@^3.10.1, lodash@~3.10.1: +lodash@^3.8.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.14.0, lodash@^4.17.4, lodash@~4.17.4: +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.11.1, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.5.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" -lodash@~4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.3.0.tgz#efd9c4a6ec53f3b05412429915c3e4824e4d25a4" +lodash@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" -log-symbols@^1.0.0: +log-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" dependencies: chalk "^1.0.0" +log4js@^0.6.31: + version "0.6.38" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" + dependencies: + readable-stream "~1.0.2" + semver "~4.3.3" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -1114,6 +2870,14 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +lru-cache@2.2.x: + version "2.2.4" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" + lru-cache@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" @@ -1121,10 +2885,43 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +lru-queue@0.1: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + dependencies: + es5-ext "~0.10.2" + +make-error-cause@^1.1.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d" + dependencies: + make-error "^1.2.0" + +make-error@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.0.tgz#52ad3a339ccf10ce62b4040b708fe707244b8b96" + +map-cache@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" +matchdep@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-1.0.1.tgz#a57a33804491fbae208aba8f68380437abc2dca5" + dependencies: + findup-sync "~0.3.0" + micromatch "^2.3.7" + resolve "~1.1.6" + stack-trace "0.0.9" + +mathml-tag-names@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.0.1.tgz#8d41268168bf86d1102b98109e28e531e7a34578" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -1135,7 +2932,20 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" -meow@^3.0.0, meow@^3.3.0: +memoizee@^0.4.5: + version "0.4.9" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.9.tgz#ea1c005f5c4c31d89a4a10e24db83fbf61cdd4f3" + dependencies: + d "1" + es5-ext "^0.10.30" + es6-weak-map "^2.0.2" + event-emitter "^0.3.5" + is-promise "^2.1" + lru-queue "0.1" + next-tick "1" + timers-ext "^0.1.2" + +meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" dependencies: @@ -1150,41 +2960,84 @@ meow@^3.0.0, meow@^3.3.0: redent "^1.0.0" trim-newlines "^1.0.0" +merge@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + mime-db@~1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" -mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.7: +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: version "2.1.17" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: mime-db "~1.30.0" +mime@^1.3.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.0.tgz#69e9e0db51d44f2a3b56e48b7817d7d137f1a343" + mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" -"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.0, minimatch@~3.0.2: +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" +minimatch@^2.0.1: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + +minimatch@~0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.3: +minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + mkdirp@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" dependencies: minimist "0.0.8" -mkdirp@^0.5.1, mkdirp@~0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -1194,15 +3047,87 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + mustache@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" +mute-stdout@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.0.tgz#5b32ea07eb43c9ded6130434cf926f46b2a7fd4d" + +nan@^2.3.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" + +natives@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +next-tick@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + +ng-annotate@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/ng-annotate/-/ng-annotate-1.2.2.tgz#dc3fc51ba0b2f8b385dbe047f4da06f580a1fd61" + dependencies: + acorn "~2.6.4" + alter "~0.2.0" + convert-source-map "~1.1.2" + optimist "~0.6.1" + ordered-ast-traverse "~1.1.1" + simple-fmt "~0.1.0" + simple-is "~0.2.0" + source-map "~0.5.3" + stable "~0.1.5" + stringmap "~0.2.2" + stringset "~0.2.1" + tryor "~0.1.2" + +node-pre-gyp@^0.6.36: + version "0.6.36" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +node.extend@^1.1.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-1.1.6.tgz#a7b882c82d6c93a4863a5504bd5de8ec86258b96" + dependencies: + is "^3.1.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" dependencies: abbrev "1" + osenv "^0.1.4" normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.4.0" @@ -1213,12 +3138,39 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-selector@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/normalize-selector/-/normalize-selector-0.2.0.tgz#d0b145eb691189c63a78d201dc4fdb1293ef0c03" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" dependencies: path-key "^2.0.0" +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -1227,22 +3179,105 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^4.0.1: +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + +object.defaults@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" + dependencies: + array-each "^1.0.1" + array-slice "^1.0.0" + for-own "^1.0.0" + isobject "^3.0.0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" dependencies: ee-first "1.1.1" -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.3.3: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" +once@~1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +optimist@^0.6.1, optimist@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + +orchestrator@^0.3.0: + version "0.3.8" + resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" + dependencies: + end-of-stream "~0.1.5" + sequencify "~0.0.7" + stream-consume "~0.1.0" + +ordered-ast-traverse@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ordered-ast-traverse/-/ordered-ast-traverse-1.1.1.tgz#6843a170bc0eee8b520cc8ddc1ddd3aa30fa057c" + dependencies: + ordered-esprima-props "~1.1.0" + +ordered-esprima-props@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ordered-esprima-props/-/ordered-esprima-props-1.1.0.tgz#a9827086df5f010aa60e9bd02b6e0335cea2ffcb" + +ordered-read-streams@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + os-locale@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" @@ -1251,6 +3286,17 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -1265,15 +3311,22 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" -pad-stream@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pad-stream/-/pad-stream-1.2.0.tgz#631dcc9f79810b705965e89dedea6cff0fc1dfc9" +parse-filepath@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" dependencies: - meow "^3.0.0" - pumpify "^1.3.3" - repeating "^2.0.0" - split2 "^1.0.0" - through2 "^2.0.0" + is-absolute "^0.2.3" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" parse-json@^2.2.0: version "2.2.0" @@ -1281,7 +3334,29 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parseurl@~1.3.0: +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + +parsejson@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + dependencies: + better-assert "~1.0.0" + +parseurl@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" @@ -1295,14 +3370,32 @@ path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" -path-is-absolute@^1.0.0, path-is-absolute@~1.0.0: +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + path-key@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + dependencies: + path-root-regex "^0.1.0" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -1343,6 +3436,10 @@ pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -1353,16 +3450,79 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -plur@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" +postcss-less@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-1.1.0.tgz#bdcc76be64c4324d873fbc5cd9fa2e799e4305fa" + dependencies: + postcss "^5.2.16" + +postcss-media-query-parser@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" + +postcss-reporter@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-reporter/-/postcss-reporter-4.0.0.tgz#13356c365c36783adde88e28e09dbba6ec6c6501" + dependencies: + chalk "^1.0.0" + lodash "^4.1.0" + log-symbols "^1.0.2" + +postcss-resolve-nested-selector@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz#29ccbc7c37dedfac304e9fff0bf1596b3f6a0e4e" + +postcss-scss@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-1.0.2.tgz#ff45cf3354b879ee89a4eb68680f46ac9bb14f94" + dependencies: + postcss "^6.0.3" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss@^5.2.16: + version "5.2.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.0, postcss@^6.0.10, postcss@^6.0.3, postcss@^6.0.6: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.10.tgz#c311b89734483d87a91a56dc9e53f15f4e6e84e4" dependencies: - irregular-plurals "^1.0.0" + chalk "^2.1.0" + source-map "^0.5.7" + supports-color "^4.2.1" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" prettysize@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/prettysize/-/prettysize-0.1.0.tgz#38ee534e2d298bc945fb7243203dd873cefc9679" +private@^0.1.6, private@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" @@ -1371,25 +3531,16 @@ progress@~1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +promise@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.0.1.tgz#e45d68b00a17647b6da711bf85ed6ed47208f450" + dependencies: + asap "~2.0.3" + pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -pump@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51" - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.3.5.tgz#1b671c619940abcaeac0ad0e3a3c164be760993b" - dependencies: - duplexify "^3.1.2" - inherits "^2.0.1" - pump "^1.0.0" - punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -1398,25 +3549,56 @@ q@^1.1.2: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -qs@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.0.tgz#a9f31142af468cb72b25b30136ba2456834916be" +qjobs@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" -qs@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-5.1.0.tgz#4d932e5c7ea411cca76a312d39a606200fd50cd9" - -qs@~6.4.0: +qs@6.4.0, qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" -raw-body@~2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774" +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +range-parser@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.2.0.tgz#994976cf6a5096a41162840492f0bdc5d6e7fb96" + dependencies: + bytes "2.4.0" + iconv-lite "0.4.15" + unpipe "1.0.0" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +rcfinder@^0.1.6: + version "0.1.9" + resolved "https://registry.yarnpkg.com/rcfinder/-/rcfinder-0.1.9.tgz#f3e80f387ddf9ae80ae30a4100329642eae81115" + dependencies: + lodash.clonedeep "^4.3.2" + +rcloader@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/rcloader/-/rcloader-0.2.2.tgz#58d2298b462d0b9bfd2133d2a1ec74fbd705c717" dependencies: - bytes "2.4.0" - iconv-lite "0.4.13" - unpipe "1.0.0" + lodash.assign "^4.2.0" + lodash.isobject "^3.0.2" + lodash.merge "^4.6.0" + rcfinder "^0.1.6" read-pkg-up@^1.0.1: version "1.0.1" @@ -1457,7 +3639,25 @@ readable-stream@1.1: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^2.0.0, readable-stream@^2.1.5, readable-stream@^2.2.2: +"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.2: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^1.0.33, readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: @@ -1469,6 +3669,21 @@ readable-stream@^2.0.0, readable-stream@^2.1.5, readable-stream@^2.2.2: string_decoder "~1.0.3" util-deprecate "~1.0.1" +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -1476,16 +3691,72 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" dependencies: is-finite "^1.0.0" +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + replace-ext@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" @@ -1496,7 +3767,7 @@ request-progress@~2.0.1: dependencies: throttleit "^1.0.0" -request@~2.81.0: +request@^2.81.0, request@~2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: @@ -1527,17 +3798,54 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -resolve@~1.1.0: +requires-port@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + +resolve-url@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.1.6, resolve@^1.1.7: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + +resolve@~1.1.6: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -rimraf@~2.2.8: - version "2.2.8" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.0, rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" @@ -1547,14 +3855,36 @@ sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" -"semver@2 || 3 || 4 || 5": +semver-greatest-satisfied-range@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" + dependencies: + sver-compat "^1.5.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" -set-blocking@^2.0.0: +semver@^4.1.0, semver@~4.3.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +sequencify@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" + +set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -1569,20 +3899,113 @@ shelljs@0.3.x: version "0.3.0" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" +sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +simple-fmt@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/simple-fmt/-/simple-fmt-0.1.0.tgz#191bf566a59e6530482cb25ab53b4a8dc85c3a6b" + +simple-is@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/simple-is/-/simple-is-0.2.0.tgz#2abb75aade39deb5cc815ce10e6191164850baf0" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" dependencies: hoek "2.x.x" -source-map@^0.5.3: +socket.io-adapter@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" + dependencies: + debug "2.3.3" + socket.io-parser "2.3.1" + +socket.io-client@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" + dependencies: + backo2 "1.0.2" + component-bind "1.0.0" + component-emitter "1.2.1" + debug "2.3.3" + engine.io-client "1.8.3" + has-binary "0.1.7" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.5" + socket.io-parser "2.3.1" + to-array "0.1.4" + +socket.io-parser@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" + dependencies: + component-emitter "1.1.2" + debug "2.2.0" + isarray "0.0.1" + json3 "3.3.2" + +socket.io@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" + dependencies: + debug "2.3.3" + engine.io "1.8.3" + has-binary "0.1.7" + object-assign "4.1.0" + socket.io-adapter "0.5.0" + socket.io-client "1.7.3" + socket.io-parser "2.3.1" + +source-map-resolve@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" + dependencies: + atob "~1.1.0" + resolve-url "~0.2.1" + source-map-url "~0.3.0" + urix "~0.1.0" + +source-map-support@^0.4.15: + version "0.4.17" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.17.tgz#6f2150553e6375375d0ccb3180502b78c18ba430" + dependencies: + source-map "^0.5.6" + +source-map-url@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" + +source-map@0.X, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" +source-map@^0.1.38: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + spdx-correct@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" @@ -1597,11 +4020,9 @@ spdx-license-ids@^1.0.2: version "1.2.2" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" -split2@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/split2/-/split2-1.1.1.tgz#162d9b18865f02ab2f2ad9585522db9b54c481f9" - dependencies: - through2 "~2.0.0" +specificity@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/specificity/-/specificity-0.3.1.tgz#f1b068424ce317ae07478d95de3c21cf85e8d567" sprintf-js@~1.0.2: version "1.0.3" @@ -1621,25 +4042,27 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +stable@~0.1.3, stable@~0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.6.tgz#910f5d2aed7b520c6e777499c1f32e139fdecb10" + +stack-trace@0.0.9: + version "0.0.9" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.9.tgz#a8f6eaeca90674c333e7c43953f275b451510695" + stack-trace@0.0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" -statuses@1: +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - -string-length@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" - dependencies: - strip-ansi "^3.0.0" +stream-consume@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" -string-width@^1.0.1: +string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -1647,7 +4070,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0: +string-width@^2.0.0, string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: @@ -1664,6 +4087,14 @@ string_decoder@~1.0.3: dependencies: safe-buffer "~5.1.0" +stringmap@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stringmap/-/stringmap-0.2.2.tgz#556c137b258f942b8776f5b2ef582aa069d7d1b1" + +stringset@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/stringset/-/stringset-0.2.1.tgz#ef259c4e349344377fcd1c913dd2e848c9c042b5" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -1680,6 +4111,17 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-bom-string@1.X: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" + +strip-bom@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" + dependencies: + first-chunk-stream "^1.0.0" + is-utf8 "^0.2.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -1690,6 +4132,10 @@ strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-comments@^0.3.2: + version "0.3.4" + resolved "https://registry.yarnpkg.com/strip-comments/-/strip-comments-0.3.4.tgz#e1cb91b86de432540d13db2da8e81ae0d4e2ecbf" + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -1704,10 +4150,104 @@ strip-json-comments@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +style-search@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" + +stylelint-config-recommended@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-1.0.0.tgz#752c17fc68fa64cd5e7589e24f6e46e77e14a735" + +stylelint-config-standard@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-17.0.0.tgz#42103a090054ee2a3dde9ecaed55e5d4d9d059fc" + dependencies: + stylelint-config-recommended "^1.0.0" + +stylelint-scss@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-2.1.0.tgz#e3fe24262bcb09cf70d859b80b17099d511094de" + dependencies: + lodash "^4.11.1" + postcss-media-query-parser "^0.2.3" + postcss-resolve-nested-selector "^0.1.1" + postcss-selector-parser "^2.0.0" + postcss-value-parser "^3.3.0" + +stylelint@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-8.0.0.tgz#87611211776cb315c93fcf6c58bc261d3c92612e" + dependencies: + autoprefixer "^7.1.2" + balanced-match "^1.0.0" + chalk "^2.0.1" + cosmiconfig "^2.1.3" + debug "^2.6.8" + execall "^1.0.0" + file-entry-cache "^2.0.0" + get-stdin "^5.0.1" + globby "^6.1.0" + globjoin "^0.1.4" + html-tags "^2.0.0" + ignore "^3.3.3" + imurmurhash "^0.1.4" + known-css-properties "^0.2.0" + lodash "^4.17.4" + log-symbols "^1.0.2" + mathml-tag-names "^2.0.1" + meow "^3.7.0" + micromatch "^2.3.11" + normalize-selector "^0.2.0" + pify "^3.0.0" + postcss "^6.0.6" + postcss-less "^1.1.0" + postcss-media-query-parser "^0.2.3" + postcss-reporter "^4.0.0" + postcss-resolve-nested-selector "^0.1.1" + postcss-scss "^1.0.2" + postcss-selector-parser "^2.2.3" + postcss-value-parser "^3.3.0" + resolve-from "^3.0.0" + specificity "^0.3.1" + string-width "^2.1.0" + style-search "^0.1.0" + sugarss "^1.0.0" + svg-tags "^1.0.0" + table "^4.0.1" + +sugarss@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sugarss/-/sugarss-1.0.0.tgz#65e51b3958432fb70d5451a68bb33e32d0cf1ef7" + dependencies: + postcss "^6.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.0.0, supports-color@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" + dependencies: + has-flag "^2.0.0" + +sver-compat@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" + dependencies: + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + svg-sprite@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/svg-sprite/-/svg-sprite-1.3.7.tgz#7ade036000e8794a3f814402a808aae290ecd1f3" @@ -1732,6 +4272,10 @@ svg-sprite@~1.3.7: xpath "^0.0.24" yargs "^8.0.1" +svg-tags@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" + svgo@^0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" @@ -1744,31 +4288,92 @@ svgo@^0.7.2: sax "~1.2.1" whet.extend "~0.9.9" -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" +table@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" throttleit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" -through2@^2.0.0, through2@^2.0.1, through2@~2.0.0: +through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: readable-stream "^2.1.5" xtend "~4.0.1" -tiny-lr@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-0.2.1.tgz#b3fdba802e5d56a33c2f6f10794b32e477ac729d" +through2@^0.6.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +tildify@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +time-stamp@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + +timers-ext@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.2.tgz#61cc47a76c1abd3195f14527f978d58ae94c5204" + dependencies: + es5-ext "~0.10.14" + next-tick "1" + +tmp@0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" dependencies: - body-parser "~1.14.0" - debug "~2.2.0" - faye-websocket "~0.10.0" - livereload-js "^2.2.0" - parseurl "~1.3.0" - qs "~5.1.0" + os-tmpdir "~1.0.1" + +tmp@0.0.x: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + +to-array@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" tough-cookie@~2.3.0: version "2.3.2" @@ -1780,6 +4385,18 @@ trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +tryor@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/tryor/-/tryor-0.1.2.tgz#8145e4ca7caff40acde3ccf946e8b8bb75b4172b" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -1790,7 +4407,7 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" -type-is@~1.6.10: +type-is@~1.6.15: version "1.6.15" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" dependencies: @@ -1801,22 +4418,80 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -underscore.string@~3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.2.3.tgz#806992633665d5e5fcb4db1fb3a862eb68e9e6da" +uglify-js@~2.8.10: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-save-license@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +unique-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" -unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" +urix@^0.1.0, urix@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +useragent@^2.1.12: + version "2.2.1" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.2.1.tgz#cf593ef4f2d175875e8bb658ea92e18a4fd06d8e" + dependencies: + lru-cache "2.2.x" + tmp "0.0.x" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + uuid@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" +v8flags@^2.0.2, v8flags@^2.0.9: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" + validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" @@ -1832,7 +4507,55 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vinyl@^2.0.2: +vinyl-bufferstream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vinyl-bufferstream/-/vinyl-bufferstream-1.0.1.tgz#0537869f580effa4ca45acb47579e4b9fe63081a" + dependencies: + bufferstreams "1.0.1" + +vinyl-fs@^0.3.0: + version "0.3.14" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" + dependencies: + defaults "^1.0.0" + glob-stream "^3.1.5" + glob-watcher "^0.0.6" + graceful-fs "^3.0.0" + mkdirp "^0.5.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@1.X: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^0.4.0: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^2.0.0, vinyl@^2.0.2: version "2.1.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c" dependencies: @@ -1843,15 +4566,9 @@ vinyl@^2.0.2: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" -websocket-driver@>=0.5.1: - version "0.6.5" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" - dependencies: - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" whet.extend@~0.9.9: version "0.9.9" @@ -1861,18 +4578,32 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.2.9: +which@^1.2.12, which@^1.2.9: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: isexe "^2.0.0" -which@~1.2.1, which@~1.2.10: +which@~1.2.10: version "1.2.14" resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: isexe "^2.0.0" +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + winston@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/winston/-/winston-2.3.1.tgz#0b48420d978c01804cf0230b648861598225a119" @@ -1884,6 +4615,14 @@ winston@^2.3.1: isstream "0.1.x" stack-trace "0.0.x" +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -1895,19 +4634,47 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +wreck@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/wreck/-/wreck-6.3.0.tgz#a1369769f07bbb62d6a378336a7871fc773c740b" + dependencies: + boom "2.x.x" + hoek "2.x.x" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +ws@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +wtf-8@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" + xmldom@0.1.27: version "0.1.27" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" +xmlhttprequest-ssl@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" + xpath@^0.0.24: version "0.0.24" resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.24.tgz#1ade162e1cc523c8d39fc7d06afc16ea216f29fb" -xtend@~4.0.1: +"xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" -y18n@^3.2.1: +y18n@^3.2.0, y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" @@ -1921,6 +4688,18 @@ yargs-parser@^7.0.0: dependencies: camelcase "^4.1.0" +yargs@^3.28.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0" + yargs@^8.0.1: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" @@ -1939,8 +4718,21 @@ yargs@^8.0.1: y18n "^3.2.1" yargs-parser "^7.0.0" +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" dependencies: fd-slicer "~1.0.1" + +yeast@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" diff --git a/templates/main.php b/templates/main.php index a5565143a..f38ce8eac 100644 --- a/templates/main.php +++ b/templates/main.php @@ -6,7 +6,7 @@ script('tasks', 'vendor/angular-draganddrop/angular-drag-and-drop-lists.min'); script('tasks', 'vendor/angular-ui-select/dist/select.min'); script('tasks', 'vendor/jstzdetect/jstz.min'); - script('tasks', 'public/app'); + script('tasks', 'public/app.min'); script('tasks', 'vendor/jquery-timepicker/jquery.ui.timepicker'); script('tasks', 'vendor/ical.js/build/ical'); style('tasks', 'style'); From 3716486d81b3efbe1b98a5e1834251f56e12f78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sun, 3 Sep 2017 10:40:32 +0200 Subject: [PATCH 3/4] Use Yarn + Gulp instead of bower --- Makefile | 9 +- js/.bowerrc | 7 - js/bower.json | 33 - js/package.json | 15 +- js/vendor/angular-animate/.bower.json | 20 - js/vendor/angular-draganddrop/.bower.json | 39 - .../demo/advanced/advanced-frame.html | 28 + .../demo/advanced/advanced.css | 66 + .../demo/advanced/advanced.html | 37 + .../demo/advanced/advanced.js | 43 + .../demo/framework/demo-framework.css | 70 + .../demo/framework/demo-framework.js | 51 + .../framework/vendor/bootstrap-theme.min.css | 7 + .../demo/framework/vendor/bootstrap.min.css | 7 + .../vendor/ic_content_copy_black_24dp_2x.png | Bin 0 -> 180 bytes .../demo/framework/vendor/prism.css | 213 + .../demo/framework/vendor/prism.js | 14 + .../demo/framework/view-source.html | 17 + .../demo/framework/view-source.js | 29 + js/vendor/angular-draganddrop/demo/index.html | 65 + .../demo/multi/multi-frame.html | 37 + .../angular-draganddrop/demo/multi/multi.css | 37 + .../angular-draganddrop/demo/multi/multi.html | 13 + .../angular-draganddrop/demo/multi/multi.js | 66 + .../demo/nested/nested-frame.html | 10 + .../demo/nested/nested.css | 126 + .../demo/nested/nested.html | 85 + .../angular-draganddrop/demo/nested/nested.js | 122 + .../demo/nested/trashcan.jpg | Bin 0 -> 28892 bytes .../demo/simple/simple-frame.html | 38 + .../demo/simple/simple.css | 47 + .../demo/simple/simple.html | 17 + .../angular-draganddrop/demo/simple/simple.js | 19 + .../demo/types/types-frame.html | 40 + .../angular-draganddrop/demo/types/types.css | 102 + .../angular-draganddrop/demo/types/types.html | 24 + .../angular-draganddrop/demo/types/types.js | 43 + js/vendor/angular-draganddrop/package.json | 21 + .../test/dndDraggableSpec.js | 173 + .../angular-draganddrop/test/dndListSpec.js | 576 + .../angular-draganddrop/test/dndNodragSpec.js | 41 + js/vendor/angular-draganddrop/test/index.html | 30 + js/vendor/angular-draganddrop/test/init.js | 21 + js/vendor/angular-draganddrop/test/mocks.js | 199 + js/vendor/angular-route/.bower.json | 20 - js/vendor/angular-sanitize/.bower.json | 20 - js/vendor/angular-ui-select/.bower.json | 41 - .../docs/examples/demo-append-to-body.html | 56 + .../docs/examples/demo-basic.html | 42 + .../demo-bind-to-single-property-async.html | 21 + .../demo-bind-to-single-property.html | 22 + .../docs/examples/demo-bootstrap.html | 76 + .../docs/examples/demo-disable-search.html | 71 + .../docs/examples/demo-dropdown-position.html | 106 + .../examples/demo-event-on-selection.html | 26 + .../docs/examples/demo-focus.html | 47 + .../docs/examples/demo-group-by.html | 42 + .../docs/examples/demo-group-filter.html | 26 + .../examples/demo-multiple-selection.html | 89 + .../docs/examples/demo-object-as-source.html | 47 + .../examples/demo-select2-with-bootstrap.html | 91 + .../demo-selectize-with-bootstrap.html | 111 + .../docs/examples/demo-tagging.html | 87 + js/vendor/angular-ui-select/docs/index.html | 2 +- .../docs/partials/_header.html | 2 +- js/vendor/angular-ui-select/gulpfile.js | 201 + js/vendor/angular-ui-select/karma.conf.js | 49 + .../src/bootstrap/choices.tpl.html | 11 + .../src/bootstrap/match-multiple.tpl.html | 15 + .../src/bootstrap/match.tpl.html | 16 + .../src/bootstrap/no-choice.tpl.html | 6 + .../src/bootstrap/select-multiple.tpl.html | 22 + .../src/bootstrap/select.tpl.html | 15 + js/vendor/angular-ui-select/src/common.css | 354 + js/vendor/angular-ui-select/src/common.js | 175 + .../src/select2/choices.tpl.html | 11 + .../src/select2/match-multiple.tpl.html | 13 + .../src/select2/match.tpl.html | 13 + .../src/select2/no-choice.tpl.html | 6 + .../src/select2/select-multiple.tpl.html | 32 + .../src/select2/select.tpl.html | 22 + .../src/selectize/choices.tpl.html | 11 + .../src/selectize/match-multiple.tpl.html | 11 + .../src/selectize/match.tpl.html | 6 + .../src/selectize/no-choice.tpl.html | 6 + .../src/selectize/select-multiple.tpl.html | 18 + .../src/selectize/select.tpl.html | 18 + .../src/uiSelectChoicesDirective.js | 90 + .../src/uiSelectController.js | 756 + .../src/uiSelectDirective.js | 423 + .../src/uiSelectMatchDirective.js | 48 + .../src/uiSelectMultipleDirective.js | 460 + .../src/uiSelectNoChoiceDirective.js | 17 + .../src/uiSelectSingleDirective.js | 143 + .../src/uiSelectSortDirective.js | 148 + .../src/uisDebounceService.js | 24 + .../src/uisOpenCloseDirective.js | 19 + .../src/uisRepeatParserService.js | 83 + js/vendor/angular-ui-select/test/helpers.js | 15 + .../angular-ui-select/test/select.spec.js | 3381 ++++ js/vendor/angular/.bower.json | 18 - js/vendor/ical.js/.bower.json | 43 - js/vendor/ical.js/CONTRIBUTING.md | 65 - js/vendor/ical.js/Gruntfile.js | 277 - js/vendor/ical.js/bower.json | 34 - .../ical.js/build/benchmark/ical_previous.js | 6670 ------- .../ical.js/samples/blank_description.ics | 51 - js/vendor/ical.js/samples/blank_line_end.ics | 4 - js/vendor/ical.js/samples/blank_line_mid.ics | 4 - js/vendor/ical.js/samples/daily_recur.ics | 52 - .../ical.js/samples/day_long_recur_yearly.ics | 52 - .../samples/duration_instead_of_dtend.ics | 39 - js/vendor/ical.js/samples/forced_types.ics | 50 - js/vendor/ical.js/samples/google_birthday.ics | 90 - js/vendor/ical.js/samples/minimal.ics | 39 - js/vendor/ical.js/samples/multiple_rrules.ics | 45 - .../ical.js/samples/only_dtstart_date.ics | 38 - .../ical.js/samples/only_dtstart_time.ics | 38 - js/vendor/ical.js/samples/parserv2.ics | 45 - js/vendor/ical.js/samples/recur_instances.ics | 97 - .../samples/recur_instances_finite.ics | 50 - .../samples/timezones/America/Atikokan.ics | 14 - .../samples/timezones/America/Denver.ics | 41 - .../samples/timezones/America/Los_Angeles.ics | 22 - .../samples/timezones/America/New_York.ics | 22 - .../timezones/Makebelieve/RDATE_test.ics | 26 - .../timezones/Makebelieve/RDATE_utc_test.ics | 26 - .../Makebelieve/RRULE_UNTIL_test.ics | 22 - .../ical.js/samples/utc_negative_zero.ics | 27 - js/vendor/ical.js/sandbox/validator.html | 104 - js/vendor/ical.js/tasks/tests.js | 177 - js/vendor/ical.js/tasks/timezones.js | 42 - js/vendor/ical.js/tasks/travis.js | 51 - js/vendor/ical.js/test-agent-coverage.json | 2 - js/vendor/ical.js/test-agent-server.js | 12 - js/vendor/ical.js/test-agent/index.html | 38 - js/vendor/ical.js/test-agent/index.js | 44 - js/vendor/ical.js/test-agent/package.json | 0 js/vendor/ical.js/test-agent/sandbox.html | 34 - js/vendor/ical.js/test-agent/style.css | 199 - js/vendor/jquery-timepicker/.bower.json | 13 - js/vendor/jquery-timepicker/AUTHORS | 8 + js/vendor/jquery-timepicker/CHANGELOG | 70 + js/vendor/jquery-timepicker/GPL-LICENSE.txt | 278 - js/vendor/jquery-timepicker/Gruntfile.js | 225 + js/vendor/jquery-timepicker/LICENSE-GPL | 278 + js/vendor/jquery-timepicker/LICENSE-MIT | 27 + js/vendor/jquery-timepicker/MIT-LICENSE.txt | 20 - js/vendor/jquery-timepicker/Makefile | 33 + js/vendor/jquery-timepicker/README.md | 34 +- js/vendor/jquery-timepicker/i18n/i18n.html | 164 - .../i18n/jquery.ui.timepicker-cs.js | 12 - .../i18n/jquery.ui.timepicker-de.js | 12 - .../i18n/jquery.ui.timepicker-es.js | 12 - .../i18n/jquery.ui.timepicker-fr.js | 13 - .../i18n/jquery.ui.timepicker-hr.js | 13 - .../i18n/jquery.ui.timepicker-hu.js | 12 - .../i18n/jquery.ui.timepicker-it.js | 12 - .../i18n/jquery.ui.timepicker-ja.js | 12 - .../i18n/jquery.ui.timepicker-mk.js | 13 - .../i18n/jquery.ui.timepicker-nl.js | 12 - .../i18n/jquery.ui.timepicker-pl.js | 12 - .../i18n/jquery.ui.timepicker-pt-BR.js | 12 - .../i18n/jquery.ui.timepicker-ru.js | 12 - .../i18n/jquery.ui.timepicker-sl.js | 12 - .../i18n/jquery.ui.timepicker-sv.js | 12 - .../i18n/jquery.ui.timepicker-tr.js | 12 - .../include/ui-1.10.0/jquery.ui.core.min.js | 5 - .../ui-1.10.0/jquery.ui.position.min.js | 5 - .../include/ui-1.10.0/jquery.ui.tabs.min.js | 5 - .../include/ui-1.10.0/jquery.ui.widget.min.js | 5 - .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 260 -> 0 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 251 -> 0 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 178 -> 0 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 104 -> 0 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 125 -> 0 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 3762 -> 0 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 90 -> 0 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 129 -> 0 bytes .../jquery-ui-1.10.0.custom.min.css | 5 - js/vendor/jquery-timepicker/index.html | 1177 -- .../jquery-timepicker.jquery.json | 62 + .../jquery-timepicker/jquery.timepicker.css | 84 + .../jquery-timepicker/jquery.timepicker.js | 858 + .../jquery.ui.timepicker.css | 57 - .../jquery-timepicker/jquery.ui.timepicker.js | 1496 -- .../jquery-timepicker/legacy_1.2.6/index.html | 762 - .../legacy_1.2.6/jquery-1.2.6.js | 3549 ---- .../legacy_1.2.6/jquery.proxy.fix.js | 44 - .../legacy_1.2.6/jquery.ui.1.6.all.js | 8862 --------- js/vendor/jquery-timepicker/package.json | 62 + js/vendor/jquery-timepicker/test/index.html | 27 + .../test/resources/jquery-ui.js | 31 + .../ui-lightness/images/animated-overlay.gif | Bin 0 -> 1738 bytes .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 418 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 312 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 205 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 348 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 207 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 5815 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 278 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 328 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 6922 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 6299 bytes .../ui-lightness/jquery-ui-1.10.4.custom.css | 1178 ++ .../jquery-ui-1.10.4.custom.min.css | 7 + .../js/jquery-ui-1.10.4.custom.js | 15008 ++++++++++++++ .../js/jquery-ui-1.10.4.custom.min.js | 7 + .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 418 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 312 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 205 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 348 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 207 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 5815 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 278 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 328 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 6922 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 6299 bytes .../jquery-ui/jquery-ui-1.11.1/jquery-ui.css | 1225 ++ .../jquery-ui/jquery-ui-1.11.1/jquery-ui.js | 16375 ++++++++++++++++ .../jquery-ui-1.11.1/jquery-ui.min.css | 7 + .../jquery-ui-1.11.1/jquery-ui.min.js | 13 + .../jquery-ui-1.11.1/jquery-ui.structure.css | 833 + .../jquery-ui.structure.min.css | 5 + .../jquery-ui-1.11.1/jquery-ui.theme.css | 410 + .../jquery-ui-1.11.1/jquery-ui.theme.min.css | 5 + .../images/ui-anim_basic_16x16.gif | Bin 0 -> 1553 bytes .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin .../images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes .../images/ui-icons_222222_256x240.png | Bin .../images/ui-icons_2e83ff_256x240.png} | Bin 4369 -> 4369 bytes .../images/ui-icons_454545_256x240.png} | Bin 4369 -> 4369 bytes .../images/ui-icons_888888_256x240.png} | Bin 4369 -> 4369 bytes .../images/ui-icons_cd0a0a_256x240.png} | Bin 4369 -> 4369 bytes .../jquery-ui-1.8.2.custom.css | 489 + .../jquery-ui-1.8.2.custom.min.js | 75 + .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 418 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 312 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 205 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 348 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 207 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 5815 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 278 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 328 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 6922 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 6299 bytes .../ui-lightness/jquery-ui-1.9.2.custom.css | 462 + .../jquery-ui-1.9.2.custom.min.css | 7 + .../js/jquery-ui-1.9.2.custom.js | 14879 ++++++++++++++ .../js/jquery-ui-1.9.2.custom.min.js | 7 + .../test/resources/jquery.js | 24 + .../test/resources/jquery.simulate.js | 312 + .../resources/jquery/jquery-1.10.1.min.js | 6 + .../resources/jquery/jquery-1.10.2.min.js | 6 + .../resources/jquery/jquery-1.11.0.min.js | 4 + .../resources/jquery/jquery-1.11.1.min.js | 4 + .../test/resources/jquery/jquery-1.3.2.min.js | 19 + .../test/resources/jquery/jquery-1.4.2.min.js | 155 + .../test/resources/jquery/jquery-1.4.3.min.js | 167 + .../test/resources/jquery/jquery-1.5.1.min.js | 16 + .../test/resources/jquery/jquery-1.6.2.min.js | 18 + .../test/resources/jquery/jquery-1.6.4.min.js | 4 + .../test/resources/jquery/jquery-1.7.1.min.js | 9266 +++++++++ .../test/resources/jquery/jquery-1.7.2.min.js | 4 + .../test/resources/jquery/jquery-1.8.3.min.js | 2 + .../resources/jquery}/jquery-1.9.0.min.js | 0 .../test/resources/jquery/jquery-1.9.1.min.js | 5 + .../test/resources/jquery/jquery-2.0.0.min.js | 6 + .../test/resources/jquery/jquery-2.0.1.min.js | 6 + .../test/resources/jquery/jquery-2.0.2.min.js | 6 + .../test/resources/jquery/jquery-2.0.3.min.js | 6 + .../test/resources/jquery/jquery-2.1.0.min.js | 4 + .../test/resources/jquery/jquery-2.1.1.min.js | 4 + .../test/resources/lazyload-min.js | 4 + .../test/resources/qunit.css | 244 + .../jquery-timepicker/test/resources/qunit.js | 2212 +++ js/vendor/jquery-timepicker/test/runner.js | 139 + js/vendor/jquery-timepicker/test/test.js | 554 + js/vendor/jquery-timepicker/test/visual.html | 32 + .../test/visuals/i43/calendar.html | 295 + .../custom-theme/images/animated-overlay.gif | Bin 0 -> 1738 bytes .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 212 bytes .../images/ui-bg_flat_100_ffffff_40x100.png | Bin 0 -> 208 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 332 bytes .../ui-bg_highlight-soft_100_f7f9fb_1x100.png | Bin 0 -> 344 bytes .../images/ui-icons_191919_256x240.png | Bin 0 -> 6910 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_323a45_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_454545_256x240.png | Bin 0 -> 6992 bytes .../images/ui-icons_888888_256x240.png | Bin 0 -> 6999 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4549 bytes .../custom-theme/jquery-ui-1.10.4.custom.css | 1203 ++ .../visuals/i43/css/jquery.formstyler.css | 397 + .../test/visuals/i43/css/main.css | 1857 ++ .../test/visuals/i43/css/normalize.min.css | 1 + .../visuals/i43/img/calendar-list__link.png | Bin 0 -> 1054 bytes .../test/visuals/i43/img/ico-add-small.png | Bin 0 -> 690 bytes .../test/visuals/i43/img/ico-add.png | Bin 0 -> 1288 bytes .../test/visuals/i43/img/ico-alarm__btn.png | Bin 0 -> 290 bytes .../test/visuals/i43/img/ico-archive.png | Bin 0 -> 293 bytes .../test/visuals/i43/img/ico-arrow-left.png | Bin 0 -> 440 bytes .../test/visuals/i43/img/ico-arrow-next.png | Bin 0 -> 403 bytes .../test/visuals/i43/img/ico-arrow-prev.png | Bin 0 -> 402 bytes .../test/visuals/i43/img/ico-calendar.png | Bin 0 -> 370 bytes .../test/visuals/i43/img/ico-camera-list.png | Bin 0 -> 367 bytes .../test/visuals/i43/img/ico-clock.png | Bin 0 -> 461 bytes .../test/visuals/i43/img/ico-close.png | Bin 0 -> 188 bytes .../test/visuals/i43/img/ico-date.png | Bin 0 -> 274 bytes .../test/visuals/i43/img/ico-download.png | Bin 0 -> 343 bytes .../test/visuals/i43/img/ico-ignore.png | Bin 0 -> 294 bytes .../test/visuals/i43/img/ico-live.png | Bin 0 -> 1408 bytes .../test/visuals/i43/img/ico-logout.png | Bin 0 -> 158 bytes .../test/visuals/i43/img/ico-map-pins.png | Bin 0 -> 1454 bytes .../test/visuals/i43/img/ico-setting.png | Bin 0 -> 523 bytes .../test/visuals/i43/img/ico-user.png | Bin 0 -> 243 bytes .../test/visuals/i43/img/logo.png | Bin 0 -> 2963 bytes .../test/visuals/i43/img/timeline-bg.png | Bin 0 -> 187 bytes .../visuals/i43/img/timeline__alarm-flag.png | Bin 0 -> 356 bytes .../i43/img/timeline__record-current-bg.png | Bin 0 -> 405 bytes .../i43/img/timeline__scroll-bridge.png | Bin 0 -> 264 bytes .../i43/img/timeline__scroll-control-bg.png | Bin 0 -> 125 bytes .../i43/img/timeline__scroll-control-left.png | Bin 0 -> 386 bytes .../img/timeline__scroll-control-right.png | Bin 0 -> 385 bytes .../test/visuals/i43/js/hoverIntent.js | 114 + .../visuals/i43/js/jquery.formstyler.min.js | 27 + .../test/visuals/i43/js/main.js | 5 + .../test/visuals/i43/js/superfish.js | 257 + .../i43/js/vendor/jquery-1.10.1.min.js | 6 + .../js/vendor/jquery-ui-1.10.4.custom.min.js | 7 + .../modernizr-2.6.2-respond-1.1.0.min.js | 11 + .../test/visuals/i43/robots.txt | 17 + .../test/visuals/i43/uploads/calendar-1.jpg | Bin 0 -> 44645 bytes .../test/visuals/i43/uploads/calendar-2.jpg | Bin 0 -> 48212 bytes .../test/visuals/i43/uploads/calendar-3.jpg | Bin 0 -> 48250 bytes js/vendor/jquery-timepicker/tests/dialog.html | 39 - .../tests/jquery.ui.dialog.min.js | 40 - js/vendor/jquery-timepicker/timepicker.png | Bin 7865 -> 0 bytes .../LICENCE.txt | 0 js/vendor/jstimezonedetect/README.md | 90 + js/vendor/jstimezonedetect/dist/jstz.js | 1433 ++ js/vendor/jstimezonedetect/dist/jstz.min.js | 2 + .../package.json | 22 +- js/vendor/jstzdetect/.bower.json | 23 - js/vendor/jstzdetect/Gruntfile.js | 25 - js/vendor/jstzdetect/README.md | 62 - js/vendor/jstzdetect/bower.json | 13 - js/vendor/jstzdetect/jstz.js | 358 - js/vendor/jstzdetect/jstz.min.js | 2 - js/yarn.lock | 46 +- templates/main.php | 4 +- 368 files changed, 81923 insertions(+), 26139 deletions(-) delete mode 100644 js/.bowerrc delete mode 100644 js/bower.json delete mode 100644 js/vendor/angular-animate/.bower.json delete mode 100644 js/vendor/angular-draganddrop/.bower.json create mode 100644 js/vendor/angular-draganddrop/demo/advanced/advanced-frame.html create mode 100644 js/vendor/angular-draganddrop/demo/advanced/advanced.css create mode 100644 js/vendor/angular-draganddrop/demo/advanced/advanced.html create mode 100644 js/vendor/angular-draganddrop/demo/advanced/advanced.js create mode 100644 js/vendor/angular-draganddrop/demo/framework/demo-framework.css create mode 100644 js/vendor/angular-draganddrop/demo/framework/demo-framework.js create mode 100644 js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap-theme.min.css create mode 100644 js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap.min.css create mode 100644 js/vendor/angular-draganddrop/demo/framework/vendor/ic_content_copy_black_24dp_2x.png create mode 100644 js/vendor/angular-draganddrop/demo/framework/vendor/prism.css create mode 100644 js/vendor/angular-draganddrop/demo/framework/vendor/prism.js create mode 100644 js/vendor/angular-draganddrop/demo/framework/view-source.html create mode 100644 js/vendor/angular-draganddrop/demo/framework/view-source.js create mode 100644 js/vendor/angular-draganddrop/demo/index.html create mode 100644 js/vendor/angular-draganddrop/demo/multi/multi-frame.html create mode 100644 js/vendor/angular-draganddrop/demo/multi/multi.css create mode 100644 js/vendor/angular-draganddrop/demo/multi/multi.html create mode 100644 js/vendor/angular-draganddrop/demo/multi/multi.js create mode 100644 js/vendor/angular-draganddrop/demo/nested/nested-frame.html create mode 100644 js/vendor/angular-draganddrop/demo/nested/nested.css create mode 100644 js/vendor/angular-draganddrop/demo/nested/nested.html create mode 100644 js/vendor/angular-draganddrop/demo/nested/nested.js create mode 100644 js/vendor/angular-draganddrop/demo/nested/trashcan.jpg create mode 100644 js/vendor/angular-draganddrop/demo/simple/simple-frame.html create mode 100644 js/vendor/angular-draganddrop/demo/simple/simple.css create mode 100644 js/vendor/angular-draganddrop/demo/simple/simple.html create mode 100644 js/vendor/angular-draganddrop/demo/simple/simple.js create mode 100644 js/vendor/angular-draganddrop/demo/types/types-frame.html create mode 100644 js/vendor/angular-draganddrop/demo/types/types.css create mode 100644 js/vendor/angular-draganddrop/demo/types/types.html create mode 100644 js/vendor/angular-draganddrop/demo/types/types.js create mode 100644 js/vendor/angular-draganddrop/package.json create mode 100644 js/vendor/angular-draganddrop/test/dndDraggableSpec.js create mode 100644 js/vendor/angular-draganddrop/test/dndListSpec.js create mode 100644 js/vendor/angular-draganddrop/test/dndNodragSpec.js create mode 100644 js/vendor/angular-draganddrop/test/index.html create mode 100644 js/vendor/angular-draganddrop/test/init.js create mode 100644 js/vendor/angular-draganddrop/test/mocks.js delete mode 100644 js/vendor/angular-route/.bower.json delete mode 100644 js/vendor/angular-sanitize/.bower.json delete mode 100644 js/vendor/angular-ui-select/.bower.json create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-append-to-body.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-basic.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property-async.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-bootstrap.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-disable-search.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-dropdown-position.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-event-on-selection.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-focus.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-group-by.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-group-filter.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-multiple-selection.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-object-as-source.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-select2-with-bootstrap.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-selectize-with-bootstrap.html create mode 100644 js/vendor/angular-ui-select/docs/examples/demo-tagging.html create mode 100644 js/vendor/angular-ui-select/gulpfile.js create mode 100644 js/vendor/angular-ui-select/karma.conf.js create mode 100644 js/vendor/angular-ui-select/src/bootstrap/choices.tpl.html create mode 100644 js/vendor/angular-ui-select/src/bootstrap/match-multiple.tpl.html create mode 100644 js/vendor/angular-ui-select/src/bootstrap/match.tpl.html create mode 100644 js/vendor/angular-ui-select/src/bootstrap/no-choice.tpl.html create mode 100644 js/vendor/angular-ui-select/src/bootstrap/select-multiple.tpl.html create mode 100644 js/vendor/angular-ui-select/src/bootstrap/select.tpl.html create mode 100644 js/vendor/angular-ui-select/src/common.css create mode 100644 js/vendor/angular-ui-select/src/common.js create mode 100644 js/vendor/angular-ui-select/src/select2/choices.tpl.html create mode 100644 js/vendor/angular-ui-select/src/select2/match-multiple.tpl.html create mode 100644 js/vendor/angular-ui-select/src/select2/match.tpl.html create mode 100644 js/vendor/angular-ui-select/src/select2/no-choice.tpl.html create mode 100644 js/vendor/angular-ui-select/src/select2/select-multiple.tpl.html create mode 100644 js/vendor/angular-ui-select/src/select2/select.tpl.html create mode 100644 js/vendor/angular-ui-select/src/selectize/choices.tpl.html create mode 100644 js/vendor/angular-ui-select/src/selectize/match-multiple.tpl.html create mode 100644 js/vendor/angular-ui-select/src/selectize/match.tpl.html create mode 100644 js/vendor/angular-ui-select/src/selectize/no-choice.tpl.html create mode 100644 js/vendor/angular-ui-select/src/selectize/select-multiple.tpl.html create mode 100644 js/vendor/angular-ui-select/src/selectize/select.tpl.html create mode 100644 js/vendor/angular-ui-select/src/uiSelectChoicesDirective.js create mode 100644 js/vendor/angular-ui-select/src/uiSelectController.js create mode 100644 js/vendor/angular-ui-select/src/uiSelectDirective.js create mode 100644 js/vendor/angular-ui-select/src/uiSelectMatchDirective.js create mode 100644 js/vendor/angular-ui-select/src/uiSelectMultipleDirective.js create mode 100644 js/vendor/angular-ui-select/src/uiSelectNoChoiceDirective.js create mode 100644 js/vendor/angular-ui-select/src/uiSelectSingleDirective.js create mode 100644 js/vendor/angular-ui-select/src/uiSelectSortDirective.js create mode 100644 js/vendor/angular-ui-select/src/uisDebounceService.js create mode 100644 js/vendor/angular-ui-select/src/uisOpenCloseDirective.js create mode 100644 js/vendor/angular-ui-select/src/uisRepeatParserService.js create mode 100644 js/vendor/angular-ui-select/test/helpers.js create mode 100644 js/vendor/angular-ui-select/test/select.spec.js delete mode 100644 js/vendor/angular/.bower.json delete mode 100644 js/vendor/ical.js/.bower.json delete mode 100644 js/vendor/ical.js/CONTRIBUTING.md delete mode 100644 js/vendor/ical.js/Gruntfile.js delete mode 100644 js/vendor/ical.js/bower.json delete mode 100644 js/vendor/ical.js/build/benchmark/ical_previous.js delete mode 100644 js/vendor/ical.js/samples/blank_description.ics delete mode 100644 js/vendor/ical.js/samples/blank_line_end.ics delete mode 100644 js/vendor/ical.js/samples/blank_line_mid.ics delete mode 100644 js/vendor/ical.js/samples/daily_recur.ics delete mode 100644 js/vendor/ical.js/samples/day_long_recur_yearly.ics delete mode 100644 js/vendor/ical.js/samples/duration_instead_of_dtend.ics delete mode 100644 js/vendor/ical.js/samples/forced_types.ics delete mode 100644 js/vendor/ical.js/samples/google_birthday.ics delete mode 100644 js/vendor/ical.js/samples/minimal.ics delete mode 100644 js/vendor/ical.js/samples/multiple_rrules.ics delete mode 100644 js/vendor/ical.js/samples/only_dtstart_date.ics delete mode 100644 js/vendor/ical.js/samples/only_dtstart_time.ics delete mode 100644 js/vendor/ical.js/samples/parserv2.ics delete mode 100644 js/vendor/ical.js/samples/recur_instances.ics delete mode 100644 js/vendor/ical.js/samples/recur_instances_finite.ics delete mode 100644 js/vendor/ical.js/samples/timezones/America/Atikokan.ics delete mode 100644 js/vendor/ical.js/samples/timezones/America/Denver.ics delete mode 100644 js/vendor/ical.js/samples/timezones/America/Los_Angeles.ics delete mode 100644 js/vendor/ical.js/samples/timezones/America/New_York.ics delete mode 100644 js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_test.ics delete mode 100644 js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_utc_test.ics delete mode 100644 js/vendor/ical.js/samples/timezones/Makebelieve/RRULE_UNTIL_test.ics delete mode 100644 js/vendor/ical.js/samples/utc_negative_zero.ics delete mode 100644 js/vendor/ical.js/sandbox/validator.html delete mode 100644 js/vendor/ical.js/tasks/tests.js delete mode 100644 js/vendor/ical.js/tasks/timezones.js delete mode 100644 js/vendor/ical.js/tasks/travis.js delete mode 100644 js/vendor/ical.js/test-agent-coverage.json delete mode 100644 js/vendor/ical.js/test-agent-server.js delete mode 100644 js/vendor/ical.js/test-agent/index.html delete mode 100644 js/vendor/ical.js/test-agent/index.js delete mode 100644 js/vendor/ical.js/test-agent/package.json delete mode 100644 js/vendor/ical.js/test-agent/sandbox.html delete mode 100644 js/vendor/ical.js/test-agent/style.css delete mode 100644 js/vendor/jquery-timepicker/.bower.json create mode 100644 js/vendor/jquery-timepicker/AUTHORS create mode 100644 js/vendor/jquery-timepicker/CHANGELOG delete mode 100644 js/vendor/jquery-timepicker/GPL-LICENSE.txt create mode 100644 js/vendor/jquery-timepicker/Gruntfile.js create mode 100644 js/vendor/jquery-timepicker/LICENSE-GPL create mode 100644 js/vendor/jquery-timepicker/LICENSE-MIT delete mode 100644 js/vendor/jquery-timepicker/MIT-LICENSE.txt create mode 100644 js/vendor/jquery-timepicker/Makefile delete mode 100644 js/vendor/jquery-timepicker/i18n/i18n.html delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-cs.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-de.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-es.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-fr.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hr.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hu.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-it.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ja.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-mk.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-nl.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pl.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pt-BR.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ru.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sl.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sv.js delete mode 100644 js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-tr.js delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.core.min.js delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.position.min.js delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.tabs.min.js delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.widget.min.js delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_flat_10_000000_40x100.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png delete mode 100644 js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/jquery-ui-1.10.0.custom.min.css delete mode 100644 js/vendor/jquery-timepicker/index.html create mode 100644 js/vendor/jquery-timepicker/jquery-timepicker.jquery.json create mode 100644 js/vendor/jquery-timepicker/jquery.timepicker.css create mode 100644 js/vendor/jquery-timepicker/jquery.timepicker.js delete mode 100644 js/vendor/jquery-timepicker/jquery.ui.timepicker.css delete mode 100644 js/vendor/jquery-timepicker/jquery.ui.timepicker.js delete mode 100644 js/vendor/jquery-timepicker/legacy_1.2.6/index.html delete mode 100644 js/vendor/jquery-timepicker/legacy_1.2.6/jquery-1.2.6.js delete mode 100644 js/vendor/jquery-timepicker/legacy_1.2.6/jquery.proxy.fix.js delete mode 100644 js/vendor/jquery-timepicker/legacy_1.2.6/jquery.ui.1.6.all.js create mode 100644 js/vendor/jquery-timepicker/package.json create mode 100644 js/vendor/jquery-timepicker/test/index.html create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/animated-overlay.gif create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_222222_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_228ef1_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_ef8c08_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_ffd27a_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_ffffff_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/jquery-ui-1.10.4.custom.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/jquery-ui-1.10.4.custom.min.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/js/jquery-ui-1.10.4.custom.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/js/jquery-ui-1.10.4.custom.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_flat_10_000000_40x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-icons_222222_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-icons_228ef1_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-icons_ef8c08_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-icons_ffd27a_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/images/ui-icons_ffffff_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.min.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.structure.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.structure.min.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.theme.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.11.1/jquery-ui.theme.min.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-anim_basic_16x16.gif create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-bg_flat_75_ffffff_40x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-bg_glass_55_fbf9ee_1x400.png rename js/vendor/jquery-timepicker/{include/ui-1.10.0/ui-lightness => test/resources/jquery-ui/jquery-ui-1.8.2}/images/ui-bg_glass_65_ffffff_1x400.png (100%) create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-bg_highlight-soft_75_cccccc_1x100.png rename js/vendor/jquery-timepicker/{include/ui-1.10.0/ui-lightness => test/resources/jquery-ui/jquery-ui-1.8.2}/images/ui-icons_222222_256x240.png (100%) rename js/vendor/jquery-timepicker/{include/ui-1.10.0/ui-lightness/images/ui-icons_ffd27a_256x240.png => test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-icons_2e83ff_256x240.png} (92%) rename js/vendor/jquery-timepicker/{include/ui-1.10.0/ui-lightness/images/ui-icons_ffffff_256x240.png => test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-icons_454545_256x240.png} (97%) rename js/vendor/jquery-timepicker/{include/ui-1.10.0/ui-lightness/images/ui-icons_ef8c08_256x240.png => test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-icons_888888_256x240.png} (92%) rename js/vendor/jquery-timepicker/{include/ui-1.10.0/ui-lightness/images/ui-icons_228ef1_256x240.png => test/resources/jquery-ui/jquery-ui-1.8.2/images/ui-icons_cd0a0a_256x240.png} (92%) create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/jquery-ui-1.8.2.custom.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.8.2/jquery-ui-1.8.2.custom.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-icons_222222_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-icons_228ef1_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-icons_ef8c08_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-icons_ffd27a_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/images/ui-icons_ffffff_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/jquery-ui-1.9.2.custom.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/css/ui-lightness/jquery-ui-1.9.2.custom.min.css create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/js/jquery-ui-1.9.2.custom.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/js/jquery-ui-1.9.2.custom.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery.simulate.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.2.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.11.0.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.11.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.3.2.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.4.2.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.4.3.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.5.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.6.2.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.6.4.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.7.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.7.2.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.8.3.min.js rename js/vendor/jquery-timepicker/{include => test/resources/jquery}/jquery-1.9.0.min.js (100%) create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.9.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-2.0.0.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-2.0.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-2.0.2.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-2.0.3.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-2.1.0.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/jquery/jquery-2.1.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/lazyload-min.js create mode 100644 js/vendor/jquery-timepicker/test/resources/qunit.css create mode 100644 js/vendor/jquery-timepicker/test/resources/qunit.js create mode 100644 js/vendor/jquery-timepicker/test/runner.js create mode 100644 js/vendor/jquery-timepicker/test/test.js create mode 100644 js/vendor/jquery-timepicker/test/visual.html create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/calendar.html create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/animated-overlay.gif create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-bg_flat_100_ffffff_40x100.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-bg_highlight-soft_100_f7f9fb_1x100.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-icons_191919_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-icons_2e83ff_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-icons_323a45_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-icons_454545_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-icons_888888_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/images/ui-icons_cd0a0a_256x240.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/custom-theme/jquery-ui-1.10.4.custom.css create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/jquery.formstyler.css create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/main.css create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/css/normalize.min.css create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/calendar-list__link.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-add-small.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-add.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-alarm__btn.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-archive.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-arrow-left.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-arrow-next.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-arrow-prev.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-calendar.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-camera-list.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-clock.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-close.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-date.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-download.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-ignore.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-live.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-logout.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-map-pins.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-setting.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/ico-user.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/logo.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/timeline-bg.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/timeline__alarm-flag.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/timeline__record-current-bg.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/timeline__scroll-bridge.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/timeline__scroll-control-bg.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/timeline__scroll-control-left.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/img/timeline__scroll-control-right.png create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/js/hoverIntent.js create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/js/jquery.formstyler.min.js create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/js/main.js create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/js/superfish.js create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/js/vendor/jquery-1.10.1.min.js create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/js/vendor/jquery-ui-1.10.4.custom.min.js create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/robots.txt create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/uploads/calendar-1.jpg create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/uploads/calendar-2.jpg create mode 100644 js/vendor/jquery-timepicker/test/visuals/i43/uploads/calendar-3.jpg delete mode 100644 js/vendor/jquery-timepicker/tests/dialog.html delete mode 100644 js/vendor/jquery-timepicker/tests/jquery.ui.dialog.min.js delete mode 100644 js/vendor/jquery-timepicker/timepicker.png rename js/vendor/{jstzdetect => jstimezonedetect}/LICENCE.txt (100%) create mode 100644 js/vendor/jstimezonedetect/README.md create mode 100644 js/vendor/jstimezonedetect/dist/jstz.js create mode 100644 js/vendor/jstimezonedetect/dist/jstz.min.js rename js/vendor/{jstzdetect => jstimezonedetect}/package.json (63%) delete mode 100644 js/vendor/jstzdetect/.bower.json delete mode 100644 js/vendor/jstzdetect/Gruntfile.js delete mode 100644 js/vendor/jstzdetect/README.md delete mode 100644 js/vendor/jstzdetect/bower.json delete mode 100644 js/vendor/jstzdetect/jstz.js delete mode 100644 js/vendor/jstzdetect/jstz.min.js diff --git a/Makefile b/Makefile index 6d216be06..be9e7b10d 100644 --- a/Makefile +++ b/Makefile @@ -33,13 +33,13 @@ # build tools and additional package managers should be installed locally in # your project, since this won't pollute people's global namespace. # -# The following yarn scripts in your package.json install and update the bower -# and yarn dependencies and use gulp as build system (notice how everything is +# The following yarn scripts in your package.json install and update the +# yarn dependencies and use gulp as build system (notice how everything is # run from the node_modules folder): # # "scripts": { # "test": "node node_modules/gulp-cli/bin/gulp.js karma", -# "prebuild": "yarn install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", +# "prebuild": "yarn install && yarn upgrade", # "build": "node node_modules/gulp-cli/bin/gulp.js" # }, @@ -98,8 +98,7 @@ yarn: clean: rm -rf ./build -# Same as clean but also removes dependencies installed by composer, bower and -# yarn +# Same as clean but also removes dependencies installed by yarn .PHONY: distclean distclean: clean rm -rf vendor diff --git a/js/.bowerrc b/js/.bowerrc deleted file mode 100644 index 1355d20ff..000000000 --- a/js/.bowerrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "directory": "vendor", - "ignoredDependencies": [ - "jquery", - "moment" - ] -} \ No newline at end of file diff --git a/js/bower.json b/js/bower.json deleted file mode 100644 index 5f710db4e..000000000 --- a/js/bower.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "Nextcloud - Tasks", - "version": "0.9.5", - "dependencies": { - "angular": "1.5.5", - "angular-route": "1.5.5", - "angular-animate": "1.5.5", - "angular-sanitize": "1.5.5", - "angular-ui-select": "https://github.com/angular-ui/ui-select.git#v0.19.8", - "angular-draganddrop": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git#v2.1.0", - "jquery-timepicker": "", - "ical.js": "~1.2.2", - "jstzdetect": "" - }, - "devDependencies": {}, - "homepage": "https://github.com/nextcloud/tasks", - "authors": [ - "Raimund Schlüßler " - ], - "description": "", - "main": "", - "moduleType": [], - "license": "AGPLv3", - "private": true, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "core/vendor", - "test", - "tests" - ] -} diff --git a/js/package.json b/js/package.json index 4f7ad8bed..c5e151943 100644 --- a/js/package.json +++ b/js/package.json @@ -11,7 +11,7 @@ "homepage": "https://github.com/nextcloud/tasks", "scripts": { "test": "node node_modules/gulp-cli/bin/gulp.js karma", - "prebuild": "yarn install && yarn upgrade && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", + "prebuild": "yarn install && yarn upgrade", "build": "node node_modules/gulp-cli/bin/gulp.js" }, "repository": { @@ -20,10 +20,19 @@ }, "bugs": "https://github.com/nextcloud/tasks/issues", "contributors": [], - "dependencies": {}, + "dependencies": { + "angular": "1.5.5", + "angular-animate": "1.5.5", + "angular-draganddrop": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git#v2.1.0", + "angular-route": "1.5.5", + "angular-sanitize": "1.5.5", + "angular-ui-select": "https://github.com/angular-ui/ui-select.git#v0.19.8", + "ical.js": "~1.2.2", + "jquery-timepicker": "", + "jstimezonedetect": "" + }, "devDependencies": { "babel-preset-es2015": "^6.14.0", - "bower": "*", "gulp": "^3.9.1", "gulp-babel": "^6.1.2", "gulp-cli": "^1.2.2", diff --git a/js/vendor/angular-animate/.bower.json b/js/vendor/angular-animate/.bower.json deleted file mode 100644 index 74297b4f4..000000000 --- a/js/vendor/angular-animate/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "angular-animate", - "version": "1.5.5", - "license": "MIT", - "main": "./angular-animate.js", - "ignore": [], - "dependencies": { - "angular": "1.5.5" - }, - "homepage": "https://github.com/angular/bower-angular-animate", - "_release": "1.5.5", - "_resolution": { - "type": "version", - "tag": "v1.5.5", - "commit": "39c4ea7a81ed05b09229f5961e31e1d9dc251bf8" - }, - "_source": "https://github.com/angular/bower-angular-animate.git", - "_target": "1.5.5", - "_originalSource": "angular-animate" -} \ No newline at end of file diff --git a/js/vendor/angular-draganddrop/.bower.json b/js/vendor/angular-draganddrop/.bower.json deleted file mode 100644 index cdcf14da4..000000000 --- a/js/vendor/angular-draganddrop/.bower.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "angular-drag-and-drop-lists", - "main": "angular-drag-and-drop-lists.js", - "version": "2.1.0", - "homepage": "https://github.com/marceljuenemann/angular-drag-and-drop-lists", - "authors": [ - "Marcel Juenemann " - ], - "description": "Angular directives for sorting nested lists using the HTML5 Drag & Drop API", - "keywords": [ - "angular", - "drag", - "drop", - "dnd", - "nested", - "sortable", - "lists", - "html5" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "demo", - "*.json", - "test", - "tests" - ], - "_release": "2.1.0", - "_resolution": { - "type": "version", - "tag": "2.1.0", - "commit": "7e98e194a8d66fa735bf6dc7c3e39886287b914e" - }, - "_source": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git", - "_target": "v2.1.0", - "_originalSource": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git" -} \ No newline at end of file diff --git a/js/vendor/angular-draganddrop/demo/advanced/advanced-frame.html b/js/vendor/angular-draganddrop/demo/advanced/advanced-frame.html new file mode 100644 index 000000000..366cc579c --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/advanced/advanced-frame.html @@ -0,0 +1,28 @@ +

Demo: Advanced Features

+ +
    +
  • dnd-effect-allowed: This demo shows how to use dnd-effect-allowed to control which drop effects are allowed. + If the source and target elements have no drop effect that is allowed on both, then a drop is not possible. If there are multiple + possible drop effects, then the user can control the drop effect using modifier keys (Ctrl and Alt).
  • +
  • dnd-external-sources: Allows to drag and drop elements accross browser windows, which you can test in this + example. The downside to this is that the lists will accept arbitrary text to be dropped. To prevent that, the dnd-drop callback + verifies that the dropped element is of the desired format.
  • +
  • dnd-allowed-types in nested lists: We are using the dnd-allowed-types attribute to ensure that Containers + only accept items, but not other containers.
  • +
  • dnd-horizontal-list: This attribute tells the positioning algorithm to drop incoming elements left or right + of the existing elements, instead of above or below.
  • +
  • Callbacks: The directives offer various callbacks, which in this example will log the events to the console. + Additionally, the callbacks on the dnd-list can prevent an element from being dropped. In this example you can't drop elements + after the 10th position, because we are preventing that in the dnd-dragover callback.
  • +
+ +
+
+
+
+
+ +
+ +

Generated Model

+
{{modelAsJson}}
diff --git a/js/vendor/angular-draganddrop/demo/advanced/advanced.css b/js/vendor/angular-draganddrop/demo/advanced/advanced.css new file mode 100644 index 000000000..2f534580f --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/advanced/advanced.css @@ -0,0 +1,66 @@ +/***************************** Dropzone Styling *****************************/ + +/** + * The dnd-list should always have a min-height, + * otherwise you can't drop to it once it's empty + */ +.advancedDemo .dropzone ul[dnd-list] { + min-height: 42px; + margin: 0px; + padding-left: 0px; +} + +.advancedDemo .dropzone li { + display: block; +} + +/** + * Reduce opacity of elements during the drag operation. This allows the user + * to see where he is dropping his element, even if the element is huge. The + * .dndDragging class is automatically set during the drag operation. + */ +.advancedDemo .dropzone .dndDragging { + opacity: 0.7; +} + +/** + * The dndDraggingSource class will be applied to the source element of a drag + * operation. + */ +.advancedDemo .dropzone .dndDraggingSource { + opacity: 0.5; +} + +/** + * An element with .dndPlaceholder class will be added as child of the dnd-list + * while the user is dragging over it. + */ +.advancedDemo .dropzone .dndPlaceholder { + background-color: #ddd !important; + display: block; + min-height: 42px; +} + +/***************************** Element type specific styles *****************************/ + +.advancedDemo .dropzone .itemlist { + min-height: 120px !important; +} + +.advancedDemo .dropzone .itemlist > li { + background-color: #337ab7; + border: none; + border-radius: .25em; + color: #fff; + float: left; + font-weight: 700; + height: 50px; + margin: 5px; + padding: 3px; + text-align: center; + width: 80px; +} + +.advancedDemo .dropzone .container-element { + margin: 10px; +} diff --git a/js/vendor/angular-draganddrop/demo/advanced/advanced.html b/js/vendor/angular-draganddrop/demo/advanced/advanced.html new file mode 100644 index 000000000..856ee1131 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/advanced/advanced.html @@ -0,0 +1,37 @@ +

Dropzone {{$index + 1}}

+
    +
  • +
    +

    Container (effects allowed: {{container.effectAllowed}})

    +
      +
    • + {{item.label}} +
    • +
    +
    +
    +
  • +
diff --git a/js/vendor/angular-draganddrop/demo/advanced/advanced.js b/js/vendor/angular-draganddrop/demo/advanced/advanced.js new file mode 100644 index 000000000..6f276c046 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/advanced/advanced.js @@ -0,0 +1,43 @@ +angular.module("demo").controller("AdvancedDemoController", function($scope) { + + $scope.dragoverCallback = function(index, external, type, callback) { + $scope.logListEvent('dragged over', index, external, type); + // Invoke callback to origin for container types. + if (type == 'container' && !external) { + console.log('Container being dragged contains ' + callback() + ' items'); + } + return index < 10; // Disallow dropping in the third row. + }; + + $scope.dropCallback = function(index, item, external, type) { + $scope.logListEvent('dropped at', index, external, type); + // Return false here to cancel drop. Return true if you insert the item yourself. + return item; + }; + + $scope.logEvent = function(message) { + console.log(message); + }; + + $scope.logListEvent = function(action, index, external, type) { + var message = external ? 'External ' : ''; + message += type + ' element was ' + action + ' position ' + index; + console.log(message); + }; + + // Initialize model + $scope.model = [[], []]; + var id = 10; + angular.forEach(['all', 'move', 'copy', 'link', 'copyLink', 'copyMove'], function(effect, i) { + var container = {items: [], effectAllowed: effect}; + for (var k = 0; k < 7; ++k) { + container.items.push({label: effect + ' ' + id++, effectAllowed: effect}); + } + $scope.model[i % $scope.model.length].push(container); + }); + + $scope.$watch('model', function(model) { + $scope.modelAsJson = angular.toJson(model, true); + }, true); + +}); diff --git a/js/vendor/angular-draganddrop/demo/framework/demo-framework.css b/js/vendor/angular-draganddrop/demo/framework/demo-framework.css new file mode 100644 index 000000000..1242c1c63 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/demo-framework.css @@ -0,0 +1,70 @@ +body { + padding-top: 70px; + padding-bottom: 30px; +} + +.box { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05); + box-shadow: 0 1px 2px rgba(0,0,0,.05); +} + +.box > h3 { + color: #333; + border-color: #ddd; + border-bottom: 1px solid transparent; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + background-repeat: repeat-x; + display: block; + font-size: 16px; + padding: 10px 15px; + margin-top: 0; + margin-bottom: 0; +} + +.box-padding { + padding: 15px; +} + +.box-padding > h3 { + margin: -15px; + margin-bottom: 15px; +} + +.box-grey { + border-color: #ddd; +} + +.box-grey > h3 { + background-color: #f5f5f5; + background-image: -webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%); + background-image: linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%); +} + +.box-blue { + border-color: #bce8f1; +} + +.box-blue > h3 { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; + background-image: -webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%); + background-image: linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%); +} + +.box-yellow { + border-color: #faebcc; +} + +.box-yellow > h3 { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; + background-image: -webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%); + background-image: linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%); +} \ No newline at end of file diff --git a/js/vendor/angular-draganddrop/demo/framework/demo-framework.js b/js/vendor/angular-draganddrop/demo/framework/demo-framework.js new file mode 100644 index 000000000..fd146e1bd --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/demo-framework.js @@ -0,0 +1,51 @@ +angular.module("demo", ["ngRoute", "dndLists"]) + .config(function($routeProvider) { + $routeProvider + .when('/simple', { + templateUrl: 'simple/simple-frame.html', + controller: 'SimpleDemoController' + }) + .when('/nested', { + templateUrl: 'nested/nested-frame.html', + controller: 'NestedListsDemoController' + }) + .when('/types', { + templateUrl: 'types/types-frame.html', + controller: 'TypesDemoController' + }) + .when('/advanced', { + templateUrl: 'advanced/advanced-frame.html', + controller: 'AdvancedDemoController' + }) + .when('/multi', { + templateUrl: 'multi/multi-frame.html', + controller: 'MultiDemoController' + }) + .otherwise({redirectTo: '/nested'}); + }) + + .directive('navigation', function($rootScope, $location) { + return { + template: '
  • ' + + ' {{option.label}}' + + '
  • ', + link: function (scope, element, attr) { + scope.options = [ + {label: "Nested Containers", href: "#/nested"}, + {label: "Simple Demo", href: "#/simple"}, + {label: "Item Types", href: "#/types"}, + {label: "Advanced Demo", href: "#/advanced"}, + {label: "Multiselection", href: "#/multi"}, + {label: "Github", href: "https://github.com/marceljuenemann/angular-drag-and-drop-lists"} + ]; + + scope.isActive = function(option) { + return option.href.indexOf(scope.location) === 1; + }; + + $rootScope.$on("$locationChangeSuccess", function(event, next, current) { + scope.location = $location.path(); + }); + } + }; + }); diff --git a/js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap-theme.min.css b/js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap-theme.min.css new file mode 100644 index 000000000..ba4bd28ae --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap-theme.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-color:#357ebd}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:linear-gradient(to bottom,#222 0,#282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} \ No newline at end of file diff --git a/js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap.min.css b/js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap.min.css new file mode 100644 index 000000000..679272d25 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/vendor/bootstrap.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/js/vendor/angular-draganddrop/demo/framework/vendor/ic_content_copy_black_24dp_2x.png b/js/vendor/angular-draganddrop/demo/framework/vendor/ic_content_copy_black_24dp_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1cf76a960302404d6bb4cbd0c3e96aea8245a68f GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DYEKu(kP61P*B!ZzDhM<`{BLsf z_VsTG{YiJv?{?zZp?Px6VfIrEpH`Y!HAl%<_O=_j`7Qs(lx(aZ(lf(>pmdKI;Vst0IVH8wEzGB literal 0 HcmV?d00001 diff --git a/js/vendor/angular-draganddrop/demo/framework/vendor/prism.css b/js/vendor/angular-draganddrop/demo/framework/vendor/prism.css new file mode 100644 index 000000000..ee7d6b8dd --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/vendor/prism.css @@ -0,0 +1,213 @@ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ + +code[class*="language-"], +pre[class*="language-"] { + color: black; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: #b3d4fc; +} + +pre[class*="language-"]::selection, pre[class*="language-"] ::selection, +code[class*="language-"]::selection, code[class*="language-"] ::selection { + text-shadow: none; + background: #b3d4fc; +} + +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #f5f2f0; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #999; +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol { + color: #905; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.builtin { + color: #690; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string, +.token.variable { + color: #a67f59; + background: hsla(0,0%,100%,.5); +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} + + +.token.regex, +.token.important { + color: #e90; +} + +.token.important { + font-weight: bold; +} + +.token.entity { + cursor: help; +} + +pre[data-line] { + position: relative; + padding: 1em 0 1em 3em; +} + +.line-highlight { + position: absolute; + left: 0; + right: 0; + padding: inherit 0; + margin-top: 1em; /* Same as .prism’s padding-top */ + + background: hsla(24, 20%, 50%,.08); + background: -moz-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); + background: -webkit-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); + background: -o-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); + background: linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); + + pointer-events: none; + + line-height: inherit; + white-space: pre; +} + + .line-highlight:before, + .line-highlight[data-end]:after { + content: attr(data-start); + position: absolute; + top: .4em; + left: .6em; + min-width: 1em; + padding: 0 .5em; + background-color: hsla(24, 20%, 50%,.4); + color: hsl(24, 20%, 95%); + font: bold 65%/1.5 sans-serif; + text-align: center; + vertical-align: .3em; + border-radius: 999px; + text-shadow: none; + box-shadow: 0 1px white; + } + + .line-highlight[data-end]:after { + content: attr(data-end); + top: auto; + bottom: .4em; + } +pre.line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber; +} + +pre.line-numbers > code { + position: relative; +} + +.line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; /* works for line-numbers below 1000 lines */ + letter-spacing: -1px; + border-right: 1px solid #999; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + +} + + .line-numbers-rows > span { + pointer-events: none; + display: block; + counter-increment: linenumber; + } + + .line-numbers-rows > span:before { + content: counter(linenumber); + color: #999; + display: block; + padding-right: 0.8em; + text-align: right; + } diff --git a/js/vendor/angular-draganddrop/demo/framework/vendor/prism.js b/js/vendor/angular-draganddrop/demo/framework/vendor/prism.js new file mode 100644 index 000000000..3b2cc64fa --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/vendor/prism.js @@ -0,0 +1,14 @@ +/** + * Prism: Lightweight, robust, elegant syntax highlighting + * MIT license http://www.opensource.org/licenses/mit-license.php/ + * @author Lea Verou http://lea.verou.me + */(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');for(var i=0,s;s=r[i++];)t.highlightElement(s,e===!0,n)},highlightElement:function(r,i,s){var o,u,a=r;while(a&&!e.test(a.className))a=a.parentNode;if(a){o=(a.className.match(e)||[,""])[1];u=t.languages[o]}if(!u)return;r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+o;a=r.parentNode;/pre/i.test(a.nodeName)&&(a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var f=r.textContent;if(!f)return;f=f.replace(/&/g,"&").replace(/e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+""};if(!self.document){self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}})();; +Prism.languages.markup={comment:/<!--[\w\W]*?-->/g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});; +Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[\{\};:]/g};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,inside:{tag:{pattern:/(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});; +Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/ig,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/ig,inside:{punctuation:/\(/}}, number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|(&){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g}; +; +Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(var|let|if|else|while|do|for|return|in|instanceof|function|get|set|new|with|typeof|try|throw|catch|finally|null|break|continue)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<|<)script[\w\W]*?(>|>)[\w\W]*?(<|<)\/script(>|>)/ig,inside:{tag:{pattern:/(<|<)script[\w\W]*?(>|>)|(<|<)\/script(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}});; +(function(){if(!window.Prism){return}function $$(a,b){return Array.prototype.slice.call((b||document).querySelectorAll(a))}function hasClass(a,b){b=" "+b+" ";return(" "+a.className+" ").replace(/[\n\t]/g," ").indexOf(b)>-1}var h=crlf=/\r?\n|\r/g;function highlightLines(a,b,c){var d=b.replace(/\s+/g,'').split(','),offset=+a.getAttribute('data-line-offset')||0;var e=parseFloat(getComputedStyle(a).lineHeight);for(var i=0,range;range=d[i++];){range=range.split('-');var f=+range[0],end=+range[1]||f;var g=document.createElement('div');g.textContent=Array(end-f+2).join(' \r\n');g.className=(c||'')+' line-highlight';if(!hasClass(a,'line-numbers')){g.setAttribute('data-start',f);if(end>f){g.setAttribute('data-end',end)}}g.style.top=(f-offset-1)*e+'px';if(hasClass(a,'line-numbers')){a.appendChild(g)}else{(a.querySelector('code')||a).appendChild(g)}}}function applyHash(){var b=location.hash.slice(1);$$('.temporary.line-highlight').forEach(function(a){a.parentNode.removeChild(a)});var c=(b.match(/\.([\d,-]+)$/)||[,''])[1];if(!c||document.getElementById(b)){return}var d=b.slice(0,b.lastIndexOf('.')),pre=document.getElementById(d);if(!pre){return}if(!pre.hasAttribute('data-line')){pre.setAttribute('data-line','')}highlightLines(pre,c,'temporary ');document.querySelector('.temporary.line-highlight').scrollIntoView()}var j=0;Prism.hooks.add('after-highlight',function(b){var c=b.element.parentNode;var d=c&&c.getAttribute('data-line');if(!c||!d||!/pre/i.test(c.nodeName)){return}clearTimeout(j);$$('.line-highlight',c).forEach(function(a){a.parentNode.removeChild(a)});highlightLines(c,d);j=setTimeout(applyHash,1)});addEventListener('hashchange',applyHash)})(); +; +Prism.hooks.add("after-highlight",function(e){var t=e.element.parentNode;if(!t||!/pre/i.test(t.nodeName)||t.className.indexOf("line-numbers")===-1){return}var n=1+e.code.split("\n").length;var r;lines=new Array(n);lines=lines.join("");r=document.createElement("span");r.className="line-numbers-rows";r.innerHTML=lines;if(t.hasAttribute("data-start")){t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)}e.element.appendChild(r)}) +; diff --git a/js/vendor/angular-draganddrop/demo/framework/view-source.html b/js/vendor/angular-draganddrop/demo/framework/view-source.html new file mode 100644 index 000000000..96df47574 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/view-source.html @@ -0,0 +1,17 @@ +

    Source Code

    + + + +
    +
    +
    {{type.source}}
    +
    +
    diff --git a/js/vendor/angular-draganddrop/demo/framework/view-source.js b/js/vendor/angular-draganddrop/demo/framework/view-source.js new file mode 100644 index 000000000..ad478644b --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/framework/view-source.js @@ -0,0 +1,29 @@ +angular.module("demo").directive('viewSource', function($http, $timeout) { + return { + scope: { + demoName: "@viewSource", + highlightLines: "=" + }, + templateUrl: 'framework/view-source.html', + link: function (scope, element, attr) { + + scope.models = { + types: [ + {extension: "html", language: "markup", label: "Markup"}, + {extension: "css", language: "css", label: "CSS"}, + {extension: "js", language: "javascript", label: "Javascript"}, + ], + activeTab: "markup" + }; + + angular.forEach(scope.models.types, function(type) { + $http.get(scope.demoName + '/' + scope.demoName + '.' + type.extension) + .success(function (data) { + type.source = data; + $timeout(Prism.highlightAll, 0); + }); + }); + + } + }; +}); diff --git a/js/vendor/angular-draganddrop/demo/index.html b/js/vendor/angular-draganddrop/demo/index.html new file mode 100644 index 000000000..3b721fee6 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/index.html @@ -0,0 +1,65 @@ + + + + + Drag & Drop Lists for angular.js + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    Angular drag & drop with HTML5

    +

    + Directives for modifying lists with the HTML5 drag & drop API. + Supports nested lists for building trees and other fancy structures. + No boilerplate code, no jQuery, just a few KB! +

    +

    Code on github »

    +
    + +
    + +
    + + diff --git a/js/vendor/angular-draganddrop/demo/multi/multi-frame.html b/js/vendor/angular-draganddrop/demo/multi/multi-frame.html new file mode 100644 index 000000000..41d982a9c --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/multi/multi-frame.html @@ -0,0 +1,37 @@ +

    Demo: Multiselect Lists

    + +
    + Instructions: + Click on items to select/unselect them. When dragging, all selected items will be moved at once. +
    + +
    + +
    +
    +
    +
    +
    +

    List {{list.listName}}

    +
    +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    +

    Generated Model

    +
    +
    +
    {{modelAsJson}}
    +
    +
    +
    + +
    diff --git a/js/vendor/angular-draganddrop/demo/multi/multi.css b/js/vendor/angular-draganddrop/demo/multi/multi.css new file mode 100644 index 000000000..44aaf02b8 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/multi/multi.css @@ -0,0 +1,37 @@ +/** + * The dnd-list should always have a min-height, + * otherwise you can't drop into it once it's empty + */ +.multiDemo ul[dnd-list] { + min-height: 42px; + padding-left: 0px; +} + +/** + * An element with .dndPlaceholder class will be + * added to the dnd-list while the user is dragging + * over it. + */ +.multiDemo ul[dnd-list] .dndPlaceholder { + background-color: #ddd; + display: block; + min-height: 42px; +} + +.multiDemo ul[dnd-list] li { + background-color: #fff; + border: 1px solid #ddd; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + display: block; + margin-bottom: -1px; + padding: 10px 15px; +} + +/** + * Show selected elements in green + */ +.multiDemo ul[dnd-list] li.selected { + background-color: #dff0d8; + color: #3c763d; +} diff --git a/js/vendor/angular-draganddrop/demo/multi/multi.html b/js/vendor/angular-draganddrop/demo/multi/multi.html new file mode 100644 index 000000000..4fb3a3c45 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/multi/multi.html @@ -0,0 +1,13 @@ +
      +
    • + {{item.label}} +
    • +
    diff --git a/js/vendor/angular-draganddrop/demo/multi/multi.js b/js/vendor/angular-draganddrop/demo/multi/multi.js new file mode 100644 index 000000000..6b95ad07f --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/multi/multi.js @@ -0,0 +1,66 @@ +angular.module("demo").controller("MultiDemoController", function($scope) { + + $scope.models = [ + {listName: "A", items: [], dragging: false}, + {listName: "B", items: [], dragging: false} + ]; + + /** + * dnd-dragging determines what data gets serialized and send to the receiver + * of the drop. While we usually just send a single object, we send the array + * of all selected items here. + */ + $scope.getSelectedItemsIncluding = function(list, item) { + item.selected = true; + return list.items.filter(function(item) { return item.selected; }); + }; + + /** + * We set the list into dragging state, meaning the items that are being + * dragged are hidden. We also use the HTML5 API directly to set a custom + * image, since otherwise only the one item that the user actually dragged + * would be shown as drag image. + */ + $scope.onDragstart = function(list, event) { + list.dragging = true; + if (event.dataTransfer.setDragImage) { + var img = new Image(); + img.src = 'framework/vendor/ic_content_copy_black_24dp_2x.png'; + event.dataTransfer.setDragImage(img, 0, 0); + } + }; + + /** + * In the dnd-drop callback, we now have to handle the data array that we + * sent above. We handle the insertion into the list ourselves. By returning + * true, the dnd-list directive won't do the insertion itself. + */ + $scope.onDrop = function(list, items, index) { + angular.forEach(items, function(item) { item.selected = false; }); + list.items = list.items.slice(0, index) + .concat(items) + .concat(list.items.slice(index)); + return true; + } + + /** + * Last but not least, we have to remove the previously dragged items in the + * dnd-moved callback. + */ + $scope.onMoved = function(list) { + list.items = list.items.filter(function(item) { return !item.selected; }); + }; + + // Generate the initial model + angular.forEach($scope.models, function(list) { + for (var i = 1; i <= 4; ++i) { + list.items.push({label: "Item " + list.listName + i}); + } + }); + + // Model to JSON for demo purpose + $scope.$watch('models', function(model) { + $scope.modelAsJson = angular.toJson(model, true); + }, true); + +}); diff --git a/js/vendor/angular-draganddrop/demo/nested/nested-frame.html b/js/vendor/angular-draganddrop/demo/nested/nested-frame.html new file mode 100644 index 000000000..c50eaecf7 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/nested/nested-frame.html @@ -0,0 +1,10 @@ +

    Demo: Nested Containers

    + +
    + Instructions: + In this demo you can not only drag & drop list items, but also containers, which + can contain list items or other containers themselves. To create new elements, use the toolbar on the right. + If this is more than you need, check out the simple list demo +
    + +
    diff --git a/js/vendor/angular-draganddrop/demo/nested/nested.css b/js/vendor/angular-draganddrop/demo/nested/nested.css new file mode 100644 index 000000000..c87dedca0 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/nested/nested.css @@ -0,0 +1,126 @@ +/***************************** Dropzone Styling *****************************/ + +/** + * The dnd-list should always have a min-height, + * otherwise you can't drop to it once it's empty + */ +.nestedDemo .dropzone ul[dnd-list] { + margin: 0px; + min-height: 42px; + padding-left: 0px; +} + +.nestedDemo .dropzone li { + background-color: #fff; + border: 1px solid #ddd; + display: block; + padding: 0px; +} + +/** + * Reduce opacity of elements during the drag operation. This allows the user + * to see where he is dropping his element, even if the element is huge. The + * .dndDragging class is automatically set during the drag operation. + */ +.nestedDemo .dropzone .dndDragging { + opacity: 0.7; +} + +/** + * The dndDraggingSource class will be applied to the source element of a drag + * operation. It makes sense to hide it to give the user the feeling that he's + * actually moving it. Note that the source element has also .dndDragging class. + */ +.nestedDemo .dropzone .dndDraggingSource { + display: none; +} + +/** + * An element with .dndPlaceholder class will be added as child of the dnd-list + * while the user is dragging over it. + */ +.nestedDemo .dropzone .dndPlaceholder { + background-color: #ddd; + display: block; + min-height: 42px; +} + +/***************************** Element Selection *****************************/ + +.nestedDemo .dropzone .selected .item { + color: #3c763d; + background-color: #dff0d8; +} + +.nestedDemo .dropzone .selected .box { + border-color: #d6e9c6; +} + +.nestedDemo .dropzone .selected .box > h3 { + background-color: #dff0d8; + background-image: linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%); + border-color: #d6e9c6; + color: #3c763d; +} + +/***************************** Element type specific styles *****************************/ + +.nestedDemo .dropzone .item { + padding: 10px 15px; +} + +.nestedDemo .dropzone .container-element { + margin: 10px; +} + +.nestedDemo .dropzone .container-element .column { + float: left; + width: 50%; +} + +/***************************** Toolbox *****************************/ + +.nestedDemo .toolbox ul { + cursor: move; + list-style: none; + padding-left: 0px; +} + +.nestedDemo .toolbox button { + margin: 5px; + opacity: 1.0; + width: 123px; +} + +.nestedDemo .toolbox .dndDragging { + opacity: 0.5; +} + +.nestedDemo .toolbox .dndDraggingSource { + opacity: 1.0; +} + +/***************************** Trashcan *****************************/ + +.nestedDemo .trashcan ul { + list-style: none; + padding-left: 0px; +} + +.nestedDemo .trashcan img { + width: 100%; + -webkit-filter: grayscale(100%); + -moz-filter: grayscale(100%); + filter: grayscale(100%); +} + +.nestedDemo .trashcan .dndDragover img { + width: 100%; + -webkit-filter: none; + -moz-filter: none; + filter: none; +} + +.nestedDemo .trashcan .dndPlaceholder { + display: none; +} diff --git a/js/vendor/angular-draganddrop/demo/nested/nested.html b/js/vendor/angular-draganddrop/demo/nested/nested.html new file mode 100644 index 000000000..f5751792f --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/nested/nested.html @@ -0,0 +1,85 @@ + + + + + + + + + + +
    +
    +
    +
    + +

    Dropzone {{zone}}

    +
    +
    +
    +
    + +
    + +

    Generated Model

    +
    {{modelAsJson}}
    +
    + + +
    + +
    +

    New Elements

    +
      + +
    • + +
    • +
    +
    + +
    +

    Selected

    + Type: {{models.selected.type}}
    + +
    + +
    + +

    Trashcan

    +
      +
    • +
    +
    + +
    diff --git a/js/vendor/angular-draganddrop/demo/nested/nested.js b/js/vendor/angular-draganddrop/demo/nested/nested.js new file mode 100644 index 000000000..0ce10edc9 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/nested/nested.js @@ -0,0 +1,122 @@ +/** + * The controller doesn't do much more than setting the initial data model + */ +angular.module("demo").controller("NestedListsDemoController", function($scope) { + + $scope.models = { + selected: null, + templates: [ + {type: "item", id: 2}, + {type: "container", id: 1, columns: [[], []]} + ], + dropzones: { + "A": [ + { + "type": "container", + "id": 1, + "columns": [ + [ + { + "type": "item", + "id": "1" + }, + { + "type": "item", + "id": "2" + } + ], + [ + { + "type": "item", + "id": "3" + } + ] + ] + }, + { + "type": "item", + "id": "4" + }, + { + "type": "item", + "id": "5" + }, + { + "type": "item", + "id": "6" + } + ], + "B": [ + { + "type": "item", + "id": 7 + }, + { + "type": "item", + "id": "8" + }, + { + "type": "container", + "id": "2", + "columns": [ + [ + { + "type": "item", + "id": "9" + }, + { + "type": "item", + "id": "10" + }, + { + "type": "item", + "id": "11" + } + ], + [ + { + "type": "item", + "id": "12" + }, + { + "type": "container", + "id": "3", + "columns": [ + [ + { + "type": "item", + "id": "13" + } + ], + [ + { + "type": "item", + "id": "14" + } + ] + ] + }, + { + "type": "item", + "id": "15" + }, + { + "type": "item", + "id": "16" + } + ] + ] + }, + { + "type": "item", + "id": 16 + } + ] + } + }; + + $scope.$watch('models.dropzones', function(model) { + $scope.modelAsJson = angular.toJson(model, true); + }, true); + +}); diff --git a/js/vendor/angular-draganddrop/demo/nested/trashcan.jpg b/js/vendor/angular-draganddrop/demo/nested/trashcan.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7d16cca14b1c0c94b030209c247a1f01cc47a40b GIT binary patch literal 28892 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 literal 0 HcmV?d00001 diff --git a/js/vendor/angular-draganddrop/demo/simple/simple-frame.html b/js/vendor/angular-draganddrop/demo/simple/simple-frame.html new file mode 100644 index 000000000..d90ceecbd --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/simple/simple-frame.html @@ -0,0 +1,38 @@ +

    Demo: Simple Lists

    + +
    + Instructions: + Drag & drop the list items to move them around, or just click to select them. + If that's too boring, check out the nested container demo +
    + +
    + +
    +
    +
    +
    +
    +

    List {{listName}}

    +
    +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    +

    Generated Model

    +
    +
    +
    {{modelAsJson}}
    +
    +
    +
    + +
    diff --git a/js/vendor/angular-draganddrop/demo/simple/simple.css b/js/vendor/angular-draganddrop/demo/simple/simple.css new file mode 100644 index 000000000..7dd04a4b6 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/simple/simple.css @@ -0,0 +1,47 @@ +/** + * The dnd-list should always have a min-height, + * otherwise you can't drop to it once it's empty + */ +.simpleDemo ul[dnd-list] { + min-height: 42px; + padding-left: 0px; +} + +/** + * The dndDraggingSource class will be applied to + * the source element of a drag operation. It makes + * sense to hide it to give the user the feeling + * that he's actually moving it. + */ +.simpleDemo ul[dnd-list] .dndDraggingSource { + display: none; +} + +/** + * An element with .dndPlaceholder class will be + * added to the dnd-list while the user is dragging + * over it. + */ +.simpleDemo ul[dnd-list] .dndPlaceholder { + background-color: #ddd; + display: block; + min-height: 42px; +} + +.simpleDemo ul[dnd-list] li { + background-color: #fff; + border: 1px solid #ddd; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + display: block; + padding: 10px 15px; + margin-bottom: -1px; +} + +/** + * Show selected elements in green + */ +.simpleDemo ul[dnd-list] li.selected { + background-color: #dff0d8; + color: #3c763d; +} diff --git a/js/vendor/angular-draganddrop/demo/simple/simple.html b/js/vendor/angular-draganddrop/demo/simple/simple.html new file mode 100644 index 000000000..3ec8bc58f --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/simple/simple.html @@ -0,0 +1,17 @@ + +
      + +
    • + {{item.label}} +
    • +
    diff --git a/js/vendor/angular-draganddrop/demo/simple/simple.js b/js/vendor/angular-draganddrop/demo/simple/simple.js new file mode 100644 index 000000000..89f0deba8 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/simple/simple.js @@ -0,0 +1,19 @@ +angular.module("demo").controller("SimpleDemoController", function($scope) { + + $scope.models = { + selected: null, + lists: {"A": [], "B": []} + }; + + // Generate initial model + for (var i = 1; i <= 3; ++i) { + $scope.models.lists.A.push({label: "Item A" + i}); + $scope.models.lists.B.push({label: "Item B" + i}); + } + + // Model to JSON for demo purpose + $scope.$watch('models', function(model) { + $scope.modelAsJson = angular.toJson(model, true); + }, true); + +}); diff --git a/js/vendor/angular-draganddrop/demo/types/types-frame.html b/js/vendor/angular-draganddrop/demo/types/types-frame.html new file mode 100644 index 000000000..156b46212 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/types/types-frame.html @@ -0,0 +1,40 @@ +

    Demo: Item Types

    + +
    + Instructions: + Drag & drop the names to move them around. Note that the names can not be + dropped in the list for the wrong gender. This is achieved with the dnd-type and + dnd-allowed-types attributes. + This demo also shows the use of the dnd-disable-if attribute, which is used here + to limit the number of names per list, as well as fix Alex' position. + You can combine these functions with nested lists + to build very powerful UIs. +
    + +
    + +
    +
    +
    +

    List of {{list.label}} (max. {{list.max}})

    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +

    List Models

    +
    +
    +
    {{modelAsJson}}
    +
    +
    +
    +
    diff --git a/js/vendor/angular-draganddrop/demo/types/types.css b/js/vendor/angular-draganddrop/demo/types/types.css new file mode 100644 index 000000000..b2b04f7f7 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/types/types.css @@ -0,0 +1,102 @@ +/** + * For the correct positioning of the placeholder element, the dnd-list and + * it's children must have position: relative + */ +.typesDemo ul[dnd-list], +.typesDemo ul[dnd-list] > li { + position: relative; +} + +/** + * The dnd-list should always have a min-height, + * otherwise you can't drop to it once it's empty + */ +.typesDemo ul[dnd-list] { + min-height: 42px; + padding-left: 0px; +} + +/** + * The dndDraggingSource class will be applied to + * the source element of a drag operation. It makes + * sense to hide it to give the user the feeling + * that he's actually moving it. + */ +.typesDemo ul[dnd-list] .dndDraggingSource { + display: none; +} + +/** + * An element with .dndPlaceholder class will be + * added to the dnd-list while the user is dragging + * over it. + */ +.typesDemo ul[dnd-list] .dndPlaceholder { + display: block; + background-color: #ddd; + padding: 10px 15px; + min-height: 42px; +} + +/** + * The dnd-lists's child elements currently MUST have + * position: relative. Otherwise we can not determine + * whether the mouse pointer is in the upper or lower + * half of the element we are dragging over. In other + * browsers we can use event.offsetY for this. + */ +.typesDemo ul[dnd-list] li { + background-color: #fff; + border: 1px solid #ddd; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + display: block; + margin-bottom: -1px; + + /* Disable text selection if item is not draggable */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.typesDemo ul[dnd-list] li dnd-nodrag { + display: block; + padding: 10px 15px; +} + +/** + * Gender-specifc background + */ +.typesDemo ul[dnd-list] li.background-man { + background-color: #CAE0FC; +} + +.typesDemo ul[dnd-list] li.background-woman { + background-color: #FFE2F5; +} + +.typesDemo ul[dnd-list] input.background-man { + background-color: #D8E9FF; + color: #2F4D99; +} + +.typesDemo ul[dnd-list] input.background-woman { + background-color: #FFF0FA; + color: #D84FA7; +} + +/** + * Handle positioning + */ +.typesDemo .handle { + cursor: move; + position: absolute; + top: 14px; +} + +.typesDemo .name { + margin-left: 20px; +} diff --git a/js/vendor/angular-draganddrop/demo/types/types.html b/js/vendor/angular-draganddrop/demo/types/types.html new file mode 100644 index 000000000..6b3073e57 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/types/types.html @@ -0,0 +1,24 @@ +
      + +
    • + +
      :::
      +
      + +
      +
      +
    • + +
    • + Drop any {{list.allowedTypes.join(' or ')}} here +
    • + +
    diff --git a/js/vendor/angular-draganddrop/demo/types/types.js b/js/vendor/angular-draganddrop/demo/types/types.js new file mode 100644 index 000000000..8a358eae3 --- /dev/null +++ b/js/vendor/angular-draganddrop/demo/types/types.js @@ -0,0 +1,43 @@ +angular.module("demo").controller("TypesDemoController", function($scope) { + + $scope.lists = [ + { + label: "Men", + allowedTypes: ['man'], + max: 4, + people: [ + {name: "Bob", type: "man"}, + {name: "Charlie", type: "man"}, + {name: "Dave", type: "man"} + ] + }, + { + label: "Women", + allowedTypes: ['woman'], + max: 4, + people: [ + {name: "Alice", type: "woman"}, + {name: "Eve", type: "woman"}, + {name: "Peggy", type: "woman"} + ] + }, + { + label: "People", + allowedTypes: ['man', 'woman'], + max: 6, + people: [ + {name: "Frank", type: "man"}, + {name: "Mallory", type: "woman"}, + {name: "Alex", type: "unknown"}, + {name: "Oscar", type: "man"}, + {name: "Wendy", type: "woman"} + ] + } + ]; + + // Model to JSON for demo purpose + $scope.$watch('lists', function(lists) { + $scope.modelAsJson = angular.toJson(lists, true); + }, true); + +}); diff --git a/js/vendor/angular-draganddrop/package.json b/js/vendor/angular-draganddrop/package.json new file mode 100644 index 000000000..d979eaa7a --- /dev/null +++ b/js/vendor/angular-draganddrop/package.json @@ -0,0 +1,21 @@ +{ + "name": "angular-drag-and-drop-lists", + "main": "angular-drag-and-drop-lists.js", + "version": "2.1.0", + "description": "Angular directives for sorting nested lists using the HTML5 Drag and Drop API", + "repository": "https://github.com/marceljuenemann/angular-drag-and-drop-lists", + "license": "MIT", + "main": "angular-drag-and-drop-lists.js", + "devDependencies": { + "angular": "~1.4.9", + "angular-mocks": "~1.4.9", + "http-server": "~0.6.1", + "minifier": "~0.7.1", + "jasmine-core": "~2.4.1", + "jquery": "~2.2.0" + }, + "scripts": { + "minify": "minify angular-drag-and-drop-lists.js", + "start": "http-server -p 8000" + } +} diff --git a/js/vendor/angular-draganddrop/test/dndDraggableSpec.js b/js/vendor/angular-draganddrop/test/dndDraggableSpec.js new file mode 100644 index 000000000..bcc5ba60e --- /dev/null +++ b/js/vendor/angular-draganddrop/test/dndDraggableSpec.js @@ -0,0 +1,173 @@ +describe('dndDraggable', function() { + + var SIMPLE_HTML = '
    '; + + describe('constructor', function() { + it('sets the draggable attribute', function() { + var element = compileAndLink(SIMPLE_HTML); + expect(element.attr('draggable')).toBe('true'); + }); + + it('watches and handles the dnd-disabled-if expression', function() { + var element = compileAndLink('
    '); + expect(element.attr('draggable')).toBe('true'); + + element.scope().disabled = true; + element.scope().$digest(); + expect(element.attr('draggable')).toBe('false'); + + element.scope().disabled = false; + element.scope().$digest(); + expect(element.attr('draggable')).toBe('true'); + }); + }); + + describe('dragstart handler', function() { + var element; + + beforeEach(function() { + element = compileAndLink(SIMPLE_HTML); + }); + + it('calls setData with serialized data', function() { + expect(Dragstart.on(element).data).toEqual({'application/x-dnd': '{"hello":"world"}'}); + }); + + it('includes the dnd-type in the mime type', function() { + element = compileAndLink('
    '); + expect(Dragstart.on(element).data).toEqual({'application/x-dnd-foo': '{}'}); + }); + + it('converts the dnd-type to lower case', function() { + element = compileAndLink('
    '); + expect(Dragstart.on(element).data).toEqual({'application/x-dnd-foo': '{}'}); + }); + + it('uses application/json mime type if custom types are not allowed', function() { + element = compileAndLink('
    '); + var dragstart = Dragstart.on(element, {allowedMimeTypes: ['Text', 'application/json']}); + expect(dragstart.data).toEqual({'application/json': '{"item":[1]}'}); + }); + + it('uses Text mime type in Internet Explorer', function() { + element = compileAndLink('
    '); + var dragstart = Dragstart.on(element, {allowedMimeTypes: ['URL', 'Text']}); + expect(dragstart.data).toEqual({ + 'Text': '{"item":{},"type":"foo"}' + }); + }); + + it('stops propagation', function() { + expect(Dragstart.on(element).propagationStopped).toBe(true); + }); + + it('sets effectAllowed to move by default', function() { + expect(Dragstart.on(element).effectAllowed).toBe('move'); + }); + + it('sets effectAllowed from dnd-effect-allowed', function() { + element = compileAndLink('
    '); + expect(Dragstart.on(element).effectAllowed).toBe('copyMove'); + }); + + it('sets effectAllowed to single effect in IE', function() { + element = compileAndLink('
    '); + expect(Dragstart.on(element, {allowedMimeTypes: ['Text']}).effectAllowed).toBe('copy'); + }); + + it('adds CSS classes to element', inject(function($timeout) { + Dragstart.on(element); + expect(element.hasClass('dndDragging')).toBe(true); + expect(element.hasClass('dndDraggingSource')).toBe(false); + + $timeout.flush(0); + expect(element.hasClass('dndDraggingSource')).toBe(true); + })); + + it('invokes dnd-dragstart callback', function() { + element = compileAndLink('
    '); + Dragstart.on(element); + expect(element.scope().ev).toEqual(jasmine.any(DragEventMock)); + }); + + it('does not start dragging if dnd-disable-if is true', function() { + element = compileAndLink('
    '); + var dragstart = Dragstart.on(element); + expect(dragstart.returnValue).toBe(true); + expect(dragstart.defaultPrevented).toBe(false); + expect(dragstart.propagationStopped).toBe(false); + }); + + it('sets the dragImage if event was triggered on a dnd-handle', function() { + var dragstart = Dragstart.on(element, {allowSetDragImage: true, dndHandle: true}); + expect(dragstart.dragImage).toBe(element[0]); + }); + }); + + describe('dragend handler', function() { + var element, dragstart; + + beforeEach(function() { + element = compileAndLink(SIMPLE_HTML); + dragstart = Dragstart.on(element); + }); + + it('stops propagation', function() { + expect(dragstart.dragend(element).propagationStopped).toBe(true); + }); + + it('removes CSS classes from element', inject(function($timeout) { + $timeout.flush(0); + expect(element.hasClass('dndDragging')).toBe(true); + expect(element.hasClass('dndDraggingSource')).toBe(true); + + dragstart.dragend(element); + expect(element.hasClass('dndDragging')).toBe(false); + expect(element.hasClass('dndDraggingSource')).toBe(false); + })); + + it('removes dndDraggingSource after a timeout', inject(function($timeout) { + // IE 9 might not flush the $timeout before invoking the dragend handler. + expect(element.hasClass('dndDragging')).toBe(true); + expect(element.hasClass('dndDraggingSource')).toBe(false); + + dragstart.dragend(element); + expect(element.hasClass('dndDragging')).toBe(false); + expect(element.hasClass('dndDraggingSource')).toBe(false); + + $timeout.flush(0); + expect(element.hasClass('dndDragging')).toBe(false); + expect(element.hasClass('dndDraggingSource')).toBe(false); + })); + + var dropEffects = {move: 'moved', copy: 'copied', link: 'linked', none: 'canceled'}; + angular.forEach(dropEffects, function(callback, dropEffect) { + it('calls callbacks for dropEffect ' + dropEffect, function() { + var html = '
    '; + var element = compileAndLink(html); + var target = compileAndLink('
    '); + Dragstart.on(element).dragover(target).drop(target).dragend(element); + + expect(element.scope().returnedEvent).toEqual(jasmine.any(DragEventMock)); + expect(element.scope().returnedDropEffect).toBe(dropEffect); + }); + }); + }); + + describe('click handler', function() { + it('does nothing if dnd-selected is not set', function() { + var element = compileAndLink(SIMPLE_HTML); + var click = new DragEventResult(element, 'click', new DataTransferMock(), {}); + expect(click.propagationStopped).toBe(false); + }); + + it('invokes dnd-selected callback and stops propagation', function() { + var element = compileAndLink('
    '); + var click = new DragEventResult(element, 'click', new DataTransferMock(), {}); + expect(click.propagationStopped).toBe(true); + expect(element.scope().selected).toBe(true); + }); + }); +}); diff --git a/js/vendor/angular-draganddrop/test/dndListSpec.js b/js/vendor/angular-draganddrop/test/dndListSpec.js new file mode 100644 index 000000000..b77a31ce1 --- /dev/null +++ b/js/vendor/angular-draganddrop/test/dndListSpec.js @@ -0,0 +1,576 @@ +describe('dndList', function() { + + it('hides the placeholder element', function() { + var element = compileAndLink(''); + expect(element.children().length).toBe(0); + }); + + it('disallows dropping if dnd-disable-if is true', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + element.scope().disabled = true; + forAllHandlers(Dragstart.on(source).dragenter(element), element, verifyDropCancelled); + }); + + it('allows drop if dnd-disable-if is false', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + forAllHandlers(Dragstart.on(source).dragenter(element), element, verifyDropAccepted); + }); + + it('disallows dropping from external sources', function() { + var element = compileAndLink('
    '); + var dragenter = Dragenter.validExternalOn(element); + forAllHandlers(dragenter, element, verifyDropCancelled); + }); + + it('allows dropping from external sources if dnd-external-sources is set', function() { + var element = compileAndLink('
    '); + var dragenter = Dragenter.validExternalOn(element); + forAllHandlers(dragenter, element, verifyDropAccepted); + }); + + it('disallows drop without valid mime types', function() { + var element = compileAndLink('
    '); + var dragenter = Dragenter.externalOn(element, {'text/plain': '{}'}); + forAllHandlers(dragenter, element, verifyDropCancelled); + }); + + // Old Internet Explorer versions don't have dataTransfer.types. + it('allows drop if dataTransfer.types is undefined', function() { + var element = compileAndLink('
    '); + var data = angular.toJson({item: {}, type: 'mytype'}); + var dragenter = Dragenter.externalOn(element, {'Text': data}, {undefinedTypes: true}); + forAllHandlers(dragenter, element, verifyDropAccepted); + }); + + it('allows drop if dataTransfer.types contains "Text"', function() { + var element = compileAndLink('
    '); + var data = angular.toJson({item: {}, type: 'mytype'}); + var dragenter = Dragenter.externalOn(element, {'Text': data}); + forAllHandlers(dragenter, element, verifyDropAccepted); + }); + + it('allows drop if dataTransfer.types contains "application/json"', function() { + var element = compileAndLink('
    '); + var data = angular.toJson({item: {}, type: 'mytype'}); + var dragenter = Dragenter.externalOn(element, {'x-pdf': '{}', 'application/json': data}); + forAllHandlers(dragenter, element, verifyDropAccepted); + }); + + it('disallows dropping untyped elements if dnd-allowed-types is set', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + forAllHandlers(Dragstart.on(source).dragenter(element), element, verifyDropCancelled); + }); + + it('allows dropping typed elements if dnd-allowed-types is not set', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + forAllHandlers(Dragstart.on(source).dragenter(element), element, verifyDropAccepted); + }); + + it('disallows dropping elements of the wrong type', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + forAllHandlers(Dragstart.on(source).dragenter(element), element, verifyDropCancelled); + }); + + it('allows dropping elements of the correct type', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + forAllHandlers(Dragstart.on(source).dragenter(element), element, verifyDropAccepted); + }); + + it('disallows dropping elements of the wrong type (test for Edge)', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + var dragstart = Dragstart.on(source, {allowedMimeTypes: ['text/plain', 'application/json']}); + forAllHandlers(dragstart.dragenter(element), element, verifyDropCancelled); + }); + + it('allows dropping elements of the correct type (test for Edge)', function() { + var source = compileAndLink('
    '); + var element = compileAndLink('
    '); + var dragstart = Dragstart.on(source, {allowedMimeTypes: ['text/plain', 'application/json']}); + forAllHandlers(dragstart.dragenter(element), element, verifyDropAccepted); + }); + + it('allows dropping external elements if correct type is encoded inside', function() { + var element = compileAndLink('
    '); + var data = angular.toJson({item: {}, type: 'mytype'}); + var dragenter = Dragenter.externalOn(element, {'application/json': data}); + forAllHandlers(dragenter, element, verifyDropAccepted); + }); + + describe('dragover handler', function() { + var source, element; + + beforeEach(function() { + source = compileAndLink('
    '); + element = compileAndLink('
    '); + element.scope().list = []; + }); + + it('adds dndDragover CSS class', function() { + Dragstart.on(source).dragover(element); + expect(element.hasClass('dndDragover')).toBe(true); + }); + + it('adds placeholder element', function() { + Dragstart.on(source).dragover(element); + expect(element.children().length).toBe(1); + expect(element.children()[0].tagName).toBe('LI'); + }); + + it('reuses custom placeholder element if it exists', function() { + element = compileAndLink(''); + Dragstart.on(source).dragover(element); + expect(element.children().length).toBe(1); + expect(element.children()[0].tagName).toBe('IMG'); + }); + + it('invokes dnd-dragover callback', function() { + element = createListWithItemsAndCallbacks(); + Dragstart.on(source).dragover(element); + expect(element.scope().dragover.event).toEqual(jasmine.any(DragEventMock)); + expect(element.scope().dragover.index).toBe(3); + expect(element.scope().dragover.external).toBe(false); + expect(element.scope().dragover.type).toBeUndefined(); + expect(element.scope().dragover.item).toBeUndefined(); + }); + + it('invokes dnd-dragover with correct type', function() { + source = compileAndLink('
    '); + element = createListWithItemsAndCallbacks(); + Dragstart.on(source).dragover(element); + expect(element.scope().dragover.type).toBe('mytype'); + expect(element.scope().dragover.external).toBe(false); + }); + + it('invokes dnd-dragover with correct type (test for IE)', function() { + source = compileAndLink('
    '); + element = createListWithItemsAndCallbacks(); + Dragstart.on(source, {allowedMimeTypes: ['Text']}).dragover(element); + expect(element.scope().dragover.type).toBe('mytype'); + expect(element.scope().dragover.external).toBe(false); + }); + + it('invokes dnd-dragover with correct type for external drops', function() { + element = createListWithItemsAndCallbacks(); + Dragenter.externalOn(element, {'application/x-dnd-mytype': {}}).dragover(element); + expect(element.scope().dragover.type).toBe('mytype'); + expect(element.scope().dragover.external).toBe(true); + }); + + it('invokes dnd-dragover with null type for external drops from IE', function() { + element = createListWithItemsAndCallbacks(); + Dragenter.externalOn(element, {'Text': 'unaccessible'}).dragover(element); + expect(element.scope().dragover.type).toBeNull(); + expect(element.scope().dragover.external).toBe(true); + }); + + it('invokes dnd-dragover with undefined callback', function() { + element = createListWithItemsAndCallbacks(); + Dragstart.on(source).dragover(element); + expect(element.scope().dragover.callback).toBeUndefined(); + }); + + it('invokes dnd-dragover with callback set on dragstart', function() { + source = compileAndLink('
    '); + source.scope().a = 2; + element = compileAndLink('
      '); + Dragstart.on(source).dragover(element); + expect(element.scope().result).toBe(6) + }); + + it('dnd-dragover callback can cancel the drop', function() { + element = compileAndLink('
      '); + verifyDropCancelled(Dragstart.on(source).dragover(element), element); + }); + + it('allows all external drops with Text mime type', function() { + element = compileAndLink('
      '); + var dragenter = Dragenter.externalOn(element, {'Text': 'unaccessible'}); + verifyDropAccepted(dragenter.dragover(element), element); + }); + + describe('placeholder positioning (vertical)', positioningTests(false, false)); + describe('placeholder positioning (horizontal)', positioningTests(true, false)); + + function positioningTests(horizontal) { + return function() { + var clientYField = 'client' + (horizontal ? 'X' : 'Y'); + var heightField = horizontal ? 'width' : 'height'; + var topField = horizontal ? 'left' : 'top'; + + beforeEach(function() { + element = createListWithItemsAndCallbacks(horizontal); + angular.element(document.body).append(element); + if (horizontal) { + element.children().css('float','left'); + } + }); + + afterEach(function() { + element.remove(); + }); + + it('adds actual placeholder element', function() { + var options = {target: element.children()[0]}; + options[clientYField] = 1; + Dragstart.on(source).dragover(element, options); + expect(element.scope().dragover.index).toBe(0); + expect(angular.element(element.children()[0]).hasClass('dndPlaceholder')).toBe(true); + }); + + it('inserts before element if mouse is in first half', function() { + var options = {target: element.children()[1]}; + var rect = options.target.getBoundingClientRect(); + options[clientYField] = rect[topField] + rect[heightField] / 2 - 1; + Dragstart.on(source).dragover(element, options); + expect(element.scope().dragover.index).toBe(1); + }); + + it('inserts after element if mouse is in second half', function() { + var options = {target: element.children()[1]}; + var rect = options.target.getBoundingClientRect(); + options[clientYField] = rect[topField] + rect[heightField] / 2 + 1; + Dragstart.on(source).dragover(element, options); + expect(element.scope().dragover.index).toBe(2); + }); + }; + } + }); + + describe('drop handler', function() { + var source, element; + + beforeEach(function() { + source = compileAndLink('
      '); + element = createListWithItemsAndCallbacks(); + }); + + it('inserts into the list and removes dndDragover class', function() { + var dragover = Dragstart.on(source).dragover(element, {target: element.children()[0]}); + expect(element.hasClass("dndDragover")).toBe(true); + dragover.drop(element); + expect(element.scope().list).toEqual([1, {example: 'data'}, 2, 3]); + expect(element.hasClass("dndDragover")).toBe(false); + expect(element.children().length).toBe(3); + }); + + it('inserts in correct position', function() { + Dragstart.on(source).dragover(element, {target: element.children()[1]}).drop(element); + expect(element.scope().list).toEqual([1, 2, {example: 'data'}, 3]); + expect(element.scope().inserted.index).toBe(2); + }); + + it('invokes the dnd-inserted callback', function() { + Dragstart.on(source).dragover(element).drop(element); + expect(element.scope().inserted.event).toEqual(jasmine.any(DragEventMock)); + expect(element.scope().inserted.index).toBe(3); + expect(element.scope().inserted.external).toBe(false); + expect(element.scope().inserted.type).toBeUndefined(); + expect(element.scope().inserted.item).toBe(element.scope().list[3]); + }); + + it('dnd-drop can transform the object', function() { + var testObject = {transformed: true}; + element.scope().dropHandler = function(params) { + expect(params.event).toEqual(jasmine.any(DragEventMock)); + expect(params.index).toBe(3); + expect(params.external).toBe(false); + expect(params.type).toBeUndefined(); + expect(params.item).toEqual({example: 'data'}); + return testObject; + }; + Dragstart.on(source).dragover(element).drop(element); + expect(element.scope().list[3]).toBe(testObject); + }); + + it('dnd-drop can cancel the drop', function() { + element.scope().dropHandler = function() { return false; }; + var drop = Dragstart.on(source).dragover(element).drop(element); + expect(element.scope().list).toEqual([1, 2, 3]); + expect(element.scope().inserted).toBeUndefined(); + verifyDropCancelled(drop, element, true, 3); + }); + + it('dnd-drop can take care of inserting the element', function() { + element.scope().dropHandler = function() { return true; }; + verifyDropAccepted(Dragstart.on(source).dragover(element).drop(element), element); + expect(element.scope().list).toEqual([1, 2, 3]); + }); + + it('invokes dnd-drop with undefined callback', function() { + element = createListWithItemsAndCallbacks(); + Dragstart.on(source).dragover(element).drop(element); + expect(element.scope().drop.callback).toBeUndefined(); + }); + + it('invokes dnd-drop with callback set on dragstart', function() { + source = compileAndLink('
      '); + source.scope().a = 2; + element = compileAndLink('
        '); + element.scope().list = []; + Dragstart.on(source).dragover(element).drop(element); + expect(element.scope().list).toEqual([6]) + }); + + it('invokes callbacks with correct type', function() { + source = compileAndLink('
        '); + Dragstart.on(source).dragover(element).drop(element); + expect(element.scope().drop.type).toBe('mytype'); + expect(element.scope().drop.external).toBe(false); + expect(element.scope().inserted.type).toBe('mytype'); + expect(element.scope().inserted.external).toBe(false); + }); + + it('invokes callbacks with correct type for Edge', function() { + source = compileAndLink('
        '); + Dragstart.on(source, {allowedMimeTypes: ['application/json']}).dragover(element).drop(element); + expect(element.scope().drop.type).toBe('mytype'); + expect(element.scope().drop.external).toBe(false); + expect(element.scope().inserted.type).toBe('mytype'); + expect(element.scope().inserted.external).toBe(false); + }); + + it('invokes callbacks with correct type for external elements', function() { + var dragenter = Dragenter.externalOn(element, {'application/x-dnd-mytype': '{}'}); + verifyDropAccepted(dragenter.dragover(element).drop(element), element); + expect(element.scope().drop.type).toBe('mytype'); + expect(element.scope().drop.external).toBe(true); + expect(element.scope().inserted.type).toBe('mytype'); + expect(element.scope().inserted.external).toBe(true); + }); + + it('invokes callbacks with correct type for external elements (test for Edge)', function() { + var data = angular.toJson({item: [1, 2, 3], type: 'mytype'}); + var dragenter = Dragenter.externalOn(element, {'application/json': data}); + verifyDropAccepted(dragenter.dragover(element).drop(element), element); + expect(element.scope().drop.type).toBe('mytype'); + expect(element.scope().drop.external).toBe(true); + expect(element.scope().inserted.type).toBe('mytype'); + expect(element.scope().inserted.external).toBe(true); + expect(element.scope().inserted.item).toEqual([1, 2, 3]); + }); + + it('disallows drops with wrong type encoded inside (test for Edge)', function() { + element = compileAndLink('
        '); + var data = angular.toJson({item: [], type: 'othertype'}); + var dragenter = Dragenter.externalOn(element, {'application/json': data}); + verifyDropCancelled(dragenter.dragover(element).drop(element), element, true); + }); + + it('cancels drop when JSON is invalid', function() { + var dragenter = Dragenter.externalOn(element, {'application/x-dnd': 'Lorem ipsum'}); + verifyDropCancelled(dragenter.dragover(element).drop(element), element, true, 3); + }); + }); + + describe('dragleave handler', function() { + var element, dragover; + + beforeEach(function() { + element = createListWithItemsAndCallbacks(); + angular.element(document.body).append(element); + + dragover = Dragstart.on(compileAndLink('
        ')).dragover(element); + expect(element.hasClass('dndDragover')).toBe(true); + expect(element.children().length).toBe(4); + }); + + afterEach(function() { + element.remove(); + }); + + it('removes the placeholder and dndDragover class', function() { + var rect = element[0].getBoundingClientRect(); + dragover.dragleave(element, {clientX: rect.left - 2, clientY: rect.top - 2}); + expect(element.hasClass('dndDragover')).toBe(false); + expect(element.children().length).toBe(3); + }); + + it('removes the placeholder and dndDragover if child placeholder is already set', function() { + var rect = element[0].getBoundingClientRect(); + dragover.dragleave(element, {clientX: rect.left + 2, clientY: rect.top + 2, phShown: true}); + expect(element.hasClass('dndDragover')).toBe(false); + expect(element.children().length).toBe(3); + }); + + it('sets _dndPhShown if mouse is still inside', function() { + var rect = element[0].getBoundingClientRect(); + var result = dragover.dragleave(element, {clientX: rect.left + 2, clientY: rect.top + 2}); + expect(element.hasClass('dndDragover')).toBe(true); + expect(element.children().length).toBe(4); + expect(result.dndPhShownSet).toBe(true); + }); + }); + + describe('dropEffect', function() { + // This matrix shows the expected drop effect, given two effectAllowed values. + var ALL = [ 'all', 'move', 'copy', 'link', 'copyLink', 'copyMove', 'linkMove']; + var EXPECTED_MATRIX = { + move: ['move', 'move', 'none', 'none', 'none', 'move', 'move'], + copy: ['copy', 'none', 'copy', 'none', 'copy', 'copy', 'none'], + link: ['link', 'none', 'none', 'link', 'link', 'none', 'link'], + copyLink: ['copy', 'none', 'copy', 'link', 'copy', 'copy', 'link'], + copyMove: ['move', 'move', 'copy', 'none', 'copy', 'move', 'move'], + linkMove: ['move', 'move', 'none', 'link', 'link', 'move', 'move'], + all: ['move', 'move', 'copy', 'link', 'copy', 'move', 'move'], + '': ['move', 'move', 'copy', 'link', 'copy', 'move', 'move'], + }; + angular.forEach(ALL, function(sourceEffectAllowed, index) { + angular.forEach(EXPECTED_MATRIX, function(expected, targetEffectAllowed) { + expected = expected[index]; + it('is ' + expected + ' for effect-allowed ' + sourceEffectAllowed + + ' and ' + targetEffectAllowed, function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(false, targetEffectAllowed); + expect(Dragstart.on(src).effectAllowed).toBe(sourceEffectAllowed); + if (expected != 'none') { + // Verify dragover. + expect(Dragstart.on(src).dragover(target).dropEffect).toBe(expected); + expect(target.scope().dragover.dropEffect).toBe(expected); + // Verify drop. + expect(Dragstart.on(src).dragover(target).drop(target).dropEffect).toBe(expected); + expect(target.scope().drop.dropEffect).toBe(expected); + // Verify dragend. + Dragstart.on(src).dragover(target).drop(target).dragend(src); + expect(src.scope().result).toBe(expected); + } else { + verifyDropCancelled(Dragstart.on(src).dragover(target), target, false, 3); + verifyDropCancelled(Dragstart.on(src).dragover(target).drop(target), target, true, 3); + Dragstart.on(src).dragend(src); + expect(src.scope().result).toBe('none'); + } + }); + }); + }); + + // In Safari dataTransfer.effectAllowed is always 'all', ignoring the value set in dragstart. + it('is determined from internal state in Safari', function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(false, 'copyLink'); + var options = {effectAllowed: 'all'}; + Dragstart.on(src).dragover(target, options).drop(target, options); + expect(target.scope().dragover.dropEffect).toBe('link'); + expect(target.scope().drop.dropEffect).toBe('link'); + }); + + // On MacOS, modifiers automatically limit the effectAllowed passed to dragover and drop. + it('is limited by modifier keys on MacOS', function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(); + Dragstart.on(src).dragover(target, {effectAllowed: 'copyLink'}).drop(target); + expect(target.scope().dragover.dropEffect).toBe('copy'); + expect(target.scope().drop.dropEffect).toBe('copy'); + }); + + it('is copy if Ctrl key is pressed', function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(); + Dragstart.on(src).dragover(target, {ctrlKey: true}).drop(target); + expect(target.scope().dragover.dropEffect).toBe('copy'); + expect(target.scope().drop.dropEffect).toBe('copy'); + }); + + it('is link if Alt key is pressed', function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(); + Dragstart.on(src).dragover(target, {altKey: true}).drop(target); + expect(target.scope().dragover.dropEffect).toBe('link'); + expect(target.scope().drop.dropEffect).toBe('link'); + }); + + it('ignores Ctrl key if copy is not possible', function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(); + Dragstart.on(src).dragover(target, {ctrlKey: true}).drop(target); + expect(target.scope().dragover.dropEffect).toBe('move'); + expect(target.scope().drop.dropEffect).toBe('move'); + }); + + it('respects effectAllowed from external drops', function() { + var target = createListWithItemsAndCallbacks(); + Dragenter.validExternalOn(target, {effectAllowed: 'copyLink'}).dragover(target).drop(target); + expect(target.scope().dragover.dropEffect).toBe('copy'); + expect(target.scope().drop.dropEffect).toBe('copy'); + }); + + it('respects effectAllowed from external drops in IE', function() { + var target = createListWithItemsAndCallbacks(); + Dragenter.externalOn(target, {'Text': '{}'}, {effectAllowed: 'copyLink'}) + .dragover(target).drop(target); + expect(target.scope().dragover.dropEffect).toBe('move'); + expect(target.scope().drop.dropEffect).toBe('move'); + }); + + it('ignores effectAllowed from internal drops in IE', function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(); + Dragstart.on(src, {allowedMimeTypes: ['Text']}).dragover(target, {altKey: true}); + expect(target.scope().dragover.dropEffect).toBe('link'); + }); + + it('does not set dropEffect in IE', function() { + var src = compileAndLink('
        '); + var target = createListWithItemsAndCallbacks(); + var dragover = Dragstart.on(src, {allowedMimeTypes: ['Text']}).dragover(target); + expect(dragover.dropEffect).toBeUndefined(); + }); + }); + + function verifyDropAccepted(result) { + expect(result.defaultPrevented).toBe(true); + if (result.type == 'dragenter') { + expect(result.returnValue).toBeUndefined(); + expect(result.propagationStopped).toBe(false); + } else { + expect(result.returnValue).toBe(false); + expect(result.propagationStopped).toBe(true); + } + } + + function verifyDropCancelled(result, element, opt_defaultPrevented, opt_children) { + expect(result.returnValue).toBe(true); + expect(result.propagationStopped).toBe(false); + expect(result.defaultPrevented).toBe(opt_defaultPrevented || false); + expect(result.dropEffect).toBeUndefined(); + expect(element.hasClass("dndDragover")).toBe(false); + expect(element.children().length).toBe(opt_children || 0); + } + + function forAllHandlers(dragenter, element, verify) { + verify(dragenter, element); + var dragover = dragenter.dragover(element); + verify(dragover, element); + var dragover2 = dragover.dragover(element); + verify(dragover2, element); + var drop = dragover2.drop(element); + verify(drop, element); + } + + function createListWithItemsAndCallbacks(horizontal, effectAllowed) { + var params = '{event: event, dropEffect: dropEffect, index: index, ' + + 'item: item, external: external, type: type, callback: callback}'; + var element = compileAndLink('
          ' + + '
        • A
        • B
        • C
        '); + element.scope().dropHandler = function(params) { + element.scope().drop = params; + return params.item; + }; + element.scope().list = [1, 2, 3]; + return element; + } +}); diff --git a/js/vendor/angular-draganddrop/test/dndNodragSpec.js b/js/vendor/angular-draganddrop/test/dndNodragSpec.js new file mode 100644 index 000000000..5804118d2 --- /dev/null +++ b/js/vendor/angular-draganddrop/test/dndNodragSpec.js @@ -0,0 +1,41 @@ +describe('dndNodrag', function() { + var element; + + beforeEach(function() { + element = compileAndLink('
        '); + }); + + it('sets the draggable attribute', function() { + expect(element.attr('draggable')).toBe('true'); + }); + + it('stops propagation and prevents default for dragstart events', function() { + var dragstart = Dragstart.on(element); + expect(dragstart.propagationStopped).toBe(true); + expect(dragstart.defaultPrevented).toBe(true); + }); + + it('does not call preventDefault if dataTransfer is already set', function() { + var dragstart = Dragstart.on(element, {presetTypes: ['text/plain']}); + expect(dragstart.propagationStopped).toBe(true); + expect(dragstart.defaultPrevented).toBe(false); + }); + + it('does nothing in dragstart if the event was triggered on a dnd-handle', function() { + var dragstart = Dragstart.on(element, {dndHandle: true}); + expect(dragstart.propagationStopped).toBe(false); + expect(dragstart.defaultPrevented).toBe(false); + }); + + it('stops propagation of dragend events', function() { + var dragend = Dragend.on(element); + expect(dragend.propagationStopped).toBe(true); + expect(dragend.defaultPrevented).toBe(false); + }); + + it('does nothing in dragend if the event was triggered on a dnd-handle', function() { + var dragend = Dragend.on(element, {dndHandle: true}); + expect(dragend.propagationStopped).toBe(false); + expect(dragend.defaultPrevented).toBe(false); + }); +}); diff --git a/js/vendor/angular-draganddrop/test/index.html b/js/vendor/angular-draganddrop/test/index.html new file mode 100644 index 000000000..d04476b96 --- /dev/null +++ b/js/vendor/angular-draganddrop/test/index.html @@ -0,0 +1,30 @@ + + + + + Testing angular-drag-and-drop-lists... + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/js/vendor/angular-draganddrop/test/init.js b/js/vendor/angular-draganddrop/test/init.js new file mode 100644 index 000000000..244b70098 --- /dev/null +++ b/js/vendor/angular-draganddrop/test/init.js @@ -0,0 +1,21 @@ +var $compile, + $rootScope; + +beforeEach(module('dndLists')); + +beforeEach(inject(function(_$compile_, _$rootScope_){ + $compile = _$compile_; + $rootScope = _$rootScope_; +})); + +afterEach(function() { + // Reset internal dndState in case dragend was not called. + Dragend.on(compileAndLink('
        ')); +}); + +function compileAndLink(html) { + var scope = $rootScope.$new(); + var element = $compile(html)(scope); + scope.$digest(); + return element; +} diff --git a/js/vendor/angular-draganddrop/test/mocks.js b/js/vendor/angular-draganddrop/test/mocks.js new file mode 100644 index 000000000..43ed307d6 --- /dev/null +++ b/js/vendor/angular-draganddrop/test/mocks.js @@ -0,0 +1,199 @@ +"use strict"; + +class DataTransferMock { + constructor() { this.$results = {}; } + get dropEffect() { throw "Unexcepted dropEffect getter invocation"; } + set dropEffect(value) { throw "Unexcepted dropEffect setter invocation"; } + get effectAllowed() { throw "Unexcepted effectAllowed getter invocation"; } + set effectAllowed(value) { throw "Unexcepted effectAllowed setter invocation"; } + get types() { throw "Unexcepted types getter invocation"; } + set types(value) { throw "Unexcepted types setter invocation"; } + getData() { throw "Unexcepted getData invocation"; } + setData() { throw "Unexcepted setData invocation"; } + setDragImage() { throw "Unexcepted setDragImage invocation"; } + getResults() { return this.$results; } +} + +class DragstartDataTransfer extends DataTransferMock { + constructor(options) { + super(); + this.$allowSetDragImage = options.allowSetDragImage || false; + this.$allowedMimeTypes = options.allowedMimeTypes || null; + this.$presetTypes = options.presetTypes || []; + this.$results.data = {}; + } + + get effectAllowed() { throw "Unexcepted effectAllowed getter invocation"; } + set effectAllowed(value) { this.$results.effectAllowed = value; } + get types() { return this.$presetTypes; } + set types(value) { throw "Unexcepted types setter invocation"; } + + setData(format, data) { + if (this.$allowedMimeTypes && !this.$allowedMimeTypes.includes(format)) { + throw "Invalid mime type " + format; + } + this.$results.data[format] = data; + } + + setDragImage(img) { + if (!this.$allowSetDragImage) throw "Unexcepted setDragImage invocation"; + this.$results.dragImage = img; + } +} + +class DropzoneDataTransfer extends DataTransferMock { + constructor(data, options) { + super(); + this.$data = data; + this.$dropEffect = options.dropEffect || 'move'; + this.$effectAllowed = options.effectAllowed || 'move'; + this.$types = options.undefinedTypes ? undefined : Object.keys(data); + } + + get dropEffect() { throw "Unexcepted dropEffect getter invocation"; } + set dropEffect(value) { this.$results.dropEffect = value; } + get effectAllowed() { return this.$effectAllowed; } + set effectAllowed(value) { throw "Unexcepted effectAllowed setter invocation"; } + get types() { return this.$types; } + set types(value) { throw "Unexcepted types setter invocation"; } +} + +class DropDataTransfer extends DropzoneDataTransfer { + getData(format) { return this.$data[format]; } +} + +class DragEventMock { + constructor(type, dataTransfer, options) { + this.$type = type; + this.$dataTransfer = dataTransfer; + this.$options = options; + this.$results = {dataTransfer: dataTransfer.getResults()}; + } + + get clientX() { return this.$options.clientX || 0; } + get clientY() { return this.$options.clientY || 0; } + get ctrlKey() { return this.$options.ctrlKey || false; } + get altKey() { return this.$options.altKey || false; } + get dataTransfer() { return this.$dataTransfer; } + get originalEvent() { return this; } + get target() { return this.$options.target || undefined; } + get type() { return this.$type; } + get _dndHandle() { return this.$options.dndHandle || undefined; } + get _dndPhShown() { return this.$options.phShown || undefined; } + set _dndPhShown(value) { this.$results.setDndPhShown = value; } + + preventDefault() { this.$results.invokedPreventDefault = true; } + stopPropagation() { this.$results.invokedStopPropagation = true; } + getResults() { return this.$results; } +} + +class DragEventResult { + constructor(element, type, dataTransfer, opt_eventOptions) { + let handler = $._data($(element).get(0), "events")[type][0].handler; + let event = new DragEventMock(type, dataTransfer, opt_eventOptions || {}); + this.$results = event.getResults(); + this.$results.returnValue = handler(event); + this.$type = type; + } + + get propagationStopped() { return !!this.$results.invokedStopPropagation; } + get defaultPrevented() { return !!this.$results.invokedPreventDefault; } + get dndPhShownSet() { return this.$results.setDndPhShown || false; } + get returnValue() { return this.$results.returnValue; } + get dropEffect() { return this.$results.dataTransfer.dropEffect; } + get type() { return this.$type; } +} + +class Dragstart extends DragEventResult { + constructor(element, options) { + super(element, 'dragstart', new DragstartDataTransfer(options), options); + } + + get data() { return this.$results.dataTransfer.data; } + get dragImage() { return this.$results.dataTransfer.dragImage; } + get effectAllowed() { return this.$results.dataTransfer.effectAllowed; } + + dragenter(element, opt_options) { + var options = $.extend({effectAllowed: this.effectAllowed}, opt_options); + return new Dragenter(element, this.$results.dataTransfer.data, options); + } + + dragover(element, opt_options) { + return this.dragenter(element, opt_options).dragover(element); + } + + dragend(element) { + return Dragend.on(element); + } + + static on(element, opt_options) { + return new Dragstart(element, opt_options || {}); + } +} + +class Dragend extends DragEventResult { + constructor(element, options) { + super(element, 'dragend', new DataTransferMock(), options); + } + + static on(element, opt_options) { + return new Dragend(element, opt_options || {}); + } +} + +class DropzoneEventResult extends DragEventResult { + constructor(element, type, data, dataTransfer, options) { + options.target = options.target || element[0]; + super(element, type, dataTransfer, options); + this.$originalData = $.extend({}, data); + this.$options = options; + } + + dragover(element, opt_options) { + return new Dragover(element, this.$originalData, $.extend({}, this.$options, opt_options)); + } +} + +class Dragenter extends DropzoneEventResult { + constructor(element, data, options) { + super(element, 'dragenter', data, new DropzoneDataTransfer(data, options), options); + } + + static externalOn(element, data, opt_options) { + return new Dragenter(element, data, opt_options || {}); + } + + static validExternalOn(element, opt_options) { + return Dragenter.externalOn(element, {'application/x-dnd': '{"hello":"world"}'}, opt_options); + } +} + +class Dragover extends DropzoneEventResult { + constructor(element, data, options) { + super(element, 'dragover', data, new DropzoneDataTransfer(data, options), options); + } + + dragleave(element, opt_options) { + return new Dragleave(element, this.$originalData, $.extend({}, this.$options, opt_options)); + } + + drop(element, opt_options) { + return new Drop(element, this.$originalData, $.extend({}, this.$options, opt_options)); + } +} + +class Dragleave extends DropzoneEventResult { + constructor(element, data, options) { + super(element, 'dragleave', data, new DataTransferMock(), options); + } +} + +class Drop extends DropzoneEventResult { + constructor(element, data, options) { + super(element, 'drop', data, new DropDataTransfer(data, options), options); + } + + dragend(element) { + return Dragend.on(element); + } +} diff --git a/js/vendor/angular-route/.bower.json b/js/vendor/angular-route/.bower.json deleted file mode 100644 index de54e2bbd..000000000 --- a/js/vendor/angular-route/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "angular-route", - "version": "1.5.5", - "license": "MIT", - "main": "./angular-route.js", - "ignore": [], - "dependencies": { - "angular": "1.5.5" - }, - "homepage": "https://github.com/angular/bower-angular-route", - "_release": "1.5.5", - "_resolution": { - "type": "version", - "tag": "v1.5.5", - "commit": "642a2dfc05f869f4a56733e182393536184ed4fa" - }, - "_source": "https://github.com/angular/bower-angular-route.git", - "_target": "1.5.5", - "_originalSource": "angular-route" -} \ No newline at end of file diff --git a/js/vendor/angular-sanitize/.bower.json b/js/vendor/angular-sanitize/.bower.json deleted file mode 100644 index ed612f218..000000000 --- a/js/vendor/angular-sanitize/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "angular-sanitize", - "version": "1.5.5", - "license": "MIT", - "main": "./angular-sanitize.js", - "ignore": [], - "dependencies": { - "angular": "1.5.5" - }, - "homepage": "https://github.com/angular/bower-angular-sanitize", - "_release": "1.5.5", - "_resolution": { - "type": "version", - "tag": "v1.5.5", - "commit": "84a69853f2a591b1b9d000984e6219924aaff016" - }, - "_source": "https://github.com/angular/bower-angular-sanitize.git", - "_target": "1.5.5", - "_originalSource": "angular-sanitize" -} \ No newline at end of file diff --git a/js/vendor/angular-ui-select/.bower.json b/js/vendor/angular-ui-select/.bower.json deleted file mode 100644 index ce85b5c1a..000000000 --- a/js/vendor/angular-ui-select/.bower.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "angular-ui-select", - "homepage": "https://github.com/angular-ui/ui-select", - "authors": [ - "AngularUI" - ], - "description": "AngularJS ui-select", - "main": [ - "dist/select.js", - "dist/select.css" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "src", - "test", - "gulpfile.js", - "karma.conf.js", - "examples" - ], - "dependencies": { - "angular": ">=1.2.18" - }, - "devDependencies": { - "jquery": "~1.11", - "angular-sanitize": ">=1.2.18", - "angular-mocks": ">=1.2.18" - }, - "version": "0.19.8", - "_release": "0.19.8", - "_resolution": { - "type": "version", - "tag": "v0.19.8", - "commit": "fc6502179847b41f864be042d432eec32e8530c4" - }, - "_source": "https://github.com/angular-ui/ui-select.git", - "_target": "v0.19.8", - "_originalSource": "https://github.com/angular-ui/ui-select.git" -} \ No newline at end of file diff --git a/js/vendor/angular-ui-select/docs/examples/demo-append-to-body.html b/js/vendor/angular-ui-select/docs/examples/demo-append-to-body.html new file mode 100644 index 000000000..d950265ea --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-append-to-body.html @@ -0,0 +1,56 @@ + + + + + +
        +

        Bootstrap theme

        +

        Selected: {{ctrl.address.selected.formatted_address}}

        + + {{$select.selected.formatted_address}} + +
        +
        +
        +

        The select dropdown menu should be displayed above this element.

        +
        + +
        +

        Select2 theme

        +

        Selected: {{ctrl.person.selected}}

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        +

        The select dropdown menu should be displayed above this element.

        +
        + +
        +

        Selectize theme

        +

        Selected: {{ctrl.country.selected}}

        + + {{$select.selected.name}} + + + + + +

        The select dropdown menu should be displayed above this element.

        +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-basic.html b/js/vendor/angular-ui-select/docs/examples/demo-basic.html new file mode 100644 index 000000000..ed1c86c88 --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-basic.html @@ -0,0 +1,42 @@ + + + + +

        Bootstrap theme (remote data source)

        +

        Selected: {{ctrl.address.selected.formatted_address}}

        + + {{$select.selected.formatted_address}} + +
        +
        +
        + +

        Select2 theme

        +

        Selected: {{ctrl.person.selected}}

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +

        Selectize theme

        +

        Selected: {{ctrl.country.selected}}

        + + {{$select.selected.name}} + + + + + diff --git a/js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property-async.html b/js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property-async.html new file mode 100644 index 000000000..385bc5d4e --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property-async.html @@ -0,0 +1,21 @@ + + + + +

        Select2 theme

        +

        Single property binding with async data

        + +

        Selected: {{ctrl.personAsync.selected | json }}

        +

        List Count: {{ (ctrl.peopleAsync || []).length }}

        + + + {{$select.selected.name || $select.selected}} + +
        + + email: {{person.email}} + age: + +
        +
        +

        Data will be populated in 3 secs

        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property.html b/js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property.html new file mode 100644 index 000000000..9ae4acea7 --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-bind-to-single-property.html @@ -0,0 +1,22 @@ + + + + +

        Select2 theme

        +

        Selected: {{ctrl.person.selected}}

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +
        +
        +
        + +

        Runs ctrl.person.selected = 'wladimir@email.com'

        \ No newline at end of file diff --git a/js/vendor/angular-ui-select/docs/examples/demo-bootstrap.html b/js/vendor/angular-ui-select/docs/examples/demo-bootstrap.html new file mode 100644 index 000000000..b5f93443c --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-bootstrap.html @@ -0,0 +1,76 @@ +

        Selected: {{ctrl.person.selected.name}}

        + +
        +
        + ui-select inside a Bootstrap form + +
        + +
        + + + {{$select.selected.name}} + +
        + +
        +
        + +
        +
        + +
        + +
        + + + {{$select.selected.name}} + + + + + + +
        +
        + +
        + +
        +
        + + + {{$select.selected.name}} + + + + + + + + + + +
        +
        +
        + +
        + +
        + + + {{$select.selected.name}} + +
        + +
        +
        + +
        +
        + +
        +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-disable-search.html b/js/vendor/angular-ui-select/docs/examples/demo-disable-search.html new file mode 100644 index 000000000..4e3aadcb9 --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-disable-search.html @@ -0,0 +1,71 @@ +

        + + + ctrl.disabled {{ctrl.disabled | json}} +

        +

        + + + ctrl.searchEnabled {{ ctrl.searchEnabled | json }} +

        +

        + +

        +

        Bootstrap theme

        +

        Selected: {{ctrl.person.selected}}

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        +
        +

        Number Selected: {{ctrl.multipleDemo.selectedPeople.length}}

        + + {{$item.name}} <{{$item.email}}> + +
        + + email: {{person.email}} + age: + +
        +
        + +

        Select2 theme

        +

        Selected: {{ctrl.person.selected}}

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        +
        +

        Number Selected: {{ctrl.multipleDemo.selectedPeople.length}}

        + + {{$item.name}} <{{$item.email}}> + +
        + + email: {{person.email}} + age: + +
        +
        +

        Selectize theme

        +

        Selected: {{ctrl.country.selected}}

        + + {{$select.selected.name}} + + + + + diff --git a/js/vendor/angular-ui-select/docs/examples/demo-dropdown-position.html b/js/vendor/angular-ui-select/docs/examples/demo-dropdown-position.html new file mode 100644 index 000000000..f03645b8d --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-dropdown-position.html @@ -0,0 +1,106 @@ +

        Dropdown Position

        + +
        +
        +
        + +
        default value can be changed at uiSelectConfig
        + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + + +

        Always UP

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + + +

        Always DOWN

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        + + +

        AUTO depending on available space (default)

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-event-on-selection.html b/js/vendor/angular-ui-select/docs/examples/demo-event-on-selection.html new file mode 100644 index 000000000..9981ff94d --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-event-on-selection.html @@ -0,0 +1,26 @@ + + + + +

        Event on Select

        +

        Selected: {{ctrl.person.selected}}

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +
        +

        Event Result

        +

        Called {{ctrl.counter+0}} times

        +

        Parameters

        +
        +$model = {{ ctrl.eventResult.model | json }}
        +$item = {{ ctrl.eventResult.item | json }}
        +
        + diff --git a/js/vendor/angular-ui-select/docs/examples/demo-focus.html b/js/vendor/angular-ui-select/docs/examples/demo-focus.html new file mode 100644 index 000000000..f899cdb0e --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-focus.html @@ -0,0 +1,47 @@ + + + + +

        Focus

        +

        Regular uiSelect

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +

        Autofocus

        +

        Use the autofocus attribute to automatically focus ui-select when the page is loaded

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +

        Focus on Demand

        +

        Use the focus-on attribute, defining a scope event name (UiSelectDemo1) to listen for, to manually trigger focussing of ui-select.

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        +

        +

        + + ($scope.$broadcast('UiSelectDemo1');) +

        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-group-by.html b/js/vendor/angular-ui-select/docs/examples/demo-group-by.html new file mode 100644 index 000000000..c0e9f01ac --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-group-by.html @@ -0,0 +1,42 @@ + + + + +

        Group By

        +

        Selected: {{ctrl.person.selected}}

        + +

        Grouped using a string group-by="'country'"

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +

        Grouped using a function group-by="ctrl.someGroupFn"

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        + +

        Regular

        + + {{$select.selected.name}} + +
        + + email: {{person.email}} + age: + +
        +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-group-filter.html b/js/vendor/angular-ui-select/docs/examples/demo-group-filter.html new file mode 100644 index 000000000..e2bbc2f84 --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-group-filter.html @@ -0,0 +1,26 @@ + + + + +

        Group Filtering

        +

        You can filter which groups are displayed by ui-select, by using the group-filter attribute. The provided value should either be an array or function.

        +

        Selected: {{country.selected}}

        + + +

        Filter groups by array group-filter="['Z','B','C']"

        + + {{$select.selected.name}} + + + + + + +

        Filter groups using a function group-filter="ctrl.reverseOrderFilterFn"

        + + {{$select.selected.name}} + + + + + diff --git a/js/vendor/angular-ui-select/docs/examples/demo-multiple-selection.html b/js/vendor/angular-ui-select/docs/examples/demo-multiple-selection.html new file mode 100644 index 000000000..9a499017f --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-multiple-selection.html @@ -0,0 +1,89 @@ + + + + +

        Multiple Selection

        + +

        Array of strings

        + + {{$item}} + + {{color}} + + +

        Selected: {{ctrl.multipleDemo.colors}}

        +
        +

        Array of objects (sorting enabled)

        + + {{$item.name}} <{{$item.email}}> + +
        + + email: {{person.email}} + age: + +
        +
        +

        Selected: {{ctrl.multipleDemo.selectedPeople}}

        + +
        +

        Deselect callback with single property binding

        + + {{$item.name}} <{{$item.email}}> + +
        + + email: {{person.email}} + age: + +
        +
        +

        Last Removed:

        +
        +$item = {{ctrl.lastRemoved.item}}
        +$model = {{ctrl.lastRemoved.model}}
        +
        + +
        +

        Array of objects with single property binding

        + + {{$item.name}} <{{$item.email}}> + +
        + + email: {{person.email}} + age: + +
        +
        +

        Selected: {{ctrl.multipleDemo.selectedPeopleSimple}}

        + +
        +

        Array of objects (with groupBy)

        + + {{$item.name}} <{{$item.email}}> + +
        + + email: {{person.email}} + age: + +
        +
        +

        Selected: {{ctrl.multipleDemo.selectedPeopleWithGroupBy}}

        + +
        +

        Disabling instead of removing selected items

        + + {{$item.name}} <{{$item.email}}> + +
        + + email: {{person.email}} + age: + +
        +
        +

        Selected: {{ctrl.multipleDemo.removeSelectIsFalse}}

        + +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-object-as-source.html b/js/vendor/angular-ui-select/docs/examples/demo-object-as-source.html new file mode 100644 index 000000000..56892c0f6 --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-object-as-source.html @@ -0,0 +1,47 @@ + + + + + +

        Object as Item Source

        +

        uiSelect supports providing choices using the (key, value) format, similar to that used by ng-repeat

        + +

        Using value for binding

        + +

        Selected: {{ctrl.person.selectedValue}}

        + + {{$select.selected.value.name}} + +
        + + email: {{person.value.email}} + age: {{person.value.age}} + +
        +
        + +

        Using single property for binding

        +

        Selected: {{ctrl.person.selectedSingle}}

        + + {{$select.selected.value.name}} + +
        + + email: {{person.value.email}} + age: {{person.value.age}} + +
        +
        + +

        Using key for binding

        +

        Selected: {{ctrl.person.selectedSingleKey}}

        + + {{$select.selected.value.name}} + +
        + + email: {{person.value.email}} + age: {{person.value.age}} + +
        +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-select2-with-bootstrap.html b/js/vendor/angular-ui-select/docs/examples/demo-select2-with-bootstrap.html new file mode 100644 index 000000000..60028885c --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-select2-with-bootstrap.html @@ -0,0 +1,91 @@ +

        Selected: {{ctrl.person.selected.name}}

        + +
        +
        + ui-select inside a Bootstrap form + +
        + +
        + + + {{$select.selected.name}} + +
        + +
        +
        + +
        +
        + +
        + +
        + + + {{$item.name}} + +
        + +
        +
        + +
        +
        + +
        + +
        + + + {{$select.selected.name}} + + + + + + +
        +
        + +
        + +
        +
        + + + {{$select.selected.name}} + + + + + + + + + + +
        +
        +
        + +
        + +
        + + + {{$select.selected.name}} + +
        + +
        +
        + +
        +
        + +
        +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-selectize-with-bootstrap.html b/js/vendor/angular-ui-select/docs/examples/demo-selectize-with-bootstrap.html new file mode 100644 index 000000000..0325293f3 --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-selectize-with-bootstrap.html @@ -0,0 +1,111 @@ + +

        Selected: {{ctrl.person.selected.name}}

        + +
        +
        + ui-select inside a Bootstrap form + +
        + +
        + + + {{$select.selected.name}} + +
        + +
        +
        + +
        +
        + +
        + +
        + + + {{$select.selected.name}} + + + + + + +
        +
        + +
        + +
        +
        + + + {{$select.selected.name}} + + + + + + + + + + +
        +
        +
        + +
        + +
        + + + {{$item.name}} + +
        + +
        +
        + +
        +
        + +
        + +
        + + + {{$select.selected.name}} + +
        + +
        +
        + +
        +
        + +
        +
        diff --git a/js/vendor/angular-ui-select/docs/examples/demo-tagging.html b/js/vendor/angular-ui-select/docs/examples/demo-tagging.html new file mode 100644 index 000000000..4b6900a1d --- /dev/null +++ b/js/vendor/angular-ui-select/docs/examples/demo-tagging.html @@ -0,0 +1,87 @@ + + + + + +

        Tagging

        +

        Tagging allows the creation of new items not present in the item list

        + +

        Simple String Tags (With Custom Tag Label & Sort Enabled)

        + + + {{$item}} + + {{color}} + + +

        Selected: {{ctrl.multipleDemo.colors}}

        +
        + +

        Simple String Tags (Predictive Search Model & No Labels)

        + + + {{$item}} + + {{color}} + + +

        Selected: {{ctrl.multipleDemo.colors2}}

        +
        + +

        Object Tags (with grouping)

        + + {{$item.name}} <{{$item.email}}> + +
        +
        + + email: {{person.email}} + age: + +
        +
        +

        Selected:

        +
        selectedPeople = {{ctrl.multipleDemo.selectedPeople | json}}
        +
        + +

        Object Tags with Tokenization (" ", /, ,)

        + Note that the Space character can't be used literally, use the keyword SPACE - tagging-tokens="SPACE|,|/" + + {{$item.name}} <{{$item.email}}> + +
        +
        + + email: {{person.email}} + age: + +
        +
        +

        Selected:

        +
        selectedPeople2 = {{ctrl.multipleDemo.selectedPeople2 | json}}
        + +

        Tagging in Single Select mode

        (NOT WORKING) + + {{$select.selected.name}} <{{$select.selected.email}}> + +
        +
        + + email: {{person.email}} + age: + +
        +
        +

        Selected:

        +
        ctrl.person.selected = {{ctrl.person.selected | json }}
        + +

        Tagging in Single select mode, with simple strings

        (NOT WORKING) + + {{$select.selected}} + +
        +
        +
        +

        Selected: {{ctrl.singleDemo.color}}

        + +
        diff --git a/js/vendor/angular-ui-select/docs/index.html b/js/vendor/angular-ui-select/docs/index.html index b0b455437..ab06c0343 100644 --- a/js/vendor/angular-ui-select/docs/index.html +++ b/js/vendor/angular-ui-select/docs/index.html @@ -1,4 +1,4 @@ - + diff --git a/js/vendor/angular-ui-select/docs/partials/_header.html b/js/vendor/angular-ui-select/docs/partials/_header.html index a657ac0a5..1c18659f7 100644 --- a/js/vendor/angular-ui-select/docs/partials/_header.html +++ b/js/vendor/angular-ui-select/docs/partials/_header.html @@ -1,4 +1,4 @@ - + diff --git a/js/vendor/angular-ui-select/gulpfile.js b/js/vendor/angular-ui-select/gulpfile.js new file mode 100644 index 000000000..cddf7515c --- /dev/null +++ b/js/vendor/angular-ui-select/gulpfile.js @@ -0,0 +1,201 @@ +var fs = require('fs'); +var del = require('del'); +var gulp = require('gulp'); +var streamqueue = require('streamqueue'); +var karma = require('karma').server; +var $ = require('gulp-load-plugins')(); +var runSequence = require('run-sequence'); +var conventionalRecommendedBump = require('conventional-recommended-bump'); +var titleCase = require('title-case'); + +var config = { + pkg : JSON.parse(fs.readFileSync('./package.json')), + banner: + '/*!\n' + + ' * <%= pkg.name %>\n' + + ' * <%= pkg.homepage %>\n' + + ' * Version: <%= pkg.version %> - <%= timestamp %>\n' + + ' * License: <%= pkg.license %>\n' + + ' */\n\n\n' +}; + +gulp.task('default', ['build','test']); +gulp.task('build', ['scripts', 'styles']); +gulp.task('test', ['build', 'karma']); + +gulp.task('watch', ['build','karma-watch'], function() { + gulp.watch(['src/**/*.{js,html}'], ['build']); +}); + +gulp.task('clean', function(cb) { + del(['dist', 'temp'], cb); +}); + +gulp.task('scripts', ['clean'], function() { + + var buildTemplates = function () { + return gulp.src('src/**/*.html') + .pipe($.minifyHtml({ + empty: true, + spare: true, + quotes: true + })) + .pipe($.angularTemplatecache({module: 'ui.select'})); + }; + + var buildLib = function(){ + return gulp.src(['src/common.js','src/*.js']) + .pipe($.plumber({ + errorHandler: handleError + })) + .pipe($.concat('select_without_templates.js')) + .pipe($.header('(function () { \n"use strict";\n')) + .pipe($.footer('\n}());')) + .pipe(gulp.dest('temp')) + .pipe($.jshint()) + .pipe($.jshint.reporter('jshint-stylish')) + .pipe($.jshint.reporter('fail')); + }; + + return streamqueue({objectMode: true }, buildLib(), buildTemplates()) + .pipe($.plumber({ + errorHandler: handleError + })) + .pipe($.concat('select.js')) + .pipe($.header(config.banner, { + timestamp: (new Date()).toISOString(), pkg: config.pkg + })) + .pipe(gulp.dest('dist')) + .pipe($.sourcemaps.init()) + .pipe($.uglify({preserveComments: 'some'})) + .pipe($.concat('select.min.js')) + .pipe($.sourcemaps.write('./')) + .pipe(gulp.dest('dist')); + +}); + +gulp.task('styles', ['clean'], function() { + + return gulp.src(['src/common.css'], {base: 'src'}) + .pipe($.sourcemaps.init()) + .pipe($.header(config.banner, { + timestamp: (new Date()).toISOString(), pkg: config.pkg + })) + .pipe($.concat('select.css')) + .pipe(gulp.dest('dist')) + .pipe($.minifyCss()) + .pipe($.concat('select.min.css')) + .pipe($.sourcemaps.write('../dist', {debug: true})) + .pipe(gulp.dest('dist')); + +}); + +gulp.task('karma', ['build'], function() { + karma.start({configFile : __dirname +'/karma.conf.js', singleRun: true}); +}); + +gulp.task('karma-watch', ['build'], function() { + karma.start({configFile : __dirname +'/karma.conf.js', singleRun: false}); +}); + +gulp.task('pull', function(done) { + $.git.pull(); + done(); +}); + +gulp.task('add', function(done) { + $.git.add(); + done(); +}); + +gulp.task('recommendedBump', function(done) { + /** + * Bumping version number and tagging the repository with it. + * Please read http://semver.org/ + * + * To bump the version numbers accordingly after you did a patch, + * introduced a feature or made a backwards-incompatible release. + */ + + conventionalRecommendedBump({preset: 'angular'}, function(err, importance) { + // Get all the files to bump version in + gulp.src(['./package.json']) + .pipe($.bump({type: importance})) + .pipe(gulp.dest('./')); + + done(); + }); +}); + +gulp.task('changelog', function() { + + return gulp.src('CHANGELOG.md', {buffer: false}) + .pipe($.conventionalChangelog({preset: 'angular'})) + .pipe(gulp.dest('./')); +}); + +gulp.task('push', function(done) { + $.git.push('origin', 'master', {args: '--follow-tags'}); + done(); +}); + +gulp.task('commit', function() { + return gulp.src('./') + .pipe($.git.commit('chore(release): bump package version and update changelog', {emitData: true})) + .on('data', function(data) { + console.log(data); + }); +}); + +gulp.task('tag', function() { + return gulp.src('package.json') + .pipe($.tagVersion()); +}); + +gulp.task('bump', function(done) { + runSequence('recommendedBump', 'changelog', 'add', 'commit', 'tag', 'push', done); +}); + +gulp.task('docs', function (cb) { + runSequence('docs:clean', 'docs:examples', 'docs:assets', 'docs:index', cb); +}); + +gulp.task('docs:clean', function (cb) { + del(['docs-built'], cb) +}); + +gulp.task('docs:assets', function () { + gulp.src('./dist/*').pipe(gulp.dest('./docs-built/dist')); + return gulp.src('docs/assets/*').pipe(gulp.dest('./docs-built/assets')); +}); + +gulp.task('docs:examples', function () { + // Need a way to reset filename list: $.filenames('exampleFiles',{overrideMode:true}); + return gulp.src(['docs/examples/*.html']) + .pipe($.header(fs.readFileSync('docs/partials/_header.html'))) + .pipe($.footer(fs.readFileSync('docs/partials/_footer.html'))) + .pipe($.filenames('exampleFiles')) + .pipe(gulp.dest('./docs-built/')); +}); + +gulp.task('docs:index', function () { + + var exampleFiles = $.filenames.get('exampleFiles'); + exampleFiles = exampleFiles.map(function (filename) { + var cleaned = titleCase(filename.replace('demo-', '').replace('.html', '')); + return '

        ' + cleaned + '

        '; + }); + + return gulp.src('docs/index.html') + .pipe($.replace('', exampleFiles.join("\n"))) + .pipe(gulp.dest('./docs-built/')); +}); + +gulp.task('docs:watch', ['docs'], function() { + gulp.watch(['docs/**/*.{js,html}'], ['docs']); +}); + +var handleError = function (err) { + console.log(err.toString()); + this.emit('end'); +}; diff --git a/js/vendor/angular-ui-select/karma.conf.js b/js/vendor/angular-ui-select/karma.conf.js new file mode 100644 index 000000000..89c684ca3 --- /dev/null +++ b/js/vendor/angular-ui-select/karma.conf.js @@ -0,0 +1,49 @@ +module.exports = function(config) { + config.set({ + + // Base path, that will be used to resolve files and exclude + basePath: '', + + // Frameworks to use + frameworks: ['jasmine'], + + // List of files / patterns to load in the browser + files: [ + 'node_modules/jquery/dist/jquery.js', + 'node_modules/angular/angular.js', + 'node_modules/angular-sanitize/angular-sanitize.js', + 'node_modules/angular-mocks/angular-mocks.js', + + 'dist/select.js', + 'test/helpers.js', + 'test/**/*.spec.js' + ], + + // List of files to exclude + exclude: ['./index.js'], + + // Web server port + port: 9876, + + // Level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // Enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + // Start these browsers, currently available: + // - Chrome + // - ChromeCanary + // - Firefox + // - Opera + // - Safari (only Mac) + // - PhantomJS + // - IE (only Windows) + browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome'], + + // Continuous Integration mode + // if true, it capture browsers, run tests and exit + singleRun: false + }); +}; diff --git a/js/vendor/angular-ui-select/src/bootstrap/choices.tpl.html b/js/vendor/angular-ui-select/src/bootstrap/choices.tpl.html new file mode 100644 index 000000000..c3f78e2e7 --- /dev/null +++ b/js/vendor/angular-ui-select/src/bootstrap/choices.tpl.html @@ -0,0 +1,11 @@ + diff --git a/js/vendor/angular-ui-select/src/bootstrap/match-multiple.tpl.html b/js/vendor/angular-ui-select/src/bootstrap/match-multiple.tpl.html new file mode 100644 index 000000000..be9e92da7 --- /dev/null +++ b/js/vendor/angular-ui-select/src/bootstrap/match-multiple.tpl.html @@ -0,0 +1,15 @@ + + + +  × + + + + diff --git a/js/vendor/angular-ui-select/src/bootstrap/match.tpl.html b/js/vendor/angular-ui-select/src/bootstrap/match.tpl.html new file mode 100644 index 000000000..1dc23cd98 --- /dev/null +++ b/js/vendor/angular-ui-select/src/bootstrap/match.tpl.html @@ -0,0 +1,16 @@ +
        + + {{$select.placeholder}} + + + + + + +
        diff --git a/js/vendor/angular-ui-select/src/bootstrap/no-choice.tpl.html b/js/vendor/angular-ui-select/src/bootstrap/no-choice.tpl.html new file mode 100644 index 000000000..fdd1391f7 --- /dev/null +++ b/js/vendor/angular-ui-select/src/bootstrap/no-choice.tpl.html @@ -0,0 +1,6 @@ + diff --git a/js/vendor/angular-ui-select/src/bootstrap/select-multiple.tpl.html b/js/vendor/angular-ui-select/src/bootstrap/select-multiple.tpl.html new file mode 100644 index 000000000..b8b329894 --- /dev/null +++ b/js/vendor/angular-ui-select/src/bootstrap/select-multiple.tpl.html @@ -0,0 +1,22 @@ + diff --git a/js/vendor/angular-ui-select/src/bootstrap/select.tpl.html b/js/vendor/angular-ui-select/src/bootstrap/select.tpl.html new file mode 100644 index 000000000..26fe13aa1 --- /dev/null +++ b/js/vendor/angular-ui-select/src/bootstrap/select.tpl.html @@ -0,0 +1,15 @@ + diff --git a/js/vendor/angular-ui-select/src/common.css b/js/vendor/angular-ui-select/src/common.css new file mode 100644 index 000000000..c81d540c7 --- /dev/null +++ b/js/vendor/angular-ui-select/src/common.css @@ -0,0 +1,354 @@ +/* Style when highlighting a search. */ +.ui-select-highlight { + font-weight: bold; +} + +.ui-select-offscreen { + clip: rect(0 0 0 0) !important; + width: 1px !important; + height: 1px !important; + border: 0 !important; + margin: 0 !important; + padding: 0 !important; + overflow: hidden !important; + position: absolute !important; + outline: 0 !important; + left: 0px !important; + top: 0px !important; +} + + +.ui-select-choices-row:hover { + background-color: #f5f5f5; +} + +/* Select2 theme */ + +/* Mark invalid Select2 */ +.ng-dirty.ng-invalid > a.select2-choice { + border-color: #D44950; +} + +.select2-result-single { + padding-left: 0; +} + +.select2-locked > .select2-search-choice-close{ + display:none; +} + +.select-locked > .ui-select-match-close{ + display:none; +} + +body > .select2-container.open { + z-index: 9999; /* The z-index Select2 applies to the select2-drop */ +} + +/* Handle up direction Select2 */ +.ui-select-container[theme="select2"].direction-up .ui-select-match, +.ui-select-container.select2.direction-up .ui-select-match { + border-radius: 4px; /* FIXME hardcoded value :-/ */ + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.ui-select-container[theme="select2"].direction-up .ui-select-dropdown, +.ui-select-container.select2.direction-up .ui-select-dropdown { + border-radius: 4px; /* FIXME hardcoded value :-/ */ + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + + border-top-width: 1px; /* FIXME hardcoded value :-/ */ + border-top-style: solid; + + box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); + + margin-top: -4px; /* FIXME hardcoded value :-/ */ +} +.ui-select-container[theme="select2"].direction-up .ui-select-dropdown .select2-search, +.ui-select-container.select2.direction-up .ui-select-dropdown .select2-search { + margin-top: 4px; /* FIXME hardcoded value :-/ */ +} +.ui-select-container[theme="select2"].direction-up.select2-dropdown-open .ui-select-match, +.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match { + border-bottom-color: #5897fb; +} + +.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden, +.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden input{ + opacity: 0; + height: 0; + min-height: 0; + padding: 0; + margin: 0; + border:0; +} + +/* Selectize theme */ + +/* Helper class to show styles when focus */ +.selectize-input.selectize-focus{ + border-color: #007FBB !important; +} + +/* Fix input width for Selectize theme */ +.selectize-control.single > .selectize-input > input { + width: 100%; +} + +/* Fix line break when there's at least one item selected with the Selectize theme */ +.selectize-control.multi > .selectize-input > input { + margin: 0 !important; +} + +/* Fix dropdown width for Selectize theme */ +.selectize-control > .selectize-dropdown { + width: 100%; +} + +/* Mark invalid Selectize */ +.ng-dirty.ng-invalid > div.selectize-input { + border-color: #D44950; +} + +/* Handle up direction Selectize */ +.ui-select-container[theme="selectize"].direction-up .ui-select-dropdown { + box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); + margin-top: -2px; /* FIXME hardcoded value :-/ */ +} + +.ui-select-container[theme="selectize"] input.ui-select-search-hidden{ + opacity: 0; + height: 0; + min-height: 0; + padding: 0; + margin: 0; + border:0; + width: 0; +} + +/* Bootstrap theme */ + +/* Helper class to show styles when focus */ +.btn-default-focus { + color: #333; + background-color: #EBEBEB; + border-color: #ADADAD; + text-decoration: none; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); +} + +.ui-select-bootstrap .ui-select-toggle { + position: relative; +} + +.ui-select-bootstrap .ui-select-toggle > .caret { + position: absolute; + height: 10px; + top: 50%; + right: 10px; + margin-top: -2px; +} + +/* Fix Bootstrap dropdown position when inside a input-group */ +.input-group > .ui-select-bootstrap.dropdown { + /* Instead of relative */ + position: static; +} + +.input-group > .ui-select-bootstrap > input.ui-select-search.form-control { + border-radius: 4px; /* FIXME hardcoded value :-/ */ + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up { + border-radius: 4px !important; /* FIXME hardcoded value :-/ */ + border-top-right-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +.ui-select-bootstrap .ui-select-search-hidden{ + opacity: 0; + height: 0; + min-height: 0; + padding: 0; + margin: 0; + border:0; +} + +.ui-select-bootstrap > .ui-select-match > .btn{ + /* Instead of center because of .btn */ + text-align: left !important; +} + +.ui-select-bootstrap > .ui-select-match > .caret { + position: absolute; + top: 45%; + right: 15px; +} + +/* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */ +.ui-select-bootstrap > .ui-select-choices ,.ui-select-bootstrap > .ui-select-no-choice { + width: 100%; + height: auto; + max-height: 200px; + overflow-x: hidden; + margin-top: -1px; +} + +body > .ui-select-bootstrap.open { + z-index: 1000; /* Standard Bootstrap dropdown z-index */ +} + +.ui-select-multiple.ui-select-bootstrap { + height: auto; + padding: 3px 3px 0 3px; +} + +.ui-select-multiple.ui-select-bootstrap input.ui-select-search { + background-color: transparent !important; /* To prevent double background when disabled */ + border: none; + outline: none; + height: 1.666666em; + margin-bottom: 3px; +} + +.ui-select-multiple.ui-select-bootstrap .ui-select-match .close { + font-size: 1.6em; + line-height: 0.75; +} + +.ui-select-multiple.ui-select-bootstrap .ui-select-match-item { + outline: 0; + margin: 0 3px 3px 0; +} + +.ui-select-multiple .ui-select-match-item { + position: relative; +} + +.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close { + pointer-events: none; +} + +.ui-select-multiple:hover .ui-select-match-item.dropping-before:before { + content: ""; + position: absolute; + top: 0; + right: 100%; + height: 100%; + margin-right: 2px; + border-left: 1px solid #428bca; +} + +.ui-select-multiple:hover .ui-select-match-item.dropping-after:after { + content: ""; + position: absolute; + top: 0; + left: 100%; + height: 100%; + margin-left: 2px; + border-right: 1px solid #428bca; +} + +.ui-select-bootstrap .ui-select-choices-row>span { + cursor: pointer; + display: block; + padding: 3px 20px; + clear: both; + font-weight: 400; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} + +.ui-select-bootstrap .ui-select-choices-row>span:hover, .ui-select-bootstrap .ui-select-choices-row>span:focus { + text-decoration: none; + color: #262626; + background-color: #f5f5f5; +} + +.ui-select-bootstrap .ui-select-choices-row.active>span { + color: #fff; + text-decoration: none; + outline: 0; + background-color: #428bca; +} + +.ui-select-bootstrap .ui-select-choices-row.disabled>span, +.ui-select-bootstrap .ui-select-choices-row.active.disabled>span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} + +/* fix hide/show angular animation */ +.ui-select-match.ng-hide-add, +.ui-select-search.ng-hide-add { + display: none !important; +} + +/* Mark invalid Bootstrap */ +.ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match { + border-color: #D44950; +} + +/* Handle up direction Bootstrap */ +.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown { + box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); +} + +.ui-select-bootstrap .ui-select-match-text { + width: 100%; + padding-right: 1em; +} +.ui-select-bootstrap .ui-select-match-text span { + display: inline-block; + width: 100%; + overflow: hidden; +} +.ui-select-bootstrap .ui-select-toggle > a.btn { + position: absolute; + height: 10px; + right: 10px; + margin-top: -2px; +} + +/* Spinner */ +.ui-select-refreshing.glyphicon { + position: absolute; + right: 0; + padding: 8px 27px; + } + +@-webkit-keyframes ui-select-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes ui-select-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +.ui-select-spin { + -webkit-animation: ui-select-spin 2s infinite linear; + animation: ui-select-spin 2s infinite linear; +} + +.ui-select-refreshing.ng-animate { + -webkit-animation: none 0s; +} diff --git a/js/vendor/angular-ui-select/src/common.js b/js/vendor/angular-ui-select/src/common.js new file mode 100644 index 000000000..89848e57c --- /dev/null +++ b/js/vendor/angular-ui-select/src/common.js @@ -0,0 +1,175 @@ +var KEY = { + TAB: 9, + ENTER: 13, + ESC: 27, + SPACE: 32, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + SHIFT: 16, + CTRL: 17, + ALT: 18, + PAGE_UP: 33, + PAGE_DOWN: 34, + HOME: 36, + END: 35, + BACKSPACE: 8, + DELETE: 46, + COMMAND: 91, + + MAP: { 91 : "COMMAND", 8 : "BACKSPACE" , 9 : "TAB" , 13 : "ENTER" , 16 : "SHIFT" , 17 : "CTRL" , 18 : "ALT" , 19 : "PAUSEBREAK" , 20 : "CAPSLOCK" , 27 : "ESC" , 32 : "SPACE" , 33 : "PAGE_UP", 34 : "PAGE_DOWN" , 35 : "END" , 36 : "HOME" , 37 : "LEFT" , 38 : "UP" , 39 : "RIGHT" , 40 : "DOWN" , 43 : "+" , 44 : "PRINTSCREEN" , 45 : "INSERT" , 46 : "DELETE", 48 : "0" , 49 : "1" , 50 : "2" , 51 : "3" , 52 : "4" , 53 : "5" , 54 : "6" , 55 : "7" , 56 : "8" , 57 : "9" , 59 : ";", 61 : "=" , 65 : "A" , 66 : "B" , 67 : "C" , 68 : "D" , 69 : "E" , 70 : "F" , 71 : "G" , 72 : "H" , 73 : "I" , 74 : "J" , 75 : "K" , 76 : "L", 77 : "M" , 78 : "N" , 79 : "O" , 80 : "P" , 81 : "Q" , 82 : "R" , 83 : "S" , 84 : "T" , 85 : "U" , 86 : "V" , 87 : "W" , 88 : "X" , 89 : "Y" , 90 : "Z", 96 : "0" , 97 : "1" , 98 : "2" , 99 : "3" , 100 : "4" , 101 : "5" , 102 : "6" , 103 : "7" , 104 : "8" , 105 : "9", 106 : "*" , 107 : "+" , 109 : "-" , 110 : "." , 111 : "/", 112 : "F1" , 113 : "F2" , 114 : "F3" , 115 : "F4" , 116 : "F5" , 117 : "F6" , 118 : "F7" , 119 : "F8" , 120 : "F9" , 121 : "F10" , 122 : "F11" , 123 : "F12", 144 : "NUMLOCK" , 145 : "SCROLLLOCK" , 186 : ";" , 187 : "=" , 188 : "," , 189 : "-" , 190 : "." , 191 : "/" , 192 : "`" , 219 : "[" , 220 : "\\" , 221 : "]" , 222 : "'" + }, + + isControl: function (e) { + var k = e.which; + switch (k) { + case KEY.COMMAND: + case KEY.SHIFT: + case KEY.CTRL: + case KEY.ALT: + return true; + } + + if (e.metaKey || e.ctrlKey || e.altKey) return true; + + return false; + }, + isFunctionKey: function (k) { + k = k.which ? k.which : k; + return k >= 112 && k <= 123; + }, + isVerticalMovement: function (k){ + return ~[KEY.UP, KEY.DOWN].indexOf(k); + }, + isHorizontalMovement: function (k){ + return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k); + }, + toSeparator: function (k) { + var sep = {ENTER:"\n",TAB:"\t",SPACE:" "}[k]; + if (sep) return sep; + // return undefined for special keys other than enter, tab or space. + // no way to use them to cut strings. + return KEY[k] ? undefined : k; + } + }; + +function isNil(value) { + return angular.isUndefined(value) || value === null; +} + +/** + * Add querySelectorAll() to jqLite. + * + * jqLite find() is limited to lookups by tag name. + * TODO This will change with future versions of AngularJS, to be removed when this happens + * + * See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586 + * See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598 + */ +if (angular.element.prototype.querySelectorAll === undefined) { + angular.element.prototype.querySelectorAll = function(selector) { + return angular.element(this[0].querySelectorAll(selector)); + }; +} + +/** + * Add closest() to jqLite. + */ +if (angular.element.prototype.closest === undefined) { + angular.element.prototype.closest = function( selector) { + var elem = this[0]; + var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector; + + while (elem) { + if (matchesSelector.bind(elem)(selector)) { + return elem; + } else { + elem = elem.parentElement; + } + } + return false; + }; +} + +var latestId = 0; + +var uis = angular.module('ui.select', []) + +.constant('uiSelectConfig', { + theme: 'bootstrap', + searchEnabled: true, + sortable: false, + placeholder: '', // Empty by default, like HTML tag + + + + diff --git a/js/vendor/angular-ui-select/src/select2/select.tpl.html b/js/vendor/angular-ui-select/src/select2/select.tpl.html new file mode 100644 index 000000000..c0d37164c --- /dev/null +++ b/js/vendor/angular-ui-select/src/select2/select.tpl.html @@ -0,0 +1,22 @@ +
        +
        + +
        diff --git a/js/vendor/angular-ui-select/src/selectize/choices.tpl.html b/js/vendor/angular-ui-select/src/selectize/choices.tpl.html new file mode 100644 index 000000000..6c193a7c6 --- /dev/null +++ b/js/vendor/angular-ui-select/src/selectize/choices.tpl.html @@ -0,0 +1,11 @@ +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        diff --git a/js/vendor/angular-ui-select/src/selectize/match-multiple.tpl.html b/js/vendor/angular-ui-select/src/selectize/match-multiple.tpl.html new file mode 100644 index 000000000..49d37b2d7 --- /dev/null +++ b/js/vendor/angular-ui-select/src/selectize/match-multiple.tpl.html @@ -0,0 +1,11 @@ +
        + + + × + +
        \ No newline at end of file diff --git a/js/vendor/angular-ui-select/src/selectize/match.tpl.html b/js/vendor/angular-ui-select/src/selectize/match.tpl.html new file mode 100644 index 000000000..00297b4fb --- /dev/null +++ b/js/vendor/angular-ui-select/src/selectize/match.tpl.html @@ -0,0 +1,6 @@ +
        + {{$select.placeholder}} + +
        + + diff --git a/js/vendor/angular-ui-select/src/selectize/no-choice.tpl.html b/js/vendor/angular-ui-select/src/selectize/no-choice.tpl.html new file mode 100644 index 000000000..18b4146f7 --- /dev/null +++ b/js/vendor/angular-ui-select/src/selectize/no-choice.tpl.html @@ -0,0 +1,6 @@ +
        +
        +
        +
        +
        diff --git a/js/vendor/angular-ui-select/src/selectize/select-multiple.tpl.html b/js/vendor/angular-ui-select/src/selectize/select-multiple.tpl.html new file mode 100644 index 000000000..b434c8ec6 --- /dev/null +++ b/js/vendor/angular-ui-select/src/selectize/select-multiple.tpl.html @@ -0,0 +1,18 @@ +
        +
        +
        + +
        +
        +
        +
        \ No newline at end of file diff --git a/js/vendor/angular-ui-select/src/selectize/select.tpl.html b/js/vendor/angular-ui-select/src/selectize/select.tpl.html new file mode 100644 index 000000000..14dbeaa46 --- /dev/null +++ b/js/vendor/angular-ui-select/src/selectize/select.tpl.html @@ -0,0 +1,18 @@ +
        +
        +
        + +
        +
        +
        +
        diff --git a/js/vendor/angular-ui-select/src/uiSelectChoicesDirective.js b/js/vendor/angular-ui-select/src/uiSelectChoicesDirective.js new file mode 100644 index 000000000..bbe8c88c3 --- /dev/null +++ b/js/vendor/angular-ui-select/src/uiSelectChoicesDirective.js @@ -0,0 +1,90 @@ +uis.directive('uiSelectChoices', + ['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile', '$window', + function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile, $window) { + + return { + restrict: 'EA', + require: '^uiSelect', + replace: true, + transclude: true, + templateUrl: function(tElement) { + // Needed so the uiSelect can detect the transcluded content + tElement.addClass('ui-select-choices'); + + // Gets theme attribute from parent (ui-select) + var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; + return theme + '/choices.tpl.html'; + }, + + compile: function(tElement, tAttrs) { + + if (!tAttrs.repeat) throw uiSelectMinErr('repeat', "Expected 'repeat' expression."); + + // var repeat = RepeatParser.parse(attrs.repeat); + var groupByExp = tAttrs.groupBy; + var groupFilterExp = tAttrs.groupFilter; + + if (groupByExp) { + var groups = tElement.querySelectorAll('.ui-select-choices-group'); + if (groups.length !== 1) throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-group but got '{0}'.", groups.length); + groups.attr('ng-repeat', RepeatParser.getGroupNgRepeatExpression()); + } + + var parserResult = RepeatParser.parse(tAttrs.repeat); + + var choices = tElement.querySelectorAll('.ui-select-choices-row'); + if (choices.length !== 1) { + throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row but got '{0}'.", choices.length); + } + + choices.attr('ng-repeat', parserResult.repeatExpression(groupByExp)) + .attr('ng-if', '$select.open'); //Prevent unnecessary watches when dropdown is closed + + + var rowsInner = tElement.querySelectorAll('.ui-select-choices-row-inner'); + if (rowsInner.length !== 1) { + throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row-inner but got '{0}'.", rowsInner.length); + } + rowsInner.attr('uis-transclude-append', ''); //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat + + // If IE8 then need to target rowsInner to apply the ng-click attr as choices will not capture the event. + var clickTarget = $window.document.addEventListener ? choices : rowsInner; + clickTarget.attr('ng-click', '$select.select(' + parserResult.itemName + ',$select.skipFocusser,$event)'); + + return function link(scope, element, attrs, $select) { + + + $select.parseRepeatAttr(attrs.repeat, groupByExp, groupFilterExp); //Result ready at $select.parserResult + $select.disableChoiceExpression = attrs.uiDisableChoice; + $select.onHighlightCallback = attrs.onHighlight; + $select.minimumInputLength = parseInt(attrs.minimumInputLength) || 0; + $select.dropdownPosition = attrs.position ? attrs.position.toLowerCase() : uiSelectConfig.dropdownPosition; + + scope.$watch('$select.search', function(newValue) { + if(newValue && !$select.open && $select.multiple) $select.activate(false, true); + $select.activeIndex = $select.tagging.isActivated ? -1 : 0; + if (!attrs.minimumInputLength || $select.search.length >= attrs.minimumInputLength) { + $select.refresh(attrs.refresh); + } else { + $select.items = []; + } + }); + + attrs.$observe('refreshDelay', function() { + // $eval() is needed otherwise we get a string instead of a number + var refreshDelay = scope.$eval(attrs.refreshDelay); + $select.refreshDelay = refreshDelay !== undefined ? refreshDelay : uiSelectConfig.refreshDelay; + }); + + scope.$watch('$select.open', function(open) { + if (open) { + tElement.attr('role', 'listbox'); + $select.refresh(attrs.refresh); + } else { + element.removeAttr('role'); + } + }); + }; + } + }; +}]); diff --git a/js/vendor/angular-ui-select/src/uiSelectController.js b/js/vendor/angular-ui-select/src/uiSelectController.js new file mode 100644 index 000000000..0d1c595eb --- /dev/null +++ b/js/vendor/angular-ui-select/src/uiSelectController.js @@ -0,0 +1,756 @@ +/** + * Contains ui-select "intelligence". + * + * The goal is to limit dependency on the DOM whenever possible and + * put as much logic in the controller (instead of the link functions) as possible so it can be easily tested. + */ +uis.controller('uiSelectCtrl', + ['$scope', '$element', '$timeout', '$filter', '$$uisDebounce', 'uisRepeatParser', 'uiSelectMinErr', 'uiSelectConfig', '$parse', '$injector', '$window', + function($scope, $element, $timeout, $filter, $$uisDebounce, RepeatParser, uiSelectMinErr, uiSelectConfig, $parse, $injector, $window) { + + var ctrl = this; + + var EMPTY_SEARCH = ''; + + ctrl.placeholder = uiSelectConfig.placeholder; + ctrl.searchEnabled = uiSelectConfig.searchEnabled; + ctrl.sortable = uiSelectConfig.sortable; + ctrl.refreshDelay = uiSelectConfig.refreshDelay; + ctrl.paste = uiSelectConfig.paste; + ctrl.resetSearchInput = uiSelectConfig.resetSearchInput; + ctrl.refreshing = false; + ctrl.spinnerEnabled = uiSelectConfig.spinnerEnabled; + ctrl.spinnerClass = uiSelectConfig.spinnerClass; + ctrl.removeSelected = uiSelectConfig.removeSelected; //If selected item(s) should be removed from dropdown list + ctrl.closeOnSelect = true; //Initialized inside uiSelect directive link function + ctrl.skipFocusser = false; //Set to true to avoid returning focus to ctrl when item is selected + ctrl.search = EMPTY_SEARCH; + + ctrl.activeIndex = 0; //Dropdown of choices + ctrl.items = []; //All available choices + + ctrl.open = false; + ctrl.focus = false; + ctrl.disabled = false; + ctrl.selected = undefined; + + ctrl.dropdownPosition = 'auto'; + + ctrl.focusser = undefined; //Reference to input element used to handle focus events + ctrl.multiple = undefined; // Initialized inside uiSelect directive link function + ctrl.disableChoiceExpression = undefined; // Initialized inside uiSelectChoices directive link function + ctrl.tagging = {isActivated: false, fct: undefined}; + ctrl.taggingTokens = {isActivated: false, tokens: undefined}; + ctrl.lockChoiceExpression = undefined; // Initialized inside uiSelectMatch directive link function + ctrl.clickTriggeredSelect = false; + ctrl.$filter = $filter; + ctrl.$element = $element; + + // Use $injector to check for $animate and store a reference to it + ctrl.$animate = (function () { + try { + return $injector.get('$animate'); + } catch (err) { + // $animate does not exist + return null; + } + })(); + + ctrl.searchInput = $element.querySelectorAll('input.ui-select-search'); + if (ctrl.searchInput.length !== 1) { + throw uiSelectMinErr('searchInput', "Expected 1 input.ui-select-search but got '{0}'.", ctrl.searchInput.length); + } + + ctrl.isEmpty = function() { + return isNil(ctrl.selected) || ctrl.selected === '' || (ctrl.multiple && ctrl.selected.length === 0); + }; + + function _findIndex(collection, predicate, thisArg){ + if (collection.findIndex){ + return collection.findIndex(predicate, thisArg); + } else { + var list = Object(collection); + var length = list.length >>> 0; + var value; + + for (var i = 0; i < length; i++) { + value = list[i]; + if (predicate.call(thisArg, value, i, list)) { + return i; + } + } + return -1; + } + } + + // Most of the time the user does not want to empty the search input when in typeahead mode + function _resetSearchInput() { + if (ctrl.resetSearchInput) { + ctrl.search = EMPTY_SEARCH; + //reset activeIndex + if (ctrl.selected && ctrl.items.length && !ctrl.multiple) { + ctrl.activeIndex = _findIndex(ctrl.items, function(item){ + return angular.equals(this, item); + }, ctrl.selected); + } + } + } + + function _groupsFilter(groups, groupNames) { + var i, j, result = []; + for(i = 0; i < groupNames.length ;i++){ + for(j = 0; j < groups.length ;j++){ + if(groups[j].name == [groupNames[i]]){ + result.push(groups[j]); + } + } + } + return result; + } + + // When the user clicks on ui-select, displays the dropdown list + ctrl.activate = function(initSearchValue, avoidReset) { + if (!ctrl.disabled && !ctrl.open) { + if(!avoidReset) _resetSearchInput(); + + $scope.$broadcast('uis:activate'); + ctrl.open = true; + ctrl.activeIndex = ctrl.activeIndex >= ctrl.items.length ? 0 : ctrl.activeIndex; + // ensure that the index is set to zero for tagging variants + // that where first option is auto-selected + if ( ctrl.activeIndex === -1 && ctrl.taggingLabel !== false ) { + ctrl.activeIndex = 0; + } + + var container = $element.querySelectorAll('.ui-select-choices-content'); + var searchInput = $element.querySelectorAll('.ui-select-search'); + if (ctrl.$animate && ctrl.$animate.on && ctrl.$animate.enabled(container[0])) { + var animateHandler = function(elem, phase) { + if (phase === 'start' && ctrl.items.length === 0) { + // Only focus input after the animation has finished + ctrl.$animate.off('removeClass', searchInput[0], animateHandler); + $timeout(function () { + ctrl.focusSearchInput(initSearchValue); + }); + } else if (phase === 'close') { + // Only focus input after the animation has finished + ctrl.$animate.off('enter', container[0], animateHandler); + $timeout(function () { + ctrl.focusSearchInput(initSearchValue); + }); + } + }; + + if (ctrl.items.length > 0) { + ctrl.$animate.on('enter', container[0], animateHandler); + } else { + ctrl.$animate.on('removeClass', searchInput[0], animateHandler); + } + } else { + $timeout(function () { + ctrl.focusSearchInput(initSearchValue); + if(!ctrl.tagging.isActivated && ctrl.items.length > 1) { + _ensureHighlightVisible(); + } + }); + } + } + else if (ctrl.open && !ctrl.searchEnabled) { + // Close the selection if we don't have search enabled, and we click on the select again + ctrl.close(); + } + }; + + ctrl.focusSearchInput = function (initSearchValue) { + ctrl.search = initSearchValue || ctrl.search; + ctrl.searchInput[0].focus(); + }; + + ctrl.findGroupByName = function(name) { + return ctrl.groups && ctrl.groups.filter(function(group) { + return group.name === name; + })[0]; + }; + + ctrl.parseRepeatAttr = function(repeatAttr, groupByExp, groupFilterExp) { + function updateGroups(items) { + var groupFn = $scope.$eval(groupByExp); + ctrl.groups = []; + angular.forEach(items, function(item) { + var groupName = angular.isFunction(groupFn) ? groupFn(item) : item[groupFn]; + var group = ctrl.findGroupByName(groupName); + if(group) { + group.items.push(item); + } + else { + ctrl.groups.push({name: groupName, items: [item]}); + } + }); + if(groupFilterExp){ + var groupFilterFn = $scope.$eval(groupFilterExp); + if( angular.isFunction(groupFilterFn)){ + ctrl.groups = groupFilterFn(ctrl.groups); + } else if(angular.isArray(groupFilterFn)){ + ctrl.groups = _groupsFilter(ctrl.groups, groupFilterFn); + } + } + ctrl.items = []; + ctrl.groups.forEach(function(group) { + ctrl.items = ctrl.items.concat(group.items); + }); + } + + function setPlainItems(items) { + ctrl.items = items || []; + } + + ctrl.setItemsFn = groupByExp ? updateGroups : setPlainItems; + + ctrl.parserResult = RepeatParser.parse(repeatAttr); + + ctrl.isGrouped = !!groupByExp; + ctrl.itemProperty = ctrl.parserResult.itemName; + + //If collection is an Object, convert it to Array + + var originalSource = ctrl.parserResult.source; + + //When an object is used as source, we better create an array and use it as 'source' + var createArrayFromObject = function(){ + var origSrc = originalSource($scope); + $scope.$uisSource = Object.keys(origSrc).map(function(v){ + var result = {}; + result[ctrl.parserResult.keyName] = v; + result.value = origSrc[v]; + return result; + }); + }; + + if (ctrl.parserResult.keyName){ // Check for (key,value) syntax + createArrayFromObject(); + ctrl.parserResult.source = $parse('$uisSource' + ctrl.parserResult.filters); + $scope.$watch(originalSource, function(newVal, oldVal){ + if (newVal !== oldVal) createArrayFromObject(); + }, true); + } + + ctrl.refreshItems = function (data){ + data = data || ctrl.parserResult.source($scope); + var selectedItems = ctrl.selected; + //TODO should implement for single mode removeSelected + if (ctrl.isEmpty() || (angular.isArray(selectedItems) && !selectedItems.length) || !ctrl.multiple || !ctrl.removeSelected) { + ctrl.setItemsFn(data); + }else{ + if ( data !== undefined && data !== null ) { + var filteredItems = data.filter(function(i) { + return angular.isArray(selectedItems) ? selectedItems.every(function(selectedItem) { + return !angular.equals(i, selectedItem); + }) : !angular.equals(i, selectedItems); + }); + ctrl.setItemsFn(filteredItems); + } + } + if (ctrl.dropdownPosition === 'auto' || ctrl.dropdownPosition === 'up'){ + $scope.calculateDropdownPos(); + } + $scope.$broadcast('uis:refresh'); + }; + + // See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L259 + $scope.$watchCollection(ctrl.parserResult.source, function(items) { + if (items === undefined || items === null) { + // If the user specifies undefined or null => reset the collection + // Special case: items can be undefined if the user did not initialized the collection on the scope + // i.e $scope.addresses = [] is missing + ctrl.items = []; + } else { + if (!angular.isArray(items)) { + throw uiSelectMinErr('items', "Expected an array but got '{0}'.", items); + } else { + //Remove already selected items (ex: while searching) + //TODO Should add a test + ctrl.refreshItems(items); + + //update the view value with fresh data from items, if there is a valid model value + if(angular.isDefined(ctrl.ngModel.$modelValue)) { + ctrl.ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters + } + } + } + }); + + }; + + var _refreshDelayPromise; + + /** + * Typeahead mode: lets the user refresh the collection using his own function. + * + * See Expose $select.search for external / remote filtering https://github.com/angular-ui/ui-select/pull/31 + */ + ctrl.refresh = function(refreshAttr) { + if (refreshAttr !== undefined) { + // Debounce + // See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L155 + // FYI AngularStrap typeahead does not have debouncing: https://github.com/mgcrea/angular-strap/blob/v2.0.0-rc.4/src/typeahead/typeahead.js#L177 + if (_refreshDelayPromise) { + $timeout.cancel(_refreshDelayPromise); + } + _refreshDelayPromise = $timeout(function() { + if ($scope.$select.search.length >= $scope.$select.minimumInputLength) { + var refreshPromise = $scope.$eval(refreshAttr); + if (refreshPromise && angular.isFunction(refreshPromise.then) && !ctrl.refreshing) { + ctrl.refreshing = true; + refreshPromise.finally(function() { + ctrl.refreshing = false; + }); + } + } + }, ctrl.refreshDelay); + } + }; + + ctrl.isActive = function(itemScope) { + if ( !ctrl.open ) { + return false; + } + var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]); + var isActive = itemIndex == ctrl.activeIndex; + + if ( !isActive || itemIndex < 0 ) { + return false; + } + + if (isActive && !angular.isUndefined(ctrl.onHighlightCallback)) { + itemScope.$eval(ctrl.onHighlightCallback); + } + + return isActive; + }; + + var _isItemSelected = function (item) { + return (ctrl.selected && angular.isArray(ctrl.selected) && + ctrl.selected.filter(function (selection) { return angular.equals(selection, item); }).length > 0); + }; + + var disabledItems = []; + + function _updateItemDisabled(item, isDisabled) { + var disabledItemIndex = disabledItems.indexOf(item); + if (isDisabled && disabledItemIndex === -1) { + disabledItems.push(item); + } + + if (!isDisabled && disabledItemIndex > -1) { + disabledItems.splice(disabledItemIndex, 1); + } + } + + function _isItemDisabled(item) { + return disabledItems.indexOf(item) > -1; + } + + ctrl.isDisabled = function(itemScope) { + + if (!ctrl.open) return; + + var item = itemScope[ctrl.itemProperty]; + var itemIndex = ctrl.items.indexOf(item); + var isDisabled = false; + + if (itemIndex >= 0 && (angular.isDefined(ctrl.disableChoiceExpression) || ctrl.multiple)) { + + if (item.isTag) return false; + + if (ctrl.multiple) { + isDisabled = _isItemSelected(item); + } + + if (!isDisabled && angular.isDefined(ctrl.disableChoiceExpression)) { + isDisabled = !!(itemScope.$eval(ctrl.disableChoiceExpression)); + } + + _updateItemDisabled(item, isDisabled); + } + + return isDisabled; + }; + + + // When the user selects an item with ENTER or clicks the dropdown + ctrl.select = function(item, skipFocusser, $event) { + if (isNil(item) || !_isItemDisabled(item)) { + + if ( ! ctrl.items && ! ctrl.search && ! ctrl.tagging.isActivated) return; + + if (!item || !_isItemDisabled(item)) { + // if click is made on existing item, prevent from tagging, ctrl.search does not matter + ctrl.clickTriggeredSelect = false; + if($event && ($event.type === 'click' || $event.type === 'touchend') && item) + ctrl.clickTriggeredSelect = true; + + if(ctrl.tagging.isActivated && ctrl.clickTriggeredSelect === false) { + // if taggingLabel is disabled and item is undefined we pull from ctrl.search + if ( ctrl.taggingLabel === false ) { + if ( ctrl.activeIndex < 0 ) { + if (item === undefined) { + item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search; + } + if (!item || angular.equals( ctrl.items[0], item ) ) { + return; + } + } else { + // keyboard nav happened first, user selected from dropdown + item = ctrl.items[ctrl.activeIndex]; + } + } else { + // tagging always operates at index zero, taggingLabel === false pushes + // the ctrl.search value without having it injected + if ( ctrl.activeIndex === 0 ) { + // ctrl.tagging pushes items to ctrl.items, so we only have empty val + // for `item` if it is a detected duplicate + if ( item === undefined ) return; + + // create new item on the fly if we don't already have one; + // use tagging function if we have one + if ( ctrl.tagging.fct !== undefined && typeof item === 'string' ) { + item = ctrl.tagging.fct(item); + if (!item) return; + // if item type is 'string', apply the tagging label + } else if ( typeof item === 'string' ) { + // trim the trailing space + item = item.replace(ctrl.taggingLabel,'').trim(); + } + } + } + // search ctrl.selected for dupes potentially caused by tagging and return early if found + if (_isItemSelected(item)) { + ctrl.close(skipFocusser); + return; + } + } + _resetSearchInput(); + $scope.$broadcast('uis:select', item); + + if (ctrl.closeOnSelect) { + ctrl.close(skipFocusser); + } + } + } + }; + + // Closes the dropdown + ctrl.close = function(skipFocusser) { + if (!ctrl.open) return; + if (ctrl.ngModel && ctrl.ngModel.$setTouched) ctrl.ngModel.$setTouched(); + ctrl.open = false; + _resetSearchInput(); + $scope.$broadcast('uis:close', skipFocusser); + + }; + + ctrl.setFocus = function(){ + if (!ctrl.focus) ctrl.focusInput[0].focus(); + }; + + ctrl.clear = function($event) { + ctrl.select(null); + $event.stopPropagation(); + $timeout(function() { + ctrl.focusser[0].focus(); + }, 0, false); + }; + + // Toggle dropdown + ctrl.toggle = function(e) { + if (ctrl.open) { + ctrl.close(); + e.preventDefault(); + e.stopPropagation(); + } else { + ctrl.activate(); + } + }; + + // Set default function for locked choices - avoids unnecessary + // logic if functionality is not being used + ctrl.isLocked = function () { + return false; + }; + + $scope.$watch(function () { + return angular.isDefined(ctrl.lockChoiceExpression) && ctrl.lockChoiceExpression !== ""; + }, _initaliseLockedChoices); + + function _initaliseLockedChoices(doInitalise) { + if(!doInitalise) return; + + var lockedItems = []; + + function _updateItemLocked(item, isLocked) { + var lockedItemIndex = lockedItems.indexOf(item); + if (isLocked && lockedItemIndex === -1) { + lockedItems.push(item); + } + + if (!isLocked && lockedItemIndex > -1) { + lockedItems.splice(lockedItemIndex, 1); + } + } + + function _isItemlocked(item) { + return lockedItems.indexOf(item) > -1; + } + + ctrl.isLocked = function (itemScope, itemIndex) { + var isLocked = false, + item = ctrl.selected[itemIndex]; + + if(item) { + if (itemScope) { + isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression)); + _updateItemLocked(item, isLocked); + } else { + isLocked = _isItemlocked(item); + } + } + + return isLocked; + }; + } + + + var sizeWatch = null; + var updaterScheduled = false; + ctrl.sizeSearchInput = function() { + + var input = ctrl.searchInput[0], + container = ctrl.$element[0], + calculateContainerWidth = function() { + // Return the container width only if the search input is visible + return container.clientWidth * !!input.offsetParent; + }, + updateIfVisible = function(containerWidth) { + if (containerWidth === 0) { + return false; + } + var inputWidth = containerWidth - input.offsetLeft; + if (inputWidth < 50) inputWidth = containerWidth; + ctrl.searchInput.css('width', inputWidth+'px'); + return true; + }; + + ctrl.searchInput.css('width', '10px'); + $timeout(function() { //Give tags time to render correctly + if (sizeWatch === null && !updateIfVisible(calculateContainerWidth())) { + sizeWatch = $scope.$watch(function() { + if (!updaterScheduled) { + updaterScheduled = true; + $scope.$$postDigest(function() { + updaterScheduled = false; + if (updateIfVisible(calculateContainerWidth())) { + sizeWatch(); + sizeWatch = null; + } + }); + } + }, angular.noop); + } + }); + }; + + function _handleDropDownSelection(key) { + var processed = true; + switch (key) { + case KEY.DOWN: + if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode + else if (ctrl.activeIndex < ctrl.items.length - 1) { + var idx = ++ctrl.activeIndex; + while(_isItemDisabled(ctrl.items[idx]) && idx < ctrl.items.length) { + ctrl.activeIndex = ++idx; + } + } + break; + case KEY.UP: + var minActiveIndex = (ctrl.search.length === 0 && ctrl.tagging.isActivated) ? -1 : 0; + if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode + else if (ctrl.activeIndex > minActiveIndex) { + var idxmin = --ctrl.activeIndex; + while(_isItemDisabled(ctrl.items[idxmin]) && idxmin > minActiveIndex) { + ctrl.activeIndex = --idxmin; + } + } + break; + case KEY.TAB: + if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true); + break; + case KEY.ENTER: + if(ctrl.open && (ctrl.tagging.isActivated || ctrl.activeIndex >= 0)){ + ctrl.select(ctrl.items[ctrl.activeIndex], ctrl.skipFocusser); // Make sure at least one dropdown item is highlighted before adding if not in tagging mode + } else { + ctrl.activate(false, true); //In case its the search input in 'multiple' mode + } + break; + case KEY.ESC: + ctrl.close(); + break; + default: + processed = false; + } + return processed; + } + + // Bind to keyboard shortcuts + ctrl.searchInput.on('keydown', function(e) { + + var key = e.which; + + if (~[KEY.ENTER,KEY.ESC].indexOf(key)){ + e.preventDefault(); + e.stopPropagation(); + } + + $scope.$apply(function() { + + var tagged = false; + + if (ctrl.items.length > 0 || ctrl.tagging.isActivated) { + if(!_handleDropDownSelection(key) && !ctrl.searchEnabled) { + e.preventDefault(); + e.stopPropagation(); + } + if ( ctrl.taggingTokens.isActivated ) { + for (var i = 0; i < ctrl.taggingTokens.tokens.length; i++) { + if ( ctrl.taggingTokens.tokens[i] === KEY.MAP[e.keyCode] ) { + // make sure there is a new value to push via tagging + if ( ctrl.search.length > 0 ) { + tagged = true; + } + } + } + if ( tagged ) { + $timeout(function() { + ctrl.searchInput.triggerHandler('tagged'); + var newItem = ctrl.search.replace(KEY.MAP[e.keyCode],'').trim(); + if ( ctrl.tagging.fct ) { + newItem = ctrl.tagging.fct( newItem ); + } + if (newItem) ctrl.select(newItem, true); + }); + } + } + } + + }); + + if(KEY.isVerticalMovement(key) && ctrl.items.length > 0){ + _ensureHighlightVisible(); + } + + if (key === KEY.ENTER || key === KEY.ESC) { + e.preventDefault(); + e.stopPropagation(); + } + + }); + + ctrl.searchInput.on('paste', function (e) { + var data; + + if (window.clipboardData && window.clipboardData.getData) { // IE + data = window.clipboardData.getData('Text'); + } else { + data = (e.originalEvent || e).clipboardData.getData('text/plain'); + } + + // Prepend the current input field text to the paste buffer. + data = ctrl.search + data; + + if (data && data.length > 0) { + // If tagging try to split by tokens and add items + if (ctrl.taggingTokens.isActivated) { + var items = []; + for (var i = 0; i < ctrl.taggingTokens.tokens.length; i++) { // split by first token that is contained in data + var separator = KEY.toSeparator(ctrl.taggingTokens.tokens[i]) || ctrl.taggingTokens.tokens[i]; + if (data.indexOf(separator) > -1) { + items = data.split(separator); + break; // only split by one token + } + } + if (items.length === 0) { + items = [data]; + } + var oldsearch = ctrl.search; + angular.forEach(items, function (item) { + var newItem = ctrl.tagging.fct ? ctrl.tagging.fct(item) : item; + if (newItem) { + ctrl.select(newItem, true); + } + }); + ctrl.search = oldsearch || EMPTY_SEARCH; + e.preventDefault(); + e.stopPropagation(); + } else if (ctrl.paste) { + ctrl.paste(data); + ctrl.search = EMPTY_SEARCH; + e.preventDefault(); + e.stopPropagation(); + } + } + }); + + ctrl.searchInput.on('tagged', function() { + $timeout(function() { + _resetSearchInput(); + }); + }); + + // See https://github.com/ivaynberg/select2/blob/3.4.6/select2.js#L1431 + function _ensureHighlightVisible() { + var container = $element.querySelectorAll('.ui-select-choices-content'); + var choices = container.querySelectorAll('.ui-select-choices-row'); + if (choices.length < 1) { + throw uiSelectMinErr('choices', "Expected multiple .ui-select-choices-row but got '{0}'.", choices.length); + } + + if (ctrl.activeIndex < 0) { + return; + } + + var highlighted = choices[ctrl.activeIndex]; + var posY = highlighted.offsetTop + highlighted.clientHeight - container[0].scrollTop; + var height = container[0].offsetHeight; + + if (posY > height) { + container[0].scrollTop += posY - height; + } else if (posY < highlighted.clientHeight) { + if (ctrl.isGrouped && ctrl.activeIndex === 0) + container[0].scrollTop = 0; //To make group header visible when going all the way up + else + container[0].scrollTop -= highlighted.clientHeight - posY; + } + } + + var onResize = $$uisDebounce(function() { + ctrl.sizeSearchInput(); + }, 50); + + angular.element($window).bind('resize', onResize); + + $scope.$on('$destroy', function() { + ctrl.searchInput.off('keyup keydown tagged blur paste'); + angular.element($window).off('resize', onResize); + }); + + $scope.$watch('$select.activeIndex', function(activeIndex) { + if (activeIndex) + $element.find('input').attr( + 'aria-activedescendant', + 'ui-select-choices-row-' + ctrl.generatedId + '-' + activeIndex); + }); + + $scope.$watch('$select.open', function(open) { + if (!open) + $element.find('input').removeAttr('aria-activedescendant'); + }); +}]); diff --git a/js/vendor/angular-ui-select/src/uiSelectDirective.js b/js/vendor/angular-ui-select/src/uiSelectDirective.js new file mode 100644 index 000000000..285cfb4ac --- /dev/null +++ b/js/vendor/angular-ui-select/src/uiSelectDirective.js @@ -0,0 +1,423 @@ +uis.directive('uiSelect', + ['$document', 'uiSelectConfig', 'uiSelectMinErr', 'uisOffset', '$compile', '$parse', '$timeout', + function($document, uiSelectConfig, uiSelectMinErr, uisOffset, $compile, $parse, $timeout) { + + return { + restrict: 'EA', + templateUrl: function(tElement, tAttrs) { + var theme = tAttrs.theme || uiSelectConfig.theme; + return theme + (angular.isDefined(tAttrs.multiple) ? '/select-multiple.tpl.html' : '/select.tpl.html'); + }, + replace: true, + transclude: true, + require: ['uiSelect', '^ngModel'], + scope: true, + + controller: 'uiSelectCtrl', + controllerAs: '$select', + compile: function(tElement, tAttrs) { + + // Allow setting ngClass on uiSelect + var match = /{(.*)}\s*{(.*)}/.exec(tAttrs.ngClass); + if(match) { + var combined = '{'+ match[1] +', '+ match[2] +'}'; + tAttrs.ngClass = combined; + tElement.attr('ng-class', combined); + } + + //Multiple or Single depending if multiple attribute presence + if (angular.isDefined(tAttrs.multiple)) + tElement.append('').removeAttr('multiple'); + else + tElement.append(''); + + if (tAttrs.inputId) + tElement.querySelectorAll('input.ui-select-search')[0].id = tAttrs.inputId; + + return function(scope, element, attrs, ctrls, transcludeFn) { + + var $select = ctrls[0]; + var ngModel = ctrls[1]; + + $select.generatedId = uiSelectConfig.generateId(); + $select.baseTitle = attrs.title || 'Select box'; + $select.focusserTitle = $select.baseTitle + ' focus'; + $select.focusserId = 'focusser-' + $select.generatedId; + + $select.closeOnSelect = function() { + if (angular.isDefined(attrs.closeOnSelect)) { + return $parse(attrs.closeOnSelect)(); + } else { + return uiSelectConfig.closeOnSelect; + } + }(); + + scope.$watch('skipFocusser', function() { + var skipFocusser = scope.$eval(attrs.skipFocusser); + $select.skipFocusser = skipFocusser !== undefined ? skipFocusser : uiSelectConfig.skipFocusser; + }); + + $select.onSelectCallback = $parse(attrs.onSelect); + $select.onRemoveCallback = $parse(attrs.onRemove); + + //Set reference to ngModel from uiSelectCtrl + $select.ngModel = ngModel; + + $select.choiceGrouped = function(group){ + return $select.isGrouped && group && group.name; + }; + + if(attrs.tabindex){ + attrs.$observe('tabindex', function(value) { + $select.focusInput.attr('tabindex', value); + element.removeAttr('tabindex'); + }); + } + + scope.$watch(function () { return scope.$eval(attrs.searchEnabled); }, function(newVal) { + $select.searchEnabled = newVal !== undefined ? newVal : uiSelectConfig.searchEnabled; + }); + + scope.$watch('sortable', function() { + var sortable = scope.$eval(attrs.sortable); + $select.sortable = sortable !== undefined ? sortable : uiSelectConfig.sortable; + }); + + attrs.$observe('backspaceReset', function() { + // $eval() is needed otherwise we get a string instead of a boolean + var backspaceReset = scope.$eval(attrs.backspaceReset); + $select.backspaceReset = backspaceReset !== undefined ? backspaceReset : true; + }); + + attrs.$observe('limit', function() { + //Limit the number of selections allowed + $select.limit = (angular.isDefined(attrs.limit)) ? parseInt(attrs.limit, 10) : undefined; + }); + + scope.$watch('removeSelected', function() { + var removeSelected = scope.$eval(attrs.removeSelected); + $select.removeSelected = removeSelected !== undefined ? removeSelected : uiSelectConfig.removeSelected; + }); + + attrs.$observe('disabled', function() { + // No need to use $eval() (thanks to ng-disabled) since we already get a boolean instead of a string + $select.disabled = attrs.disabled !== undefined ? attrs.disabled : false; + }); + + attrs.$observe('resetSearchInput', function() { + // $eval() is needed otherwise we get a string instead of a boolean + var resetSearchInput = scope.$eval(attrs.resetSearchInput); + $select.resetSearchInput = resetSearchInput !== undefined ? resetSearchInput : true; + }); + + attrs.$observe('paste', function() { + $select.paste = scope.$eval(attrs.paste); + }); + + attrs.$observe('tagging', function() { + if(attrs.tagging !== undefined) + { + // $eval() is needed otherwise we get a string instead of a boolean + var taggingEval = scope.$eval(attrs.tagging); + $select.tagging = {isActivated: true, fct: taggingEval !== true ? taggingEval : undefined}; + } + else + { + $select.tagging = {isActivated: false, fct: undefined}; + } + }); + + attrs.$observe('taggingLabel', function() { + if(attrs.tagging !== undefined ) + { + // check eval for FALSE, in this case, we disable the labels + // associated with tagging + if ( attrs.taggingLabel === 'false' ) { + $select.taggingLabel = false; + } + else + { + $select.taggingLabel = attrs.taggingLabel !== undefined ? attrs.taggingLabel : '(new)'; + } + } + }); + + attrs.$observe('taggingTokens', function() { + if (attrs.tagging !== undefined) { + var tokens = attrs.taggingTokens !== undefined ? attrs.taggingTokens.split('|') : [',','ENTER']; + $select.taggingTokens = {isActivated: true, tokens: tokens }; + } + }); + + attrs.$observe('spinnerEnabled', function() { + // $eval() is needed otherwise we get a string instead of a boolean + var spinnerEnabled = scope.$eval(attrs.spinnerEnabled); + $select.spinnerEnabled = spinnerEnabled !== undefined ? spinnerEnabled : uiSelectConfig.spinnerEnabled; + }); + + attrs.$observe('spinnerClass', function() { + var spinnerClass = attrs.spinnerClass; + $select.spinnerClass = spinnerClass !== undefined ? attrs.spinnerClass : uiSelectConfig.spinnerClass; + }); + + //Automatically gets focus when loaded + if (angular.isDefined(attrs.autofocus)){ + $timeout(function(){ + $select.setFocus(); + }); + } + + //Gets focus based on scope event name (e.g. focus-on='SomeEventName') + if (angular.isDefined(attrs.focusOn)){ + scope.$on(attrs.focusOn, function() { + $timeout(function(){ + $select.setFocus(); + }); + }); + } + + function onDocumentClick(e) { + if (!$select.open) return; //Skip it if dropdown is close + + var contains = false; + + if (window.jQuery) { + // Firefox 3.6 does not support element.contains() + // See Node.contains https://developer.mozilla.org/en-US/docs/Web/API/Node.contains + contains = window.jQuery.contains(element[0], e.target); + } else { + contains = element[0].contains(e.target); + } + + if (!contains && !$select.clickTriggeredSelect) { + var skipFocusser; + if (!$select.skipFocusser) { + //Will lose focus only with certain targets + var focusableControls = ['input','button','textarea','select']; + var targetController = angular.element(e.target).controller('uiSelect'); //To check if target is other ui-select + skipFocusser = targetController && targetController !== $select; //To check if target is other ui-select + if (!skipFocusser) skipFocusser = ~focusableControls.indexOf(e.target.tagName.toLowerCase()); //Check if target is input, button or textarea + } else { + skipFocusser = true; + } + $select.close(skipFocusser); + scope.$digest(); + } + $select.clickTriggeredSelect = false; + } + + // See Click everywhere but here event http://stackoverflow.com/questions/12931369 + $document.on('click', onDocumentClick); + + scope.$on('$destroy', function() { + $document.off('click', onDocumentClick); + }); + + // Move transcluded elements to their correct position in main template + transcludeFn(scope, function(clone) { + // See Transclude in AngularJS http://blog.omkarpatil.com/2012/11/transclude-in-angularjs.html + + // One day jqLite will be replaced by jQuery and we will be able to write: + // var transcludedElement = clone.filter('.my-class') + // instead of creating a hackish DOM element: + var transcluded = angular.element('
        ').append(clone); + + var transcludedMatch = transcluded.querySelectorAll('.ui-select-match'); + transcludedMatch.removeAttr('ui-select-match'); //To avoid loop in case directive as attr + transcludedMatch.removeAttr('data-ui-select-match'); // Properly handle HTML5 data-attributes + if (transcludedMatch.length !== 1) { + throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-match but got '{0}'.", transcludedMatch.length); + } + element.querySelectorAll('.ui-select-match').replaceWith(transcludedMatch); + + var transcludedChoices = transcluded.querySelectorAll('.ui-select-choices'); + transcludedChoices.removeAttr('ui-select-choices'); //To avoid loop in case directive as attr + transcludedChoices.removeAttr('data-ui-select-choices'); // Properly handle HTML5 data-attributes + if (transcludedChoices.length !== 1) { + throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-choices but got '{0}'.", transcludedChoices.length); + } + element.querySelectorAll('.ui-select-choices').replaceWith(transcludedChoices); + + var transcludedNoChoice = transcluded.querySelectorAll('.ui-select-no-choice'); + transcludedNoChoice.removeAttr('ui-select-no-choice'); //To avoid loop in case directive as attr + transcludedNoChoice.removeAttr('data-ui-select-no-choice'); // Properly handle HTML5 data-attributes + if (transcludedNoChoice.length == 1) { + element.querySelectorAll('.ui-select-no-choice').replaceWith(transcludedNoChoice); + } + }); + + // Support for appending the select field to the body when its open + var appendToBody = scope.$eval(attrs.appendToBody); + if (appendToBody !== undefined ? appendToBody : uiSelectConfig.appendToBody) { + scope.$watch('$select.open', function(isOpen) { + if (isOpen) { + positionDropdown(); + } else { + resetDropdown(); + } + }); + + // Move the dropdown back to its original location when the scope is destroyed. Otherwise + // it might stick around when the user routes away or the select field is otherwise removed + scope.$on('$destroy', function() { + resetDropdown(); + }); + } + + // Hold on to a reference to the .ui-select-container element for appendToBody support + var placeholder = null, + originalWidth = ''; + + function positionDropdown() { + // Remember the absolute position of the element + var offset = uisOffset(element); + + // Clone the element into a placeholder element to take its original place in the DOM + placeholder = angular.element('
        '); + placeholder[0].style.width = offset.width + 'px'; + placeholder[0].style.height = offset.height + 'px'; + element.after(placeholder); + + // Remember the original value of the element width inline style, so it can be restored + // when the dropdown is closed + originalWidth = element[0].style.width; + + // Now move the actual dropdown element to the end of the body + $document.find('body').append(element); + + element[0].style.position = 'absolute'; + element[0].style.left = offset.left + 'px'; + element[0].style.top = offset.top + 'px'; + element[0].style.width = offset.width + 'px'; + } + + function resetDropdown() { + if (placeholder === null) { + // The dropdown has not actually been display yet, so there's nothing to reset + return; + } + + // Move the dropdown element back to its original location in the DOM + placeholder.replaceWith(element); + placeholder = null; + + element[0].style.position = ''; + element[0].style.left = ''; + element[0].style.top = ''; + element[0].style.width = originalWidth; + + // Set focus back on to the moved element + $select.setFocus(); + } + + // Hold on to a reference to the .ui-select-dropdown element for direction support. + var dropdown = null, + directionUpClassName = 'direction-up'; + + // Support changing the direction of the dropdown if there isn't enough space to render it. + scope.$watch('$select.open', function() { + + if ($select.dropdownPosition === 'auto' || $select.dropdownPosition === 'up'){ + scope.calculateDropdownPos(); + } + + }); + + var setDropdownPosUp = function(offset, offsetDropdown){ + + offset = offset || uisOffset(element); + offsetDropdown = offsetDropdown || uisOffset(dropdown); + + dropdown[0].style.position = 'absolute'; + dropdown[0].style.top = (offsetDropdown.height * -1) + 'px'; + element.addClass(directionUpClassName); + + }; + + var setDropdownPosDown = function(offset, offsetDropdown){ + + element.removeClass(directionUpClassName); + + offset = offset || uisOffset(element); + offsetDropdown = offsetDropdown || uisOffset(dropdown); + + dropdown[0].style.position = ''; + dropdown[0].style.top = ''; + + }; + + var calculateDropdownPosAfterAnimation = function() { + // Delay positioning the dropdown until all choices have been added so its height is correct. + $timeout(function() { + if ($select.dropdownPosition === 'up') { + //Go UP + setDropdownPosUp(); + } else { + //AUTO + element.removeClass(directionUpClassName); + + var offset = uisOffset(element); + var offsetDropdown = uisOffset(dropdown); + + //https://code.google.com/p/chromium/issues/detail?id=342307#c4 + var scrollTop = $document[0].documentElement.scrollTop || $document[0].body.scrollTop; //To make it cross browser (blink, webkit, IE, Firefox). + + // Determine if the direction of the dropdown needs to be changed. + if (offset.top + offset.height + offsetDropdown.height > scrollTop + $document[0].documentElement.clientHeight) { + //Go UP + setDropdownPosUp(offset, offsetDropdown); + }else{ + //Go DOWN + setDropdownPosDown(offset, offsetDropdown); + } + } + + // Display the dropdown once it has been positioned. + dropdown[0].style.opacity = 1; + }); + }; + + var opened = false; + + scope.calculateDropdownPos = function() { + if ($select.open) { + dropdown = angular.element(element).querySelectorAll('.ui-select-dropdown'); + + if (dropdown.length === 0) { + return; + } + + // Hide the dropdown so there is no flicker until $timeout is done executing. + if ($select.search === '' && !opened) { + dropdown[0].style.opacity = 0; + opened = true; + } + + if (!uisOffset(dropdown).height && $select.$animate && $select.$animate.on && $select.$animate.enabled(dropdown)) { + var needsCalculated = true; + + $select.$animate.on('enter', dropdown, function (elem, phase) { + if (phase === 'close' && needsCalculated) { + calculateDropdownPosAfterAnimation(); + needsCalculated = false; + } + }); + } else { + calculateDropdownPosAfterAnimation(); + } + } else { + if (dropdown === null || dropdown.length === 0) { + return; + } + + // Reset the position of the dropdown. + dropdown[0].style.opacity = 0; + dropdown[0].style.position = ''; + dropdown[0].style.top = ''; + element.removeClass(directionUpClassName); + } + }; + }; + } + }; +}]); diff --git a/js/vendor/angular-ui-select/src/uiSelectMatchDirective.js b/js/vendor/angular-ui-select/src/uiSelectMatchDirective.js new file mode 100644 index 000000000..ef9bdcf33 --- /dev/null +++ b/js/vendor/angular-ui-select/src/uiSelectMatchDirective.js @@ -0,0 +1,48 @@ +uis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) { + return { + restrict: 'EA', + require: '^uiSelect', + replace: true, + transclude: true, + templateUrl: function(tElement) { + // Needed so the uiSelect can detect the transcluded content + tElement.addClass('ui-select-match'); + + var parent = tElement.parent(); + // Gets theme attribute from parent (ui-select) + var theme = getAttribute(parent, 'theme') || uiSelectConfig.theme; + var multi = angular.isDefined(getAttribute(parent, 'multiple')); + + return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html'); + }, + link: function(scope, element, attrs, $select) { + $select.lockChoiceExpression = attrs.uiLockChoice; + attrs.$observe('placeholder', function(placeholder) { + $select.placeholder = placeholder !== undefined ? placeholder : uiSelectConfig.placeholder; + }); + + function setAllowClear(allow) { + $select.allowClear = (angular.isDefined(allow)) ? (allow === '') ? true : (allow.toLowerCase() === 'true') : false; + } + + attrs.$observe('allowClear', setAllowClear); + setAllowClear(attrs.allowClear); + + if($select.multiple){ + $select.sizeSearchInput(); + } + + } + }; + + function getAttribute(elem, attribute) { + if (elem[0].hasAttribute(attribute)) + return elem.attr(attribute); + + if (elem[0].hasAttribute('data-' + attribute)) + return elem.attr('data-' + attribute); + + if (elem[0].hasAttribute('x-' + attribute)) + return elem.attr('x-' + attribute); + } +}]); diff --git a/js/vendor/angular-ui-select/src/uiSelectMultipleDirective.js b/js/vendor/angular-ui-select/src/uiSelectMultipleDirective.js new file mode 100644 index 000000000..629256fb1 --- /dev/null +++ b/js/vendor/angular-ui-select/src/uiSelectMultipleDirective.js @@ -0,0 +1,460 @@ +uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelectMinErr, $timeout) { + return { + restrict: 'EA', + require: ['^uiSelect', '^ngModel'], + + controller: ['$scope','$timeout', function($scope, $timeout){ + + var ctrl = this, + $select = $scope.$select, + ngModel; + + if (angular.isUndefined($select.selected)) + $select.selected = []; + + //Wait for link fn to inject it + $scope.$evalAsync(function(){ ngModel = $scope.ngModel; }); + + ctrl.activeMatchIndex = -1; + + ctrl.updateModel = function(){ + ngModel.$setViewValue(Date.now()); //Set timestamp as a unique string to force changes + ctrl.refreshComponent(); + }; + + ctrl.refreshComponent = function(){ + //Remove already selected items + //e.g. When user clicks on a selection, the selected array changes and + //the dropdown should remove that item + if($select.refreshItems){ + $select.refreshItems(); + } + if($select.sizeSearchInput){ + $select.sizeSearchInput(); + } + }; + + // Remove item from multiple select + ctrl.removeChoice = function(index){ + + // if the choice is locked, don't remove it + if($select.isLocked(null, index)) return false; + + var removedChoice = $select.selected[index]; + + var locals = {}; + locals[$select.parserResult.itemName] = removedChoice; + + $select.selected.splice(index, 1); + ctrl.activeMatchIndex = -1; + $select.sizeSearchInput(); + + // Give some time for scope propagation. + $timeout(function(){ + $select.onRemoveCallback($scope, { + $item: removedChoice, + $model: $select.parserResult.modelMapper($scope, locals) + }); + }); + + ctrl.updateModel(); + + return true; + }; + + ctrl.getPlaceholder = function(){ + //Refactor single? + if($select.selected && $select.selected.length) return; + return $select.placeholder; + }; + + + }], + controllerAs: '$selectMultiple', + + link: function(scope, element, attrs, ctrls) { + + var $select = ctrls[0]; + var ngModel = scope.ngModel = ctrls[1]; + var $selectMultiple = scope.$selectMultiple; + + //$select.selected = raw selected objects (ignoring any property binding) + + $select.multiple = true; + + //Input that will handle focus + $select.focusInput = $select.searchInput; + + //Properly check for empty if set to multiple + ngModel.$isEmpty = function(value) { + return !value || value.length === 0; + }; + + //From view --> model + ngModel.$parsers.unshift(function () { + var locals = {}, + result, + resultMultiple = []; + for (var j = $select.selected.length - 1; j >= 0; j--) { + locals = {}; + locals[$select.parserResult.itemName] = $select.selected[j]; + result = $select.parserResult.modelMapper(scope, locals); + resultMultiple.unshift(result); + } + return resultMultiple; + }); + + // From model --> view + ngModel.$formatters.unshift(function (inputValue) { + var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search + locals = {}, + result; + if (!data) return inputValue; + var resultMultiple = []; + var checkFnMultiple = function(list, value){ + if (!list || !list.length) return; + for (var p = list.length - 1; p >= 0; p--) { + locals[$select.parserResult.itemName] = list[p]; + result = $select.parserResult.modelMapper(scope, locals); + if($select.parserResult.trackByExp){ + var propsItemNameMatches = /(\w*)\./.exec($select.parserResult.trackByExp); + var matches = /\.([^\s]+)/.exec($select.parserResult.trackByExp); + if(propsItemNameMatches && propsItemNameMatches.length > 0 && propsItemNameMatches[1] == $select.parserResult.itemName){ + if(matches && matches.length>0 && result[matches[1]] == value[matches[1]]){ + resultMultiple.unshift(list[p]); + return true; + } + } + } + if (angular.equals(result,value)){ + resultMultiple.unshift(list[p]); + return true; + } + } + return false; + }; + if (!inputValue) return resultMultiple; //If ngModel was undefined + for (var k = inputValue.length - 1; k >= 0; k--) { + //Check model array of currently selected items + if (!checkFnMultiple($select.selected, inputValue[k])){ + //Check model array of all items available + if (!checkFnMultiple(data, inputValue[k])){ + //If not found on previous lists, just add it directly to resultMultiple + resultMultiple.unshift(inputValue[k]); + } + } + } + return resultMultiple; + }); + + //Watch for external model changes + scope.$watchCollection(function(){ return ngModel.$modelValue; }, function(newValue, oldValue) { + if (oldValue != newValue){ + //update the view value with fresh data from items, if there is a valid model value + if(angular.isDefined(ngModel.$modelValue)) { + ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters + } + $selectMultiple.refreshComponent(); + } + }); + + ngModel.$render = function() { + // Make sure that model value is array + if(!angular.isArray(ngModel.$viewValue)){ + // Have tolerance for null or undefined values + if (isNil(ngModel.$viewValue)){ + ngModel.$viewValue = []; + } else { + throw uiSelectMinErr('multiarr', "Expected model value to be array but got '{0}'", ngModel.$viewValue); + } + } + $select.selected = ngModel.$viewValue; + $selectMultiple.refreshComponent(); + scope.$evalAsync(); //To force $digest + }; + + scope.$on('uis:select', function (event, item) { + if($select.selected.length >= $select.limit) { + return; + } + $select.selected.push(item); + var locals = {}; + locals[$select.parserResult.itemName] = item; + + $timeout(function(){ + $select.onSelectCallback(scope, { + $item: item, + $model: $select.parserResult.modelMapper(scope, locals) + }); + }); + $selectMultiple.updateModel(); + }); + + scope.$on('uis:activate', function () { + $selectMultiple.activeMatchIndex = -1; + }); + + scope.$watch('$select.disabled', function(newValue, oldValue) { + // As the search input field may now become visible, it may be necessary to recompute its size + if (oldValue && !newValue) $select.sizeSearchInput(); + }); + + $select.searchInput.on('keydown', function(e) { + var key = e.which; + scope.$apply(function() { + var processed = false; + // var tagged = false; //Checkme + if(KEY.isHorizontalMovement(key)){ + processed = _handleMatchSelection(key); + } + if (processed && key != KEY.TAB) { + //TODO Check si el tab selecciona aun correctamente + //Crear test + e.preventDefault(); + e.stopPropagation(); + } + }); + }); + function _getCaretPosition(el) { + if(angular.isNumber(el.selectionStart)) return el.selectionStart; + // selectionStart is not supported in IE8 and we don't want hacky workarounds so we compromise + else return el.value.length; + } + // Handles selected options in "multiple" mode + function _handleMatchSelection(key){ + var caretPosition = _getCaretPosition($select.searchInput[0]), + length = $select.selected.length, + // none = -1, + first = 0, + last = length-1, + curr = $selectMultiple.activeMatchIndex, + next = $selectMultiple.activeMatchIndex+1, + prev = $selectMultiple.activeMatchIndex-1, + newIndex = curr; + + if(caretPosition > 0 || ($select.search.length && key == KEY.RIGHT)) return false; + + $select.close(); + + function getNewActiveMatchIndex(){ + switch(key){ + case KEY.LEFT: + // Select previous/first item + if(~$selectMultiple.activeMatchIndex) return prev; + // Select last item + else return last; + break; + case KEY.RIGHT: + // Open drop-down + if(!~$selectMultiple.activeMatchIndex || curr === last){ + $select.activate(); + return false; + } + // Select next/last item + else return next; + break; + case KEY.BACKSPACE: + // Remove selected item and select previous/first + if(~$selectMultiple.activeMatchIndex){ + if($selectMultiple.removeChoice(curr)) { + return prev; + } else { + return curr; + } + + } else { + // If nothing yet selected, select last item + return last; + } + break; + case KEY.DELETE: + // Remove selected item and select next item + if(~$selectMultiple.activeMatchIndex){ + $selectMultiple.removeChoice($selectMultiple.activeMatchIndex); + return curr; + } + else return false; + } + } + + newIndex = getNewActiveMatchIndex(); + + if(!$select.selected.length || newIndex === false) $selectMultiple.activeMatchIndex = -1; + else $selectMultiple.activeMatchIndex = Math.min(last,Math.max(first,newIndex)); + + return true; + } + + $select.searchInput.on('keyup', function(e) { + + if ( ! KEY.isVerticalMovement(e.which) ) { + scope.$evalAsync( function () { + $select.activeIndex = $select.taggingLabel === false ? -1 : 0; + }); + } + // Push a "create new" item into array if there is a search string + if ( $select.tagging.isActivated && $select.search.length > 0 ) { + + // return early with these keys + if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || KEY.isVerticalMovement(e.which) ) { + return; + } + // always reset the activeIndex to the first item when tagging + $select.activeIndex = $select.taggingLabel === false ? -1 : 0; + // taggingLabel === false bypasses all of this + if ($select.taggingLabel === false) return; + + var items = angular.copy( $select.items ); + var stashArr = angular.copy( $select.items ); + var newItem; + var item; + var hasTag = false; + var dupeIndex = -1; + var tagItems; + var tagItem; + + // case for object tagging via transform `$select.tagging.fct` function + if ( $select.tagging.fct !== undefined) { + tagItems = $select.$filter('filter')(items,{'isTag': true}); + if ( tagItems.length > 0 ) { + tagItem = tagItems[0]; + } + // remove the first element, if it has the `isTag` prop we generate a new one with each keyup, shaving the previous + if ( items.length > 0 && tagItem ) { + hasTag = true; + items = items.slice(1,items.length); + stashArr = stashArr.slice(1,stashArr.length); + } + newItem = $select.tagging.fct($select.search); + // verify the new tag doesn't match the value of a possible selection choice or an already selected item. + if ( + stashArr.some(function (origItem) { + return angular.equals(origItem, newItem); + }) || + $select.selected.some(function (origItem) { + return angular.equals(origItem, newItem); + }) + ) { + scope.$evalAsync(function () { + $select.activeIndex = 0; + $select.items = items; + }); + return; + } + if (newItem) newItem.isTag = true; + // handle newItem string and stripping dupes in tagging string context + } else { + // find any tagging items already in the $select.items array and store them + tagItems = $select.$filter('filter')(items,function (item) { + return item.match($select.taggingLabel); + }); + if ( tagItems.length > 0 ) { + tagItem = tagItems[0]; + } + item = items[0]; + // remove existing tag item if found (should only ever be one tag item) + if ( item !== undefined && items.length > 0 && tagItem ) { + hasTag = true; + items = items.slice(1,items.length); + stashArr = stashArr.slice(1,stashArr.length); + } + newItem = $select.search+' '+$select.taggingLabel; + if ( _findApproxDupe($select.selected, $select.search) > -1 ) { + return; + } + // verify the the tag doesn't match the value of an existing item from + // the searched data set or the items already selected + if ( _findCaseInsensitiveDupe(stashArr.concat($select.selected)) ) { + // if there is a tag from prev iteration, strip it / queue the change + // and return early + if ( hasTag ) { + items = stashArr; + scope.$evalAsync( function () { + $select.activeIndex = 0; + $select.items = items; + }); + } + return; + } + if ( _findCaseInsensitiveDupe(stashArr) ) { + // if there is a tag from prev iteration, strip it + if ( hasTag ) { + $select.items = stashArr.slice(1,stashArr.length); + } + return; + } + } + if ( hasTag ) dupeIndex = _findApproxDupe($select.selected, newItem); + // dupe found, shave the first item + if ( dupeIndex > -1 ) { + items = items.slice(dupeIndex+1,items.length-1); + } else { + items = []; + if (newItem) items.push(newItem); + items = items.concat(stashArr); + } + scope.$evalAsync( function () { + $select.activeIndex = 0; + $select.items = items; + + if ($select.isGrouped) { + // update item references in groups, so that indexOf will work after angular.copy + var itemsWithoutTag = newItem ? items.slice(1) : items; + $select.setItemsFn(itemsWithoutTag); + if (newItem) { + // add tag item as a new group + $select.items.unshift(newItem); + $select.groups.unshift({name: '', items: [newItem], tagging: true}); + } + } + }); + } + }); + function _findCaseInsensitiveDupe(arr) { + if ( arr === undefined || $select.search === undefined ) { + return false; + } + var hasDupe = arr.filter( function (origItem) { + if ( $select.search.toUpperCase() === undefined || origItem === undefined ) { + return false; + } + return origItem.toUpperCase() === $select.search.toUpperCase(); + }).length > 0; + + return hasDupe; + } + function _findApproxDupe(haystack, needle) { + var dupeIndex = -1; + if(angular.isArray(haystack)) { + var tempArr = angular.copy(haystack); + for (var i = 0; i model + ngModel.$parsers.unshift(function (inputValue) { + // Keep original value for undefined and null + if (isNil(inputValue)) { + return inputValue; + } + + var locals = {}, + result; + locals[$select.parserResult.itemName] = inputValue; + result = $select.parserResult.modelMapper(scope, locals); + return result; + }); + + //From model --> view + ngModel.$formatters.unshift(function (inputValue) { + // Keep original value for undefined and null + if (isNil(inputValue)) { + return inputValue; + } + + var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search + locals = {}, + result; + if (data){ + var checkFnSingle = function(d){ + locals[$select.parserResult.itemName] = d; + result = $select.parserResult.modelMapper(scope, locals); + return result === inputValue; + }; + //If possible pass same object stored in $select.selected + if ($select.selected && checkFnSingle($select.selected)) { + return $select.selected; + } + for (var i = data.length - 1; i >= 0; i--) { + if (checkFnSingle(data[i])) return data[i]; + } + } + return inputValue; + }); + + //Update viewValue if model change + scope.$watch('$select.selected', function(newValue) { + if (ngModel.$viewValue !== newValue) { + ngModel.$setViewValue(newValue); + } + }); + + ngModel.$render = function() { + $select.selected = ngModel.$viewValue; + }; + + scope.$on('uis:select', function (event, item) { + $select.selected = item; + var locals = {}; + locals[$select.parserResult.itemName] = item; + + $timeout(function() { + $select.onSelectCallback(scope, { + $item: item, + $model: isNil(item) ? item : $select.parserResult.modelMapper(scope, locals) + }); + }); + }); + + scope.$on('uis:close', function (event, skipFocusser) { + $timeout(function(){ + $select.focusser.prop('disabled', false); + if (!skipFocusser) $select.focusser[0].focus(); + },0,false); + }); + + scope.$on('uis:activate', function () { + focusser.prop('disabled', true); //Will reactivate it on .close() + }); + + //Idea from: https://github.com/ivaynberg/select2/blob/79b5bf6db918d7560bdd959109b7bcfb47edaf43/select2.js#L1954 + var focusser = angular.element(""); + $compile(focusser)(scope); + $select.focusser = focusser; + + //Input that will handle focus + $select.focusInput = focusser; + + element.parent().append(focusser); + focusser.bind("focus", function(){ + scope.$evalAsync(function(){ + $select.focus = true; + }); + }); + focusser.bind("blur", function(){ + scope.$evalAsync(function(){ + $select.focus = false; + }); + }); + focusser.bind("keydown", function(e){ + + if (e.which === KEY.BACKSPACE && $select.backspaceReset !== false) { + e.preventDefault(); + e.stopPropagation(); + $select.select(undefined); + scope.$apply(); + return; + } + + if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) { + return; + } + + if (e.which == KEY.DOWN || e.which == KEY.UP || e.which == KEY.ENTER || e.which == KEY.SPACE){ + e.preventDefault(); + e.stopPropagation(); + $select.activate(); + } + + scope.$digest(); + }); + + focusser.bind("keyup input", function(e){ + + if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) { + return; + } + + $select.activate(focusser.val()); //User pressed some regular key, so we pass it to the search input + focusser.val(''); + scope.$digest(); + + }); + + + } + }; +}]); diff --git a/js/vendor/angular-ui-select/src/uiSelectSortDirective.js b/js/vendor/angular-ui-select/src/uiSelectSortDirective.js new file mode 100644 index 000000000..43a546171 --- /dev/null +++ b/js/vendor/angular-ui-select/src/uiSelectSortDirective.js @@ -0,0 +1,148 @@ +// Make multiple matches sortable +uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', function($timeout, uiSelectConfig, uiSelectMinErr) { + return { + require: ['^^uiSelect', '^ngModel'], + link: function(scope, element, attrs, ctrls) { + if (scope[attrs.uiSelectSort] === null) { + throw uiSelectMinErr('sort', 'Expected a list to sort'); + } + + var $select = ctrls[0]; + var $ngModel = ctrls[1]; + + var options = angular.extend({ + axis: 'horizontal' + }, + scope.$eval(attrs.uiSelectSortOptions)); + + var axis = options.axis; + var draggingClassName = 'dragging'; + var droppingClassName = 'dropping'; + var droppingBeforeClassName = 'dropping-before'; + var droppingAfterClassName = 'dropping-after'; + + scope.$watch(function(){ + return $select.sortable; + }, function(newValue){ + if (newValue) { + element.attr('draggable', true); + } else { + element.removeAttr('draggable'); + } + }); + + element.on('dragstart', function(event) { + element.addClass(draggingClassName); + + (event.dataTransfer || event.originalEvent.dataTransfer).setData('text', scope.$index.toString()); + }); + + element.on('dragend', function() { + removeClass(draggingClassName); + }); + + var move = function(from, to) { + /*jshint validthis: true */ + this.splice(to, 0, this.splice(from, 1)[0]); + }; + + var removeClass = function(className) { + angular.forEach($select.$element.querySelectorAll('.' + className), function(el){ + angular.element(el).removeClass(className); + }); + }; + + var dragOverHandler = function(event) { + event.preventDefault(); + + var offset = axis === 'vertical' ? event.offsetY || event.layerY || (event.originalEvent ? event.originalEvent.offsetY : 0) : event.offsetX || event.layerX || (event.originalEvent ? event.originalEvent.offsetX : 0); + + if (offset < (this[axis === 'vertical' ? 'offsetHeight' : 'offsetWidth'] / 2)) { + removeClass(droppingAfterClassName); + element.addClass(droppingBeforeClassName); + + } else { + removeClass(droppingBeforeClassName); + element.addClass(droppingAfterClassName); + } + }; + + var dropTimeout; + + var dropHandler = function(event) { + event.preventDefault(); + + var droppedItemIndex = parseInt((event.dataTransfer || event.originalEvent.dataTransfer).getData('text'), 10); + + // prevent event firing multiple times in firefox + $timeout.cancel(dropTimeout); + dropTimeout = $timeout(function() { + _dropHandler(droppedItemIndex); + }, 20); + }; + + var _dropHandler = function(droppedItemIndex) { + var theList = scope.$eval(attrs.uiSelectSort); + var itemToMove = theList[droppedItemIndex]; + var newIndex = null; + + if (element.hasClass(droppingBeforeClassName)) { + if (droppedItemIndex < scope.$index) { + newIndex = scope.$index - 1; + } else { + newIndex = scope.$index; + } + } else { + if (droppedItemIndex < scope.$index) { + newIndex = scope.$index; + } else { + newIndex = scope.$index + 1; + } + } + + move.apply(theList, [droppedItemIndex, newIndex]); + + $ngModel.$setViewValue(Date.now()); + + scope.$apply(function() { + scope.$emit('uiSelectSort:change', { + array: theList, + item: itemToMove, + from: droppedItemIndex, + to: newIndex + }); + }); + + removeClass(droppingClassName); + removeClass(droppingBeforeClassName); + removeClass(droppingAfterClassName); + + element.off('drop', dropHandler); + }; + + element.on('dragenter', function() { + if (element.hasClass(draggingClassName)) { + return; + } + + element.addClass(droppingClassName); + + element.on('dragover', dragOverHandler); + element.on('drop', dropHandler); + }); + + element.on('dragleave', function(event) { + if (event.target != element) { + return; + } + + removeClass(droppingClassName); + removeClass(droppingBeforeClassName); + removeClass(droppingAfterClassName); + + element.off('dragover', dragOverHandler); + element.off('drop', dropHandler); + }); + } + }; +}]); diff --git a/js/vendor/angular-ui-select/src/uisDebounceService.js b/js/vendor/angular-ui-select/src/uisDebounceService.js new file mode 100644 index 000000000..f92193a94 --- /dev/null +++ b/js/vendor/angular-ui-select/src/uisDebounceService.js @@ -0,0 +1,24 @@ +/** + * Debounces functions + * + * Taken from UI Bootstrap $$debounce source code + * See https://github.com/angular-ui/bootstrap/blob/master/src/debounce/debounce.js + * + */ +uis.factory('$$uisDebounce', ['$timeout', function($timeout) { + return function(callback, debounceTime) { + var timeoutPromise; + + return function() { + var self = this; + var args = Array.prototype.slice.call(arguments); + if (timeoutPromise) { + $timeout.cancel(timeoutPromise); + } + + timeoutPromise = $timeout(function() { + callback.apply(self, args); + }, debounceTime); + }; + }; +}]); diff --git a/js/vendor/angular-ui-select/src/uisOpenCloseDirective.js b/js/vendor/angular-ui-select/src/uisOpenCloseDirective.js new file mode 100644 index 000000000..9b0a00821 --- /dev/null +++ b/js/vendor/angular-ui-select/src/uisOpenCloseDirective.js @@ -0,0 +1,19 @@ +uis.directive('uisOpenClose', ['$parse', '$timeout', function ($parse, $timeout) { + return { + restrict: 'A', + require: 'uiSelect', + link: function (scope, element, attrs, $select) { + $select.onOpenCloseCallback = $parse(attrs.uisOpenClose); + + scope.$watch('$select.open', function (isOpen, previousState) { + if (isOpen !== previousState) { + $timeout(function () { + $select.onOpenCloseCallback(scope, { + isOpen: isOpen + }); + }); + } + }); + } + }; +}]); diff --git a/js/vendor/angular-ui-select/src/uisRepeatParserService.js b/js/vendor/angular-ui-select/src/uisRepeatParserService.js new file mode 100644 index 000000000..005bed15d --- /dev/null +++ b/js/vendor/angular-ui-select/src/uisRepeatParserService.js @@ -0,0 +1,83 @@ +/** + * Parses "repeat" attribute. + * + * Taken from AngularJS ngRepeat source code + * See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L211 + * + * Original discussion about parsing "repeat" attribute instead of fully relying on ng-repeat: + * https://github.com/angular-ui/ui-select/commit/5dd63ad#commitcomment-5504697 + */ + +uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinErr, $parse) { + var self = this; + + /** + * Example: + * expression = "address in addresses | filter: {street: $select.search} track by $index" + * itemName = "address", + * source = "addresses | filter: {street: $select.search}", + * trackByExp = "$index", + */ + self.parse = function(expression) { + + + var match; + //var isObjectCollection = /\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)/.test(expression); + // If an array is used as collection + + // if (isObjectCollection){ + // 000000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000055555555555000000000000000000000066666666600000000 + match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); + + // 1 Alias + // 2 Item + // 3 Key on (key,value) + // 4 Value on (key,value) + // 5 Source expression (including filters) + // 6 Track by + + if (!match) { + throw uiSelectMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.", + expression); + } + + var source = match[5], + filters = ''; + + // When using (key,value) ui-select requires filters to be extracted, since the object + // is converted to an array for $select.items + // (in which case the filters need to be reapplied) + if (match[3]) { + // Remove any enclosing parenthesis + source = match[5].replace(/(^\()|(\)$)/g, ''); + // match all after | but not after || + var filterMatch = match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/); + if(filterMatch && filterMatch[1].trim()) { + filters = filterMatch[1]; + source = source.replace(filters, ''); + } + } + + return { + itemName: match[4] || match[2], // (lhs) Left-hand side, + keyName: match[3], //for (key, value) syntax + source: $parse(source), + filters: filters, + trackByExp: match[6], + modelMapper: $parse(match[1] || match[4] || match[2]), + repeatExpression: function (grouped) { + var expression = this.itemName + ' in ' + (grouped ? '$group.items' : '$select.items'); + if (this.trackByExp) { + expression += ' track by ' + this.trackByExp; + } + return expression; + } + }; + + }; + + self.getGroupNgRepeatExpression = function() { + return '$group in $select.groups track by $group.name'; + }; + +}]); diff --git a/js/vendor/angular-ui-select/test/helpers.js b/js/vendor/angular-ui-select/test/helpers.js new file mode 100644 index 000000000..e4d85da53 --- /dev/null +++ b/js/vendor/angular-ui-select/test/helpers.js @@ -0,0 +1,15 @@ +beforeEach(function() { + jasmine.addMatchers({ + toHaveClass: function(util, customEqualityTesters) { + return { + compare: function(actual, cls) { + var pass = actual.hasClass(cls); + return { + pass: pass, + message: "Expected '" + actual + "'" + (pass ? ' not ' : ' ') + "to have class '" + cls + "'." + }; + } + }; + } + }); +}); diff --git a/js/vendor/angular-ui-select/test/select.spec.js b/js/vendor/angular-ui-select/test/select.spec.js new file mode 100644 index 000000000..a23c63f68 --- /dev/null +++ b/js/vendor/angular-ui-select/test/select.spec.js @@ -0,0 +1,3381 @@ +'use strict'; + +describe('ui-select tests', function () { + var scope, $rootScope, $compile, $timeout, $injector, $q, uisRepeatParser; + + var Key = { + Enter: 13, + Tab: 9, + Up: 38, + Down: 40, + Left: 37, + Right: 39, + Backspace: 8, + Delete: 46, + Escape: 27 + }; + + function isNil(value) { + return angular.isUndefined(value) || value === null; + } + + //create a directive that wraps ui-select + angular.module('wrapperDirective', ['ui.select']); + angular.module('wrapperDirective').directive('wrapperUiSelect', function () { + return { + restrict: 'EA', + template: ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        ', + require: 'ngModel', + scope: true, + + link: function (scope, element, attrs, ctrl) { + + } + }; + + }); + + /* Create a directive that can be applied to the ui-select instance to test + * the effects of Angular's validation process on the control. + * + * Does not currently work with single property binding. Looks at the + * selected object or objects for a "valid" property. If all selected objects + * have a "valid" property that is truthy, the validator passes. + */ + angular.module('testValidator', []); + angular.module('testValidator').directive('testValidator', function () { + return { + restrict: 'A', + require: 'ngModel', + link: function (scope, element, attrs, ngModel) { + ngModel.$validators.testValidator = function (modelValue, viewValue) { + if (isNil(modelValue)) { + return true; + } else if (angular.isArray(modelValue)) { + var allValid = true, idx = modelValue.length; + while (idx-- > 0 && allValid) { + allValid = allValid && modelValue[idx].valid; + } + return allValid; + } else { + return !!modelValue.valid; + } + } + } + } + }); + + beforeEach(module('ngSanitize', 'ui.select', 'wrapperDirective', 'testValidator')); + + beforeEach(function () { + module(function ($provide) { + $provide.factory('uisOffset', function () { + return function (el) { + return { top: 100, left: 200, width: 300, height: 400 }; + }; + }); + }); + }); + + beforeEach(inject(function (_$rootScope_, _$compile_, _$timeout_, _$injector_, _$q_, _uisRepeatParser_) { + $rootScope = _$rootScope_; + scope = $rootScope.$new(); + $compile = _$compile_; + $timeout = _$timeout_; + $injector = _$injector_; + $q = _$q_; + uisRepeatParser = _uisRepeatParser_; + scope.selection = {}; + + scope.getGroupLabel = function (person) { + return person.age % 2 ? 'even' : 'odd'; + }; + + scope.filterInvertOrder = function (groups) { + return groups.sort(function (groupA, groupB) { + return groupA.name.toLocaleLowerCase() < groupB.name.toLocaleLowerCase(); + }); + }; + + + scope.people = [ + { name: 'Adam', email: 'adam@email.com', group: 'Foo', age: 12 }, + { name: 'Amalie', email: 'amalie@email.com', group: 'Foo', age: 12 }, + { name: 'Estefanía', email: 'estefanía@email.com', group: 'Foo', age: 21 }, + { name: 'Adrian', email: 'adrian@email.com', group: 'Foo', age: 21 }, + { name: 'Wladimir', email: 'wladimir@email.com', group: 'Foo', age: 30 }, + { name: 'Samantha', email: 'samantha@email.com', group: 'bar', age: 30 }, + { name: 'Nicole', email: 'nicole@email.com', group: 'bar', age: 43 }, + { name: 'Natasha', email: 'natasha@email.com', group: 'Baz', age: 54 } + ]; + + scope.peopleObj = { + '1': { name: 'Adam', email: 'adam@email.com', age: 12, country: 'United States' }, + '2': { name: 'Amalie', email: 'amalie@email.com', age: 12, country: 'Argentina' }, + '3': { name: 'Estefanía', email: 'estefania@email.com', age: 21, country: 'Argentina' }, + '4': { name: 'Adrian', email: 'adrian@email.com', age: 21, country: 'Ecuador' }, + '5': { name: 'Wladimir', email: 'wladimir@email.com', age: 30, country: 'Ecuador' }, + '6': { name: 'Samantha', email: 'samantha@email.com', age: 30, country: 'United States' }, + '7': { name: 'Nicole', email: 'nicole@email.com', age: 43, country: 'Colombia' }, + '8': { name: 'Natasha', email: 'natasha@email.com', age: 54, country: 'Ecuador' }, + '9': { name: 'Michael', email: 'michael@email.com', age: 15, country: 'Colombia' }, + '10': { name: 'Nicolás', email: 'nicolas@email.com', age: 43, country: 'Colombia' } + }; + + scope.someObject = {}; + scope.someObject.people = [ + { name: 'Adam', email: 'adam@email.com', group: 'Foo', age: 12 }, + { name: 'Amalie', email: 'amalie@email.com', group: 'Foo', age: 12 }, + { name: 'Estefanía', email: 'estefanía@email.com', group: 'Foo', age: 21 }, + { name: 'Adrian', email: 'adrian@email.com', group: 'Foo', age: 21 }, + { name: 'Wladimir', email: 'wladimir@email.com', group: 'Foo', age: 30 }, + { name: 'Samantha', email: 'samantha@email.com', group: 'bar', age: 30 }, + { name: 'Nicole', email: 'nicole@email.com', group: 'bar', age: 43 }, + { name: 'Natasha', email: 'natasha@email.com', group: 'Baz', age: 54 } + ]; + })); + + + // DSL (domain-specific language) + + function compileTemplate(template) { + var el = $compile(angular.element(template))(scope); + scope.$digest(); + return el; + } + + function createUiSelect(attrs) { + var attrsHtml = '', + matchAttrsHtml = '', + choicesAttrsHtml = '' + if (attrs !== undefined) { + if (attrs.disabled !== undefined) { attrsHtml += ' ng-disabled="' + attrs.disabled + '"'; } + if (attrs.required !== undefined) { attrsHtml += ' ng-required="' + attrs.required + '"'; } + if (attrs.theme !== undefined) { attrsHtml += ' theme="' + attrs.theme + '"'; } + if (attrs.tabindex !== undefined) { attrsHtml += ' tabindex="' + attrs.tabindex + '"'; } + if (attrs.tagging !== undefined) { attrsHtml += ' tagging="' + attrs.tagging + '"'; } + if (attrs.taggingTokens !== undefined) { attrsHtml += ' tagging-tokens="' + attrs.taggingTokens + '"'; } + if (attrs.title !== undefined) { attrsHtml += ' title="' + attrs.title + '"'; } + if (attrs.appendToBody !== undefined) { attrsHtml += ' append-to-body="' + attrs.appendToBody + '"'; } + if (attrs.allowClear !== undefined) { matchAttrsHtml += ' allow-clear="' + attrs.allowClear + '"'; } + if (attrs.inputId !== undefined) { attrsHtml += ' input-id="' + attrs.inputId + '"'; } + if (attrs.ngClass !== undefined) { attrsHtml += ' ng-class="' + attrs.ngClass + '"'; } + if (attrs.resetSearchInput !== undefined) { attrsHtml += ' reset-search-input="' + attrs.resetSearchInput + '"'; } + if (attrs.closeOnSelect !== undefined) { attrsHtml += ' close-on-select="' + attrs.closeOnSelect + '"'; } + if (attrs.spinnerEnabled !== undefined) { attrsHtml += ' spinner-enabled="' + attrs.spinnerEnabled + '"'; } + if (attrs.spinnerClass !== undefined) { attrsHtml += ' spinner-class="' + attrs.spinnerClass + '"'; } + if (attrs.refresh !== undefined) { choicesAttrsHtml += ' refresh="' + attrs.refresh + '"'; } + if (attrs.refreshDelay !== undefined) { choicesAttrsHtml += ' refresh-delay="' + attrs.refreshDelay + '"'; } + if (attrs.backspaceReset !== undefined) { attrsHtml += ' backspace-reset="' + attrs.backspaceReset + '"'; } + if (attrs.uiDisableChoice !== undefined) { choicesAttrsHtml += ' ui-disable-choice="' + attrs.uiDisableChoice + '"'; } + if (attrs.removeSelected !== undefined) { attrsHtml += ' remove-selected="' + attrs.removeSelected + '"'; } + } + + return compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + } + + function getMatchLabel(el) { + return $(el).find('.ui-select-match > span:first > span[ng-transclude]:not(.ng-hide)').text(); + } + + function clickItem(el, text) { + + if (!isDropdownOpened(el)) { + openDropdown(el); + } + + $(el).find('.ui-select-choices-row div:contains("' + text + '")').click(); + scope.$digest(); + } + + function clickMatch(el) { + $(el).find('.ui-select-match > span:first').click(); + scope.$digest(); + } + + function isDropdownOpened(el) { + // Does not work with jQuery 2.*, have to use jQuery 1.11.* + // This will be fixed in AngularJS 1.3 + // See issue with unit-testing directive using karma https://github.com/angular/angular.js/issues/4640#issuecomment-35002427 + return el.scope().$select.open && el.hasClass('open'); + } + + function triggerKeydown(element, keyCode) { + var e = jQuery.Event("keydown"); + e.which = keyCode; + e.keyCode = keyCode; + element.trigger(e); + } + function triggerPaste(element, text, isClipboardEvent) { + var e = jQuery.Event("paste"); + if (isClipboardEvent) { + e.clipboardData = { + getData: function () { + return text; + } + }; + } else { + e.originalEvent = { + clipboardData: { + getData: function () { + return text; + } + } + }; + } + element.trigger(e); + } + + function setSearchText(el, text) { + el.scope().$select.search = text; + scope.$digest(); + $timeout.flush(); + } + + function openDropdown(el) { + var $select = el.scope().$select; + $select.open = true; + scope.$digest(); + } + + function closeDropdown(el) { + var $select = el.scope().$select; + $select.open = false; + scope.$digest(); + } + + function showChoicesForSearch(el, search) { + setSearchText(el, search); + el.scope().$select.searchInput.trigger('keyup'); + scope.$digest(); + } + + it('should initialize selected choices with an array if choices source is undefined', function () { + var el = createUiSelect(), + ctrl = el.scope().$select; + + ctrl.setItemsFn(); // setPlainItems + expect(ctrl.items).toEqual([]); + }); + + // Tests + //uisRepeatParser + + it('should parse simple repeat syntax', function () { + + var locals = {}; + locals.people = [{ name: 'Wladimir' }, { name: 'Samantha' }]; + locals.person = locals.people[0]; + + var parserResult = uisRepeatParser.parse('person in people'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.modelMapper(locals)).toBe(locals.person); + expect(parserResult.source(locals)).toBe(locals.people); + + var ngExp = parserResult.repeatExpression(false); + expect(ngExp).toBe('person in $select.items'); + + var ngExpGrouped = parserResult.repeatExpression(true); + expect(ngExpGrouped).toBe('person in $group.items'); + + }); + + it('should parse simple repeat syntax', function () { + + var locals = {}; + locals.people = [{ name: 'Wladimir' }, { name: 'Samantha' }]; + locals.person = locals.people[0]; + + var parserResult = uisRepeatParser.parse('person.name as person in people'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.modelMapper(locals)).toBe(locals.person.name); + expect(parserResult.source(locals)).toBe(locals.people); + + }); + + it('should parse simple property binding repeat syntax', function () { + + var locals = {}; + locals.people = [{ name: 'Wladimir' }, { name: 'Samantha' }]; + locals.person = locals.people[0]; + + var parserResult = uisRepeatParser.parse('person.name as person in people'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.modelMapper(locals)).toBe(locals.person.name); + expect(parserResult.source(locals)).toBe(locals.people); + + }); + + it('should parse simple property binding repeat syntax with a basic filter', function () { + + var locals = {}; + locals.people = [{ name: 'Wladimir' }, { name: 'Samantha' }]; + locals.person = locals.people[1]; + + var parserResult = uisRepeatParser.parse('person.name as person in people | filter: { name: \'Samantha\' }'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.modelMapper(locals)).toBe(locals.person.name); + expect(parserResult.source(locals)).toEqual([locals.person]); + + }); + + it('should parse simple property binding repeat syntax with track by', function () { + + var locals = {}; + locals.people = [{ name: 'Wladimir' }, { name: 'Samantha' }]; + locals.person = locals.people[0]; + + var parserResult = uisRepeatParser.parse('person.name as person in people track by person.name'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.modelMapper(locals)).toBe(locals.person.name); + expect(parserResult.source(locals)).toBe(locals.people); + + }); + + it('should parse (key, value) repeat syntax', function () { + + var locals = {}; + locals.people = { 'WC': { name: 'Wladimir' }, 'SH': { name: 'Samantha' } }; + locals.person = locals.people[0]; + + var parserResult = uisRepeatParser.parse('(key,person) in people'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.keyName).toBe('key'); + expect(parserResult.modelMapper(locals)).toBe(locals.person); + expect(parserResult.source(locals)).toBe(locals.people); + + var ngExp = parserResult.repeatExpression(false); + expect(ngExp).toBe('person in $select.items'); + + var ngExpGrouped = parserResult.repeatExpression(true); + expect(ngExpGrouped).toBe('person in $group.items'); + + }); + + it('should parse simple property binding with (key, value) repeat syntax', function () { + + var locals = {}; + locals.people = { 'WC': { name: 'Wladimir' }, 'SH': { name: 'Samantha' } }; + locals.person = locals.people['WC']; + + var parserResult = uisRepeatParser.parse('person.name as (key, person) in people'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.keyName).toBe('key'); + expect(parserResult.modelMapper(locals)).toBe(locals.person.name); + expect(parserResult.source(locals)).toBe(locals.people); + + }); + + it('should should accept a "collection expresion" only if its not (key, value) repeat syntax', function () { + + var locals = {}; + locals.people = { 'WC': { name: 'Wladimir' }, 'SH': { name: 'Samantha' } }; + locals.person = locals.people['WC']; + + var parserResult = uisRepeatParser.parse('person.name as person in (peopleNothing || people)'); + expect(parserResult.itemName).toBe('person'); + expect(parserResult.modelMapper(locals)).toBe(locals.person.name); + // expect(parserResult.source(locals)).toBe(locals.people); + + }); + + it('should should throw if "collection expresion" used and (key, value) repeat syntax', function () { + + var locals = {}; + locals.people = { 'WC': { name: 'Wladimir' }, 'SH': { name: 'Samantha' } }; + locals.person = locals.people['WC']; + + function errorFunctionWrapper() { + uisRepeatParser.parse('person.name as (key,person) in (people | someFilter)'); + } + + expect(errorFunctionWrapper).toThrow(); + + }); + + it('should not leak memory', function () { + var cacheLenght = Object.keys(angular.element.cache).length; + createUiSelect().remove(); + scope.$destroy(); + expect(Object.keys(angular.element.cache).length).toBe(cacheLenght); + }); + + it('should compile child directives', function () { + var el = createUiSelect(); + + var searchEl = $(el).find('.ui-select-search'); + expect(searchEl.length).toEqual(1); + + var matchEl = $(el).find('.ui-select-match'); + expect(matchEl.length).toEqual(1); + + var choicesContentEl = $(el).find('.ui-select-choices-content'); + expect(choicesContentEl.length).toEqual(1); + + var choicesContainerEl = $(el).find('.ui-select-choices'); + expect(choicesContainerEl.length).toEqual(1); + + openDropdown(el); + var choicesEls = $(el).find('.ui-select-choices-row'); + expect(choicesEls.length).toEqual(8); + }); + + it('should correctly render initial state', function () { + scope.selection.selected = scope.people[0]; + + var el = createUiSelect(); + + expect(getMatchLabel(el)).toEqual('Adam'); + }); + + it('should merge both ng-class attributes defined on ui-select and its templates', function () { + var el = createUiSelect({ + ngClass: "{class: expression}" + }); + + expect($(el).attr('ng-class')).toEqual("{class: expression, open: $select.open}"); + }); + + it('should correctly render initial state with track by feature', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + scope.selection.selected = { name: 'Samantha', email: 'something different than array source', group: 'bar', age: 30 }; + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + it('should correctly render initial state with track by $index', function () { + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ + {{person.email}} \ + \ + ' + ); + + openDropdown(el); + + var generatedId = el.scope().$select.generatedId; + expect($(el).find('[id="ui-select-choices-row-' + generatedId + '-0"]').length).toEqual(1); + }); + + it('should utilize wrapper directive ng-model', function () { + var el = compileTemplate(''); + scope.selection.selected = { name: 'Samantha', email: 'something different than array source', group: 'bar', age: 30 }; + scope.$digest(); + expect($(el).find('.ui-select-container > .ui-select-match > span:first > span[ng-transclude]:not(.ng-hide)').text()).toEqual('Samantha'); + }); + + it('should display the choices when activated', function () { + var el = createUiSelect(); + + expect(isDropdownOpened(el)).toEqual(false); + + clickMatch(el); + + expect(isDropdownOpened(el)).toEqual(true); + }); + + it('should select an item', function () { + var el = createUiSelect(); + + clickItem(el, 'Samantha'); + + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + it('should select an item (controller)', function () { + var el = createUiSelect(); + + el.scope().$select.select(scope.people[1]); + scope.$digest(); + + expect(getMatchLabel(el)).toEqual('Amalie'); + }); + + it('should not select a non existing item', function () { + var el = createUiSelect(); + + clickItem(el, "I don't exist"); + + expect(getMatchLabel(el)).toEqual(''); + }); + + it('should close the choices when an item is selected', function () { + var el = createUiSelect(); + + clickMatch(el); + + expect(isDropdownOpened(el)).toEqual(true); + + clickItem(el, 'Samantha'); + + expect(isDropdownOpened(el)).toEqual(false); + }); + + + it('should open/close dropdown when clicking caret icon', function () { + + var el = createUiSelect({ theme: 'select2' }); + var searchInput = el.find('.ui-select-search'); + var $select = el.scope().$select; + + expect($select.open).toEqual(false); + + el.find(".ui-select-toggle").click(); + expect($select.open).toEqual(true); + + + el.find(".ui-select-toggle").click(); + expect($select.open).toEqual(false); + }); + + it('should clear selection', function () { + scope.selection.selected = scope.people[0]; + + var el = createUiSelect({ theme: 'select2', allowClear: 'true' }); + var $select = el.scope().$select; + + // allowClear should be true. + expect($select.allowClear).toEqual(true); + + // Trigger clear. + el.find('.select2-search-choice-close').click(); + expect(scope.selection.selected).toEqual(null); + + // If there is no selection the X icon should be gone. + expect(el.find('.select2-search-choice-close').length).toEqual(0); + }); + + it('should toggle allow-clear directive', function () { + scope.selection.selected = scope.people[0]; + scope.isClearAllowed = false; + + var el = createUiSelect({ theme: 'select2', allowClear: '{{isClearAllowed}}' }); + var $select = el.scope().$select; + + expect($select.allowClear).toEqual(false); + expect(el.find('.select2-search-choice-close').length).toEqual(0); + + // Turn clear on + scope.isClearAllowed = true; + scope.$digest(); + + expect($select.allowClear).toEqual(true); + expect(el.find('.select2-search-choice-close').length).toEqual(1); + }); + + it('should clear selection (with object as source)', function () { + var el = compileTemplate( + ' \ + {{$select.selected.value.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + var $select = el.scope().$select; + + clickItem(el, 'Samantha'); + expect(scope.selection.selected).toEqual('Samantha'); + + // allowClear should be true. + expect($select.allowClear).toEqual(true); + + // Trigger clear. + el.find('.select2-search-choice-close').click(); + expect(scope.selection.selected).toEqual(null); + + // If there is no selection the X icon should be gone. + expect(el.find('.select2-search-choice-close').length).toEqual(0); + }); + + it('should pass tabindex to focusser', function () { + var el = createUiSelect({ tabindex: 5 }); + + expect($(el).find('.ui-select-focusser').attr('tabindex')).toEqual('5'); + expect($(el).attr('tabindex')).toEqual(undefined); + }); + + it('should pass tabindex to focusser when tabindex is an expression', function () { + scope.tabValue = 22; + var el = createUiSelect({ tabindex: '{{tabValue + 10}}' }); + + expect($(el).find('.ui-select-focusser').attr('tabindex')).toEqual('32'); + expect($(el).attr('tabindex')).toEqual(undefined); + }); + + it('should not give focusser a tabindex when ui-select does not have one', function () { + var el = createUiSelect(); + + expect($(el).find('.ui-select-focusser').attr('tabindex')).toEqual(undefined); + expect($(el).attr('tabindex')).toEqual(undefined); + }); + + it('should be disabled if the attribute says so', function () { + var el1 = createUiSelect({ disabled: true }); + expect(el1.scope().$select.disabled).toEqual(true); + clickMatch(el1); + expect(isDropdownOpened(el1)).toEqual(false); + + var el2 = createUiSelect({ disabled: false }); + expect(el2.scope().$select.disabled).toEqual(false); + clickMatch(el2); + expect(isDropdownOpened(el2)).toEqual(true); + + var el3 = createUiSelect(); + expect(el3.scope().$select.disabled).toBeFalsy(); + clickMatch(el3); + expect(isDropdownOpened(el3)).toEqual(true); + }); + + it('should allow decline tags when tagging function returns null', function () { + scope.taggingFunc = function (name) { + return null; + }; + + var el = createUiSelect({ tagging: 'taggingFunc' }); + clickMatch(el); + + showChoicesForSearch(el, 'idontexist'); + $(el).scope().$select.activeIndex = 0; + $(el).scope().$select.select('idontexist'); + + expect($(el).scope().$select.selected).not.toBeDefined(); + }); + + it('should allow tagging if the attribute says so', function () { + var el = createUiSelect({ tagging: true }); + clickMatch(el); + + $(el).scope().$select.select("I don't exist"); + + expect($(el).scope().$select.selected).toEqual("I don't exist"); + }); + + it('should format new items using the tagging function when the attribute is a function', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + group: 'Foo', + age: 12 + }; + }; + + var el = createUiSelect({ tagging: 'taggingFunc' }); + clickMatch(el); + + $(el).scope().$select.search = 'idontexist'; + $(el).scope().$select.activeIndex = 0; + $(el).scope().$select.select('idontexist'); + + expect($(el).scope().$select.selected).toEqual({ + name: 'idontexist', + email: 'idontexist@email.com', + group: 'Foo', + age: 12 + }); + }); + + // See when an item that evaluates to false (such as "false" or "no") is selected, the placeholder is shown https://github.com/angular-ui/ui-select/pull/32 + it('should not display the placeholder when item evaluates to false', function () { + scope.items = ['false']; + + var el = compileTemplate( + ' \ + {{$select.selected}} \ + \ +
        \ +
        \ +
        ' + ); + expect(el.scope().$select.selected).toEqual(undefined); + + clickItem(el, 'false'); + + expect(el.scope().$select.selected).toEqual('false'); + expect(getMatchLabel(el)).toEqual('false'); + }); + + it('should close an opened select when another one is opened', function () { + var el1 = createUiSelect(); + var el2 = createUiSelect(); + el1.appendTo(document.body); + el2.appendTo(document.body); + + expect(isDropdownOpened(el1)).toEqual(false); + expect(isDropdownOpened(el2)).toEqual(false); + clickMatch(el1); + expect(isDropdownOpened(el1)).toEqual(true); + expect(isDropdownOpened(el2)).toEqual(false); + clickMatch(el2); + expect(isDropdownOpened(el1)).toEqual(false); + expect(isDropdownOpened(el2)).toEqual(true); + + el1.remove(); + el2.remove(); + }); + + it('should bind model correctly (with object as source)', function () { + var el = compileTemplate( + ' \ + {{$select.selected.value.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + // scope.selection.selected = 'Samantha'; + + clickItem(el, 'Samantha'); + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + expect(scope.selection.selected).toBe(scope.peopleObj[6]); + + }); + + it('should bind model correctly (with object as source) using a single property', function () { + var el = compileTemplate( + ' \ + {{$select.selected.value.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + // scope.selection.selected = 'Samantha'; + + clickItem(el, 'Samantha'); + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + expect(scope.selection.selected).toBe('Samantha'); + + }); + + it('should update choices when original source changes (with object as source)', function () { + var el = compileTemplate( + ' \ + {{$select.selected.value.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + scope.$digest(); + + openDropdown(el); + var choicesEls = $(el).find('.ui-select-choices-row'); + expect(choicesEls.length).toEqual(10); + + scope.peopleObj['11'] = { name: 'Camila', email: 'camila@email.com', age: 1, country: 'Ecuador' }; + scope.$digest(); + + choicesEls = $(el).find('.ui-select-choices-row'); + expect(choicesEls.length).toEqual(11); + + }); + + it('should bind model correctly (with object as source) using the key of collection', function () { + var el = compileTemplate( + ' \ + {{$select.selected.value.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + // scope.selection.selected = 'Samantha'; + + clickItem(el, 'Samantha'); + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + expect(scope.selection.selected).toBe('6'); + + }); + + it('should correctly render initial state (with object as source) differentiating between falsy values', function () { + scope.items = [{ + label: '-- None Selected --', + value: '' + }, { + label: 'Yes', + value: true + }, { + label: 'No', + value: false + }]; + + var el = compileTemplate( + ' \ + {{ $select.selected.label }} \ + {{ item.label }} \ + ' + ); + + scope.selection.selected = ''; + scope.$digest(); + expect(getMatchLabel(el)).toEqual('-- None Selected --'); + }); + + describe('backspace reset option', function () { + it('should undefined model when pressing BACKSPACE key if backspaceReset=true', function () { + var el = createUiSelect(); + var focusserInput = el.find('.ui-select-focusser'); + + clickItem(el, 'Samantha'); + triggerKeydown(focusserInput, Key.Backspace); + expect(scope.selection.selected).toBeUndefined(); + }); + + it('should NOT reset model when pressing BACKSPACE key if backspaceReset=false', function () { + var el = createUiSelect({ backspaceReset: false }); + var focusserInput = el.find('.ui-select-focusser'); + + clickItem(el, 'Samantha'); + triggerKeydown(focusserInput, Key.Backspace); + expect(scope.selection.selected).toBe(scope.people[5]); + }); + }); + + describe('disabled options', function () { + function createUiSelect(attrs) { + var attrsDisabled = ''; + if (attrs !== undefined) { + if (attrs.disabled !== undefined) { + attrsDisabled = ' ui-disable-choice="' + attrs.disabled + '"'; + } else { + attrsDisabled = ''; + } + } + + return compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + } + + function disablePerson(opts) { + opts = opts || {}; + + var key = opts.key || 'people', + disableAttr = opts.disableAttr || 'disabled', + disableBool = opts.disableBool === undefined ? true : opts.disableBool, + matchAttr = opts.match || 'name', + matchVal = opts.matchVal || 'Wladimir'; + + scope['_' + key] = angular.copy(scope[key]); + scope[key].map(function (model) { + if (model[matchAttr] == matchVal) { + model[disableAttr] = disableBool; + } + return model; + }); + } + + function resetScope(opts) { + opts = opts || {}; + var key = opts.key || 'people'; + scope[key] = angular.copy(scope['_' + key]); + } + + describe('without disabling expression', function () { + beforeEach(function () { + disablePerson(); + this.el = createUiSelect(); + }); + + it('should not allow disabled options to be selected', function () { + clickItem(this.el, 'Wladimir'); + + expect(getMatchLabel(this.el)).toEqual('Wladimir'); + }); + + it('should set a disabled class on the option', function () { + var option = $(this.el).find('.ui-select-choices-row div:contains("Wladimir")'); + var container = option.closest('.ui-select-choices-row'); + + expect(container.hasClass('disabled')).toBeFalsy(); + }); + }); + + describe('disable on truthy property', function () { + beforeEach(function () { + disablePerson({ + disableAttr: 'inactive', + disableBool: true + }); + this.el = createUiSelect({ + disabled: 'person.inactive' + }); + }); + + it('should allow the user to define the selected option', function () { + expect($(this.el).find('.ui-select-choices').attr('ui-disable-choice')).toBe('person.inactive'); + }); + + it('should not allow disabled options to be selected', function () { + clickItem(this.el, 'Wladimir'); + + expect(getMatchLabel(this.el)).not.toEqual('Wladimir'); + }); + + it('should set a disabled class on the option', function () { + + openDropdown(this.el); + + var option = $(this.el).find('.ui-select-choices-row div:contains("Wladimir")'); + var container = option.closest('.ui-select-choices-row'); + + expect(container.hasClass('disabled')).toBeTruthy(); + + }); + }); + + describe('disable on inverse property check', function () { + beforeEach(function () { + disablePerson({ + disableAttr: 'active', + disableBool: false + }); + this.el = createUiSelect({ + disabled: '!person.active' + }); + }); + + it('should allow the user to define the selected option', function () { + expect($(this.el).find('.ui-select-choices').attr('ui-disable-choice')).toBe('!person.active'); + }); + + it('should not allow disabled options to be selected', function () { + clickItem(this.el, 'Wladimir'); + + expect(getMatchLabel(this.el)).not.toEqual('Wladimir'); + }); + + it('should set a disabled class on the option', function () { + openDropdown(this.el); + + var option = $(this.el).find('.ui-select-choices-row div:contains("Wladimir")'); + var container = option.closest('.ui-select-choices-row'); + + expect(container.hasClass('disabled')).toBeTruthy(); + }); + }); + + describe('disable on expression', function () { + beforeEach(function () { + disablePerson({ + disableAttr: 'status', + disableBool: 'inactive' + }); + this.el = createUiSelect({ + disabled: "person.status == 'inactive'" + }); + }); + + it('should allow the user to define the selected option', function () { + expect($(this.el).find('.ui-select-choices').attr('ui-disable-choice')).toBe("person.status == 'inactive'"); + }); + + it('should not allow disabled options to be selected', function () { + clickItem(this.el, 'Wladimir'); + + expect(getMatchLabel(this.el)).not.toEqual('Wladimir'); + }); + + it('should set a disabled class on the option', function () { + openDropdown(this.el); + + var option = $(this.el).find('.ui-select-choices-row div:contains("Wladimir")'); + var container = option.closest('.ui-select-choices-row'); + + expect(container.hasClass('disabled')).toBeTruthy(); + }); + }); + + afterEach(function () { + resetScope(); + }); + }); + + describe('choices group', function () { + function getGroupLabel(item) { + return item.parent('.ui-select-choices-group').find('.ui-select-choices-group-label'); + } + function createUiSelect() { + return compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + } + + it('should create items group', function () { + var el = createUiSelect(); + expect(el.find('.ui-select-choices-group').length).toBe(3); + }); + + it('should show label before each group', function () { + var el = createUiSelect(); + expect(el.find('.ui-select-choices-group .ui-select-choices-group-label').map(function () { + return this.textContent; + }).toArray()).toEqual(['Foo', 'bar', 'Baz']); + }); + + it('should hide empty groups', function () { + var el = createUiSelect(); + el.scope().$select.search = 'd'; + scope.$digest(); + + expect(el.find('.ui-select-choices-group .ui-select-choices-group-label').map(function () { + return this.textContent; + }).toArray()).toEqual(['Foo']); + }); + + it('should change activeItem through groups', function () { + var el = createUiSelect(); + el.scope().$select.search = 't'; + scope.$digest(); + openDropdown(el); + var choices = el.find('.ui-select-choices-row'); + + expect(choices.eq(0)).toHaveClass('active'); + expect(getGroupLabel(choices.eq(0)).text()).toBe('Foo'); + + triggerKeydown(el.find('input'), 40 /*Down*/); + scope.$digest(); + expect(choices.eq(1)).toHaveClass('active'); + expect(getGroupLabel(choices.eq(1)).text()).toBe('bar'); + }); + }); + + describe('choices group by function', function () { + function createUiSelect() { + return compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        ' + ); + } + it("should extract group value through function", function () { + var el = createUiSelect(); + expect(el.find('.ui-select-choices-group .ui-select-choices-group-label').map(function () { + return this.textContent; + }).toArray()).toEqual(['odd', 'even']); + }); + }); + + describe('choices group filter function', function () { + function createUiSelect() { + return compileTemplate('\ + \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        ' + ); + } + it("should sort groups using filter", function () { + var el = createUiSelect(); + expect(el.find('.ui-select-choices-group .ui-select-choices-group-label').map(function () { + return this.textContent; + }).toArray()).toEqual(["Foo", "Baz", "bar"]); + }); + }); + + describe('choices group filter array', function () { + function createUiSelect() { + return compileTemplate('\ + \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        ' + ); + } + it("should sort groups using filter", function () { + var el = createUiSelect(); + expect(el.find('.ui-select-choices-group .ui-select-choices-group-label').map(function () { + return this.textContent; + }).toArray()).toEqual(["Foo"]); + }); + }); + + it('should format the model correctly using alias', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + clickItem(el, 'Samantha'); + expect(scope.selection.selected).toBe(scope.people[5]); + }); + + it('should parse the model correctly using alias', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + scope.selection.selected = scope.people[5]; + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + it('should format the model correctly using property of alias', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + clickItem(el, 'Samantha'); + expect(scope.selection.selected).toBe('Samantha'); + }); + + it('should parse the model correctly using property of alias', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + scope.selection.selected = 'Samantha'; + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + it('should parse the model correctly using property of alias with async choices data', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + $timeout(function () { + scope.peopleAsync = scope.people; + }); + + scope.selection.selected = 'Samantha'; + scope.$digest(); + expect(getMatchLabel(el)).toEqual(''); + + $timeout.flush(); //After choices populated (async), it should show match correctly + expect(getMatchLabel(el)).toEqual('Samantha'); + + }); + + //TODO Is this really something we should expect? + it('should parse the model correctly using property of alias but passed whole object', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + scope.selection.selected = scope.people[5]; + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + it('should format the model correctly without alias', function () { + var el = createUiSelect(); + clickItem(el, 'Samantha'); + expect(scope.selection.selected).toBe(scope.people[5]); + }); + + it('should parse the model correctly without alias', function () { + var el = createUiSelect(); + scope.selection.selected = scope.people[5]; + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + it('should display choices correctly with child array', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + scope.selection.selected = scope.people[5]; + scope.$digest(); + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + it('should format the model correctly using property of alias and when using child array for choices', function () { + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + clickItem(el, 'Samantha'); + expect(scope.selection.selected).toBe('Samantha'); + }); + + it('should invoke select callback on select', function () { + + scope.onSelectFn = function ($item, $model, $label) { + scope.$item = $item; + scope.$model = $model; + }; + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(scope.$item).toBeFalsy(); + expect(scope.$model).toBeFalsy(); + + clickItem(el, 'Samantha'); + $timeout.flush(); + + + expect(scope.selection.selected).toBe('Samantha'); + + expect(scope.$item).toEqual(scope.people[5]); + expect(scope.$model).toEqual('Samantha'); + + }); + + it('should set $item & $model correctly when invoking callback on select and no single prop. binding', function () { + + scope.onSelectFn = function ($item, $model, $label) { + scope.$item = $item; + scope.$model = $model; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(scope.$item).toBeFalsy(); + expect(scope.$model).toBeFalsy(); + + clickItem(el, 'Samantha'); + expect(scope.$item).toEqual(scope.$model); + + }); + + it('should invoke remove callback on remove', function () { + + scope.onRemoveFn = function ($item, $model, $label) { + scope.$item = $item; + scope.$model = $model; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(scope.$item).toBeFalsy(); + expect(scope.$model).toBeFalsy(); + + clickItem(el, 'Samantha'); + clickItem(el, 'Adrian'); + el.find('.ui-select-match-item').first().find('.ui-select-match-close').click(); + $timeout.flush(); + + expect(scope.$item).toBe(scope.people[5]); + expect(scope.$model).toBe('Samantha'); + + }); + + it('should set $item & $model correctly when invoking callback on remove and no single prop. binding', function () { + + scope.onRemoveFn = function ($item, $model, $label) { + scope.$item = $item; + scope.$model = $model; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(scope.$item).toBeFalsy(); + expect(scope.$model).toBeFalsy(); + + clickItem(el, 'Samantha'); + clickItem(el, 'Adrian'); + el.find('.ui-select-match-item').first().find('.ui-select-match-close').click(); + $timeout.flush(); + + expect(scope.$item).toBe(scope.people[5]); + expect(scope.$model).toBe(scope.$item); + }); + + it('should call open-close callback with isOpen state as first argument on open and on close', function () { + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + scope.onOpenCloseFn = function () { }; + spyOn(scope, 'onOpenCloseFn'); + + openDropdown(el); + $timeout.flush(); + expect(scope.onOpenCloseFn).toHaveBeenCalledWith(true); + + closeDropdown(el); + $timeout.flush(); + expect(scope.onOpenCloseFn).toHaveBeenCalledWith(false); + + expect(scope.onOpenCloseFn.calls.count()).toBe(2); + }); + + it('should allow creating tag in single select mode with tagging enabled', function () { + + scope.taggingFunc = function (name) { + return name; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + clickMatch(el); + + var searchInput = el.find('.ui-select-search'); + + setSearchText(el, 'idontexist'); + + triggerKeydown(searchInput, Key.Enter); + + expect($(el).scope().$select.selected).toEqual('idontexist'); + }); + + it('should allow creating tag on ENTER in multiple select mode with tagging enabled, no labels', function () { + + scope.taggingFunc = function (name) { + return name; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + var searchInput = el.find('.ui-select-search'); + + setSearchText(el, 'idontexist'); + + triggerKeydown(searchInput, Key.Enter); + + expect($(el).scope().$select.selected).toEqual(['idontexist']); + }); + + it('should allow selecting an item (click) in single select mode with tagging enabled', function () { + + scope.taggingFunc = function (name) { + return name; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + clickMatch(el); + setSearchText(el, 'Sam'); + clickItem(el, 'Samantha'); + + expect(scope.selection.selected).toBe(scope.people[5]); + expect(getMatchLabel(el)).toEqual('Samantha'); + }); + + + it('should remove a choice when multiple and remove-selected is not given (default is true)', function () { + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + clickItem(el, 'Samantha'); + clickItem(el, 'Adrian'); + + openDropdown(el); + + var choicesEls = $(el).find('.ui-select-choices-row'); + expect(choicesEls.length).toEqual(6); + + ['Adam', 'Amalie', 'Estefanía', 'Wladimir', 'Nicole', 'Natasha'].forEach(function (name, index) { + expect($(choicesEls[index]).hasClass('disabled')).toBeFalsy(); + expect($(choicesEls[index]).find('.person-name').text()).toEqual(name); + }); + }); + + it('should not remove a pre-selected choice when not multiple and remove-selected is not given (default is true)', function () { + scope.selection.selected = scope.people[5]; // Samantha + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(getMatchLabel(el)).toEqual("Samantha"); + openDropdown(el); + + var choicesEls = $(el).find('.ui-select-choices-row'); + expect(choicesEls.length).toEqual(8); + + ['Adam', 'Amalie', 'Estefanía', 'Adrian', 'Wladimir', 'Samantha', 'Nicole', 'Natasha'].forEach(function (name, index) { + expect($(choicesEls[index]).hasClass('disabled')).toBeFalsy(); + expect($(choicesEls[index]).find('.person-name').text()).toEqual(name); + }); + }); + + it('should disable a choice instead of removing it when remove-selected is false', function () { + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + clickItem(el, 'Samantha'); + clickItem(el, 'Adrian'); + + openDropdown(el); + + var choicesEls = $(el).find('.ui-select-choices-row'); + expect(choicesEls.length).toEqual(8); + [false, false, false, true /* Adrian */, false, true /* Samantha */, false, false].forEach(function (bool, index) { + expect($(choicesEls[index]).hasClass('disabled')).toEqual(bool); + }); + }); + + it('should append/transclude content (with correct scope) that users add at tag', function () { + + var el = compileTemplate( + ' \ + \ + {{$select.selected.name}}\ + {{$select.selected.name | uppercase}}\ + \ + \ +
        \ +
        \ +
        ' + ); + + clickItem(el, 'Samantha'); + expect(getMatchLabel(el).trim()).toEqual('Samantha'); + + clickItem(el, 'Wladimir'); + expect(getMatchLabel(el).trim()).not.toEqual('Wladimir'); + expect(getMatchLabel(el).trim()).toEqual('WLADIMIR'); + + }); + it('should append/transclude content (with correct scope) that users add at tag', function () { + + var el = compileTemplate( + ' \ + \ + \ + \ +
        \ +
        \ + I should appear only once\ +
        \ +
        \ +
        ' + ); + + openDropdown(el); + expect($(el).find('.only-once').length).toEqual(1); + + + }); + + it('should call refresh function when search text changes', function () { + + var el = compileTemplate( + ' \ + \ + \ + \ +
        \ +
        \ + I should appear only once\ +
        \ +
        \ +
        ' + ); + + scope.fetchFromServer = function () { }; + + spyOn(scope, 'fetchFromServer'); + + el.scope().$select.search = 'r'; + scope.$digest(); + $timeout.flush(); + + expect(scope.fetchFromServer).toHaveBeenCalledWith('r'); + + }); + + it('should call refresh function respecting minimum input length option', function () { + + var el = compileTemplate( + ' \ + \ + \ + \ +
        \ +
        \ + I should appear only once\ +
        \ +
        \ +
        ' + ); + + scope.fetchFromServer = function () { }; + + spyOn(scope, 'fetchFromServer'); + + el.scope().$select.search = 'r'; + scope.$digest(); + $timeout.flush(); + expect(scope.fetchFromServer).not.toHaveBeenCalledWith('r'); + + el.scope().$select.search = 'red'; + scope.$digest(); + $timeout.flush(); + expect(scope.fetchFromServer).toHaveBeenCalledWith('red'); + }); + + + it('should call refresh function respecting minimum input length option with given refresh-delay', function () { + + var el = compileTemplate( + ' \ + \ + \ + \ +
        \ +
        \ + I should appear only once\ +
        \ +
        \ +
        ' + ); + + scope.fetchFromServer = function () { }; + + spyOn(scope, 'fetchFromServer'); + + el.scope().$select.search = 'redd'; + scope.$digest(); + $timeout.flush(); + expect(scope.fetchFromServer).toHaveBeenCalledWith('redd'); + + + el.scope().$select.search = 'red'; + scope.$digest(); + el.scope().$select.search = 're'; + scope.$digest(); + el.scope().$select.search = 'r'; + scope.$digest(); + $timeout.flush(); + expect(scope.fetchFromServer).not.toHaveBeenCalledWith('r'); + + + }); + + + it('should format view value correctly when using single property binding and refresh function', function () { + + var el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ + I should appear only once\ +
        \ +
        \ +
        ' + ); + + scope.fetchFromServer = function (searching) { + + if (searching == 's') + return scope.people; + + if (searching == 'o') { + scope.people = []; //To simulate cases were previously selected item isnt in the list anymore + } + + }; + + setSearchText(el, 'r'); + clickItem(el, 'Samantha'); + expect(getMatchLabel(el)).toBe('Samantha'); + + setSearchText(el, 'o'); + expect(getMatchLabel(el)).toBe('Samantha'); + + }); + + it('should retain an invalid view value after refreshing items', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + valid: name === "iamvalid" + }; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.email}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + clickMatch(el); + var searchInput = el.find('.ui-select-search'); + + setSearchText(el, 'iamvalid'); + triggerKeydown(searchInput, Key.Tab); + + //model value defined because it's valid, view value defined as expected + var validTag = scope.taggingFunc("iamvalid"); + expect(scope.selection.selected).toEqual(validTag); + expect($(el).scope().$select.selected).toEqual(validTag); + + clickMatch(el); + setSearchText(el, 'notvalid'); + triggerKeydown(searchInput, Key.Tab); + + //model value undefined because it's invalid, view value STILL defined as expected + expect(scope.selection.selected).toEqual(undefined); + expect($(el).scope().$select.selected).toEqual(scope.taggingFunc("notvalid")); + }); + + describe('search-enabled option', function () { + + var el; + + function setupSelectComponent(searchEnabled, theme) { + el = compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + } + + describe('selectize theme', function () { + + it('should show search input when true', function () { + setupSelectComponent(true, 'selectize'); + expect($(el).find('.ui-select-search')).not.toHaveClass('ui-select-search-hidden'); + }); + + it('should hide search input when false', function () { + setupSelectComponent(false, 'selectize'); + expect($(el).find('.ui-select-search')).toHaveClass('ui-select-search-hidden'); + }); + + }); + + describe('select2 theme', function () { + + it('should show search input when true', function () { + setupSelectComponent('true', 'select2'); + expect($(el).find('.search-container')).not.toHaveClass('ui-select-search-hidden'); + }); + + it('should hide search input when false', function () { + setupSelectComponent('false', 'select2'); + expect($(el).find('.search-container')).toHaveClass('ui-select-search-hidden'); + }); + + }); + + describe('bootstrap theme', function () { + + it('should show search input when true', function () { + setupSelectComponent('true', 'bootstrap'); + clickMatch(el); + expect($(el).find('.ui-select-search')).not.toHaveClass('ui-select-search-hidden'); + }); + + it('should hide search input when false', function () { + setupSelectComponent('false', 'bootstrap'); + clickMatch(el); + expect($(el).find('.ui-select-search')).toHaveClass('ui-select-search-hidden'); + }); + + }); + + }); + + + describe('multi selection', function () { + + function createUiSelectMultiple(attrs) { + var attrsHtml = '', + choicesAttrsHtml = '', + matchesAttrsHtml = ''; + if (attrs !== undefined) { + if (attrs.disabled !== undefined) { attrsHtml += ' ng-disabled="' + attrs.disabled + '"'; } + if (attrs.required !== undefined) { attrsHtml += ' ng-required="' + attrs.required + '"'; } + if (attrs.tabindex !== undefined) { attrsHtml += ' tabindex="' + attrs.tabindex + '"'; } + if (attrs.closeOnSelect !== undefined) { attrsHtml += ' close-on-select="' + attrs.closeOnSelect + '"'; } + if (attrs.tagging !== undefined) { attrsHtml += ' tagging="' + attrs.tagging + '"'; } + if (attrs.taggingTokens !== undefined) { attrsHtml += ' tagging-tokens="' + attrs.taggingTokens + '"'; } + if (attrs.taggingLabel !== undefined) { attrsHtml += ' tagging-label="' + attrs.taggingLabel + '"'; } + if (attrs.inputId !== undefined) { attrsHtml += ' input-id="' + attrs.inputId + '"'; } + if (attrs.groupBy !== undefined) { choicesAttrsHtml += ' group-by="' + attrs.groupBy + '"'; } + if (attrs.uiDisableChoice !== undefined) { choicesAttrsHtml += ' ui-disable-choice="' + attrs.uiDisableChoice + '"'; } + if (attrs.lockChoice !== undefined) { matchesAttrsHtml += ' ui-lock-choice="' + attrs.lockChoice + '"'; } + if (attrs.removeSelected !== undefined) { attrsHtml += ' remove-selected="' + attrs.removeSelected + '"'; } + if (attrs.resetSearchInput !== undefined) { attrsHtml += ' reset-search-input="' + attrs.resetSearchInput + '"'; } + if (attrs.limit !== undefined) { attrsHtml += ' limit="' + attrs.limit + '"'; } + if (attrs.onSelect !== undefined) { attrsHtml += ' on-select="' + attrs.onSelect + '"'; } + if (attrs.removeSelected !== undefined) { attrsHtml += ' remove-selected="' + attrs.removeSelected + '"'; } + } + + return compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        ' + ); + } + + it('should initialize selected choices with an empty array when choices source is undefined', function () { + var el = createUiSelectMultiple({ groupBy: "'age'" }), + ctrl = el.scope().$select; + + ctrl.setItemsFn(); // updateGroups + expect(ctrl.items).toEqual([]); + }); + + it('should render initial state', function () { + var el = createUiSelectMultiple(); + expect(el).toHaveClass('ui-select-multiple'); + expect(el.scope().$select.selected.length).toBe(0); + expect(el.find('.ui-select-match-item').length).toBe(0); + }); + + it('should render intial state with data-multiple attribute', function () { + // ensure match template has been loaded by having more than one selection + scope.selection.selectedMultiple = [scope.people[0], scope.people[1]]; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(el).toHaveClass('ui-select-multiple'); + expect(el.scope().$select.selected.length).toBe(2); + expect(el.find('.ui-select-match-item').length).toBe(2); + }); + + it('should render intial state with x-multiple attribute', function () { + // ensure match template has been loaded by having more than one selection + scope.selection.selectedMultiple = [scope.people[0], scope.people[1]]; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(el).toHaveClass('ui-select-multiple'); + expect(el.scope().$select.selected.length).toBe(2); + expect(el.find('.ui-select-match-item').length).toBe(2); + }); + + it('should set model as an empty array if ngModel isnt defined after an item is selected', function () { + + // scope.selection.selectedMultiple = []; + var el = createUiSelectMultiple(); + expect(scope.selection.selectedMultiple instanceof Array).toBe(false); + clickItem(el, 'Samantha'); + expect(scope.selection.selectedMultiple instanceof Array).toBe(true); + }); + + it('should render initial selected items', function () { + scope.selection.selectedMultiple = [scope.people[4], scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple(); + expect(el.scope().$select.selected.length).toBe(2); + expect(el.find('.ui-select-match-item').length).toBe(2); + }); + + it('should remove item by pressing X icon', function () { + scope.selection.selectedMultiple = [scope.people[4], scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple(); + expect(el.scope().$select.selected.length).toBe(2); + el.find('.ui-select-match-item').first().find('.ui-select-match-close').click(); + expect(el.scope().$select.selected.length).toBe(1); + // $timeout.flush(); + }); + + it('should pass tabindex to searchInput', function () { + var el = createUiSelectMultiple({ tabindex: 5 }); + var searchInput = el.find('.ui-select-search'); + + expect(searchInput.attr('tabindex')).toEqual('5'); + expect($(el).attr('tabindex')).toEqual(undefined); + }); + + it('should pass tabindex to searchInput when tabindex is an expression', function () { + scope.tabValue = 22; + var el = createUiSelectMultiple({ tabindex: '{{tabValue + 10}}' }); + var searchInput = el.find('.ui-select-search'); + + expect(searchInput.attr('tabindex')).toEqual('32'); + expect($(el).attr('tabindex')).toEqual(undefined); + }); + + it('should not give searchInput a tabindex when ui-select does not have one', function () { + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(searchInput.attr('tabindex')).toEqual(undefined); + expect($(el).attr('tabindex')).toEqual(undefined); + }); + + it('should update size of search input after removing an item', function () { + scope.selection.selectedMultiple = [scope.people[4], scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple(); + + spyOn(el.scope().$select, 'sizeSearchInput'); + + var searchInput = el.find('.ui-select-search'); + var oldWidth = searchInput.css('width'); + + el.find('.ui-select-match-item').first().find('.ui-select-match-close').click(); + expect(el.scope().$select.sizeSearchInput).toHaveBeenCalled(); + + }); + + it('should update size of search input use container width', function () { + scope.selection.selectedMultiple = [scope.people[4], scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple({ + appendToBody: true + }); + + angular.element(document.body).css("width", "100%"); + angular.element(document.body).css("height", "100%"); + angular.element(document.body).append(el); + + spyOn(el.scope().$select, 'sizeSearchInput'); + + var searchInput = el.find('.ui-select-search'); + el.find('.ui-select-match-item').first().find('.ui-select-match-close').click(); + + expect(el.scope().$select.sizeSearchInput).toHaveBeenCalled(); + + $timeout.flush(); + + var newWidth = searchInput[0].clientWidth + searchInput[0].offsetLeft; + var containerWidth = el[0].clientWidth; + expect(containerWidth - newWidth).toBeLessThan(10); + + }); + it('should move to last match when pressing BACKSPACE key from search', function () { + + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Backspace); + expect(isDropdownOpened(el)).toEqual(false); + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(el.scope().$select.selected.length - 1); + + }); + + it('should remove highlighted match when pressing BACKSPACE key from search and decrease activeMatchIndex', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Backspace); + expect(el.scope().$select.selected).toEqual([scope.people[4], scope.people[6]]); //Wladimir & Nicole + + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(0); + + }); + + it('should remove highlighted match when pressing DELETE key from search and keep same activeMatchIndex', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Delete); + expect(el.scope().$select.selected).toEqual([scope.people[4], scope.people[6]]); //Wladimir & Nicole + + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(1); + + }); + + it('should NOT remove highlighted match when pressing BACKSPACE key on a locked choice', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple({ lockChoice: "$item.name == '" + scope.people[6].name + "'" }); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Backspace); + expect(el.scope().$select.selected).toEqual([scope.people[4], scope.people[5], scope.people[6]]); //Wladimir, Samantha & Nicole + + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(scope.selection.selectedMultiple.length - 1); + + }); + + it('should NOT remove highlighted match when pressing DELETE key on a locked choice', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple({ lockChoice: "$item.name == '" + scope.people[6].name + "'" }); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Delete); + expect(el.scope().$select.selected).toEqual([scope.people[4], scope.people[5], scope.people[6]]); //Wladimir, Samantha & Nicole + + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(scope.selection.selectedMultiple.length - 1); + + }); + + + it('should move to last match when pressing LEFT key from search', function () { + + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Left); + expect(isDropdownOpened(el)).toEqual(false); + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(el.scope().$select.selected.length - 1); + + }); + + it('should move between matches when pressing LEFT key from search', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Left); + expect(isDropdownOpened(el)).toEqual(false); + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(el.scope().$select.selected.length - 2); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Left); + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(0); + + }); + + it('should decrease $selectMultiple.activeMatchIndex when pressing LEFT key', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + el.scope().$selectMultiple.activeMatchIndex = 3; + triggerKeydown(searchInput, Key.Left); + triggerKeydown(searchInput, Key.Left); + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(1); + + }); + + it('should increase $selectMultiple.activeMatchIndex when pressing RIGHT key', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + el.scope().$selectMultiple.activeMatchIndex = 0; + triggerKeydown(searchInput, Key.Right); + triggerKeydown(searchInput, Key.Right); + expect(el.scope().$selectMultiple.activeMatchIndex).toBe(2); + + }); + + it('should open dropdown when pressing DOWN key', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Down); + expect(isDropdownOpened(el)).toEqual(true); + + }); + + it('should search/open dropdown when writing to search input', function () { + + scope.selection.selectedMultiple = [scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + el.scope().$select.search = 'r'; + scope.$digest(); + expect(isDropdownOpened(el)).toEqual(true); + + }); + + it('should add selected match to selection array', function () { + + scope.selection.selectedMultiple = [scope.people[5]]; //Samantha + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + clickItem(el, 'Wladimir'); + expect(scope.selection.selectedMultiple).toEqual([scope.people[5], scope.people[4]]); //Samantha & Wladimir + + }); + + it('should close dropdown after selecting', function () { + + scope.selection.selectedMultiple = [scope.people[5]]; //Samantha + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Down); + expect(isDropdownOpened(el)).toEqual(true); + + clickItem(el, 'Wladimir'); + + expect(isDropdownOpened(el)).toEqual(false); + + }); + + it('should not close dropdown after selecting if closeOnSelect=false', function () { + + scope.selection.selectedMultiple = [scope.people[5]]; //Samantha + var el = createUiSelectMultiple({ closeOnSelect: false }); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Down); + expect(isDropdownOpened(el)).toEqual(true); + + clickItem(el, 'Wladimir'); + + expect(isDropdownOpened(el)).toEqual(true); + + }); + + it('should closes dropdown when pressing ESC key from search input', function () { + + scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + expect(isDropdownOpened(el)).toEqual(false); + triggerKeydown(searchInput, Key.Down); + expect(isDropdownOpened(el)).toEqual(true); + triggerKeydown(searchInput, Key.Escape); + expect(isDropdownOpened(el)).toEqual(false); + + }); + + it('should select highlighted match when pressing ENTER key from dropdown', function () { + + scope.selection.selectedMultiple = [scope.people[5]]; //Samantha + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(scope.selection.selectedMultiple.length).toEqual(2); + + }); + + it('should stop the propagation when pressing ENTER key from dropdown', function () { + + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + spyOn(jQuery.Event.prototype, 'preventDefault'); + spyOn(jQuery.Event.prototype, 'stopPropagation'); + + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(jQuery.Event.prototype.preventDefault).toHaveBeenCalled(); + expect(jQuery.Event.prototype.stopPropagation).toHaveBeenCalled(); + + }); + + it('should stop the propagation when pressing ESC key from dropdown', function () { + + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + spyOn(jQuery.Event.prototype, 'preventDefault'); + spyOn(jQuery.Event.prototype, 'stopPropagation'); + + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Escape); + expect(jQuery.Event.prototype.preventDefault).toHaveBeenCalled(); + expect(jQuery.Event.prototype.stopPropagation).toHaveBeenCalled(); + + }); + + it('should increase $select.activeIndex when pressing DOWN key from dropdown', function () { + + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + triggerKeydown(searchInput, Key.Down); //Open dropdown + + el.scope().$select.activeIndex = 0; + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Down); + expect(el.scope().$select.activeIndex).toBe(2); + + }); + + it('should decrease $select.activeIndex when pressing UP key from dropdown', function () { + + var el = createUiSelectMultiple(); + var searchInput = el.find('.ui-select-search'); + + triggerKeydown(searchInput, Key.Down); //Open dropdown + + el.scope().$select.activeIndex = 5; + triggerKeydown(searchInput, Key.Up); + triggerKeydown(searchInput, Key.Up); + expect(el.scope().$select.activeIndex).toBe(3); + + }); + + it('should render initial selected items', function () { + scope.selection.selectedMultiple = [scope.people[4], scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple(); + expect(el.scope().$select.selected.length).toBe(2); + expect(el.find('.ui-select-match-item').length).toBe(2); + }); + + it('should parse the items correctly using single property binding', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + expect(el.scope().$select.selected).toEqual([scope.people[4], scope.people[5]]); + + }); + + it('should add selected match to selection array using single property binding', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + var searchInput = el.find('.ui-select-search'); + + clickItem(el, 'Natasha'); + + expect(el.scope().$select.selected).toEqual([scope.people[4], scope.people[5], scope.people[7]]); + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com', 'natasha@email.com']; + + }); + + it('should format view value correctly when using single property binding and refresh function', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + var searchInput = el.find('.ui-select-search'); + + scope.fetchFromServer = function (searching) { + + if (searching == 'n') + return scope.people; + + if (searching == 'o') { + scope.people = []; //To simulate cases were previously selected item isnt in the list anymore + } + + }; + + setSearchText(el, 'n'); + clickItem(el, 'Nicole'); + + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir Samantha Nicole "); + + setSearchText(el, 'o'); + + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir Samantha Nicole "); + + }); + + it('should watch changes for $select.selected and update formatted value correctly', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + var el2 = compileTemplate(''); + + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir Samantha "); + + clickItem(el, 'Nicole'); + + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir Samantha Nicole "); + + expect(scope.selection.selectedMultiple.length).toBe(3); + + }); + + it('should watch changes for $select.selected and refresh choices correctly', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + scope.selection.selectedMultiple.splice(0, 1); // Remove Wladimir from selection + + var searchInput = el.find('.ui-select-search'); + triggerKeydown(searchInput, Key.Down); //Open dropdown + + expect(el.find('.ui-select-choices-content').text()) + .toContain("wladimir@email.com"); + + }); + + it('should ensure the multiple selection limit is respected', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + var el2 = compileTemplate(''); + + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir "); + + clickItem(el, 'Samantha'); + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir Samantha "); + + clickItem(el, 'Nicole'); + + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir Samantha "); + + expect(scope.selection.selectedMultiple.length).toBe(2); + + }); + + it('should change viewvalue only once when updating modelvalue', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + scope.counter = 0; + scope.onlyOnce = function () { + scope.counter++; + }; + + clickItem(el, 'Nicole'); + + expect(scope.counter).toBe(1); + + }); + + it('should retain an invalid view value after refreshing items', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + valid: name === "iamvalid" + }; + }; + + var el = compileTemplate( + ' \ + {{$select.selected.email}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + + clickMatch(el); + var searchInput = el.find('.ui-select-search'); + + setSearchText(el, 'iamvalid'); + triggerKeydown(searchInput, Key.Tab); + + //model value defined because it's valid, view value defined as expected + var validTag = scope.taggingFunc("iamvalid"); + expect(scope.selection.selectedMultiple).toEqual([jasmine.objectContaining(validTag)]); + expect($(el).scope().$select.selected).toEqual([jasmine.objectContaining(validTag)]); + + clickMatch(el); + setSearchText(el, 'notvalid'); + triggerKeydown(searchInput, Key.Tab); + + //model value undefined because it's invalid, view value STILL defined as expected + var invalidTag = scope.taggingFunc("notvalid"); + expect(scope.selection.selected).toEqual(undefined); + expect($(el).scope().$select.selected).toEqual([jasmine.objectContaining(validTag), jasmine.objectContaining(invalidTag)]); + }); + + it('should run $formatters when changing model directly', function () { + + scope.selection.selectedMultiple = ['wladimir@email.com', 'samantha@email.com']; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + // var el2 = compileTemplate(''); + + scope.selection.selectedMultiple.push("nicole@email.com"); + + scope.$digest(); + scope.$digest(); //2nd $digest needed when using angular 1.3.0-rc.1+, might be related with the fact that the value is an array + + expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text()) + .toBe("Wladimir Samantha Nicole "); + + }); + + it('should support multiple="multiple" attribute', function () { + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + expect(el.scope().$select.multiple).toBe(true); + }); + + it('should preserve the model if tagging is enabled on select multiple', function () { + scope.selection.selectedMultiple = ["I am not on the list of choices"]; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + scope.$digest(); + + expect(scope.selection.selectedMultiple) + .toEqual(["I am not on the list of choices"]); + }); + + it('should not call tagging function needlessly', function () { + scope.slowTaggingFunc = function (name) { + // for (var i = 0; i < 100000000; i++); + return { name: name }; + }; + spyOn(scope, 'slowTaggingFunc').and.callThrough(); + + var el = createUiSelectMultiple({ tagging: 'slowTaggingFunc' }); + + showChoicesForSearch(el, 'Foo'); + expect(el.find('.ui-select-choices-row-inner').size()).toBe(6); + + showChoicesForSearch(el, 'a'); + expect(el.find('.ui-select-choices-row-inner').size()).toBe(9); + + expect(scope.slowTaggingFunc.calls.count()).toBe(2); + expect(scope.slowTaggingFunc.calls.count()).not.toBe(15); + }); + + it('should allow decline tags when tagging function returns null in multiple select mode', function () { + scope.taggingFunc = function (name) { + if (name == 'idontexist') return null; + return { + name: name, + email: name + '@email.com', + group: 'Foo', + age: 12 + }; + }; + + var el = createUiSelectMultiple({ tagging: 'taggingFunc' }); + + showChoicesForSearch(el, 'amalie'); + expect(el.find('.ui-select-choices-row-inner').size()).toBe(2); + expect(el.scope().$select.items[0]).toEqual(jasmine.objectContaining({ name: 'amalie', isTag: true })); + expect(el.scope().$select.items[1]).toEqual(jasmine.objectContaining({ name: 'Amalie' })); + + showChoicesForSearch(el, 'idoexist'); + expect(el.find('.ui-select-choices-row-inner').size()).toBe(1); + expect(el.find('.ui-select-choices-row-inner').is(':contains(idoexist@email.com)')).toBeTruthy(); + + showChoicesForSearch(el, 'idontexist'); + expect(el.find('.ui-select-choices-row-inner').size()).toBe(0); + }); + + it('should allow creating tag in multi select mode with tagging and group-by enabled', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + group: 'Foo', + age: 12 + }; + }; + + var el = createUiSelectMultiple({ tagging: 'taggingFunc', groupBy: "'age'" }); + + showChoicesForSearch(el, 'amal'); + expect(el.find('.ui-select-choices-row-inner').size()).toBe(2); + expect(el.scope().$select.items[0]).toEqual(jasmine.objectContaining({ name: 'amal', email: 'amal@email.com', isTag: true })); + expect(el.scope().$select.items[1]).toEqual(jasmine.objectContaining({ name: 'Amalie', email: 'amalie@email.com' })); + }); + + + it('should have tolerance for undefined values', function () { + + scope.modelValue = undefined; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + expect($(el).scope().$select.selected).toEqual([]); + }); + + it('should have tolerance for null values', function () { + + scope.modelValue = null; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
        \ +
        \ +
        \ +
        \ + ' + ); + + expect($(el).scope().$select.selected).toEqual([]); + }); + + it('should allow paste tag from clipboard', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + group: 'Foo', + age: 12 + }; + }; + + var el = createUiSelectMultiple({ tagging: 'taggingFunc', taggingTokens: ",|ENTER" }); + clickMatch(el); + triggerPaste(el.find('input'), 'tag1'); + + expect($(el).scope().$select.selected.length).toBe(1); + expect($(el).scope().$select.selected[0].name).toBe('tag1'); + }); + + it('should allow paste tag from clipboard for generic ClipboardEvent', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + group: 'Foo', + age: 12 + }; + }; + + var el = createUiSelectMultiple({ tagging: 'taggingFunc', taggingTokens: ",|ENTER" }); + clickMatch(el); + triggerPaste(el.find('input'), 'tag1', true); + + expect($(el).scope().$select.selected.length).toBe(1); + expect($(el).scope().$select.selected[0].name).toBe('tag1'); + }); + + it('should allow paste multiple tags', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + group: 'Foo', + age: 12 + }; + }; + + var el = createUiSelectMultiple({ tagging: 'taggingFunc', taggingTokens: ",|ENTER" }); + clickMatch(el); + triggerPaste(el.find('input'), ',tag1,tag2,tag3,,tag5,'); + + expect($(el).scope().$select.selected.length).toBe(5); + }); + + it('should allow paste multiple tags with generic ClipboardEvent', function () { + scope.taggingFunc = function (name) { + return { + name: name, + email: name + '@email.com', + group: 'Foo', + age: 12 + }; + }; + + var el = createUiSelectMultiple({ tagging: 'taggingFunc', taggingTokens: ",|ENTER" }); + clickMatch(el); + triggerPaste(el.find('input'), ',tag1,tag2,tag3,,tag5,', true); + + expect($(el).scope().$select.selected.length).toBe(5); + }); + + it('should split pastes on ENTER (and with undefined tagging function)', function () { + var el = createUiSelectMultiple({ tagging: true, taggingTokens: "ENTER|," }); + clickMatch(el); + triggerPaste(el.find('input'), "tag1\ntag2\ntag3"); + + expect($(el).scope().$select.selected.length).toBe(3); + }); + + it('should split pastes on TAB', function () { + var el = createUiSelectMultiple({ tagging: true, taggingTokens: "TAB|," }); + clickMatch(el); + triggerPaste(el.find('input'), "tag1\ttag2\ttag3"); + + expect($(el).scope().$select.selected.length).toBe(3); + }); + + it('should split pastes on tagging token that is not the first token', function () { + var el = createUiSelectMultiple({ tagging: true, taggingTokens: ",|ENTER|TAB" }); + clickMatch(el); + triggerPaste(el.find('input'), "tag1\ntag2\ntag3\ntag4"); + + expect($(el).scope().$select.selected).toEqual(['tag1', 'tag2', 'tag3', 'tag4']); + }); + + it('should split pastes only on first tagging token found in paste string', function () { + var el = createUiSelectMultiple({ tagging: true, taggingTokens: ",|ENTER|TAB" }); + clickMatch(el); + triggerPaste(el.find('input'), "tag1\ntag2\ntag3\ttag4"); + + expect($(el).scope().$select.selected).toEqual(['tag1', 'tag2', 'tag3\ttag4']); + }); + + it('should allow paste with tagging-tokens and tagging-label=="false"', function () { + var el = createUiSelectMultiple({ tagging: true, taggingLabel: false, taggingTokens: "," }); + clickMatch(el); + triggerPaste(el.find('input'), 'tag1'); + + expect($(el).scope().$select.selected).toEqual(['tag1']); + }); + + it('should add an id to the search input field', function () { + var el = createUiSelectMultiple({ inputId: 'inid' }); + var searchEl = $(el).find('input.ui-select-search'); + expect(searchEl.length).toEqual(1); + expect(searchEl[0].id).toEqual('inid'); + }); + + it('should properly identify as empty if required', function () { + var el = createUiSelectMultiple({ required: true }); + expect(el.hasClass('ng-empty')).toBeTruthy(); + }); + + it('should properly identify as not empty if required', function () { + var el = createUiSelectMultiple({ required: true }); + clickItem(el, 'Nicole'); + clickItem(el, 'Samantha'); + expect(el.hasClass('ng-not-empty')).toBeTruthy(); + }); + + it('should be able to re-select the item with removeselected set to false', function () { + scope.selection.selectedMultiple = [scope.people[4], scope.people[5]]; //Wladimir & Samantha + var el = createUiSelectMultiple({ removeSelected: true }); + expect(el.scope().$select.selected.length).toBe(2); + el.find('.ui-select-match-item').first().find('.ui-select-match-close').click(); + expect(el.scope().$select.selected.length).toBe(1); + clickItem(el, 'Wladimir'); + expect(el.scope().$select.selected.length).toBe(2); + }); + + it('should set only 1 item in the selected items when limit = 1', function () { + var el = createUiSelectMultiple({ limit: 1 }); + clickItem(el, 'Wladimir'); + clickItem(el, 'Natasha'); + expect(el.scope().$select.selected.length).toEqual(1); + }); + + it('should only have 1 item selected and onSelect function should only be handled once.', function () { + scope.onSelectFn = function ($item, $model) { + scope.$item = $item; + scope.$model = $model; + }; + var el = createUiSelectMultiple({ limit: 1, onSelect: 'onSelectFn($item, $model)' }); + + expect(scope.$item).toBeFalsy(); + expect(scope.$model).toBeFalsy(); + + clickItem(el, 'Samantha'); + $timeout.flush(); + clickItem(el, 'Natasha'); + $timeout.flush(); + expect(scope.selection.selectedMultiple[0].name).toBe('Samantha'); + expect(scope.$model.name).toEqual('Samantha'); + expect(el.scope().$select.selected.length).toEqual(1); + }); + + it('should only have 2 items selected and onSelect function should be handeld.', function () { + scope.onSelectFn = function ($item, $model) { + scope.$item = $item; + scope.$model = $model; + }; + var el = createUiSelectMultiple({ onSelect: 'onSelectFn($item, $model)' }); + + expect(scope.$item).toBeFalsy(); + expect(scope.$model).toBeFalsy(); + + clickItem(el, 'Samantha'); + $timeout.flush(); + expect(scope.$model.name).toEqual('Samantha'); + clickItem(el, 'Natasha'); + $timeout.flush(); + expect(scope.$model.name).toEqual('Natasha'); + expect(el.scope().$select.selected.length).toEqual(2); + }); + + describe('Test key down key up and activeIndex should skip disabled choice for uiMultipleSelect', function () { + it('should ignored disabled items going up', function () { + var el = createUiSelect({ uiDisableChoice: "person.age == 12" }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(0); + triggerKeydown(searchInput, Key.Down); + expect(el.scope().$select.activeIndex).toBe(2); + triggerKeydown(searchInput, Key.Up); + expect(el.scope().$select.activeIndex).toBe(0); + }); + + it('should ignored disabled items going up with tagging on', function () { + var el = createUiSelectMultiple({ uiDisableChoice: "person.age == 12", tagging: true }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(-1); + triggerKeydown(searchInput, Key.Down); + expect(el.scope().$select.activeIndex).toBe(2); + triggerKeydown(searchInput, Key.Up); + expect(el.scope().$select.activeIndex).toBe(-1); + }); + + it('should ignored disabled items going down', function () { + var el = createUiSelectMultiple({ uiDisableChoice: "person.age == 12" }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(0); + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(el.scope().$select.activeIndex).toBe(2); + }); + + it('should ignored disabled items going down with tagging on', function () { + var el = createUiSelectMultiple({ uiDisableChoice: "person.age == 12", tagging: true }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(-1); + triggerKeydown(searchInput, Key.Down); + expect(el.scope().$select.activeIndex).toBe(2); + triggerKeydown(searchInput, Key.Up); + expect(el.scope().$select.activeIndex).toBe(-1); + }); + + it('should ignore disabled items, going down with remove-selected on false', function () { + var el = createUiSelectMultiple({ uiDisableChoice: "person.age == 12", removeSelected: false }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(0); + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(el.scope().$select.activeIndex).toBe(2); + }); + }); + + describe('resetSearchInput option multiple', function () { + it('should be true by default', function () { + expect(createUiSelectMultiple().scope().$select.resetSearchInput).toBe(true); + }); + + it('should be false when set.', function () { + expect(createUiSelectMultiple({ resetSearchInput: false }).scope().$select.resetSearchInput).toBe(false); + }); + }); + + + describe('Reset the search value', function () { + it('should clear the search input when resetSearchInput is true', function () { + var el = createUiSelectMultiple(); + $(el).scope().$select.search = 'idontexist'; + $(el).scope().$select.select('idontexist'); + expect($(el).scope().$select.search).toEqual(''); + }); + + it('should not clear the search input when resetSearchInput is false', function () { + var el = createUiSelectMultiple({ resetSearchInput: false }); + $(el).scope().$select.search = 'idontexist'; + $(el).scope().$select.select('idontexist'); + expect($(el).scope().$select.search).toEqual('idontexist'); + }); + + it('should clear the search input when resetSearchInput is default set', function () { + var el = createUiSelectMultiple(); + $(el).scope().$select.search = 'idontexist'; + $(el).scope().$select.select('idontexist'); + expect($(el).scope().$select.search).toEqual(''); + }); + }); + }); + + it('should add an id to the search input field', function () { + var el = createUiSelect({ inputId: 'inid' }); + var searchEl = $(el).find('input.ui-select-search'); + expect(searchEl.length).toEqual(1); + expect(searchEl[0].id).toEqual('inid'); + }); + + describe('default configuration via uiSelectConfig', function () { + + describe('searchEnabled option', function () { + + function setupWithoutAttr() { + return compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + } + + function setupWithAttr(searchEnabled) { + return compileTemplate( + ' \ + {{$select.selected.name}} \ + \ +
        \ +
        \ +
        \ +
        ' + ); + } + + it('should be true by default', function () { + var el = setupWithoutAttr(); + expect(el.scope().$select.searchEnabled).toBe(true); + }); + + it('should disable search if default set to false', function () { + var uiSelectConfig = $injector.get('uiSelectConfig'); + uiSelectConfig.searchEnabled = false; + + var el = setupWithoutAttr(); + expect(el.scope().$select.searchEnabled).not.toBe(true); + }); + + it('should be overridden by inline option search-enabled=true', function () { + var uiSelectConfig = $injector.get('uiSelectConfig'); + uiSelectConfig.searchEnabled = false; + + var el = setupWithAttr(true); + expect(el.scope().$select.searchEnabled).toBe(true); + }); + + it('should be overridden by inline option search-enabled=false', function () { + var uiSelectConfig = $injector.get('uiSelectConfig'); + uiSelectConfig.searchEnabled = true; + + var el = setupWithAttr(false); + expect(el.scope().$select.searchEnabled).not.toBe(true); + }); + }); + }); + + describe('resetSearchInput option', function () { + it('should be true by default', function () { + expect(createUiSelect().scope().$select.resetSearchInput).toBe(true); + }); + + it('should be overridden by inline option reset-search-input=false', function () { + expect(createUiSelect({ resetSearchInput: false }).scope().$select.resetSearchInput).toBe(false); + }); + + describe('Reset the search value', function () { + it('should clear the search input when resetSearchInput is true', function () { + var control = createUiSelect(); + setSearchText(control, 'idontexist'); + clickMatch(control); + expect(control.scope().$select.search).toEqual(''); + }); + + it('should not clear the search input', function () { + var control = createUiSelect({ resetSearchInput: false }); + setSearchText(control, 'idontexist'); + clickMatch(control); + expect(control.scope().$select.search).toEqual('idontexist'); + }); + + it('should clear the search input when resetSearchInput is true and closeOnSelect is true', function () { + var control = createUiSelect({ closeOnSelect: true }); + setSearchText(control, 'idontexist'); + clickMatch(control); + expect(control.scope().$select.search).toEqual(''); + }); + + it('should clear the search input when resetSearchInput is true and closeOnSelect is false', function () { + var control = createUiSelect({ closeOnSelect: false }); + setSearchText(control, 'idontexist'); + clickMatch(control); + expect(control.scope().$select.search).toEqual(''); + }); + + it('should not clear the search input when resetSearchInput is false and closeOnSelect is false', function () { + var control = createUiSelect({ resetSearchInput: false, closeOnSelect: false }); + setSearchText(control, 'idontexist'); + clickMatch(control); + expect(control.scope().$select.search).toEqual('idontexist'); + }); + + it('should not clear the search input when resetSearchInput is false and closeOnSelect is true', function () { + var control = createUiSelect({ resetSearchInput: false, closeOnSelect: true }); + setSearchText(control, 'idontexist'); + clickMatch(control); + expect(control.scope().$select.search).toEqual('idontexist'); + }); + }); + }); + + describe('accessibility', function () { + it('should have baseTitle in scope', function () { + expect(createUiSelect().scope().$select.baseTitle).toBe('Select box'); + expect(createUiSelect().scope().$select.focusserTitle).toBe('Select box focus'); + expect(createUiSelect({ title: 'Choose a person' }).scope().$select.baseTitle).toBe('Choose a person'); + expect(createUiSelect({ title: 'Choose a person' }).scope().$select.focusserTitle).toBe('Choose a person focus'); + }); + + it('should have aria-label on all input and button elements', function () { + checkTheme(); + checkTheme('select2'); + checkTheme('selectize'); + checkTheme('bootstrap'); + + function checkTheme(theme) { + var el = createUiSelect({ theme: theme }); + checkElements(el.find('input')); + checkElements(el.find('button')); + + function checkElements(els) { + for (var i = 0; i < els.length; i++) { + expect(els[i].attributes['aria-label']).toBeTruthy(); + } + } + } + }); + }); + + describe('select with the append to body option', function () { + var body; + + beforeEach(inject(function ($document) { + body = $document.find('body')[0]; + })); + + it('should only be moved to the body when the appendToBody option is true', function () { + var el = createUiSelect({ appendToBody: false }); + openDropdown(el); + expect(el.parent()[0]).not.toBe(body); + }); + + it('should be moved to the body when the appendToBody is true in uiSelectConfig', inject(function (uiSelectConfig) { + uiSelectConfig.appendToBody = true; + var el = createUiSelect(); + openDropdown(el); + expect(el.parent()[0]).toBe(body); + })); + + it('should be moved to the body when opened', function () { + var el = createUiSelect({ appendToBody: true }); + openDropdown(el); + expect(el.parent()[0]).toBe(body); + closeDropdown(el); + expect(el.parent()[0]).not.toBe(body); + }); + + it('should remove itself from the body when the scope is destroyed', function () { + var el = createUiSelect({ appendToBody: true }); + openDropdown(el); + expect(el.parent()[0]).toBe(body); + el.scope().$destroy(); + expect(el.parent()[0]).not.toBe(body); + }); + + it('should have specific position and dimensions', function () { + var el = createUiSelect({ appendToBody: true }); + var originalPosition = el.css('position'); + var originalTop = el.css('top'); + var originalLeft = el.css('left'); + var originalWidth = el.css('width'); + openDropdown(el); + expect(el.css('position')).toBe('absolute'); + expect(el.css('top')).toBe('100px'); + expect(el.css('left')).toBe('200px'); + expect(el.css('width')).toBe('300px'); + closeDropdown(el); + expect(el.css('position')).toBe(originalPosition); + expect(el.css('top')).toBe(originalTop); + expect(el.css('left')).toBe(originalLeft); + expect(el.css('width')).toBe(originalWidth); + }); + }); + + describe('highlight filter', function () { + var highlight; + + beforeEach(function () { + highlight = $injector.get('highlightFilter'); + }); + + it('returns the item if there is no match', function () { + var query = 'January'; + var item = 'December'; + + expect(highlight(item, query)).toBe('December'); + }); + + it('wraps search strings matches in ui-select-highlight class', function () { + var query = 'er'; + var item = 'December'; + + expect(highlight(item, query)).toBe('December'); + }); + + it('properly highlights numeric items', function () { + var query = '15'; + var item = 2015; + + expect(highlight(item, query)).toBe('2015'); + }); + + it('properly works with numeric queries', function () { + var query = 15; + var item = 2015; + + expect(highlight(item, query)).toBe('2015'); + }); + }); + + describe('Test Spinner for promises', function () { + var deferred; + + function getFromServer() { + deferred = $q.defer(); + return deferred.promise; + } + it('should have a default value of false', function () { + var control = createUiSelect(); + expect(control.scope().$select.spinnerEnabled).toEqual(false); + }); + + it('should have a set a value of true', function () { + var control = createUiSelect({ spinnerEnabled: true }); + expect(control.scope().$select.spinnerEnabled).toEqual(true); + }); + + it('should have a default value of glyphicon-refresh ui-select-spin', function () { + var control = createUiSelect(); + expect(control.scope().$select.spinnerClass).toEqual('glyphicon glyphicon-refresh ui-select-spin'); + }); + + it('should have set a custom class value of randomclass', function () { + var control = createUiSelect({ spinnerClass: 'randomclass' }); + expect(control.scope().$select.spinnerClass).toEqual('randomclass'); + }); + + it('should not display spinner when disabled', function () { + scope.getFromServer = getFromServer; + var el = createUiSelect({ theme: 'bootstrap', refresh: "getFromServer($select.search)", refreshDelay: 0 }); + openDropdown(el); + var spinner = el.find('.ui-select-refreshing'); + expect(spinner.hasClass('ng-hide')).toBe(true); + setSearchText(el, 'a'); + expect(spinner.hasClass('ng-hide')).toBe(true); + deferred.resolve(); + scope.$digest(); + expect(spinner.hasClass('ng-hide')).toBe(true); + }); + + it('should display spinner when enabled', function () { + scope.getFromServer = getFromServer; + var el = createUiSelect({ spinnerEnabled: true, theme: 'bootstrap', refresh: "getFromServer($select.search)", refreshDelay: 0 }); + openDropdown(el); + var spinner = el.find('.ui-select-refreshing'); + expect(spinner.hasClass('ng-hide')).toBe(true); + setSearchText(el, 'a'); + expect(spinner.hasClass('ng-hide')).toBe(false); + deferred.resolve(); + scope.$digest(); + expect(spinner.hasClass('ng-hide')).toBe(true); + }); + + it('should not display spinner when enabled', function () { + var el = createUiSelect({ spinnerEnabled: true, theme: 'bootstrap', spinnerClass: 'randomclass' }); + openDropdown(el); + var spinner = el.find('.ui-select-refreshing'); + setSearchText(el, 'a'); + expect(el.scope().$select.spinnerClass).toBe('randomclass'); + }); + }); + + describe('With refresh on active', function () { + it('should refresh when is activated', function () { + scope.fetchFromServer = function () { }; + var el = createUiSelect({ refresh: "fetchFromServer($select.search)", refreshDelay: 0 }); + spyOn(scope, 'fetchFromServer'); + expect(el.scope().$select.open).toEqual(false); + el.scope().$select.activate(); + $timeout.flush(); + expect(el.scope().$select.open).toEqual(true); + expect(scope.fetchFromServer.calls.any()).toEqual(true); + }); + + + it('should refresh when open is set to true', function () { + scope.fetchFromServer = function () { }; + var el = createUiSelect({ refresh: "fetchFromServer($select.search)", refreshDelay: 0 }); + spyOn(scope, 'fetchFromServer'); + expect(el.scope().$select.open).toEqual(false); + openDropdown(el); + $timeout.flush(); + expect(el.scope().$select.open).toEqual(true); + expect(scope.fetchFromServer.calls.any()).toEqual(true); + }); + }); + describe('Test key down key up and activeIndex should skip disabled choice', function () { + it('should ignore disabled items, going down', function () { + var el = createUiSelect({ uiDisableChoice: "person.age == 12" }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(0); + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(el.scope().$select.activeIndex).toBe(2); + }); + + it('should ignore disabled items, going up', function () { + var el = createUiSelect({ uiDisableChoice: "person.age == 12" }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(0); + triggerKeydown(searchInput, Key.Down); + expect(el.scope().$select.activeIndex).toBe(2); + triggerKeydown(searchInput, Key.Up); + expect(el.scope().$select.activeIndex).toBe(0); + }); + + it('should ignored disabled items going up with tagging on', function () { + var el = createUiSelect({ uiDisableChoice: "person.age == 12", tagging: true }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(-1); + triggerKeydown(searchInput, Key.Down); + expect(el.scope().$select.activeIndex).toBe(2); + triggerKeydown(searchInput, Key.Up); + expect(el.scope().$select.activeIndex).toBe(-1); + }); + + it('should ignored disabled items in the down direction with tagging on', function () { + var el = createUiSelect({ uiDisableChoice: "person.age == 12", tagging: true }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(-1); + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(el.scope().$select.activeIndex).toBe(2); + }); + + it('should ignored disabled items going up with tagging on and custom tag', function () { + var el = createUiSelect({ uiDisableChoice: "person.age == 12", tagging: true, taggingLabel: 'custom tag' }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(-1); + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(el.scope().$select.activeIndex).toBe(2); + }); + + it('should ignore disabled items, going down with remove-selected on false', function () { + var el = createUiSelect({ uiDisableChoice: "person.age == 12", removeSelected: false }); + openDropdown(el); + var searchInput = el.find('.ui-select-search'); + expect(el.scope().$select.activeIndex).toBe(0); + triggerKeydown(searchInput, Key.Down); + triggerKeydown(searchInput, Key.Enter); + expect(el.scope().$select.activeIndex).toBe(2); + }); + }); +}); diff --git a/js/vendor/angular/.bower.json b/js/vendor/angular/.bower.json deleted file mode 100644 index 44702a676..000000000 --- a/js/vendor/angular/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "angular", - "version": "1.5.5", - "license": "MIT", - "main": "./angular.js", - "ignore": [], - "dependencies": {}, - "homepage": "https://github.com/angular/bower-angular", - "_release": "1.5.5", - "_resolution": { - "type": "version", - "tag": "v1.5.5", - "commit": "cd353693d20736baa44fb44f65f8f573ef6e8e18" - }, - "_source": "https://github.com/angular/bower-angular.git", - "_target": "1.5.5", - "_originalSource": "angular" -} \ No newline at end of file diff --git a/js/vendor/ical.js/.bower.json b/js/vendor/ical.js/.bower.json deleted file mode 100644 index 4dd68102e..000000000 --- a/js/vendor/ical.js/.bower.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "ical.js", - "version": "1.2.2", - "homepage": "https://github.com/mozilla-comm/ical.js", - "authors": [ - "Philipp Kewisch ", - "Github Contributors (https://github.com/mozilla-comm/ical.js/graphs/contributors)" - ], - "description": "Javascript parser for ics (rfc5545) and vcard (rfc6350) data", - "main": "build/ical.js", - "moduleType": [ - "globals", - "node" - ], - "keywords": [ - "calendar", - "iCalendar", - "jCal", - "vCard", - "jCard", - "parser" - ], - "license": "MPL-2.0", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tools", - "zoneinfo", - "coverage", - "junk" - ], - "_release": "1.2.2", - "_resolution": { - "type": "version", - "tag": "v1.2.2", - "commit": "a4e882f941ddca2e81373d93c53256017ce04011" - }, - "_source": "https://github.com/mozilla-comm/ical.js.git", - "_target": "~1.2.2", - "_originalSource": "ical.js" -} \ No newline at end of file diff --git a/js/vendor/ical.js/CONTRIBUTING.md b/js/vendor/ical.js/CONTRIBUTING.md deleted file mode 100644 index 78c622b77..000000000 --- a/js/vendor/ical.js/CONTRIBUTING.md +++ /dev/null @@ -1,65 +0,0 @@ -Woohoo, a new contributor! -========================== -Thank you so much for looking into ical.js. With your work you are doing good -by making it easier to process calendar data on the web. - -To give you a feeling about what you are dealing with, ical.js was originally -created as a replacement for [libical], meant to be used in [Lightning], the -calendaring extension to Thunderbird. Using binary components in Mozilla -extensions often leads to compatibility issues so a pure JavaScript -implementation was needed. It is now also used in the Firefox OS calendaring -application. - -Work on the library prompted creating some standards around it. One of them is -jCal ([rfc7265]), an alternative text format for iCalendar data using JSON. The -other document is jCard ([rfc7095]), which is the counterpart for vCard data. - -Pull Requests -------------- -In general we are happy about any form of contribution to ical.js. Note however -that since the library is used in at least two larger projects, drastic changes -to the API should be discussed in an issue beforehand. If you have a bug fix -that doesn't affect the API or just adds methods and you don't want to waste -time discussing it, feel free to just send a pull request and we'll see. - -When you send a pull request, don't forget to call `grunt package` to ensure the -browser build in `build/ical.js`, its minified counterpart and the source map -is updated. These files should be put into a separate commit. - -Also, you should check for linter errors and run the tests using `grunt -linters` and `grunt test-node`. See the next section for details on tests. As -they take a while, you can skip the performance tests using `grunt -test-node:unit` and `grunt test-node:acceptance`, but if you are uncertain if -your change may affect performance, you should run all tests. - -Currently the team working on ical.js consists of a very small number of -voluntary contributors. If you don't get a reply in a timely manner please -don't feel turned down. If you are getting impatient with us, go ahead and send -one or more reminders via email or comment. - -Tests ------ -To make sure there are no regressions, we use unit testing and continuous -integration via Travis. Sending a pull request with a unit test for the bug you -are fixing or feature you are adding will greatly improve the speed of -reviewing and the pull request being merged. Please read the page on [running -tests] in the wiki to set these up and make sure everything passes. - -License -------- -ical.js is licensed under the [Mozilla Public License], version 2.0. - -Last words ----------- -If you have any questions please don't hesitate to get in touch. You can leave -a comment on an issue, send [@kewisch] an email, or for ad-hoc questions contact -`Fallen` on [irc.mozilla.org]. - -[libical]: https://github.com/libical/libical/ -[Lightning]: http://www.mozilla.org/projects/calendar/ -[rfc7095]: https://tools.ietf.org/html/rfc7095 -[rfc7265]: https://tools.ietf.org/html/rfc7265 -[running tests]: https://github.com/mozilla-comm/ical.js/wiki/Running-Tests -[irc.mozilla.org]: irc://irc.mozilla.org/#calendar -[@kewisch]: https://github.com/kewisch/ -[Mozilla Public License]: https://www.mozilla.org/MPL/2.0/ diff --git a/js/vendor/ical.js/Gruntfile.js b/js/vendor/ical.js/Gruntfile.js deleted file mode 100644 index 610ad0518..000000000 --- a/js/vendor/ical.js/Gruntfile.js +++ /dev/null @@ -1,277 +0,0 @@ -'use strict'; - -var path = require('path'); - -module.exports = function(grunt) { - function loadOptionalTask(name) { - var root = path.resolve('node_modules'); - var tasksdir = path.join(root, name, 'tasks'); - if (grunt.file.exists(tasksdir)) { - grunt.loadNpmTasks(name); - } - } - - var pkg = grunt.file.readJSON('package.json'); - grunt.initConfig({ - pkg: pkg, - libinfo: { - cwd: 'lib/ical', - doc: 'api', - files: [ - 'helpers.js', 'design.js', 'stringify.js', 'parse.js', 'component.js', - 'property.js', 'utc_offset.js', 'binary.js', 'period.js', 'duration.js', - 'timezone.js', 'timezone_service.js', 'time.js', 'vcard_time.js', - 'recur.js', 'recur_iterator.js', 'recur_expansion.js', 'event.js', - 'component_parser.js' - ], - test: { - head: ['test/helper.js'], - unit: ['test/*_test.js'], - acceptance: ['test/acceptance/*_test.js'], - performance: ['test/performance/*_test.js'] - }, - validator: { - dev: 'https://rawgit.com/mozilla-comm/ical.js/master/build/ical.js', - prod: 'https://cdn.rawgit.com/mozilla-comm/ical.js/<%= travis.commit %>/build/ical.js', - dest: 'validator.html' - } - }, - - concat: { - options: { - separator: '' - }, - - dist: { - options: { - process: function(src, filepath) { - return src.replace('"use strict";', ''); - } - }, - src: ['<%= libinfo.absfiles %>'], - dest: 'build/ical.js' - }, - - validator: { - options: { - process: function(src, filepath) { - return src.replace(grunt.config('libinfo.validator.dev'), grunt.config('libinfo.validator.prod')); - } - }, - src: ['sandbox/validator.html'], - dest: '<%= libinfo.validator.dest %>' - } - }, - - mocha_istanbul: { - coverage: { - src: ['<%= libinfo.test.unit %>', '<%= libinfo.test.acceptance %>'], - options: { - root: './lib/ical/', - require: ['<%= libinfo.test.head %>'], - reporter: 'dot', - ui: 'tdd' - } - } - }, - - coveralls: { - options: { - force: true - }, - unit: { - src: './coverage/lcov.info' - } - }, - - 'node-inspector': { - test: { - hidden: ['node_modules'] - } - }, - - concurrent: { - all: ['mochacli', 'node-inspector'], - unit: ['mochacli:unit', 'node-inspector'], - acceptance: ['mochacli:acceptance', 'node-inspector'], - single: ['mochacli:single', 'node-inspector'], - }, - - eslint: { - src: ['<%= libinfo.absfiles %>'] - }, - - mochacli: { - options: { - ui: 'tdd', - require: ['<%= libinfo.test.head %>'], - 'debug-brk': grunt.option('debug'), - reporter: grunt.option('reporter') || 'spec' - }, - performance: { - src: ['<%= libinfo.test.performance %>'] - }, - acceptance: { - src: ['<%= libinfo.test.acceptance %>'] - }, - unit: { - src: ['<%= libinfo.test.unit %>'] - }, - single: { - src: [grunt.option('test')] - } - }, - - karma: { - options: { - singleRun: true, - hostname: grunt.option('remote') ? '0.0.0.0' : 'localhost', - port: 9876, - colors: true, - basePath: '', - logLevel: grunt.option('verbose') ? 'DEBUG' : 'INFO', - autoWatch: false, - captureTimeout: 240000, - browserNoActivityTimeout: 120000, - frameworks: ['mocha', 'chai'], - client: { - mocha: { - ui: 'tdd' - } - }, - files: [ - { pattern: 'samples/**/*.ics', included: false }, - { pattern: 'test/parser/*', included: false }, - '<%= libinfo.relfiles %>', - '<%= libinfo.test.head %>' - ] - }, - ci: { - exitOnFailure: false, - customLaunchers: pkg.saucelabs, - browsers: Object.keys(pkg.saucelabs), - reporters: ['saucelabs', 'spec'], - sauceLabs: { - testName: 'ICAL.js', - startConnect: true - }, - - files: { - src: ['<%= libinfo.test.unit %>'] - } - }, - single: { - singleRun: !grunt.option('debug'), - reporters: ['spec'], - files: { - src: [grunt.option('test')] - } - }, - unit: { - singleRun: !grunt.option('debug'), - reporters: ['spec'], - files: { - src: ['<%= libinfo.test.unit %>'] - } - }, - acceptance: { - singleRun: !grunt.option('debug'), - reporters: ['spec'], - files: { - src: ['<%= libinfo.test.acceptance %>'] - } - }, - }, - - uglify: { - options: { - sourceMap: true, - preserveComments: false, - screwIE8: true, - compress: {}, - mangle: { - except: ['ICAL'] - } - }, - dist: { - files: { - 'build/ical.min.js': ['build/ical.js'] - } - } - }, - release: { - options: { - tagName: 'v<%=version%>', - tagMessage: 'v<%=version%>', - additionalFiles: ['bower.json'], - github: { - repo: 'mozilla-comm/ical.js', - accessTokenVar: 'GITHUB_TOKEN' - } - } - }, - jsdoc: { - dist: { - src: ['<%= libinfo.absfiles %>', 'README.md'], - options: { - destination: '<%= libinfo.doc %>', - template: './node_modules/minami/', - private: false - } - } - }, - - 'gh-pages': { - options: { - clone: 'ghpages-stage', - only: '<%= libinfo.doc %>', - user: { - name: 'Travis CI', - email: 'builds@travis-ci.org', - }, - repo: 'git@github.com:mozilla-comm/ical.js.git', - message: 'Update API documentation and validator for <%= travis.commit %>' - }, - src: ['<%= libinfo.doc %>/**', '<%= libinfo.validator.dest %>'] - } - }); - - grunt.config.set('libinfo.absfiles', grunt.config.get('libinfo.files').map(function(f) { - return path.join(grunt.config.get('libinfo.cwd'), f); - })); - grunt.config.set('libinfo.relfiles', grunt.config.get('libinfo.files').map(function(f) { - return path.join("lib", "ical", f); - })); - - grunt.loadNpmTasks('grunt-concurrent'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-coveralls'); - grunt.loadNpmTasks('grunt-gh-pages'); - grunt.loadNpmTasks('grunt-jsdoc'); - grunt.loadNpmTasks('grunt-karma'); - grunt.loadNpmTasks('grunt-mocha-cli'); - grunt.loadNpmTasks('grunt-mocha-istanbul'); - grunt.loadNpmTasks('grunt-release'); - grunt.loadNpmTasks('gruntify-eslint'); - - loadOptionalTask('grunt-node-inspector'); - - grunt.loadTasks('tasks'); - - grunt.registerTask('default', ['package']); - grunt.registerTask('package', ['concat:dist', 'uglify']); - grunt.registerTask('coverage', 'mocha_istanbul'); - grunt.registerTask('linters', ['eslint', 'check-browser-build']); - grunt.registerTask('test-server', ['test-agent-config', 'run-test-server']); - grunt.registerTask('test', ['test-browser', 'test-node']); - - grunt.registerTask('ghpages-ci', ['jsdoc', 'concat:validator', 'run-on-master-leader:run-with-env:GITHUB_SSH_KEY:gh-pages']); - grunt.registerTask('unit-ci', ['test-node:unit', 'test-node:acceptance', 'run-on-master-leader:karma:ci']); - grunt.registerTask('coverage-ci', ['coverage', 'coveralls']); - grunt.registerTask('test-ci', ['check-browser-build', 'linters', 'unit-ci', 'coverage-ci', 'ghpages-ci']); - - // Additional tasks: - // - tests.js: performance-update, test-node, test-browser, - // - timezones.js: timezones -}; diff --git a/js/vendor/ical.js/bower.json b/js/vendor/ical.js/bower.json deleted file mode 100644 index 06fbcf026..000000000 --- a/js/vendor/ical.js/bower.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "ical.js", - "version": "1.2.2", - "homepage": "https://github.com/mozilla-comm/ical.js", - "authors": [ - "Philipp Kewisch ", - "Github Contributors (https://github.com/mozilla-comm/ical.js/graphs/contributors)" - ], - "description": "Javascript parser for ics (rfc5545) and vcard (rfc6350) data", - "main": "build/ical.js", - "moduleType": [ - "globals", - "node" - ], - "keywords": [ - "calendar", - "iCalendar", - "jCal", - "vCard", - "jCard", - "parser" - ], - "license": "MPL-2.0", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tools", - "zoneinfo", - "coverage", - "junk" - ] -} diff --git a/js/vendor/ical.js/build/benchmark/ical_previous.js b/js/vendor/ical.js/build/benchmark/ical_previous.js deleted file mode 100644 index 064b335ab..000000000 --- a/js/vendor/ical.js/build/benchmark/ical_previous.js +++ /dev/null @@ -1,6670 +0,0 @@ -var ICAL_previous = (function() { var ICAL = {}; -if (typeof global !== 'undefined') global.ICAL_previous = ICAL; -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * Portions Copyright (C) Philipp Kewisch, 2011-2012 */ - -ICAL.foldLength = 75; -ICAL.newLineChar = '\r\n'; - -/** - * Helper functions used in various places within ical.js - */ -ICAL.helpers = { - initState: function initState(aLine, aLineNr) { - return { - buffer: aLine, - line: aLine, - lineNr: aLineNr, - character: 0, - currentData: null, - parentData: [] - }; - }, - - initComponentData: function initComponentData(aName) { - return { - name: aName, - type: "COMPONENT", - value: [] - }; - }, - - /** - * Checks if the given number is NaN - */ - isStrictlyNaN: function(number) { - return typeof(number) === 'number' && isNaN(number); - }, - - /** - * Parses a string value that is expected to be an - * integer, when the valid is not an integer throws - * a decoration error. - * - * @param {String} string raw input. - * @return {Number} integer. - */ - strictParseInt: function(string) { - var result = parseInt(string, 10); - - if (ICAL.helpers.isStrictlyNaN(result)) { - throw new Error( - 'Could not extract integer from "' + string + '"' - ); - } - - return result; - }, - - /** - * Creates or returns a class instance - * of a given type with the initialization - * data if the data is not already an instance - * of the given type. - * - * - * Example: - * - * var time = new ICAL.Time(...); - * var result = ICAL.helpers.formatClassType(time, ICAL.Time); - * - * (result instanceof ICAL.Time) - * // => true - * - * result = ICAL.helpers.formatClassType({}, ICAL.Time); - * (result isntanceof ICAL.Time) - * // => true - * - * - * @param {Object} data object initialization data. - * @param {Object} type object type (like ICAL.Time). - */ - formatClassType: function formatClassType(data, type) { - if (typeof(data) === 'undefined') - return undefined; - - if (data instanceof type) { - return data; - } - return new type(data); - }, - - /** - * Identical to index of but will only match values - * when they are not preceded by a backslash char \\\ - * - * @param {String} buffer string value. - * @param {String} search value. - * @param {Numeric} pos start position. - */ - unescapedIndexOf: function(buffer, search, pos) { - while ((pos = buffer.indexOf(search, pos)) !== -1) { - if (pos > 0 && buffer[pos - 1] === '\\') { - pos += 1; - } else { - return pos; - } - } - return -1; - }, - - binsearchInsert: function(list, seekVal, cmpfunc) { - if (!list.length) - return 0; - - var low = 0, high = list.length - 1, - mid, cmpval; - - while (low <= high) { - mid = low + Math.floor((high - low) / 2); - cmpval = cmpfunc(seekVal, list[mid]); - - if (cmpval < 0) - high = mid - 1; - else if (cmpval > 0) - low = mid + 1; - else - break; - } - - if (cmpval < 0) - return mid; // insertion is displacing, so use mid outright. - else if (cmpval > 0) - return mid + 1; - else - return mid; - }, - - dumpn: function() { - if (!ICAL.debug) { - return null; - } - - if (typeof (console) !== 'undefined' && 'log' in console) { - ICAL.helpers.dumpn = function consoleDumpn(input) { - return console.log(input); - } - } else { - ICAL.helpers.dumpn = function geckoDumpn(input) { - dump(input + '\n'); - } - } - - return ICAL.helpers.dumpn(arguments[0]); - }, - - mixin: function(obj, data) { - if (data) { - for (var k in data) { - obj[k] = data[k]; - } - } - return obj; - }, - - isArray: function(o) { - return o && (o instanceof Array || typeof o == "array"); - }, - - clone: function(aSrc, aDeep) { - if (!aSrc || typeof aSrc != "object") { - return aSrc; - } else if (aSrc instanceof Date) { - return new Date(aSrc.getTime()); - } else if ("clone" in aSrc) { - return aSrc.clone(); - } else if (ICAL.helpers.isArray(aSrc)) { - var result = []; - for (var i = 0; i < aSrc.length; i++) { - result.push(aDeep ? ICAL.helpers.clone(aSrc[i], true) : aSrc[i]); - } - return result; - } else { - var result = {}; - for (var name in aSrc) { - // uses prototype method to allow use of Object.create(null); - if (Object.prototype.hasOwnProperty.call(aSrc, name)) { - if (aDeep) { - result[name] = ICAL.helpers.clone(aSrc[name], true); - } else { - result[name] = aSrc[name]; - } - } - } - return result; - } - }, - - unfoldline: function unfoldline(aState) { - // Section 3.1 - // if the line ends with a CRLF - // and the next line starts with a LINEAR WHITESPACE (space, htab, ...) - - // then remove the CRLF and the whitespace to unsplit the line - var moreLines = true; - var line = ""; - - while (moreLines) { - moreLines = false; - var pos = aState.buffer.search(/\r?\n/); - if (pos > -1) { - var len = (aState.buffer[pos] == "\r" ? 2 : 1); - var nextChar = aState.buffer.substr(pos + len, 1); - if (nextChar.match(/^[ \t]$/)) { - moreLines = true; - line += aState.buffer.substr(0, pos); - aState.buffer = aState.buffer.substr(pos + len + 1); - } else { - // We're at the end of the line, copy the found chunk - line += aState.buffer.substr(0, pos); - aState.buffer = aState.buffer.substr(pos + len); - } - } else { - line += aState.buffer; - aState.buffer = ""; - } - } - return line; - }, - - foldline: function foldline(aLine) { - var result = ""; - var line = aLine || ""; - - while (line.length) { - result += ICAL.newLineChar + " " + line.substr(0, ICAL.foldLength); - line = line.substr(ICAL.foldLength); - } - return result.substr(ICAL.newLineChar.length + 1); - }, - - ensureKeyExists: function(obj, key, defvalue) { - if (!(key in obj)) { - obj[key] = defvalue; - } - }, - - hasKey: function(obj, key) { - return (obj && key in obj && obj[key]); - }, - - pad2: function pad(data) { - if (typeof(data) !== 'string') { - // handle fractions. - if (typeof(data) === 'number') { - data = parseInt(data); - } - data = String(data); - } - - var len = data.length; - - switch (len) { - case 0: - return '00'; - case 1: - return '0' + data; - default: - return data; - } - }, - - trunc: function trunc(number) { - return (number < 0 ? Math.ceil(number) : Math.floor(number)); - } -}; -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * Portions Copyright (C) Philipp Kewisch, 2011-2012 */ - -(typeof(ICAL) === 'undefined')? ICAL = {} : ''; - -ICAL.design = (function() { - 'use strict'; - - var ICAL_NEWLINE = /\\\\|\\;|\\,|\\[Nn]/g; - - function DecorationError() { - Error.apply(this, arguments); - } - - DecorationError.prototype = { - __proto__: Error.prototype - }; - - function replaceNewlineReplace(string) { - switch (string) { - case "\\\\": - return "\\"; - case "\\;": - return ";"; - case "\\,": - return ","; - case "\\n": - case "\\N": - return "\n"; - default: - return string; - } - } - - function replaceNewline(value) { - // avoid regex when possible. - if (value.indexOf('\\') === -1) { - return value; - } - - return value.replace(ICAL_NEWLINE, replaceNewlineReplace); - } - - /** - * Design data used by the parser to decide if data is semantically correct - */ - var design = { - DecorationError: DecorationError, - - defaultType: 'text', - - param: { - // Although the syntax is DQUOTE uri DQUOTE, I don't think we should - // enfoce anything aside from it being a valid content line. - // "ALTREP": { ... }, - - // CN just wants a param-value - // "CN": { ... } - - "cutype": { - values: ["INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN"], - allowXName: true, - allowIanaToken: true - }, - - "delegated-from": { - valueType: "cal-address", - multiValue: "," - }, - "delegated-to": { - valueType: "cal-address", - multiValue: "," - }, - // "DIR": { ... }, // See ALTREP - "encoding": { - values: ["8BIT", "BASE64"] - }, - // "FMTTYPE": { ... }, // See ALTREP - "fbtype": { - values: ["FREE", "BUSY", "BUSY-UNAVAILABLE", "BUSY-TENTATIVE"], - allowXName: true, - allowIanaToken: true - }, - // "LANGUAGE": { ... }, // See ALTREP - "member": { - valueType: "cal-address", - multiValue: "," - }, - "partstat": { - // TODO These values are actually different per-component - values: ["NEEDS-ACTION", "ACCEPTED", "DECLINED", "TENTATIVE", - "DELEGATED", "COMPLETED", "IN-PROCESS"], - allowXName: true, - allowIanaToken: true - }, - "range": { - values: ["THISLANDFUTURE"] - }, - "related": { - values: ["START", "END"] - }, - "reltype": { - values: ["PARENT", "CHILD", "SIBLING"], - allowXName: true, - allowIanaToken: true - }, - "role": { - values: ["REQ-PARTICIPANT", "CHAIR", - "OPT-PARTICIPANT", "NON-PARTICIPANT"], - allowXName: true, - allowIanaToken: true - }, - "rsvp": { - valueType: "boolean" - }, - "sent-by": { - valueType: "cal-address" - }, - "tzid": { - matches: /^\// - }, - "value": { - // since the value here is a 'type' lowercase is used. - values: ["binary", "boolean", "cal-address", "date", "date-time", - "duration", "float", "integer", "period", "recur", "text", - "time", "uri", "utc-offset"], - allowXName: true, - allowIanaToken: true - } - }, - - // When adding a value here, be sure to add it to the parameter types! - value: { - - "binary": { - decorate: function(aString) { - return ICAL.Binary.fromString(aString); - }, - - undecorate: function(aBinary) { - return aBinary.toString(); - } - }, - "boolean": { - values: ["TRUE", "FALSE"], - - fromICAL: function(aValue) { - switch(aValue) { - case 'TRUE': - return true; - case 'FALSE': - return false; - default: - //TODO: parser warning - return false; - } - }, - - toICAL: function(aValue) { - if (aValue) { - return 'TRUE'; - } - return 'FALSE'; - } - - }, - "cal-address": { - // needs to be an uri - }, - "date": { - decorate: function(aValue, aProp) { - return ICAL.Time.fromDateString(aValue, aProp); - }, - - /** - * undecorates a time object. - */ - undecorate: function(aValue) { - return aValue.toString(); - }, - - fromICAL: function(aValue) { - // from: 20120901 - // to: 2012-09-01 - var result = aValue.substr(0, 4) + '-' + - aValue.substr(4, 2) + '-' + - aValue.substr(6, 2); - - if (aValue[8] === 'Z') { - result += 'Z'; - } - - return result; - }, - - toICAL: function(aValue) { - // from: 2012-09-01 - // to: 20120901 - - if (aValue.length > 11) { - //TODO: serialize warning? - return aValue; - } - - var result = aValue.substr(0, 4) + - aValue.substr(5, 2) + - aValue.substr(8, 2); - - if (aValue[10] === 'Z') { - result += 'Z'; - } - - return result; - } - }, - "date-time": { - fromICAL: function(aValue) { - // from: 20120901T130000 - // to: 2012-09-01T13:00:00 - var result = aValue.substr(0, 4) + '-' + - aValue.substr(4, 2) + '-' + - aValue.substr(6, 2) + 'T' + - aValue.substr(9, 2) + ':' + - aValue.substr(11, 2) + ':' + - aValue.substr(13, 2); - - if (aValue[15] === 'Z') { - result += 'Z' - } - - return result; - }, - - toICAL: function(aValue) { - // from: 2012-09-01T13:00:00 - // to: 20120901T130000 - - if (aValue.length < 19) { - // TODO: error - return aValue; - } - - var result = aValue.substr(0, 4) + - aValue.substr(5, 2) + - // grab the (DDTHH) segment - aValue.substr(8, 5) + - // MM - aValue.substr(14, 2) + - // SS - aValue.substr(17, 2); - - if (aValue[19] === 'Z') { - result += 'Z'; - } - - return result; - }, - - decorate: function(aValue, aProp) { - return ICAL.Time.fromDateTimeString(aValue, aProp); - }, - - undecorate: function(aValue) { - return aValue.toString(); - } - }, - duration: { - decorate: function(aValue) { - return ICAL.Duration.fromString(aValue); - }, - undecorate: function(aValue) { - return aValue.toString(); - } - }, - float: { - matches: /^[+-]?\d+\.\d+$/, - decorate: function(aValue) { - return ICAL.Value.fromString(aValue, "float"); - }, - - fromICAL: function(aValue) { - var parsed = parseFloat(aValue); - if (ICAL.helpers.isStrictlyNaN(parsed)) { - // TODO: parser warning - return 0.0; - } - return parsed; - }, - - toICAL: function(aValue) { - return String(aValue); - } - }, - integer: { - fromICAL: function(aValue) { - var parsed = parseInt(aValue); - if (ICAL.helpers.isStrictlyNaN(parsed)) { - return 0; - } - return parsed; - }, - - toICAL: function(aValue) { - return String(aValue); - } - }, - period: { - - fromICAL: function(string) { - var parts = string.split('/'); - var result = design.value['date-time'].fromICAL(parts[0]) + '/'; - - if (ICAL.Duration.isValueString(parts[1])) { - result += parts[1]; - } else { - result += design.value['date-time'].fromICAL(parts[1]); - } - - return result; - }, - - toICAL: function(string) { - var parts = string.split('/'); - var result = design.value['date-time'].toICAL(parts[0]) + '/'; - - if (ICAL.Duration.isValueString(parts[1])) { - result += parts[1]; - } else { - result += design.value['date-time'].toICAL(parts[1]); - } - - return result; - }, - - decorate: function(aValue, aProp) { - return ICAL.Period.fromString(aValue, aProp); - }, - - undecorate: function(aValue) { - return aValue.toString(); - } - }, - recur: { - fromICAL: function(string) { - return ICAL.Recur._stringToData(string, true); - }, - - toICAL: function(data) { - var str = ""; - for (var k in data) { - var val = data[k] - if (k == "until") { - if (val.length > 10) { - val = design.value['date-time'].toICAL(val); - } else { - val = design.value['date'].toICAL(val); - } - } else if (k == "wkst") { - val = ICAL.Recur.numericDayToIcalDay(val); - } else if (ICAL.helpers.isArray(val)) { - val = val.join(","); - } - str += k.toUpperCase() + "=" + val + ";"; - } - return str.substr(0, str.length - 1); - }, - - decorate: function decorate(aValue) { - return ICAL.Recur.fromData(aValue); - }, - - undecorate: function(aRecur) { - return aRecur.toJSON(); - } - }, - - text: { - matches: /.*/, - - fromICAL: function(aValue, aName) { - return replaceNewline(aValue); - }, - - toICAL: function escape(aValue, aName) { - return aValue.replace(/\\|;|,|\n/g, function(str) { - switch (str) { - case "\\": - return "\\\\"; - case ";": - return "\\;"; - case ",": - return "\\,"; - case "\n": - return "\\n"; - default: - return str; - } - }); - } - }, - - time: { - fromICAL: function(aValue) { - // from: MMHHSS(Z)? - // to: HH:MM:SS(Z)? - if (aValue.length < 6) { - // TODO: parser exception? - return aValue; - } - - // HH::MM::SSZ? - var result = aValue.substr(0, 2) + ':' + - aValue.substr(2, 2) + ':' + - aValue.substr(4, 2); - - if (aValue[6] === 'Z') { - result += 'Z'; - } - - return result; - }, - - toICAL: function(aValue) { - // from: HH:MM:SS(Z)? - // to: MMHHSS(Z)? - if (aValue.length < 8) { - //TODO: error - return aValue; - } - - var result = aValue.substr(0, 2) + - aValue.substr(3, 2) + - aValue.substr(6, 2); - - if (aValue[8] === 'Z') { - result += 'Z'; - } - - return result; - } - }, - - uri: { - // TODO - /* ... */ - }, - - "utc-offset": { - toICAL: function(aValue) { - if (aValue.length < 7) { - // no seconds - // -0500 - return aValue.substr(0, 3) + - aValue.substr(4, 2); - } else { - // seconds - // -050000 - return aValue.substr(0, 3) + - aValue.substr(4, 2) + - aValue.substr(7, 2); - } - }, - - fromICAL: function(aValue) { - if (aValue.length < 6) { - // no seconds - // -05:00 - return aValue.substr(0, 3) + ':' + - aValue.substr(3, 2); - } else { - // seconds - // -05:00:00 - return aValue.substr(0, 3) + ':' + - aValue.substr(3, 2) + ':' + - aValue.substr(5, 2); - } - }, - - decorate: function(aValue) { - return ICAL.UtcOffset.fromString(aValue); - }, - - undecorate: function(aValue) { - return aValue.toString(); - } - } - }, - - property: { - decorate: function decorate(aData, aParent) { - return new ICAL.Property(aData, aParent); - }, - "attach": { - defaultType: "uri" - }, - "attendee": { - defaultType: "cal-address" - }, - "categories": { - defaultType: "text", - multiValue: "," - }, - "completed": { - defaultType: "date-time" - }, - "created": { - defaultType: "date-time" - }, - "dtend": { - defaultType: "date-time", - allowedTypes: ["date-time", "date"] - }, - "dtstamp": { - defaultType: "date-time" - }, - "dtstart": { - defaultType: "date-time", - allowedTypes: ["date-time", "date"] - }, - "due": { - defaultType: "date-time", - allowedTypes: ["date-time", "date"] - }, - "duration": { - defaultType: "duration" - }, - "exdate": { - defaultType: "date-time", - allowedTypes: ["date-time", "date"], - multiValue: ',' - }, - "exrule": { - defaultType: "recur" - }, - "freebusy": { - defaultType: "period", - multiValue: "," - }, - "geo": { - defaultType: "float", - multiValue: ";" - }, - /* TODO exactly 2 values */"last-modified": { - defaultType: "date-time" - }, - "organizer": { - defaultType: "cal-address" - }, - "percent-complete": { - defaultType: "integer" - }, - "repeat": { - defaultType: "integer" - }, - "rdate": { - defaultType: "date-time", - allowedTypes: ["date-time", "date", "period"], - multiValue: ',', - detectType: function(string) { - if (string.indexOf('/') !== -1) { - return 'period'; - } - return (string.indexOf('T') === -1) ? 'date' : 'date-time'; - } - }, - "recurrence-id": { - defaultType: "date-time", - allowedTypes: ["date-time", "date"] - }, - "resources": { - defaultType: "text", - multiValue: "," - }, - "request-status": { - defaultType: "text", - multiValue: ";" - }, - "priority": { - defaultType: "integer" - }, - "rrule": { - defaultType: "recur" - }, - "sequence": { - defaultType: "integer" - }, - "trigger": { - defaultType: "duration", - allowedTypes: ["duration", "date-time"] - }, - "tzoffsetfrom": { - defaultType: "utc-offset" - }, - "tzoffsetto": { - defaultType: "utc-offset" - }, - "tzurl": { - defaultType: "uri" - }, - "url": { - defaultType: "uri" - } - }, - - component: { - decorate: function decorate(aData, aParent) { - return new ICAL.Component(aData, aParent); - }, - "vevent": {} - } - - }; - - return design; -}()); -ICAL.stringify = (function() { - 'use strict'; - - var LINE_ENDING = '\r\n'; - var DEFAULT_TYPE = 'text'; - - var design = ICAL.design; - var helpers = ICAL.helpers; - - /** - * Convert a full jCal Array into a ical document. - * - * @param {Array} jCal document. - * @return {String} ical document. - */ - function stringify(jCal) { - if (typeof jCal[0] == "string") { - // This is a single component - jCal = [jCal]; - } - - var i = 0; - var len = jCal.length; - var result = ''; - - for (; i < len; i++) { - result += stringify.component(jCal[i]) + LINE_ENDING; - } - - return result; - } - - /** - * Converts an jCal component array into a ICAL string. - * Recursive will resolve sub-components. - * - * Exact component/property order is not saved all - * properties will come before subcomponents. - * - * @param {Array} component jCal fragment of a component. - */ - stringify.component = function(component) { - var name = component[0].toUpperCase(); - var result = 'BEGIN:' + name + LINE_ENDING; - - var props = component[1]; - var propIdx = 0; - var propLen = props.length; - - for (; propIdx < propLen; propIdx++) { - result += stringify.property(props[propIdx]) + LINE_ENDING; - } - - var comps = component[2]; - var compIdx = 0; - var compLen = comps.length; - - for (; compIdx < compLen; compIdx++) { - result += stringify.component(comps[compIdx]) + LINE_ENDING; - } - - result += 'END:' + name; - return result; - } - - /** - * Converts a single property to a ICAL string. - * - * @param {Array} property jCal property. - */ - stringify.property = function(property) { - var name = property[0].toUpperCase(); - var jsName = property[0]; - var params = property[1]; - - var line = name; - - var paramName; - for (paramName in params) { - if (params.hasOwnProperty(paramName)) { - line += ';' + paramName.toUpperCase(); - line += '=' + stringify.propertyValue(params[paramName]); - } - } - - // there is no value so return. - if (property.length === 3) { - // if no params where inserted and no value - // we given we must add a blank value. - if (!paramName) { - line += ':'; - } - return line; - } - - var valueType = property[2]; - - var propDetails; - var multiValue = false; - var isDefault = false; - - if (jsName in design.property) { - propDetails = design.property[jsName]; - - if ('multiValue' in propDetails) { - multiValue = propDetails.multiValue; - } - - if ('defaultType' in propDetails) { - if (valueType === propDetails.defaultType) { - isDefault = true; - } - } else { - if (valueType === DEFAULT_TYPE) { - isDefault = true; - } - } - } else { - if (valueType === DEFAULT_TYPE) { - isDefault = true; - } - } - - // push the VALUE property if type is not the default - // for the current property. - if (!isDefault) { - // value will never contain ;/:/, so we don't escape it here. - line += ';VALUE=' + valueType.toUpperCase(); - } - - line += ':'; - - if (multiValue) { - line += stringify.multiValue( - property.slice(3), multiValue, valueType - ); - } else { - line += stringify.value(property[3], valueType); - } - - return ICAL.helpers.foldline(line); - } - - /** - * Handles escaping of property values that may contain: - * - * COLON (:), SEMICOLON (;), or COMMA (,) - * - * If any of the above are present the result is wrapped - * in double quotes. - * - * @param {String} value raw value. - * @return {String} given or escaped value when needed. - */ - stringify.propertyValue = function(value) { - - if ((helpers.unescapedIndexOf(value, ',') === -1) && - (helpers.unescapedIndexOf(value, ':') === -1) && - (helpers.unescapedIndexOf(value, ';') === -1)) { - - return value; - } - - return '"' + value + '"'; - } - - /** - * Converts an array of ical values into a single - * string based on a type and a delimiter value (like ","). - * - * @param {Array} values list of values to convert. - * @param {String} delim used to join the values usually (",", ";", ":"). - * @param {String} type lowecase ical value type - * (like boolean, date-time, etc..). - * - * @return {String} ical string for value. - */ - stringify.multiValue = function(values, delim, type) { - var result = ''; - var len = values.length; - var i = 0; - - for (; i < len; i++) { - result += stringify.value(values[i], type); - if (i !== (len - 1)) { - result += delim; - } - } - - return result; - } - - /** - * Processes a single ical value runs the associated "toICAL" - * method from the design value type if available to convert - * the value. - * - * @param {String|Numeric} value some formatted value. - * @param {String} type lowecase ical value type - * (like boolean, date-time, etc..). - * @return {String} ical value for single value. - */ - stringify.value = function(value, type) { - if (type in design.value && 'toICAL' in design.value[type]) { - return design.value[type].toICAL(value); - } - return value; - } - - return stringify; - -}()); - -ICAL.parse = (function() { - 'use strict'; - - var CHAR = /[^ \t]/; - var MULTIVALUE_DELIMITER = ','; - var VALUE_DELIMITER = ':'; - var PARAM_DELIMITER = ';'; - var PARAM_NAME_DELIMITER = '='; - var DEFAULT_TYPE = 'text'; - - var design = ICAL.design; - var helpers = ICAL.helpers; - - function ParserError(message) { - this.message = message; - - try { - throw new Error(); - } catch (e) { - var split = e.stack.split('\n'); - split.shift(); - this.stack = split.join('\n'); - } - } - - ParserError.prototype = { - __proto__: Error.prototype - }; - - function parser(input) { - var state = {}; - var root = state.component = []; - - state.stack = [root]; - - parser._eachLine(input, function(err, line) { - parser._handleContentLine(line, state); - }); - - - // when there are still items on the stack - // throw a fatal error, a component was not closed - // correctly in that case. - if (state.stack.length > 1) { - throw new ParserError( - 'invalid ical body. component began but did not end' - ); - } - - state = null; - - return (root.length == 1 ? root[0] : root); - } - - // classes & constants - parser.ParserError = ParserError; - - parser._formatName = function(name) { - return name.toLowerCase(); - } - - parser._handleContentLine = function(line, state) { - // break up the parts of the line - var valuePos = line.indexOf(VALUE_DELIMITER); - var paramPos = line.indexOf(PARAM_DELIMITER); - - var lastParamIndex; - var lastValuePos; - - // name of property or begin/end - var name; - var value; - // params is only overridden if paramPos !== -1. - // we can't do params = params || {} later on - // because it sacrifices ops. - var params = {}; - - /** - * Different property cases - * - * - * 1. RRULE:FREQ=foo - * // FREQ= is not a param but the value - * - * 2. ATTENDEE;ROLE=REQ-PARTICIPANT; - * // ROLE= is a param because : has not happened yet - */ - // when the parameter delimiter is after the - // value delimiter then its not a parameter. - - if ((paramPos !== -1 && valuePos !== -1)) { - // when the parameter delimiter is after the - // value delimiter then its not a parameter. - if (paramPos > valuePos) { - paramPos = -1; - } - } - - var parsedParams; - if (paramPos !== -1) { - name = line.substring(0, paramPos).toLowerCase(); - parsedParams = parser._parseParameters(line.substring(paramPos), 0); - params = parsedParams[0]; - lastParamIndex = parsedParams[1].length + parsedParams[2] + paramPos; - if ((lastValuePos = - line.substring(lastParamIndex).indexOf(VALUE_DELIMITER)) !== -1) { - value = line.substring(lastParamIndex + lastValuePos + 1); - } - } else if (valuePos !== -1) { - // without parmeters (BEGIN:VCAENDAR, CLASS:PUBLIC) - name = line.substring(0, valuePos).toLowerCase(); - value = line.substring(valuePos + 1); - - if (name === 'begin') { - var newComponent = [value.toLowerCase(), [], []]; - if (state.stack.length === 1) { - state.component.push(newComponent); - } else { - state.component[2].push(newComponent); - } - state.stack.push(state.component); - state.component = newComponent; - return; - } else if (name === 'end') { - state.component = state.stack.pop(); - return; - } - } else { - /** - * Invalid line. - * The rational to throw an error is we will - * never be certain that the rest of the file - * is sane and its unlikely that we can serialize - * the result correctly either. - */ - throw new ParserError( - 'invalid line (no token ";" or ":") "' + line + '"' - ); - } - - var valueType; - var multiValue = false; - var propertyDetails; - - if (name in design.property) { - propertyDetails = design.property[name]; - - if ('multiValue' in propertyDetails) { - multiValue = propertyDetails.multiValue; - } - - if (value && 'detectType' in propertyDetails) { - valueType = propertyDetails.detectType(value); - } - } - - // attempt to determine value - if (!valueType) { - if (!('value' in params)) { - if (propertyDetails) { - valueType = propertyDetails.defaultType; - } else { - valueType = DEFAULT_TYPE; - } - } else { - // possible to avoid this? - valueType = params.value.toLowerCase(); - } - } - - delete params.value; - - /** - * Note on `var result` juggling: - * - * I observed that building the array in pieces has adverse - * effects on performance, so where possible we inline the creation. - * Its a little ugly but resulted in ~2000 additional ops/sec. - */ - - if (value) { - if (multiValue) { - var result = [name, params, valueType]; - parser._parseMultiValue(value, multiValue, valueType, result); - } else { - value = parser._parseValue(value, valueType); - var result = [name, params, valueType, value]; - } - } else { - var result = [name, params, valueType]; - } - - state.component[1].push(result); - }; - - /** - * @param {String} value original value. - * @param {String} type type of value. - * @return {Object} varies on type. - */ - parser._parseValue = function(value, type) { - if (type in design.value && 'fromICAL' in design.value[type]) { - return design.value[type].fromICAL(value); - } - return value; - }; - - /** - * Parse parameters from a string to object. - * - * @param {String} line a single unfolded line. - * @param {Numeric} start position to start looking for properties. - * @param {Numeric} maxPos position at which values start. - * @return {Object} key/value pairs. - */ - parser._parseParameters = function(line, start) { - var lastParam = start; - var pos = 0; - var delim = PARAM_NAME_DELIMITER; - var result = {}; - var name; - var value; - var type; - - // find the next '=' sign - // use lastParam and pos to find name - // check if " is used if so get value from "->" - // then increment pos to find next ; - - while ((pos !== false) && - (pos = helpers.unescapedIndexOf(line, delim, pos + 1)) !== -1) { - - name = line.substr(lastParam + 1, pos - lastParam - 1); - - var nextChar = line[pos + 1]; - if (nextChar === '"') { - var valuePos = pos + 2; - pos = helpers.unescapedIndexOf(line, '"', valuePos); - value = line.substr(valuePos, pos - valuePos); - lastParam = helpers.unescapedIndexOf(line, PARAM_DELIMITER, pos); - } else { - var valuePos = pos + 1; - - // move to next ";" - var nextPos = helpers.unescapedIndexOf(line, PARAM_DELIMITER, valuePos); - if (nextPos === -1) { - // when there is no ";" attempt to locate ":" - nextPos = helpers.unescapedIndexOf(line, VALUE_DELIMITER, valuePos); - - if (nextPos === -1) { - nextPos = line.length; - } - pos = false; - } else { - lastParam = nextPos; - } - - value = line.substr(valuePos, nextPos - valuePos); - } - - if (name in design.param && design.param[name].valueType) { - type = design.param[name].valueType; - } else { - type = DEFAULT_TYPE; - } - - result[name.toLowerCase()] = parser._parseValue(value, type); - } - return [result, value, valuePos]; - } - - /** - * Parse a multi value string - */ - parser._parseMultiValue = function(buffer, delim, type, result) { - var pos = 0; - var lastPos = 0; - - // split each piece - while ((pos = helpers.unescapedIndexOf(buffer, delim, lastPos)) !== -1) { - var value = buffer.substr(lastPos, pos - lastPos); - result.push(parser._parseValue(value, type)); - lastPos = pos + 1; - } - - // on the last piece take the rest of string - result.push( - parser._parseValue(buffer.substr(lastPos), type) - ); - - return result; - } - - parser._eachLine = function(buffer, callback) { - var len = buffer.length; - var lastPos = buffer.search(CHAR); - var pos = lastPos; - var line; - var firstChar; - - var newlineOffset; - - do { - pos = buffer.indexOf('\n', lastPos) + 1; - - if (buffer[pos - 2] === '\r') { - newlineOffset = 2; - } else { - newlineOffset = 1; - } - - if (pos === 0) { - pos = len; - newlineOffset = 0; - } - - firstChar = buffer[lastPos]; - - if (firstChar === ' ' || firstChar === '\t') { - // add to line - line += buffer.substr( - lastPos + 1, - pos - lastPos - (newlineOffset + 1) - ); - } else { - if (line) - callback(null, line); - // push line - line = buffer.substr( - lastPos, - pos - lastPos - newlineOffset - ); - } - - lastPos = pos; - } while (pos !== len); - - // extra ending line - line = line.trim(); - - if (line.length) - callback(null, line); - } - - return parser; - -}()); -ICAL.Component = (function() { - 'use strict'; - - var PROPERTY_INDEX = 1; - var COMPONENT_INDEX = 2; - var NAME_INDEX = 0; - - /** - * Create a wrapper for a jCal component. - * - * @param {Array|String} jCal - * raw jCal component data OR name of new component. - * @param {ICAL.Component} parent parent component to associate. - */ - function Component(jCal, parent) { - if (typeof(jCal) === 'string') { - // jCal spec (name, properties, components) - jCal = [jCal, [], []]; - } - - // mostly for legacy reasons. - this.jCal = jCal; - - this.parent = parent || null; - } - - Component.prototype = { - /** - * Hydrated properties are inserted into the _properties array at the same - * position as in the jCal array, so its possible the array contains - * undefined values for unhydrdated properties. To avoid iterating the - * array when checking if all properties have been hydrated, we save the - * count here. - */ - _hydratedPropertyCount: 0, - - /** - * The same count as for _hydratedPropertyCount, but for subcomponents - */ - _hydratedComponentCount: 0, - - get name() { - return this.jCal[NAME_INDEX]; - }, - - _hydrateComponent: function(index) { - if (!this._components) { - this._components = []; - this._hydratedComponentCount = 0; - } - - if (this._components[index]) { - return this._components[index]; - } - - var comp = new Component( - this.jCal[COMPONENT_INDEX][index], - this - ); - - this._hydratedComponentCount++; - return this._components[index] = comp; - }, - - _hydrateProperty: function(index) { - if (!this._properties) { - this._properties = []; - this._hydratedPropertyCount = 0; - } - - if (this._properties[index]) { - return this._properties[index]; - } - - var prop = new ICAL.Property( - this.jCal[PROPERTY_INDEX][index], - this - ); - - this._hydratedPropertyCount++; - return this._properties[index] = prop; - }, - - /** - * Finds first sub component, optionally filtered by name. - * - * @method getFirstSubcomponent - * @param {String} [name] optional name to filter by. - */ - getFirstSubcomponent: function(name) { - if (name) { - var i = 0; - var comps = this.jCal[COMPONENT_INDEX]; - var len = comps.length; - - for (; i < len; i++) { - if (comps[i][NAME_INDEX] === name) { - var result = this._hydrateComponent(i); - return result; - } - } - } else { - if (this.jCal[COMPONENT_INDEX].length) { - return this._hydrateComponent(0); - } - } - - // ensure we return a value (strict mode) - return null; - }, - - /** - * Finds all sub components, optionally filtering by name. - * - * @method getAllSubcomponents - * @param {String} [name] optional name to filter by. - */ - getAllSubcomponents: function(name) { - var jCalLen = this.jCal[COMPONENT_INDEX].length; - - if (name) { - var comps = this.jCal[COMPONENT_INDEX]; - var result = []; - var i = 0; - - for (; i < jCalLen; i++) { - if (name === comps[i][NAME_INDEX]) { - result.push( - this._hydrateComponent(i) - ); - } - } - return result; - } else { - if (!this._components || - (this._hydratedComponentCount !== jCalLen)) { - var i = 0; - for (; i < jCalLen; i++) { - this._hydrateComponent(i); - } - } - - return this._components; - } - }, - - /** - * Returns true when a named property exists. - * - * @param {String} name property name. - * @return {Boolean} true when property is found. - */ - hasProperty: function(name) { - var props = this.jCal[PROPERTY_INDEX]; - var len = props.length; - - var i = 0; - for (; i < len; i++) { - // 0 is property name - if (props[i][NAME_INDEX] === name) { - return true; - } - } - - return false; - }, - - /** - * Finds first property. - * - * @param {String} [name] lowercase name of property. - * @return {ICAL.Property} found property. - */ - getFirstProperty: function(name) { - if (name) { - var i = 0; - var props = this.jCal[PROPERTY_INDEX]; - var len = props.length; - - for (; i < len; i++) { - if (props[i][NAME_INDEX] === name) { - var result = this._hydrateProperty(i); - return result; - } - } - } else { - if (this.jCal[PROPERTY_INDEX].length) { - return this._hydrateProperty(0); - } - } - - return null; - }, - - /** - * Returns first properties value if available. - * - * @param {String} [name] (lowecase) property name. - * @return {String} property value. - */ - getFirstPropertyValue: function(name) { - var prop = this.getFirstProperty(name); - if (prop) { - return prop.getFirstValue(); - } - - return null; - }, - - /** - * get all properties in the component. - * - * @param {String} [name] (lowercase) property name. - * @return {Array[ICAL.Property]} list of properties. - */ - getAllProperties: function(name) { - var jCalLen = this.jCal[PROPERTY_INDEX].length; - - if (name) { - var props = this.jCal[PROPERTY_INDEX]; - var result = []; - var i = 0; - - for (; i < jCalLen; i++) { - if (name === props[i][NAME_INDEX]) { - result.push( - this._hydrateProperty(i) - ); - } - } - return result; - } else { - if (!this._properties || - (this._hydratedPropertyCount !== jCalLen)) { - var i = 0; - for (; i < jCalLen; i++) { - this._hydrateProperty(i); - } - } - - return this._properties; - } - - return null; - }, - - _removeObjectByIndex: function(jCalIndex, cache, index) { - // remove cached version - if (cache && cache[index]) { - var obj = cache[index]; - if ("parent" in obj) { - obj.parent = null; - } - cache.splice(index, 1); - } - - // remove it from the jCal - this.jCal[jCalIndex].splice(index, 1); - }, - - _removeObject: function(jCalIndex, cache, nameOrObject) { - var i = 0; - var objects = this.jCal[jCalIndex]; - var len = objects.length; - var cached = this[cache]; - - if (typeof(nameOrObject) === 'string') { - for (; i < len; i++) { - if (objects[i][NAME_INDEX] === nameOrObject) { - this._removeObjectByIndex(jCalIndex, cached, i); - return true; - } - } - } else if (cached) { - for (; i < len; i++) { - if (cached[i] && cached[i] === nameOrObject) { - this._removeObjectByIndex(jCalIndex, cached, i); - return true; - } - } - } - - return false; - }, - - _removeAllObjects: function(jCalIndex, cache, name) { - var cached = this[cache]; - - // Unfortunately we have to run through all children to reset their - // parent property. - var objects = this.jCal[jCalIndex]; - var i = objects.length - 1; - - // descending search required because splice - // is used and will effect the indices. - for (; i >= 0; i--) { - if (!name || objects[i][NAME_INDEX] === name) { - this._removeObjectByIndex(jCalIndex, cached, i); - } - } - }, - - /** - * Adds a single sub component. - * - * @param {ICAL.Component} component to add. - */ - addSubcomponent: function(component) { - if (!this._components) { - this._components = []; - this._hydratedComponentCount = 0; - } - - if (component.parent) { - component.parent.removeSubcomponent(component); - } - - var idx = this.jCal[COMPONENT_INDEX].push(component.jCal); - this._components[idx - 1] = component; - this._hydratedComponentCount++; - component.parent = this; - }, - - /** - * Removes a single component by name or - * the instance of a specific component. - * - * @param {ICAL.Component|String} nameOrComp comp type. - * @return {Boolean} true when comp is removed. - */ - removeSubcomponent: function(nameOrComp) { - var removed = this._removeObject(COMPONENT_INDEX, '_components', nameOrComp); - if (removed) { - this._hydratedComponentCount--; - } - return removed; - }, - - /** - * Removes all components or (if given) all - * components by a particular name. - * - * @param {String} [name] (lowercase) component name. - */ - removeAllSubcomponents: function(name) { - var removed = this._removeAllObjects(COMPONENT_INDEX, '_components', name); - this._hydratedComponentCount = 0; - return removed; - }, - - /** - * Adds a property to the component. - * - * @param {ICAL.Property} property object. - */ - addProperty: function(property) { - if (!(property instanceof ICAL.Property)) { - throw new TypeError('must instance of ICAL.Property'); - } - - if (!this._properties) { - this._properties = []; - this._hydratedPropertyCount = 0; - } - - - if (property.parent) { - property.parent.removeProperty(property); - } - - var idx = this.jCal[PROPERTY_INDEX].push(property.jCal); - this._properties[idx - 1] = property; - this._hydratedPropertyCount++; - property.parent = this; - }, - - /** - * Helper method to add a property with a value to the component. - * - * @param {String} name property name to add. - * @param {Object} value property value. - */ - addPropertyWithValue: function(name, value) { - var prop = new ICAL.Property(name); - prop.setValue(value); - - this.addProperty(prop); - - return prop; - }, - - /** - * Helper method that will update or create a property - * of the given name and sets its value. - * - * @param {String} name property name. - * @param {Object} value property value. - * @return {ICAL.Property} property. - */ - updatePropertyWithValue: function(name, value) { - var prop = this.getFirstProperty(name); - - if (prop) { - prop.setValue(value); - } else { - prop = this.addPropertyWithValue(name, value); - } - - return prop; - }, - - /** - * Removes a single property by name or - * the instance of the specific property. - * - * @param {String|ICAL.Property} nameOrProp to remove. - * @return {Boolean} true when deleted. - */ - removeProperty: function(nameOrProp) { - var removed = this._removeObject(PROPERTY_INDEX, '_properties', nameOrProp); - if (removed) { - this._hydratedPropertyCount--; - } - return removed; - }, - - /** - * Removes all properties associated with this component. - * - * @param {String} [name] (lowecase) optional property name. - */ - removeAllProperties: function(name) { - var removed = this._removeAllObjects(PROPERTY_INDEX, '_properties', name); - this._hydratedPropertyCount = 0; - return removed; - }, - - toJSON: function() { - return this.jCal; - }, - - toString: function() { - return ICAL.stringify.component( - this.jCal - ); - } - - }; - - return Component; - -}()); -ICAL.Property = (function() { - 'use strict'; - - var NAME_INDEX = 0; - var PROP_INDEX = 1; - var TYPE_INDEX = 2; - var VALUE_INDEX = 3; - - var design = ICAL.design; - - /** - * Provides a nicer interface to any kind of property. - * Its important to note that mutations done in the wrapper - * directly effect (mutate) the jCal object used to initialize. - * - * Can also be used to create new properties by passing - * the name of the property (as a String). - * - * - * @param {Array|String} jCal raw jCal representation OR - * the new name of the property (when creating). - * - * @param {ICAL.Component} [parent] parent component. - */ - function Property(jCal, parent) { - if (typeof(jCal) === 'string') { - // because we a creating by name we need - // to find the type when creating the property. - var name = jCal; - - if (name in design.property) { - var prop = design.property[name]; - if ('defaultType' in prop) { - var type = prop.defaultType; - } else { - var type = design.defaultType; - } - } else { - var type = design.defaultType; - } - - jCal = [name, {}, type]; - } - - this.jCal = jCal; - this.parent = parent || null; - this._updateType(); - } - - Property.prototype = { - get type() { - return this.jCal[TYPE_INDEX]; - }, - - get name() { - return this.jCal[NAME_INDEX]; - }, - - _updateType: function() { - if (this.type in design.value) { - var designType = design.value[this.type]; - - if ('decorate' in design.value[this.type]) { - this.isDecorated = true; - } else { - this.isDecorated = false; - } - - if (this.name in design.property) { - if ('multiValue' in design.property[this.name]) { - this.isMultiValue = true; - } else { - this.isMultiValue = false; - } - } - } - }, - - /** - * Hydrate a single value. - */ - _hydrateValue: function(index) { - if (this._values && this._values[index]) { - return this._values[index]; - } - - // for the case where there is no value. - if (this.jCal.length <= (VALUE_INDEX + index)) { - return null; - } - - if (this.isDecorated) { - if (!this._values) { - this._values = []; - } - return this._values[index] = this._decorate( - this.jCal[VALUE_INDEX + index] - ); - } else { - return this.jCal[VALUE_INDEX + index]; - } - }, - - _decorate: function(value) { - return design.value[this.type].decorate(value, this); - }, - - _undecorate: function(value) { - return design.value[this.type].undecorate(value, this); - }, - - _setDecoratedValue: function(value, index) { - if (!this._values) { - this._values = []; - } - - if (typeof(value) === 'object' && 'icaltype' in value) { - // decorated value - this.jCal[VALUE_INDEX + index] = this._undecorate(value); - this._values[index] = value; - } else { - // undecorated value - this.jCal[VALUE_INDEX + index] = value; - this._values[index] = this._decorate(value); - } - }, - - /** - * Gets a param on the property. - * - * @param {String} name prop name (lowercase). - * @return {String} prop value. - */ - getParameter: function(name) { - return this.jCal[PROP_INDEX][name]; - }, - - /** - * Sets a param on the property. - * - * @param {String} value property value. - */ - setParameter: function(name, value) { - this.jCal[PROP_INDEX][name] = value; - }, - - /** - * Removes a parameter - * - * @param {String} name prop name (lowercase). - */ - removeParameter: function(name) { - return delete this.jCal[PROP_INDEX][name]; - }, - - /** - * Get the default type based on this property's name. - * - * @return {String} the default type for this property. - */ - getDefaultType: function() { - var name = this.name - if (name in design.property) { - var details = design.property[name]; - if ('defaultType' in details) { - return details.defaultType; - } - } - return null; - }, - - /** - * Sets type of property and clears out any - * existing values of the current type. - * - * @param {String} type new iCAL type (see design.values). - */ - resetType: function(type) { - this.removeAllValues(); - this.jCal[TYPE_INDEX] = type; - this._updateType(); - }, - - /** - * Finds first property value. - * - * @return {String} first property value. - */ - getFirstValue: function() { - return this._hydrateValue(0); - }, - - /** - * Gets all values on the property. - * - * NOTE: this creates an array during each call. - * - * @return {Array} list of values. - */ - getValues: function() { - var len = this.jCal.length - VALUE_INDEX; - - if (len < 1) { - // its possible for a property to have no value. - return []; - } - - var i = 0; - var result = []; - - for (; i < len; i++) { - result[i] = this._hydrateValue(i); - } - - return result; - }, - - removeAllValues: function() { - if (this._values) { - this._values.length = 0; - } - this.jCal.length = 3; - }, - - /** - * Sets the values of the property. - * Will overwrite the existing values. - * - * @param {Array} values an array of values. - */ - setValues: function(values) { - if (!this.isMultiValue) { - throw new Error( - this.name + ': does not not support mulitValue.\n' + - 'override isMultiValue' - ); - } - - var len = values.length; - var i = 0; - this.removeAllValues(); - - if (len > 0 && - typeof(values[0]) === 'object' && - 'icaltype' in values[0]) { - this.resetType(values[0].icaltype); - } - - if (this.isDecorated) { - for (; i < len; i++) { - this._setDecoratedValue(values[i], i); - } - } else { - for (; i < len; i++) { - this.jCal[VALUE_INDEX + i] = values[i]; - } - } - }, - - /** - * Sets the current value of the property. If this is a multi-value - * property, all other values will be removed. - * - * @param {String|Object} value new prop value. - */ - setValue: function(value) { - this.removeAllValues(); - if (typeof(value) === 'object' && 'icaltype' in value) { - this.resetType(value.icaltype); - } - - if (this.isDecorated) { - this._setDecoratedValue(value, 0); - } else { - this.jCal[VALUE_INDEX] = value; - } - }, - - /** - * Returns the jCal representation of this property. - * - * @return {Object} jCal. - */ - toJSON: function() { - return this.jCal; - }, - - toICAL: function() { - return ICAL.stringify.property( - this.jCal - ); - } - - }; - - return Property; - -}()); -ICAL.UtcOffset = (function() { - - function UtcOffset(aData) { - this.hours = aData.hours; - this.minutes = aData.minutes; - this.factor = aData.factor; - }; - - UtcOffset.prototype = { - - hours: null, - minutes: null, - factor: null, - - icaltype: "utc-offset", - - toString: function toString() { - return (this.factor == 1 ? "+" : "-") + - ICAL.helpers.pad2(this.hours) + ':' + - ICAL.helpers.pad2(this.minutes); - } - }; - - UtcOffset.fromString = function(aString) { - // -05:00 - var options = {}; - //TODO: support seconds per rfc5545 ? - options.factor = (aString[0] === '+') ? 1 : -1; - options.hours = ICAL.helpers.strictParseInt(aString.substr(1, 2)); - options.minutes = ICAL.helpers.strictParseInt(aString.substr(4, 2)); - - return new ICAL.UtcOffset(options); - }; - - - return UtcOffset; - -}()); -ICAL.Binary = (function() { - - function Binary(aValue) { - this.value = aValue; - }; - - Binary.prototype = { - icaltype: "binary", - - decodeValue: function decodeValue() { - return this._b64_decode(this.value); - }, - - setEncodedValue: function setEncodedValue(val) { - this.value = this._b64_encode(val); - }, - - _b64_encode: function base64_encode(data) { - // http://kevin.vanzonneveld.net - // + original by: Tyler Akins (http://rumkin.com) - // + improved by: Bayron Guevara - // + improved by: Thunder.m - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + bugfixed by: Pellentesque Malesuada - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + improved by: Rafał Kukawski (http://kukawski.pl) - // * example 1: base64_encode('Kevin van Zonneveld'); - // * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA==' - // mozilla has this native - // - but breaks in 2.0.0.12! - //if (typeof this.window['atob'] == 'function') { - // return atob(data); - //} - var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + - "abcdefghijklmnopqrstuvwxyz0123456789+/="; - var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, - ac = 0, - enc = "", - tmp_arr = []; - - if (!data) { - return data; - } - - do { // pack three octets into four hexets - o1 = data.charCodeAt(i++); - o2 = data.charCodeAt(i++); - o3 = data.charCodeAt(i++); - - bits = o1 << 16 | o2 << 8 | o3; - - h1 = bits >> 18 & 0x3f; - h2 = bits >> 12 & 0x3f; - h3 = bits >> 6 & 0x3f; - h4 = bits & 0x3f; - - // use hexets to index into b64, and append result to encoded string - tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); - } while (i < data.length); - - enc = tmp_arr.join(''); - - var r = data.length % 3; - - return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3); - - }, - - _b64_decode: function base64_decode(data) { - // http://kevin.vanzonneveld.net - // + original by: Tyler Akins (http://rumkin.com) - // + improved by: Thunder.m - // + input by: Aman Gupta - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + bugfixed by: Onno Marsman - // + bugfixed by: Pellentesque Malesuada - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + input by: Brett Zamir (http://brett-zamir.me) - // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA=='); - // * returns 1: 'Kevin van Zonneveld' - // mozilla has this native - // - but breaks in 2.0.0.12! - //if (typeof this.window['btoa'] == 'function') { - // return btoa(data); - //} - var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + - "abcdefghijklmnopqrstuvwxyz0123456789+/="; - var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, - ac = 0, - dec = "", - tmp_arr = []; - - if (!data) { - return data; - } - - data += ''; - - do { // unpack four hexets into three octets using index points in b64 - h1 = b64.indexOf(data.charAt(i++)); - h2 = b64.indexOf(data.charAt(i++)); - h3 = b64.indexOf(data.charAt(i++)); - h4 = b64.indexOf(data.charAt(i++)); - - bits = h1 << 18 | h2 << 12 | h3 << 6 | h4; - - o1 = bits >> 16 & 0xff; - o2 = bits >> 8 & 0xff; - o3 = bits & 0xff; - - if (h3 == 64) { - tmp_arr[ac++] = String.fromCharCode(o1); - } else if (h4 == 64) { - tmp_arr[ac++] = String.fromCharCode(o1, o2); - } else { - tmp_arr[ac++] = String.fromCharCode(o1, o2, o3); - } - } while (i < data.length); - - dec = tmp_arr.join(''); - - return dec; - }, - - toString: function() { - return this.value; - } - }; - - Binary.fromString = function(aString) { - return new Binary(aString); - } - - return Binary; - -}()); -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * Portions Copyright (C) Philipp Kewisch, 2011-2012 */ - - - -(typeof(ICAL) === 'undefined')? ICAL = {} : ''; -(function() { - ICAL.Period = function icalperiod(aData) { - this.wrappedJSObject = this; - - if (aData && 'start' in aData) { - if (aData.start && !(aData.start instanceof ICAL.Time)) { - throw new TypeError('.start must be an instance of ICAL.Time'); - } - this.start = aData.start; - } - - if (aData && aData.end && aData.duration) { - throw new Error('cannot accept both end and duration'); - } - - if (aData && 'end' in aData) { - if (aData.end && !(aData.end instanceof ICAL.Time)) { - throw new TypeError('.end must be an instance of ICAL.Time'); - } - this.end = aData.end; - } - - if (aData && 'duration' in aData) { - if (aData.duration && !(aData.duration instanceof ICAL.Duration)) { - throw new TypeError('.duration must be an instance of ICAL.Duration'); - } - this.duration = aData.duration; - } - }; - - ICAL.Period.prototype = { - - start: null, - end: null, - duration: null, - icalclass: "icalperiod", - icaltype: "period", - - clone: function() { - return ICAL.Period.fromData({ - start: this.start ? this.start.clone() : null, - end: this.end ? this.end.clone() : null, - duration: this.duration ? this.duration.clone() : null - }); - }, - - getDuration: function duration() { - if (this.duration) { - return this.duration; - } else { - return this.end.subtractDate(this.start); - } - }, - - getEnd: function() { - if (this.end) { - return this.end; - } else { - var end = this.start.clone(); - end.addDuration(this.duration); - return end; - } - }, - - toString: function toString() { - return this.start + "/" + (this.end || this.duration); - }, - - toICALString: function() { - return this.start.toICALString() + "/" + - (this.end || this.duration).toICALString(); - } - }; - - ICAL.Period.fromString = function fromString(str, prop) { - var parts = str.split('/'); - - if (parts.length !== 2) { - throw new Error( - 'Invalid string value: "' + str + '" must contain a "/" char.' - ); - } - - var options = { - start: ICAL.Time.fromDateTimeString(parts[0], prop) - }; - - var end = parts[1]; - - if (ICAL.Duration.isValueString(end)) { - options.duration = ICAL.Duration.fromString(end); - } else { - options.end = ICAL.Time.fromDateTimeString(end, prop); - } - - return new ICAL.Period(options); - }; - - ICAL.Period.fromData = function fromData(aData) { - return new ICAL.Period(aData); - }; - -})(); -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * Portions Copyright (C) Philipp Kewisch, 2011-2012 */ - - - -(typeof(ICAL) === 'undefined')? ICAL = {} : ''; -(function() { - var DURATION_LETTERS = /([PDWHMTS]{1,1})/; - - ICAL.Duration = function icalduration(data) { - this.wrappedJSObject = this; - this.fromData(data); - }; - - ICAL.Duration.prototype = { - - weeks: 0, - days: 0, - hours: 0, - minutes: 0, - seconds: 0, - isNegative: false, - icalclass: "icalduration", - icaltype: "duration", - - clone: function clone() { - return ICAL.Duration.fromData(this); - }, - - toSeconds: function toSeconds() { - var seconds = this.seconds + 60 * this.minutes + 3600 * this.hours + - 86400 * this.days + 7 * 86400 * this.weeks; - return (this.isNegative ? -seconds : seconds); - }, - - fromSeconds: function fromSeconds(aSeconds) { - var secs = Math.abs(aSeconds); - - this.isNegative = (aSeconds < 0); - this.days = ICAL.helpers.trunc(secs / 86400); - - // If we have a flat number of weeks, use them. - if (this.days % 7 == 0) { - this.weeks = this.days / 7; - this.days = 0; - } else { - this.weeks = 0; - } - - secs -= (this.days + 7 * this.weeks) * 86400; - - this.hours = ICAL.helpers.trunc(secs / 3600); - secs -= this.hours * 3600; - - this.minutes = ICAL.helpers.trunc(secs / 60); - secs -= this.minutes * 60; - - this.seconds = secs; - return this; - }, - - fromData: function fromData(aData) { - var propsToCopy = ["weeks", "days", "hours", - "minutes", "seconds", "isNegative"]; - for (var key in propsToCopy) { - var prop = propsToCopy[key]; - if (aData && prop in aData) { - this[prop] = aData[prop]; - } else { - this[prop] = 0; - } - } - }, - - reset: function reset() { - this.isNegative = false; - this.weeks = 0; - this.days = 0; - this.hours = 0; - this.minutes = 0; - this.seconds = 0; - }, - - compare: function compare(aOther) { - var thisSeconds = this.toSeconds(); - var otherSeconds = aOther.toSeconds(); - return (thisSeconds > otherSeconds) - (thisSeconds < otherSeconds); - }, - - normalize: function normalize() { - this.fromSeconds(this.toSeconds()); - return this; - }, - - toString: function toString() { - if (this.toSeconds() == 0) { - return "PT0S"; - } else { - var str = ""; - if (this.isNegative) str += "-"; - str += "P"; - if (this.weeks) str += this.weeks + "W"; - if (this.days) str += this.days + "D"; - - if (this.hours || this.minutes || this.seconds) { - str += "T"; - if (this.hours) str += this.hours + "H"; - if (this.minutes) str += this.minutes + "M"; - if (this.seconds) str += this.seconds + "S"; - } - return str; - } - }, - - toICALString: function() { - return this.toString(); - } - }; - - ICAL.Duration.fromSeconds = function icalduration_from_seconds(aSeconds) { - return (new ICAL.Duration()).fromSeconds(aSeconds); - }; - - /** - * Internal helper function to handle a chunk of a duration. - * - * @param {String} letter type of duration chunk. - * @param {String} number numeric value or -/+. - * @param {Object} dict target to assign values to. - */ - function parseDurationChunk(letter, number, object) { - var type; - switch (letter) { - case 'P': - if (number && number === '-') { - object.isNegative = true; - } else { - object.isNegative = false; - } - // period - break; - case 'D': - type = 'days'; - break; - case 'W': - type = 'weeks'; - break; - case 'H': - type = 'hours'; - break; - case 'M': - type = 'minutes'; - break; - case 'S': - type = 'seconds'; - break; - default: - // Not a valid chunk - return 0; - } - - if (type) { - if (!number && number !== 0) { - throw new Error( - 'invalid duration value: Missing number before "' + letter + '"' - ); - } - var num = parseInt(number, 10); - if (ICAL.helpers.isStrictlyNaN(num)) { - throw new Error( - 'invalid duration value: Invalid number "' + number + '" before "' + letter + '"' - ); - } - object[type] = num; - } - - return 1; - } - - /** - * @param {String} value raw ical value. - * @return {Boolean} - * true when the given value is of the duration ical type. - */ - ICAL.Duration.isValueString = function(string) { - return (string[0] === 'P' || string[1] === 'P'); - }, - - ICAL.Duration.fromString = function icalduration_from_string(aStr) { - var pos = 0; - var dict = Object.create(null); - var chunks = 0; - - while ((pos = aStr.search(DURATION_LETTERS)) !== -1) { - var type = aStr[pos]; - var numeric = aStr.substr(0, pos); - aStr = aStr.substr(pos + 1); - - chunks += parseDurationChunk(type, numeric, dict); - } - - if (chunks < 2) { - // There must be at least a chunk with "P" and some unit chunk - throw new Error( - 'invalid duration value: Not enough duration components in "' + aStr + '"' - ); - } - - return new ICAL.Duration(dict); - }; - - ICAL.Duration.fromData = function icalduration_from_data(aData) { - return new ICAL.Duration(aData); - }; -})(); -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * Portions Copyright (C) Philipp Kewisch, 2011-2012 */ - - - -(typeof(ICAL) === 'undefined')? ICAL = {} : ''; -(function() { - var OPTIONS = ["tzid", "location", "tznames", - "latitude", "longitude"]; - - /** - * Timezone representation, created by passing in a tzid and component. - * - * var vcalendar; - * var timezoneComp = vcalendar.getFirstSubcomponent('vtimezone'); - * var tzid = timezoneComp.getFirstPropertyValue('tzid'); - * - * var timezone = new ICAL.Timezone({ - * component: timezoneComp, - * tzid - * }); - * - * - * @param {Object} data options for class (see above). - */ - ICAL.Timezone = function icaltimezone(data) { - this.wrappedJSObject = this; - this.fromData(data); - }; - - ICAL.Timezone.prototype = { - - tzid: "", - location: "", - tznames: "", - - latitude: 0.0, - longitude: 0.0, - - component: null, - - expandedUntilYear: 0, - - icalclass: "icaltimezone", - - fromData: function fromData(aData) { - this.expandedUntilYear = 0; - this.changes = []; - - if (aData instanceof ICAL.Component) { - // Either a component is passed directly - this.component = aData; - } else { - // Otherwise the component may be in the data object - if (aData && "component" in aData) { - if (typeof aData.component == "string") { - // If a string was passed, parse it as a component - var jCal = ICAL.parse(aData.component); - this.component = new ICAL.Component(jCal); - } else if (aData.component instanceof ICAL.Component) { - // If it was a component already, then just set it - this.component = aData.component; - } else { - // Otherwise just null out the component - this.component = null; - } - } - - // Copy remaining passed properties - for (var key in OPTIONS) { - var prop = OPTIONS[key]; - if (aData && prop in aData) { - this[prop] = aData[prop]; - } - } - } - - // If we have a component but no TZID, attempt to get it from the - // component's properties. - if (this.component instanceof ICAL.Component && !this.tzid) { - this.tzid = this.component.getFirstPropertyValue('tzid'); - } - - return this; - }, - - /** - * Finds the utcOffset the given time would occur in this timezone. - * - * @return {Number} utc offset in seconds. - */ - utcOffset: function utcOffset(tt) { - if (this == ICAL.Timezone.utcTimezone || this == ICAL.Timezone.localTimezone) { - return 0; - } - - this._ensureCoverage(tt.year); - - if (!this.changes.length) { - return 0; - } - - var tt_change = { - year: tt.year, - month: tt.month, - day: tt.day, - hour: tt.hour, - minute: tt.minute, - second: tt.second - }; - - var change_num = this._findNearbyChange(tt_change); - var change_num_to_use = -1; - var step = 1; - - // TODO: replace with bin search? - for (;;) { - var change = ICAL.helpers.clone(this.changes[change_num], true); - if (change.utcOffset < change.prevUtcOffset) { - ICAL.Timezone.adjust_change(change, 0, 0, 0, change.utcOffset); - } else { - ICAL.Timezone.adjust_change(change, 0, 0, 0, - change.prevUtcOffset); - } - - var cmp = ICAL.Timezone._compare_change_fn(tt_change, change); - - if (cmp >= 0) { - change_num_to_use = change_num; - } else { - step = -1; - } - - if (step == -1 && change_num_to_use != -1) { - break; - } - - change_num += step; - - if (change_num < 0) { - return 0; - } - - if (change_num >= this.changes.length) { - break; - } - } - - var zone_change = this.changes[change_num_to_use]; - var utcOffset_change = zone_change.utcOffset - zone_change.prevUtcOffset; - - if (utcOffset_change < 0 && change_num_to_use > 0) { - var tmp_change = ICAL.helpers.clone(zone_change, true); - ICAL.Timezone.adjust_change(tmp_change, 0, 0, 0, - tmp_change.prevUtcOffset); - - if (ICAL.Timezone._compare_change_fn(tt_change, tmp_change) < 0) { - var prev_zone_change = this.changes[change_num_to_use - 1]; - - var want_daylight = false; // TODO - - if (zone_change.is_daylight != want_daylight && - prev_zone_change.is_daylight == want_daylight) { - zone_change = prev_zone_change; - } - } - } - - // TODO return is_daylight? - return zone_change.utcOffset; - }, - - _findNearbyChange: function icaltimezone_find_nearby_change(change) { - // find the closest match - var idx = ICAL.helpers.binsearchInsert( - this.changes, - change, - ICAL.Timezone._compare_change_fn - ); - - if (idx >= this.changes.length) { - return this.changes.length - 1; - } - - return idx; - }, - - _ensureCoverage: function(aYear) { - if (ICAL.Timezone._minimumExpansionYear == -1) { - var today = ICAL.Time.now(); - ICAL.Timezone._minimumExpansionYear = today.year; - } - - var changesEndYear = aYear; - if (changesEndYear < ICAL.Timezone._minimumExpansionYear) { - changesEndYear = ICAL.Timezone._minimumExpansionYear; - } - - changesEndYear += ICAL.Timezone.EXTRA_COVERAGE; - - if (changesEndYear > ICAL.Timezone.MAX_YEAR) { - changesEndYear = ICAL.Timezone.MAX_YEAR; - } - - if (!this.changes.length || this.expandedUntilYear < aYear) { - var subcomps = this.component.getAllSubcomponents(); - var compLen = subcomps.length; - var compIdx = 0; - - for (; compIdx < compLen; compIdx++) { - this._expandComponent( - subcomps[compIdx], changesEndYear, this.changes - ); - } - - this.changes.sort(ICAL.Timezone._compare_change_fn); - this.expandedUntilYear = changesEndYear; - } - }, - - _expandComponent: function(aComponent, aYear, changes) { - if (!aComponent.hasProperty("dtstart") || - !aComponent.hasProperty("tzoffsetto") || - !aComponent.hasProperty("tzoffsetfrom")) { - return null; - } - - var dtstart = aComponent.getFirstProperty("dtstart").getFirstValue(); - - function convert_tzoffset(offset) { - return offset.factor * (offset.hours * 3600 + offset.minutes * 60); - } - - function init_changes() { - var changebase = {}; - changebase.is_daylight = (aComponent.name == "daylight"); - changebase.utcOffset = convert_tzoffset( - aComponent.getFirstProperty("tzoffsetto").getFirstValue() - ); - - changebase.prevUtcOffset = convert_tzoffset( - aComponent.getFirstProperty("tzoffsetfrom").getFirstValue() - ); - - return changebase; - } - - if (!aComponent.hasProperty("rrule") && !aComponent.hasProperty("rdate")) { - var change = init_changes(); - change.year = dtstart.year; - change.month = dtstart.month; - change.day = dtstart.day; - change.hour = dtstart.hour; - change.minute = dtstart.minute; - change.second = dtstart.second; - - ICAL.Timezone.adjust_change(change, 0, 0, 0, - -change.prevUtcOffset); - changes.push(change); - } else { - var props = aComponent.getAllProperties("rdate"); - for (var rdatekey in props) { - var rdate = props[rdatekey]; - var time = rdate.getFirstValue(); - var change = init_changes(); - - change.year = time.year; - change.month = time.month; - change.day = time.day; - - if (time.isDate) { - change.hour = dtstart.hour; - change.minute = dtstart.minute; - change.second = dtstart.second; - - if (dtstart.zone != ICAL.Timezone.utcTimezone) { - ICAL.Timezone.adjust_change(change, 0, 0, 0, - -change.prevUtcOffset); - } - } else { - change.hour = time.hour; - change.minute = time.minute; - change.second = time.second; - - if (time.zone != ICAL.Timezone.utcTimezone) { - ICAL.Timezone.adjust_change(change, 0, 0, 0, - -change.prevUtcOffset); - } - } - - changes.push(change); - } - - var rrule = aComponent.getFirstProperty("rrule"); - - if (rrule) { - rrule = rrule.getFirstValue(); - var change = init_changes(); - - if (rrule.until && rrule.until.zone == ICAL.Timezone.utcTimezone) { - rrule.until.adjust(0, 0, 0, change.prevUtcOffset); - rrule.until.zone = ICAL.Timezone.localTimezone; - } - - var iterator = rrule.iterator(dtstart); - - var occ; - while ((occ = iterator.next())) { - var change = init_changes(); - if (occ.year > aYear || !occ) { - break; - } - - change.year = occ.year; - change.month = occ.month; - change.day = occ.day; - change.hour = occ.hour; - change.minute = occ.minute; - change.second = occ.second; - change.isDate = occ.isDate; - - ICAL.Timezone.adjust_change(change, 0, 0, 0, - -change.prevUtcOffset); - changes.push(change); - } - } - } - - return changes; - }, - - toString: function toString() { - return (this.tznames ? this.tznames : this.tzid); - } - - }; - - ICAL.Timezone._compare_change_fn = function icaltimezone_compare_change_fn(a, b) { - if (a.year < b.year) return -1; - else if (a.year > b.year) return 1; - - if (a.month < b.month) return -1; - else if (a.month > b.month) return 1; - - if (a.day < b.day) return -1; - else if (a.day > b.day) return 1; - - if (a.hour < b.hour) return -1; - else if (a.hour > b.hour) return 1; - - if (a.minute < b.minute) return -1; - else if (a.minute > b.minute) return 1; - - if (a.second < b.second) return -1; - else if (a.second > b.second) return 1; - - return 0; - }; - - ICAL.Timezone.convert_time = function icaltimezone_convert_time(tt, from_zone, to_zone) { - if (tt.isDate || - from_zone.tzid == to_zone.tzid || - from_zone == ICAL.Timezone.localTimezone || - to_zone == ICAL.Timezone.localTimezone) { - tt.zone = to_zone; - return tt; - } - - var utcOffset = from_zone.utcOffset(tt); - tt.adjust(0, 0, 0, - utcOffset); - - utcOffset = to_zone.utcOffset(tt); - tt.adjust(0, 0, 0, utcOffset); - - return null; - }; - - ICAL.Timezone.fromData = function icaltimezone_fromData(aData) { - var tt = new ICAL.Timezone(); - return tt.fromData(aData); - }; - - ICAL.Timezone.utcTimezone = ICAL.Timezone.fromData({ - tzid: "UTC" - }); - - ICAL.Timezone.localTimezone = ICAL.Timezone.fromData({ - tzid: "floating" - }); - - ICAL.Timezone.adjust_change = function icaltimezone_adjust_change(change, days, hours, minutes, seconds) { - return ICAL.Time.prototype.adjust.call( - change, - days, - hours, - minutes, - seconds, - change - ); - }; - - ICAL.Timezone._minimumExpansionYear = -1; - ICAL.Timezone.MAX_YEAR = 2035; // TODO this is because of time_t, which we don't need. Still usefull? - ICAL.Timezone.EXTRA_COVERAGE = 5; -})(); -// singleton class to contain timezones. -// Right now its all manual registry in the -// future we may use this class to download timezone -// information or handle loading pre-expanded timezones. -ICAL.TimezoneService = (function() { - var zones; - - // Using var rather then return so we don't need to name the functions twice. - // TimezoneService#get will appear in profiler, etc... - var TimezoneService = { - reset: function() { - zones = Object.create(null); - var utc = ICAL.Timezone.utcTimezone; - - zones.Z = utc; - zones.UTC = utc; - zones.GMT = utc; - }, - - /** - * Checks if timezone id has been registered. - * - * @param {String} tzid (e.g. America/Los_Angeles). - * @return {Boolean} false when not present. - */ - has: function(tzid) { - return !!zones[tzid]; - }, - - /** - * Returns a timezone by its tzid if present. - * - * @param {String} tzid name of timezone (e.g. America/Los_Angeles). - * @return {ICAL.Timezone|Null} zone or null. - */ - get: function(tzid) { - return zones[tzid]; - }, - - /** - * Registers a timezone object or component. - * - * @param {String} [name] optional uses timezone.tzid by default. - * @param {ICAL.Component|ICAL.Timezone} zone initialized zone or vtimezone. - */ - register: function(name, timezone) { - if (name instanceof ICAL.Component) { - if (name.name === 'vtimezone') { - timezone = new ICAL.Timezone(name); - name = timezone.tzid; - } - } - - if (timezone instanceof ICAL.Timezone) { - zones[name] = timezone; - } else { - throw new TypeError('timezone must be ICAL.Timezone or ICAL.Component'); - } - }, - - /** - * Removes a timezone by its tzid from the list. - * - * @param {String} tzid (e.g. America/Los_Angeles). - */ - remove: function(tzid) { - return (delete zones[tzid]); - } - }; - - // initialize defaults - TimezoneService.reset(); - - return TimezoneService; -}()); -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * Portions Copyright (C) Philipp Kewisch, 2011-2012 */ - - - -(typeof(ICAL) === 'undefined')? ICAL = {} : ''; -(function() { - - /** - * Time representation (similar to JS Date object). - * Fully independent of system (OS) timezone / time. - * Unlike JS Date month start at 1 (Jan) not zero. - * - * - * var time = new ICAL.Time({ - * year: 2012, - * month: 10, - * day: 11 - * minute: 0, - * second: 0, - * isDate: false - * }); - * - * - * @param {Object} data initialization time. - * @param {ICAL.Timezone} zone timezone this position occurs in. - */ - ICAL.Time = function icaltime(data, zone) { - this.wrappedJSObject = this; - var time = this._time = Object.create(null); - - /* time defaults */ - time.year = 0; - time.month = 1; - time.day = 1; - time.hour = 0; - time.minute = 0; - time.second = 0; - time.isDate = false; - - this.fromData(data, zone); - }; - - ICAL.Time.prototype = { - - icalclass: "icaltime", - - // is read only strictly defined by isDate - get icaltype() { - return this.isDate ? 'date' : 'date-time'; - }, - - /** - * @type ICAL.Timezone - */ - zone: null, - - /** - * Internal uses to indicate that a change has been - * made and the next read operation must attempt to - * normalize the value (for example changing the day to 33). - * - * @type Boolean - * @private - */ - _pendingNormalization: false, - - clone: function icaltime_clone() { - return new ICAL.Time(this._time, this.zone); - }, - - reset: function icaltime_reset() { - this.fromData(ICAL.Time.epochTime); - this.zone = ICAL.Timezone.utcTimezone; - }, - - resetTo: function icaltime_resetTo(year, month, day, - hour, minute, second, timezone) { - this.fromData({ - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - zone: timezone - }); - }, - - fromString: function icaltime_fromString(str) { - var data; - try { - data = ICAL.DecorationParser.parseValue(str, "date"); - data.isDate = true; - } catch (e) { - data = ICAL.DecorationParser.parseValue(str, "date-time"); - data.isDate = false; - } - return this.fromData(data); - }, - - fromJSDate: function icaltime_fromJSDate(aDate, useUTC) { - if (!aDate) { - this.reset(); - } else { - if (useUTC) { - this.zone = ICAL.Timezone.utcTimezone; - this.year = aDate.getUTCFullYear(); - this.month = aDate.getUTCMonth() + 1; - this.day = aDate.getUTCDate(); - this.hour = aDate.getUTCHours(); - this.minute = aDate.getUTCMinutes(); - this.second = aDate.getUTCSeconds(); - } else { - this.zone = ICAL.Timezone.localTimezone; - this.year = aDate.getFullYear(); - this.month = aDate.getMonth() + 1; - this.day = aDate.getDate(); - this.hour = aDate.getHours(); - this.minute = aDate.getMinutes(); - this.second = aDate.getSeconds(); - } - } - return this; - }, - - fromData: function fromData(aData, aZone) { - for (var key in aData) { - // ical type cannot be set - if (key === 'icaltype') continue; - this[key] = aData[key]; - } - - if (aZone) { - this.zone = aZone; - } - - if (aData && !("isDate" in aData)) { - this.isDate = !("hour" in aData); - } else if (aData && ("isDate" in aData)) { - this.isDate = aData.isDate; - } - - if (aData && "timezone" in aData) { - var zone = ICAL.TimezoneService.get( - aData.timezone - ); - - this.zone = zone || ICAL.Timezone.localTimezone; - } - - if (aData && "zone" in aData) { - this.zone = aData.zone; - } - - if (!this.zone) { - this.zone = ICAL.Timezone.localTimezone; - } - - return this; - }, - - dayOfWeek: function icaltime_dayOfWeek() { - // Using Zeller's algorithm - var q = this.day; - var m = this.month + (this.month < 3 ? 12 : 0); - var Y = this.year - (this.month < 3 ? 1 : 0); - - var h = (q + Y + ICAL.helpers.trunc(((m + 1) * 26) / 10) + ICAL.helpers.trunc(Y / 4)); - if (true /* gregorian */) { - h += ICAL.helpers.trunc(Y / 100) * 6 + ICAL.helpers.trunc(Y / 400); - } else { - h += 5; - } - - // Normalize to 1 = sunday - h = ((h + 6) % 7) + 1; - return h; - }, - - dayOfYear: function icaltime_dayOfYear() { - var is_leap = (ICAL.Time.is_leap_year(this.year) ? 1 : 0); - var diypm = ICAL.Time._days_in_year_passed_month; - return diypm[is_leap][this.month - 1] + this.day; - }, - - startOfWeek: function startOfWeek() { - var result = this.clone(); - result.day -= this.dayOfWeek() - 1; - return result; - }, - - endOfWeek: function endOfWeek() { - var result = this.clone(); - result.day += 7 - this.dayOfWeek(); - return result; - }, - - startOfMonth: function startOfMonth() { - var result = this.clone(); - result.day = 1; - result.isDate = true; - result.hour = 0; - result.minute = 0; - result.second = 0; - return result; - }, - - endOfMonth: function endOfMonth() { - var result = this.clone(); - result.day = ICAL.Time.daysInMonth(result.month, result.year); - result.isDate = true; - result.hour = 0; - result.minute = 0; - result.second = 0; - return result; - }, - - startOfYear: function startOfYear() { - var result = this.clone(); - result.day = 1; - result.month = 1; - result.isDate = true; - result.hour = 0; - result.minute = 0; - result.second = 0; - return result; - }, - - endOfYear: function endOfYear() { - var result = this.clone(); - result.day = 31; - result.month = 12; - result.isDate = true; - result.hour = 0; - result.minute = 0; - result.second = 0; - return result; - }, - - startDoyWeek: function startDoyWeek(aFirstDayOfWeek) { - var firstDow = aFirstDayOfWeek || ICAL.Time.SUNDAY; - var delta = this.dayOfWeek() - firstDow; - if (delta < 0) delta += 7; - return this.dayOfYear() - delta; - }, - - /** - * Finds the nthWeekDay relative to the current month (not day). - * The returned value is a day relative the month that this - * month belongs to so 1 would indicate the first of the month - * and 40 would indicate a day in the following month. - * - * @param {Numeric} aDayOfWeek day of the week see the day name constants. - * @param {Numeric} aPos nth occurrence of a given week day - * values of 1 and 0 both indicate the first - * weekday of that type. aPos may be either positive - * or negative. - * - * @return {Numeric} numeric value indicating a day relative - * to the current month of this time object. - */ - nthWeekDay: function icaltime_nthWeekDay(aDayOfWeek, aPos) { - var daysInMonth = ICAL.Time.daysInMonth(this.month, this.year); - var weekday; - var pos = aPos; - - var start = 0; - - var otherDay = this.clone(); - - if (pos >= 0) { - otherDay.day = 1; - - // because 0 means no position has been given - // 1 and 0 indicate the same day. - if (pos != 0) { - // remove the extra numeric value - pos--; - } - - // set current start offset to current day. - start = otherDay.day; - - // find the current day of week - var startDow = otherDay.dayOfWeek(); - - // calculate the difference between current - // day of the week and desired day of the week - var offset = aDayOfWeek - startDow; - - - // if the offset goes into the past - // week we add 7 so its goes into the next - // week. We only want to go forward in time here. - if (offset < 0) - // this is really important otherwise we would - // end up with dates from in the past. - offset += 7; - - // add offset to start so start is the same - // day of the week as the desired day of week. - start += offset; - - // because we are going to add (and multiply) - // the numeric value of the day we subtract it - // from the start position so not to add it twice. - start -= aDayOfWeek; - - // set week day - weekday = aDayOfWeek; - } else { - - // then we set it to the last day in the current month - otherDay.day = daysInMonth; - - // find the ends weekday - var endDow = otherDay.dayOfWeek(); - - pos++; - - weekday = (endDow - aDayOfWeek); - - if (weekday < 0) { - weekday += 7; - } - - weekday = daysInMonth - weekday; - } - - weekday += pos * 7; - - return start + weekday; - }, - - /** - * Checks if current time is the nthWeekDay. - * Relative to the current month. - * - * Will always return false when rule resolves - * outside of current month. - * - * @param {Numeric} aDayOfWeek day of week. - * @param {Numeric} aPos position. - * @param {Numeric} aMax maximum valid day. - */ - isNthWeekDay: function(aDayOfWeek, aPos) { - var dow = this.dayOfWeek(); - - if (aPos === 0 && dow === aDayOfWeek) { - return true; - } - - // get pos - var day = this.nthWeekDay(aDayOfWeek, aPos); - - if (day === this.day) { - return true; - } - - return false; - }, - - weekNumber: function weekNumber(aWeekStart) { - // This function courtesty of Julian Bucknall, published under the MIT license - // http://www.boyet.com/articles/publishedarticles/calculatingtheisoweeknumb.html - var doy = this.dayOfYear(); - var dow = this.dayOfWeek(); - var year = this.year; - var week1; - - var dt = this.clone(); - dt.isDate = true; - var first_dow = dt.dayOfWeek(); - var isoyear = this.year; - - if (dt.month == 12 && dt.day > 28) { - week1 = ICAL.Time.weekOneStarts(isoyear + 1, aWeekStart); - if (dt.compare(week1) < 0) { - week1 = ICAL.Time.weekOneStarts(isoyear, aWeekStart); - } else { - isoyear++; - } - } else { - week1 = ICAL.Time.weekOneStarts(isoyear, aWeekStart); - if (dt.compare(week1) < 0) { - week1 = ICAL.Time.weekOneStarts(--isoyear, aWeekStart); - } - } - - var daysBetween = (dt.subtractDate(week1).toSeconds() / 86400); - return ICAL.helpers.trunc(daysBetween / 7) + 1; - }, - - addDuration: function icaltime_add(aDuration) { - var mult = (aDuration.isNegative ? -1 : 1); - - // because of the duration optimizations it is much - // more efficient to grab all the values up front - // then set them directly (which will avoid a normalization call). - // So we don't actually normalize until we need it. - var second = this.second; - var minute = this.minute; - var hour = this.hour; - var day = this.day; - - second += mult * aDuration.seconds; - minute += mult * aDuration.minutes; - hour += mult * aDuration.hours; - day += mult * aDuration.days; - day += mult * 7 * aDuration.weeks; - - this.second = second; - this.minute = minute; - this.hour = hour; - this.day = day; - }, - - /** - * Subtract the date details (_excluding_ timezone). - * Useful for finding the relative difference between - * two time objects excluding their timezone differences. - * - * @return {ICAL.Duration} difference in duration. - */ - subtractDate: function icaltime_subtract(aDate) { - var unixTime = this.toUnixTime() + this.utcOffset(); - var other = aDate.toUnixTime() + aDate.utcOffset(); - return ICAL.Duration.fromSeconds(unixTime - other); - }, - - /** - * Subtract the date details, taking timezones into account. - * - * @param {ICAL.Time} The date to subtract. - * @return {ICAL.Duration} The difference in duration. - */ - subtractDateTz: function icaltime_subtract_abs(aDate) { - var unixTime = this.toUnixTime(); - var other = aDate.toUnixTime(); - return ICAL.Duration.fromSeconds(unixTime - other); - }, - - compare: function icaltime_compare(other) { - var a = this.toUnixTime(); - var b = other.toUnixTime(); - - if (a > b) return 1; - if (b > a) return -1; - return 0; - }, - - compareDateOnlyTz: function icaltime_compareDateOnlyTz(other, tz) { - function cmp(attr) { - return ICAL.Time._cmp_attr(a, b, attr); - } - var a = this.convertToZone(tz); - var b = other.convertToZone(tz); - var rc = 0; - - if ((rc = cmp("year")) != 0) return rc; - if ((rc = cmp("month")) != 0) return rc; - if ((rc = cmp("day")) != 0) return rc; - - return rc; - }, - - convertToZone: function convertToZone(zone) { - var copy = this.clone(); - var zone_equals = (this.zone.tzid == zone.tzid); - - if (!this.isDate && !zone_equals) { - ICAL.Timezone.convert_time(copy, this.zone, zone); - } - - copy.zone = zone; - return copy; - }, - - utcOffset: function utc_offset() { - if (this.zone == ICAL.Timezone.localTimezone || - this.zone == ICAL.Timezone.utcTimezone) { - return 0; - } else { - return this.zone.utcOffset(this); - } - }, - - /** - * Returns an RFC 5455 compliant ical representation of this object. - * - * @return {String} ical date/date-time. - */ - toICALString: function() { - var string = this.toString(); - - if (string.length > 10) { - return ICAL.design.value['date-time'].toICAL(string); - } else { - return ICAL.design.value.date.toICAL(string); - } - }, - - toString: function toString() { - var result = this.year + '-' + - ICAL.helpers.pad2(this.month) + '-' + - ICAL.helpers.pad2(this.day); - - if (!this.isDate) { - result += 'T' + ICAL.helpers.pad2(this.hour) + ':' + - ICAL.helpers.pad2(this.minute) + ':' + - ICAL.helpers.pad2(this.second); - - if (this.zone === ICAL.Timezone.utcTimezone) { - result += 'Z'; - } - } - - return result; - }, - - toJSDate: function toJSDate() { - if (this.zone == ICAL.Timezone.localTimezone) { - if (this.isDate) { - return new Date(this.year, this.month - 1, this.day); - } else { - return new Date(this.year, this.month - 1, this.day, - this.hour, this.minute, this.second, 0); - } - } else { - return new Date(this.toUnixTime() * 1000); - } - }, - - _normalize: function icaltime_normalize() { - var isDate = this._time.isDate; - if (this._time.isDate) { - this._time.hour = 0; - this._time.minute = 0; - this._time.second = 0; - } - this.adjust(0, 0, 0, 0); - - return this; - }, - - adjust: function icaltime_adjust(aExtraDays, aExtraHours, - aExtraMinutes, aExtraSeconds, aTime) { - - var minutesOverflow, hoursOverflow, - daysOverflow = 0, yearsOverflow = 0; - - var second, minute, hour, day; - var daysInMonth; - - var time = aTime || this._time; - - if (!time.isDate) { - second = time.second + aExtraSeconds; - time.second = second % 60; - minutesOverflow = ICAL.helpers.trunc(second / 60); - if (time.second < 0) { - time.second += 60; - minutesOverflow--; - } - - minute = time.minute + aExtraMinutes + minutesOverflow; - time.minute = minute % 60; - hoursOverflow = ICAL.helpers.trunc(minute / 60); - if (time.minute < 0) { - time.minute += 60; - hoursOverflow--; - } - - hour = time.hour + aExtraHours + hoursOverflow; - - time.hour = hour % 24; - daysOverflow = ICAL.helpers.trunc(hour / 24); - if (time.hour < 0) { - time.hour += 24; - daysOverflow--; - } - } - - - // Adjust month and year first, because we need to know what month the day - // is in before adjusting it. - if (time.month > 12) { - yearsOverflow = ICAL.helpers.trunc((time.month - 1) / 12); - } else if (time.month < 1) { - yearsOverflow = ICAL.helpers.trunc(time.month / 12) - 1; - } - - time.year += yearsOverflow; - time.month -= 12 * yearsOverflow; - - // Now take care of the days (and adjust month if needed) - day = time.day + aExtraDays + daysOverflow; - - if (day > 0) { - for (;;) { - var daysInMonth = ICAL.Time.daysInMonth(time.month, time.year); - if (day <= daysInMonth) { - break; - } - - time.month++; - if (time.month > 12) { - time.year++; - time.month = 1; - } - - day -= daysInMonth; - } - } else { - while (day <= 0) { - if (time.month == 1) { - time.year--; - time.month = 12; - } else { - time.month--; - } - - day += ICAL.Time.daysInMonth(time.month, time.year); - } - } - - time.day = day; - return this; - }, - - fromUnixTime: function fromUnixTime(seconds) { - this.zone = ICAL.Timezone.utcTimezone; - var epoch = ICAL.Time.epochTime.clone(); - epoch.adjust(0, 0, 0, seconds); - - this.year = epoch.year; - this.month = epoch.month; - this.day = epoch.day; - this.hour = epoch.hour; - this.minute = epoch.minute; - this.second = epoch.second; - }, - - toUnixTime: function toUnixTime() { - var offset = this.utcOffset(); - - // we use the offset trick to ensure - // that we are getting the actual UTC time - var ms = Date.UTC( - this.year, - this.month - 1, - this.day, - this.hour, - this.minute, - this.second - offset - ); - - // seconds - return ms / 1000; - }, - - /** - * Converts time to into Object - * which can be serialized then re-created - * using the constructor. - * - * Example: - * - * // toJSON will automatically be called - * var json = JSON.stringify(mytime); - * - * var deserialized = JSON.parse(json); - * - * var time = new ICAL.Time(deserialized); - * - */ - toJSON: function() { - var copy = [ - 'year', - 'month', - 'day', - 'hour', - 'minute', - 'second', - 'isDate' - ]; - - var result = Object.create(null); - - var i = 0; - var len = copy.length; - var prop; - - for (; i < len; i++) { - prop = copy[i]; - result[prop] = this[prop]; - } - - if (this.zone) { - result.timezone = this.zone.tzid; - } - - return result; - } - - }; - - (function setupNormalizeAttributes() { - // This needs to run before any instances are created! - function defineAttr(attr) { - Object.defineProperty(ICAL.Time.prototype, attr, { - get: function getTimeAttr() { - if (this._pendingNormalization) { - this._normalize(); - this._pendingNormalization = false; - } - - return this._time[attr]; - }, - set: function setTimeAttr(val) { - this._pendingNormalization = true; - this._time[attr] = val; - - return val; - } - }); - - } - - if ("defineProperty" in Object) { - defineAttr("year"); - defineAttr("month"); - defineAttr("day"); - defineAttr("hour"); - defineAttr("minute"); - defineAttr("second"); - defineAttr("isDate"); - } - })(); - - ICAL.Time.daysInMonth = function icaltime_daysInMonth(month, year) { - var _daysInMonth = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - var days = 30; - - if (month < 1 || month > 12) return days; - - days = _daysInMonth[month]; - - if (month == 2) { - days += ICAL.Time.is_leap_year(year); - } - - return days; - }; - - ICAL.Time.is_leap_year = function icaltime_is_leap_year(year) { - if (year <= 1752) { - return ((year % 4) == 0); - } else { - return (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)); - } - }; - - ICAL.Time.fromDayOfYear = function icaltime_fromDayOfYear(aDayOfYear, aYear) { - var year = aYear; - var doy = aDayOfYear; - var tt = new ICAL.Time(); - tt.auto_normalize = false; - var is_leap = (ICAL.Time.is_leap_year(year) ? 1 : 0); - - if (doy < 1) { - year--; - is_leap = (ICAL.Time.is_leap_year(year) ? 1 : 0); - doy += ICAL.Time._days_in_year_passed_month[is_leap][12]; - } else if (doy > ICAL.Time._days_in_year_passed_month[is_leap][12]) { - is_leap = (ICAL.Time.is_leap_year(year) ? 1 : 0); - doy -= ICAL.Time._days_in_year_passed_month[is_leap][12]; - year++; - } - - tt.year = year; - tt.isDate = true; - - for (var month = 11; month >= 0; month--) { - if (doy > ICAL.Time._days_in_year_passed_month[is_leap][month]) { - tt.month = month + 1; - tt.day = doy - ICAL.Time._days_in_year_passed_month[is_leap][month]; - break; - } - } - - tt.auto_normalize = true; - return tt; - }; - - ICAL.Time.fromStringv2 = function fromString(str) { - return new ICAL.Time({ - year: parseInt(str.substr(0, 4), 10), - month: parseInt(str.substr(5, 2), 10), - day: parseInt(str.substr(8, 2), 10), - isDate: true - }); - }; - - ICAL.Time.fromDateString = function(aValue, aProp) { - // Dates should have no timezone. - // Google likes to sometimes specify Z on dates - // we specifically ignore that to avoid issues. - - // YYYY-MM-DD - // 2012-10-10 - return new ICAL.Time({ - year: ICAL.helpers.strictParseInt(aValue.substr(0, 4)), - month: ICAL.helpers.strictParseInt(aValue.substr(5, 2)), - day: ICAL.helpers.strictParseInt(aValue.substr(8, 2)), - isDate: true - }); - }; - - ICAL.Time.fromDateTimeString = function(aValue, prop) { - if (aValue.length < 19) { - throw new Error( - 'invalid date-time value: "' + aValue + '"' - ); - } - - var zone; - - if (aValue[19] === 'Z') { - zone = 'Z'; - } else if (prop) { - zone = prop.getParameter('tzid'); - } - - // 2012-10-10T10:10:10(Z)? - var time = new ICAL.Time({ - year: ICAL.helpers.strictParseInt(aValue.substr(0, 4)), - month: ICAL.helpers.strictParseInt(aValue.substr(5, 2)), - day: ICAL.helpers.strictParseInt(aValue.substr(8, 2)), - hour: ICAL.helpers.strictParseInt(aValue.substr(11, 2)), - minute: ICAL.helpers.strictParseInt(aValue.substr(14, 2)), - second: ICAL.helpers.strictParseInt(aValue.substr(17, 2)), - timezone: zone - }); - - return time; - }; - - ICAL.Time.fromString = function fromString(aValue) { - if (aValue.length > 10) { - return ICAL.Time.fromDateTimeString(aValue); - } else { - return ICAL.Time.fromDateString(aValue); - } - }; - - ICAL.Time.fromJSDate = function fromJSDate(aDate, useUTC) { - var tt = new ICAL.Time(); - return tt.fromJSDate(aDate, useUTC); - }; - - ICAL.Time.fromData = function fromData(aData) { - var t = new ICAL.Time(); - return t.fromData(aData); - }; - - ICAL.Time.now = function icaltime_now() { - return ICAL.Time.fromJSDate(new Date(), false); - }; - - ICAL.Time.weekOneStarts = function weekOneStarts(aYear, aWeekStart) { - var t = ICAL.Time.fromData({ - year: aYear, - month: 1, - day: 4, - isDate: true - }); - - var fourth_dow = t.dayOfWeek(); - t.day += (1 - fourth_dow) + ((aWeekStart || ICAL.Time.SUNDAY) - 1); - return t; - }; - - ICAL.Time.epochTime = ICAL.Time.fromData({ - year: 1970, - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0, - isDate: false, - timezone: "Z" - }); - - ICAL.Time._cmp_attr = function _cmp_attr(a, b, attr) { - if (a[attr] > b[attr]) return 1; - if (a[attr] < b[attr]) return -1; - return 0; - }; - - ICAL.Time._days_in_year_passed_month = [ - [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], - [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366] - ]; - - - ICAL.Time.SUNDAY = 1; - ICAL.Time.MONDAY = 2; - ICAL.Time.TUESDAY = 3; - ICAL.Time.WEDNESDAY = 4; - ICAL.Time.THURSDAY = 5; - ICAL.Time.FRIDAY = 6; - ICAL.Time.SATURDAY = 7; - - ICAL.Time.DEFAULT_WEEK_START = ICAL.Time.MONDAY; -})(); -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * Portions Copyright (C) Philipp Kewisch, 2011-2012 */ - - - -(typeof(ICAL) === 'undefined')? ICAL = {} : ''; -(function() { - - var DOW_MAP = { - SU: ICAL.Time.SUNDAY, - MO: ICAL.Time.MONDAY, - TU: ICAL.Time.TUESDAY, - WE: ICAL.Time.WEDNESDAY, - TH: ICAL.Time.THURSDAY, - FR: ICAL.Time.FRIDAY, - SA: ICAL.Time.SATURDAY - }; - - var REVERSE_DOW_MAP = {}; - for (var key in DOW_MAP) { - REVERSE_DOW_MAP[DOW_MAP[key]] = key; - } - - var COPY_PARTS = ["BYSECOND", "BYMINUTE", "BYHOUR", "BYDAY", - "BYMONTHDAY", "BYYEARDAY", "BYWEEKNO", - "BYMONTH", "BYSETPOS"]; - - ICAL.Recur = function icalrecur(data) { - this.wrappedJSObject = this; - this.parts = {}; - - if (data && typeof(data) === 'object') { - this.fromData(data); - } - }; - - ICAL.Recur.prototype = { - - parts: null, - - interval: 1, - wkst: ICAL.Time.MONDAY, - until: null, - count: null, - freq: null, - icalclass: "icalrecur", - icaltype: "recur", - - iterator: function(aStart) { - return new ICAL.RecurIterator({ - rule: this, - dtstart: aStart - }); - }, - - clone: function clone() { - return new ICAL.Recur(this.toJSON()); - }, - - isFinite: function isfinite() { - return !!(this.count || this.until); - }, - - isByCount: function isbycount() { - return !!(this.count && !this.until); - }, - - addComponent: function addPart(aType, aValue) { - var ucname = aType.toUpperCase(); - if (ucname in this.parts) { - this.parts[ucname].push(aValue); - } else { - this.parts[ucname] = [aValue]; - } - }, - - setComponent: function setComponent(aType, aValues) { - this.parts[aType.toUpperCase()] = aValues; - }, - - getComponent: function getComponent(aType) { - var ucname = aType.toUpperCase(); - return (ucname in this.parts ? this.parts[ucname] : []); - }, - - getNextOccurrence: function getNextOccurrence(aStartTime, aRecurrenceId) { - var iter = this.iterator(aStartTime); - var next, cdt; - - do { - next = iter.next(); - } while (next && next.compare(aRecurrenceId) <= 0); - - if (next && aRecurrenceId.zone) { - next.zone = aRecurrenceId.zone; - } - - return next; - }, - - fromData: function(data) { - for (var key in data) { - var uckey = key.toUpperCase(); - - if (uckey in partDesign) { - if (ICAL.helpers.isArray(data[key])) { - this.parts[uckey] = data[key]; - } else { - this.parts[uckey] = [data[key]]; - } - } else { - this[key] = data[key]; - } - } - - if (this.wkst && typeof this.wkst != "number") { - this.wkst = ICAL.Recur.icalDayToNumericDay(this.wkst); - } - - if (this.until && !(this.until instanceof ICAL.Time)) { - this.until = ICAL.Time.fromString(this.until); - } - }, - - toJSON: function() { - var res = Object.create(null); - res.freq = this.freq; - - if (this.count) { - res.count = this.count; - } - - if (this.interval > 1) { - res.interval = this.interval; - } - - for (var k in this.parts) { - var kparts = this.parts[k]; - if (ICAL.helpers.isArray(kparts) && kparts.length == 1) { - res[k.toLowerCase()] = kparts[0]; - } else { - res[k.toLowerCase()] = ICAL.helpers.clone(this.parts[k]); - } - } - - if (this.until) { - res.until = this.until.toString(); - } - if ('wkst' in this && this.wkst !== ICAL.Time.DEFAULT_WEEK_START) { - res.wkst = ICAL.Recur.numericDayToIcalDay(this.wkst); - } - return res; - }, - - toString: function icalrecur_toString() { - // TODO retain order - var str = "FREQ=" + this.freq; - if (this.count) { - str += ";COUNT=" + this.count; - } - if (this.interval > 1) { - str += ";INTERVAL=" + this.interval; - } - for (var k in this.parts) { - str += ";" + k + "=" + this.parts[k]; - } - if (this.until ){ - str += ';UNTIL=' + this.until.toString(); - } - if ('wkst' in this && this.wkst !== ICAL.Time.DEFAULT_WEEK_START) { - str += ';WKST=' + ICAL.Recur.numericDayToIcalDay(this.wkst); - } - return str; - } - }; - - function parseNumericValue(type, min, max, value) { - var result = value; - - if (value[0] === '+') { - result = value.substr(1); - } - - result = ICAL.helpers.strictParseInt(result); - - if (min !== undefined && value < min) { - throw new Error( - type + ': invalid value "' + value + '" must be > ' + min - ); - } - - if (max !== undefined && value > max) { - throw new Error( - type + ': invalid value "' + value + '" must be < ' + min - ); - } - - return result; - } - - /** - * Convert an ical representation of a day (SU, MO, etc..) - * into a numeric value of that day. - * - * @param {String} day ical day. - * @return {Numeric} numeric value of given day. - */ - ICAL.Recur.icalDayToNumericDay = function toNumericDay(string) { - //XXX: this is here so we can deal - // with possibly invalid string values. - - return DOW_MAP[string]; - }; - - /** - * Convert a numeric day value into its ical representation (SU, MO, etc..) - * - * @param {Numeric} numeric value of given day. - * @return {String} day ical day. - */ - ICAL.Recur.numericDayToIcalDay = function toIcalDay(num) { - //XXX: this is here so we can deal with possibly invalid number values. - // Also, this allows consistent mapping between day numbers and day - // names for external users. - return REVERSE_DOW_MAP[num]; - }; - - var VALID_DAY_NAMES = /^(SU|MO|TU|WE|TH|FR|SA)$/; - var VALID_BYDAY_PART = /^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/ - var ALLOWED_FREQ = ['SECONDLY', 'MINUTELY', 'HOURLY', - 'DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY']; - - var optionDesign = { - FREQ: function(value, dict, fmtIcal) { - // yes this is actually equal or faster then regex. - // upside here is we can enumerate the valid values. - if (ALLOWED_FREQ.indexOf(value) !== -1) { - dict.freq = value; - } else { - throw new Error( - 'invalid frequency "' + value + '" expected: "' + - ALLOWED_FREQ.join(', ') + '"' - ); - } - }, - - COUNT: function(value, dict, fmtIcal) { - dict.count = ICAL.helpers.strictParseInt(value); - }, - - INTERVAL: function(value, dict, fmtIcal) { - dict.interval = ICAL.helpers.strictParseInt(value); - if (dict.interval < 1) { - // 0 or negative values are not allowed, some engines seem to generate - // it though. Assume 1 instead. - dict.interval = 1; - } - }, - - UNTIL: function(value, dict, fmtIcal) { - if (fmtIcal) { - if (value.length > 10) { - dict.until = ICAL.design.value['date-time'].fromICAL(value); - } else { - dict.until = ICAL.design.value.date.fromICAL(value); - } - } else { - dict.until = ICAL.Time.fromString(value); - } - }, - - WKST: function(value, dict, fmtIcal) { - if (VALID_DAY_NAMES.test(value)) { - dict.wkst = ICAL.Recur.icalDayToNumericDay(value); - } else { - throw new Error('invalid WKST value "' + value + '"'); - } - } - }; - - var partDesign = { - BYSECOND: parseNumericValue.bind(this, 'BYSECOND', 0, 60), - BYMINUTE: parseNumericValue.bind(this, 'BYMINUTE', 0, 59), - BYHOUR: parseNumericValue.bind(this, 'BYHOUR', 0, 23), - BYDAY: function(value) { - if (VALID_BYDAY_PART.test(value)) { - return value; - } else { - throw new Error('invalid BYDAY value "' + value + '"'); - } - }, - BYMONTHDAY: parseNumericValue.bind(this, 'BYMONTHDAY', -31, 31), - BYYEARDAY: parseNumericValue.bind(this, 'BYYEARDAY', -366, 366), - BYWEEKNO: parseNumericValue.bind(this, 'BYWEEKNO', -53, 53), - BYMONTH: parseNumericValue.bind(this, 'BYMONTH', 0, 12), - BYSETPOS: parseNumericValue.bind(this, 'BYSETPOS', -366, 366) - }; - - ICAL.Recur.fromString = function(string) { - var data = ICAL.Recur._stringToData(string, false); - return new ICAL.Recur(data); - }; - - ICAL.Recur.fromData = function(aData) { - return new ICAL.Recur(aData); - }; - - ICAL.Recur._stringToData= function(string, fmtIcal) { - var dict = Object.create(null); - var dict = {}; - - // split is slower in FF but fast enough. - // v8 however this is faster then manual split? - var values = string.split(';'); - var len = values.length; - - for (var i = 0; i < len; i++) { - var parts = values[i].split('='); - var ucname = parts[0].toUpperCase(); - var lcname = parts[0].toLowerCase(); - var name = (fmtIcal ? lcname : ucname); - var value = parts[1]; - - if (ucname in partDesign) { - var partArr = value.split(','); - var partArrIdx = 0; - var partArrLen = partArr.length; - - for (; partArrIdx < partArrLen; partArrIdx++) { - partArr[partArrIdx] = partDesign[ucname](partArr[partArrIdx]); - } - dict[name] = (partArr.length == 1 ? partArr[0] : partArr); - } else if (ucname in optionDesign) { - optionDesign[ucname](value, dict, fmtIcal); - } else { - // Don't swallow unknown values. Just set them as they are. - dict[lcname] = value; - } - } - - return dict; - }; - -})(); -ICAL.RecurIterator = (function() { - - /** - * Options: - * - rule: (ICAL.Recur) instance - * - dtstart: (ICAL.Time) start date of recurrence rule - * - initialized: (Boolean) when true will assume options - * are from previously constructed - * iterator and will not re-initialize - * iterator but resume its state from given data. - * - * - by_data: (for iterator de-serialization) - * - days: " - * - last: " - * - by_indices: " - */ - function icalrecur_iterator(options) { - this.fromData(options); - } - - icalrecur_iterator.prototype = { - - /** - * True when iteration is finished. - */ - completed: false, - - rule: null, - dtstart: null, - last: null, - occurrence_number: 0, - by_indices: null, - initialized: false, - by_data: null, - - days: null, - days_index: 0, - - fromData: function(options) { - this.rule = ICAL.helpers.formatClassType(options.rule, ICAL.Recur); - - if (!this.rule) { - throw new Error('iterator requires a (ICAL.Recur) rule'); - } - - this.dtstart = ICAL.helpers.formatClassType(options.dtstart, ICAL.Time); - - if (!this.dtstart) { - throw new Error('iterator requires a (ICAL.Time) dtstart'); - } - - if (options.by_data) { - this.by_data = options.by_data; - } else { - this.by_data = ICAL.helpers.clone(this.rule.parts, true); - } - - if (options.occurrence_number) - this.occurrence_number = options.occurrence_number; - - this.days = options.days || []; - this.last = ICAL.helpers.formatClassType(options.last, ICAL.Time); - - this.by_indices = options.by_indices; - - if (!this.by_indices) { - this.by_indices = { - "BYSECOND": 0, - "BYMINUTE": 0, - "BYHOUR": 0, - "BYDAY": 0, - "BYMONTH": 0, - "BYWEEKNO": 0, - "BYMONTHDAY": 0 - }; - } - - this.initialized = options.initialized || false; - - if (!this.initialized) { - this.init(); - } - }, - - init: function icalrecur_iterator_init() { - this.initialized = true; - this.last = this.dtstart.clone(); - var parts = this.by_data; - - if ("BYDAY" in parts) { - // libical does this earlier when the rule is loaded, but we postpone to - // now so we can preserve the original order. - this.sort_byday_rules(parts.BYDAY, this.rule.wkst); - } - - // If the BYYEARDAY appares, no other date rule part may appear - if ("BYYEARDAY" in parts) { - if ("BYMONTH" in parts || "BYWEEKNO" in parts || - "BYMONTHDAY" in parts || "BYDAY" in parts) { - throw new Error("Invalid BYYEARDAY rule"); - } - } - - // BYWEEKNO and BYMONTHDAY rule parts may not both appear - if ("BYWEEKNO" in parts && "BYMONTHDAY" in parts) { - throw new Error("BYWEEKNO does not fit to BYMONTHDAY"); - } - - // For MONTHLY recurrences (FREQ=MONTHLY) neither BYYEARDAY nor - // BYWEEKNO may appear. - if (this.rule.freq == "MONTHLY" && - ("BYYEARDAY" in parts || "BYWEEKNO" in parts)) { - throw new Error("For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear"); - } - - // For WEEKLY recurrences (FREQ=WEEKLY) neither BYMONTHDAY nor - // BYYEARDAY may appear. - if (this.rule.freq == "WEEKLY" && - ("BYYEARDAY" in parts || "BYMONTHDAY" in parts)) { - throw new Error("For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear"); - } - - // BYYEARDAY may only appear in YEARLY rules - if (this.rule.freq != "YEARLY" && "BYYEARDAY" in parts) { - throw new Error("BYYEARDAY may only appear in YEARLY rules"); - } - - this.last.second = this.setup_defaults("BYSECOND", "SECONDLY", this.dtstart.second); - this.last.minute = this.setup_defaults("BYMINUTE", "MINUTELY", this.dtstart.minute); - this.last.hour = this.setup_defaults("BYHOUR", "HOURLY", this.dtstart.hour); - this.last.day = this.setup_defaults("BYMONTHDAY", "DAILY", this.dtstart.day); - this.last.month = this.setup_defaults("BYMONTH", "MONTHLY", this.dtstart.month); - - if (this.rule.freq == "WEEKLY") { - if ("BYDAY" in parts) { - var parts = this.ruleDayOfWeek(parts.BYDAY[0]); - var pos = parts[0]; - var rule_dow = parts[1]; - var dow = rule_dow - this.last.dayOfWeek(); - if ((this.last.dayOfWeek() < rule_dow && dow >= 0) || dow < 0) { - // Initial time is after first day of BYDAY data - this.last.day += dow; - } - } else { - var dayName = ICAL.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek()); - parts.BYDAY = [dayName]; - } - } - - if (this.rule.freq == "YEARLY") { - for (;;) { - this.expand_year_days(this.last.year); - if (this.days.length > 0) { - break; - } - this.increment_year(this.rule.interval); - } - - var next = ICAL.Time.fromDayOfYear(this.days[0], this.last.year); - - this.last.day = next.day; - this.last.month = next.month; - } - - if (this.rule.freq == "MONTHLY" && this.has_by_data("BYDAY")) { - - var coded_day = this.by_data.BYDAY[this.by_indices.BYDAY]; - var parts = this.ruleDayOfWeek(coded_day); - var pos = parts[0]; - var dow = parts[1]; - - var daysInMonth = ICAL.Time.daysInMonth(this.last.month, this.last.year); - var poscount = 0; - - if (pos >= 0) { - for (this.last.day = 1; this.last.day <= daysInMonth; this.last.day++) { - if (this.last.dayOfWeek() == dow) { - if (++poscount == pos || pos == 0) { - break; - } - } - } - } else { - pos = -pos; - for (this.last.day = daysInMonth; this.last.day != 0; this.last.day--) { - if (this.last.dayOfWeek() == dow) { - if (++poscount == pos) { - break; - } - } - } - } - - //XXX: This feels like a hack, but we need to initialize - // the BYMONTHDAY case correctly and byDayAndMonthDay handles - // this case. It accepts a special flag which will avoid incrementing - // the initial value without the flag days that match the start time - // would be missed. - if (this.has_by_data('BYMONTHDAY')) { - this._byDayAndMonthDay(true); - } - - if (this.last.day > daysInMonth || this.last.day == 0) { - throw new Error("Malformed values in BYDAY part"); - } - - } else if (this.has_by_data("BYMONTHDAY")) { - if (this.last.day < 0) { - var daysInMonth = ICAL.Time.daysInMonth(this.last.month, this.last.year); - this.last.day = daysInMonth + this.last.day + 1; - } - } - - }, - - next: function icalrecur_iterator_next() { - var before = (this.last ? this.last.clone() : null); - - if ((this.rule.count && this.occurrence_number >= this.rule.count) || - (this.rule.until && this.last.compare(this.rule.until) > 0)) { - - //XXX: right now this is just a flag and has no impact - // we can simplify the above case to check for completed later. - this.completed = true; - - return null; - } - - if (this.occurrence_number == 0 && this.last.compare(this.dtstart) >= 0) { - // First of all, give the instance that was initialized - this.occurrence_number++; - return this.last; - } - - do { - var valid = 1; - - switch (this.rule.freq) { - case "SECONDLY": - this.next_second(); - break; - case "MINUTELY": - this.next_minute(); - break; - case "HOURLY": - this.next_hour(); - break; - case "DAILY": - this.next_day(); - break; - case "WEEKLY": - this.next_week(); - break; - case "MONTHLY": - valid = this.next_month(); - break; - case "YEARLY": - this.next_year(); - break; - - default: - return null; - } - } while (!this.check_contracting_rules() || - this.last.compare(this.dtstart) < 0 || - !valid); - - // TODO is this valid? - if (this.last.compare(before) == 0) { - throw new Error("Same occurrence found twice, protecting " + - "you from death by recursion"); - } - - if (this.rule.until && this.last.compare(this.rule.until) > 0) { - this.completed = true; - return null; - } else { - this.occurrence_number++; - return this.last; - } - }, - - next_second: function next_second() { - return this.next_generic("BYSECOND", "SECONDLY", "second", "minute"); - }, - - increment_second: function increment_second(inc) { - return this.increment_generic(inc, "second", 60, "minute"); - }, - - next_minute: function next_minute() { - return this.next_generic("BYMINUTE", "MINUTELY", - "minute", "hour", "next_second"); - }, - - increment_minute: function increment_minute(inc) { - return this.increment_generic(inc, "minute", 60, "hour"); - }, - - next_hour: function next_hour() { - return this.next_generic("BYHOUR", "HOURLY", "hour", - "monthday", "next_minute"); - }, - - increment_hour: function increment_hour(inc) { - this.increment_generic(inc, "hour", 24, "monthday"); - }, - - next_day: function next_day() { - var has_by_day = ("BYDAY" in this.by_data); - var this_freq = (this.rule.freq == "DAILY"); - - if (this.next_hour() == 0) { - return 0; - } - - if (this_freq) { - this.increment_monthday(this.rule.interval); - } else { - this.increment_monthday(1); - } - - return 0; - }, - - next_week: function next_week() { - var end_of_data = 0; - - if (this.next_weekday_by_week() == 0) { - return end_of_data; - } - - if (this.has_by_data("BYWEEKNO")) { - var idx = ++this.by_indices.BYWEEKNO; - - if (this.by_indices.BYWEEKNO == this.by_data.BYWEEKNO.length) { - this.by_indices.BYWEEKNO = 0; - end_of_data = 1; - } - - // HACK should be first month of the year - this.last.month = 1; - this.last.day = 1; - - var week_no = this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO]; - - this.last.day += 7 * week_no; - - if (end_of_data) { - this.increment_year(1); - } - } else { - // Jump to the next week - this.increment_monthday(7 * this.rule.interval); - } - - return end_of_data; - }, - - /** - * normalize each by day rule for a given year/month. - * Takes into account ordering and negative rules - * - * @param {Numeric} year current year. - * @param {Numeric} month current month. - * @param {Array} rules array of rules. - * - * @return {Array} sorted and normalized rules. - * Negative rules will be expanded to their - * correct positive values for easier processing. - */ - normalizeByMonthDayRules: function(year, month, rules) { - var daysInMonth = ICAL.Time.daysInMonth(month, year); - - // XXX: This is probably bad for performance to allocate - // a new array for each month we scan, if possible - // we should try to optimize this... - var newRules = []; - - var ruleIdx = 0; - var len = rules.length; - var rule; - - for (; ruleIdx < len; ruleIdx++) { - rule = rules[ruleIdx]; - - // if this rule falls outside of given - // month discard it. - if (Math.abs(rule) > daysInMonth) { - continue; - } - - // negative case - if (rule < 0) { - // we add (not subtract its a negative number) - // one from the rule because 1 === last day of month - rule = daysInMonth + (rule + 1); - } else if (rule === 0) { - // skip zero its invalid. - continue; - } - - // only add unique items... - if (newRules.indexOf(rule) === -1) { - newRules.push(rule); - } - - } - - // unique and sort - return newRules.sort(function(a,b){return a - b}); - }, - - /** - * NOTES: - * We are given a list of dates in the month (BYMONTHDAY) (23, etc..) - * Also we are given a list of days (BYDAY) (MO, 2SU, etc..) when - * both conditions match a given date (this.last.day) iteration stops. - * - * @param {Boolean} [isInit] when given true will not - * increment the current day (this.last). - */ - _byDayAndMonthDay: function(isInit) { - var byMonthDay; // setup in initMonth - var byDay = this.by_data.BYDAY; - - var date; - var dateIdx = 0; - var dateLen; // setup in initMonth - var dayLen = byDay.length; - - // we are not valid by default - var dataIsValid = 0; - - var daysInMonth; - var self = this; - // we need a copy of this, because a DateTime gets normalized - // automatically if the day is out of range. At some points we - // set the last day to 0 to start counting. - var lastDay = this.last.day; - - function initMonth() { - daysInMonth = ICAL.Time.daysInMonth( - self.last.month, self.last.year - ); - - byMonthDay = self.normalizeByMonthDayRules( - self.last.year, - self.last.month, - self.by_data.BYMONTHDAY - ); - - dateLen = byMonthDay.length; - - // For the case of more than one occurrence in one month - // we have to be sure to start searching after the last - // found date or at the last BYMONTHDAY. - while (byMonthDay[dateIdx] <= lastDay && dateIdx < dateLen - 1) { - dateIdx++; - } - } - - function nextMonth() { - // since the day is incremented at the start - // of the loop below, we need to start at 0 - lastDay = 0; - self.increment_month(); - dateIdx = 0; - initMonth(); - } - - initMonth(); - - // should come after initMonth - if (isInit) { - lastDay -= 1; - } - - while (!dataIsValid) { - // increment the current date. This is really - // important otherwise we may fall into the infinite - // loop trap. The initial date takes care of the case - // where the current date is the date we are looking - // for. - date = lastDay + 1; - - if (date > daysInMonth) { - nextMonth(); - continue; - } - - // find next date - var next = byMonthDay[dateIdx++]; - - // this logic is dependant on the BYMONTHDAYS - // being in order (which is done by #normalizeByMonthDayRules) - if (next >= date) { - // if the next month day is in the future jump to it. - lastDay = next; - } else { - // in this case the 'next' monthday has past - // we must move to the month. - nextMonth(); - continue; - } - - // Now we can loop through the day rules to see - // if one matches the current month date. - for (var dayIdx = 0; dayIdx < dayLen; dayIdx++) { - var parts = this.ruleDayOfWeek(byDay[dayIdx]); - var pos = parts[0]; - var dow = parts[1]; - - this.last.day = lastDay; - if (this.last.isNthWeekDay(dow, pos)) { - // when we find the valid one we can mark - // the conditions as met and break the loop. - // (Because we have this condition above - // it will also break the parent loop). - dataIsValid = 1; - break; - } - } - - // Its completely possible that the combination - // cannot be matched in the current month. - // When we reach the end of possible combinations - // in the current month we iterate to the next one. - // since dateIdx is incremented right after getting - // "next", we don't need dateLen -1 here. - if (!dataIsValid && dateIdx === dateLen) { - nextMonth(); - continue; - } - } - - return dataIsValid; - }, - - next_month: function next_month() { - var this_freq = (this.rule.freq == "MONTHLY"); - var data_valid = 1; - - if (this.next_hour() == 0) { - return data_valid; - } - - if (this.has_by_data("BYDAY") && this.has_by_data("BYMONTHDAY")) { - data_valid = this._byDayAndMonthDay(); - } else if (this.has_by_data("BYDAY")) { - var daysInMonth = ICAL.Time.daysInMonth(this.last.month, this.last.year); - var setpos = 0; - - if (this.has_by_data("BYSETPOS")) { - var last_day = this.last.day; - for (var day = 1; day <= daysInMonth; day++) { - this.last.day = day; - if (this.is_day_in_byday(this.last) && day <= last_day) { - setpos++; - } - } - this.last.day = last_day; - } - - for (var day = this.last.day + 1; day <= daysInMonth; day++) { - this.last.day = day; - - if (this.is_day_in_byday(this.last)) { - if (!this.has_by_data("BYSETPOS") || - this.check_set_position(++setpos) || - this.check_set_position(setpos - this.by_data.BYSETPOS.length - 1)) { - - data_valid = 1; - break; - } - } - } - - if (day > daysInMonth) { - this.last.day = 1; - this.increment_month(); - - if (this.is_day_in_byday(this.last)) { - if (!this.has_by_data("BYSETPOS") || this.check_set_position(1)) { - data_valid = 1; - } - } else { - data_valid = 0; - } - } - } else if (this.has_by_data("BYMONTHDAY")) { - this.by_indices.BYMONTHDAY++; - - if (this.by_indices.BYMONTHDAY >= this.by_data.BYMONTHDAY.length) { - this.by_indices.BYMONTHDAY = 0; - this.increment_month(); - } - - var daysInMonth = ICAL.Time.daysInMonth(this.last.month, this.last.year); - - var day = this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY]; - - if (day < 0) { - day = daysInMonth + day + 1; - } - - if (day > daysInMonth) { - this.last.day = 1; - data_valid = this.is_day_in_byday(this.last); - } else { - this.last.day = day; - } - - } else { - this.last.day = this.by_data.BYMONTHDAY[0]; - this.increment_month(); - var daysInMonth = ICAL.Time.daysInMonth(this.last.month, this.last.year); - this.last.day = Math.min(this.last.day, daysInMonth); - } - - return data_valid; - }, - - next_weekday_by_week: function next_weekday_by_week() { - var end_of_data = 0; - - if (this.next_hour() == 0) { - return end_of_data; - } - - if (!this.has_by_data("BYDAY")) { - return 1; - } - - for (;;) { - var tt = new ICAL.Time(); - this.by_indices.BYDAY++; - - if (this.by_indices.BYDAY == Object.keys(this.by_data.BYDAY).length) { - this.by_indices.BYDAY = 0; - end_of_data = 1; - } - - var coded_day = this.by_data.BYDAY[this.by_indices.BYDAY]; - var parts = this.ruleDayOfWeek(coded_day); - var dow = parts[1]; - - dow -= this.rule.wkst; - - if (dow < 0) { - dow += 7; - } - - tt.year = this.last.year; - tt.month = this.last.month; - tt.day = this.last.day; - - var startOfWeek = tt.startDoyWeek(this.rule.wkst); - - if (dow + startOfWeek < 1) { - // The selected date is in the previous year - if (!end_of_data) { - continue; - } - } - - var next = ICAL.Time.fromDayOfYear(startOfWeek + dow, - this.last.year); - - /** - * The normalization horrors below are due to - * the fact that when the year/month/day changes - * it can effect the other operations that come after. - */ - this.last.year = next.year; - this.last.month = next.month; - this.last.day = next.day; - - return end_of_data; - } - }, - - next_year: function next_year() { - - if (this.next_hour() == 0) { - return 0; - } - - if (++this.days_index == this.days.length) { - this.days_index = 0; - do { - this.increment_year(this.rule.interval); - this.expand_year_days(this.last.year); - } while (this.days.length == 0); - } - - var next = ICAL.Time.fromDayOfYear(this.days[this.days_index], - this.last.year); - - this.last.day = next.day; - this.last.month = next.month; - - return 1; - }, - - ruleDayOfWeek: function ruleDayOfWeek(dow) { - var matches = dow.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/); - if (matches) { - var pos = parseInt(matches[1] || 0, 10); - dow = ICAL.Recur.icalDayToNumericDay(matches[2]); - return [pos, dow]; - } else { - return [0, 0]; - } - }, - - next_generic: function next_generic(aRuleType, aInterval, aDateAttr, - aFollowingAttr, aPreviousIncr) { - var has_by_rule = (aRuleType in this.by_data); - var this_freq = (this.rule.freq == aInterval); - var end_of_data = 0; - - if (aPreviousIncr && this[aPreviousIncr]() == 0) { - return end_of_data; - } - - if (has_by_rule) { - this.by_indices[aRuleType]++; - var idx = this.by_indices[aRuleType]; - var dta = this.by_data[aRuleType]; - - if (this.by_indices[aRuleType] == dta.length) { - this.by_indices[aRuleType] = 0; - end_of_data = 1; - } - this.last[aDateAttr] = dta[this.by_indices[aRuleType]]; - } else if (this_freq) { - this["increment_" + aDateAttr](this.rule.interval); - } - - if (has_by_rule && end_of_data && this_freq) { - this["increment_" + aFollowingAttr](1); - } - - return end_of_data; - }, - - increment_monthday: function increment_monthday(inc) { - for (var i = 0; i < inc; i++) { - var daysInMonth = ICAL.Time.daysInMonth(this.last.month, this.last.year); - this.last.day++; - - if (this.last.day > daysInMonth) { - this.last.day -= daysInMonth; - this.increment_month(); - } - } - }, - - increment_month: function increment_month() { - this.last.day = 1; - if (this.has_by_data("BYMONTH")) { - this.by_indices.BYMONTH++; - - if (this.by_indices.BYMONTH == this.by_data.BYMONTH.length) { - this.by_indices.BYMONTH = 0; - this.increment_year(1); - } - - this.last.month = this.by_data.BYMONTH[this.by_indices.BYMONTH]; - } else { - if (this.rule.freq == "MONTHLY") { - this.last.month += this.rule.interval; - } else { - this.last.month++; - } - - this.last.month--; - var years = ICAL.helpers.trunc(this.last.month / 12); - this.last.month %= 12; - this.last.month++; - - if (years != 0) { - this.increment_year(years); - } - } - }, - - increment_year: function increment_year(inc) { - this.last.year += inc; - }, - - increment_generic: function increment_generic(inc, aDateAttr, - aFactor, aNextIncrement) { - this.last[aDateAttr] += inc; - var nextunit = ICAL.helpers.trunc(this.last[aDateAttr] / aFactor); - this.last[aDateAttr] %= aFactor; - if (nextunit != 0) { - this["increment_" + aNextIncrement](nextunit); - } - }, - - has_by_data: function has_by_data(aRuleType) { - return (aRuleType in this.rule.parts); - }, - - expand_year_days: function expand_year_days(aYear) { - var t = new ICAL.Time(); - this.days = []; - - // We need our own copy with a few keys set - var parts = {}; - var rules = ["BYDAY", "BYWEEKNO", "BYMONTHDAY", "BYMONTH", "BYYEARDAY"]; - for (var p in rules) { - var part = rules[p]; - if (part in this.rule.parts) { - parts[part] = this.rule.parts[part]; - } - } - - if ("BYMONTH" in parts && "BYWEEKNO" in parts) { - var valid = 1; - var validWeeks = {}; - t.year = aYear; - t.isDate = true; - - for (var monthIdx = 0; monthIdx < this.by_data.BYMONTH.length; monthIdx++) { - var month = this.by_data.BYMONTH[monthIdx]; - t.month = month; - t.day = 1; - var first_week = t.weekNumber(this.rule.wkst); - t.day = ICAL.Time.daysInMonth(month, aYear); - var last_week = t.weekNumber(this.rule.wkst); - for (monthIdx = first_week; monthIdx < last_week; monthIdx++) { - validWeeks[monthIdx] = 1; - } - } - - for (var weekIdx = 0; weekIdx < this.by_data.BYWEEKNO.length && valid; weekIdx++) { - var weekno = this.by_data.BYWEEKNO[weekIdx]; - if (weekno < 52) { - valid &= validWeeks[weekIdx]; - } else { - valid = 0; - } - } - - if (valid) { - delete parts.BYMONTH; - } else { - delete parts.BYWEEKNO; - } - } - - var partCount = Object.keys(parts).length; - - if (partCount == 0) { - var t = this.dtstart.clone(); - t.year = this.last.year; - this.days.push(t.dayOfYear()); - } else if (partCount == 1 && "BYMONTH" in parts) { - for (var monthkey in this.by_data.BYMONTH) { - var t2 = this.dtstart.clone(); - t2.year = aYear; - t2.month = this.by_data.BYMONTH[monthkey]; - t2.isDate = true; - this.days.push(t2.dayOfYear()); - } - } else if (partCount == 1 && "BYMONTHDAY" in parts) { - for (var monthdaykey in this.by_data.BYMONTHDAY) { - var t2 = this.dtstart.clone(); - t2.day = this.by_data.BYMONTHDAY[monthdaykey]; - t2.year = aYear; - t2.isDate = true; - this.days.push(t2.dayOfYear()); - } - } else if (partCount == 2 && - "BYMONTHDAY" in parts && - "BYMONTH" in parts) { - for (var monthkey in this.by_data.BYMONTH) { - for (var monthdaykey in this.by_data.BYMONTHDAY) { - t.day = this.by_data.BYMONTHDAY[monthdaykey]; - t.month = this.by_data.BYMONTH[monthkey]; - t.year = aYear; - t.isDate = true; - - this.days.push(t.dayOfYear()); - } - } - } else if (partCount == 1 && "BYWEEKNO" in parts) { - // TODO unimplemented in libical - } else if (partCount == 2 && - "BYWEEKNO" in parts && - "BYMONTHDAY" in parts) { - // TODO unimplemented in libical - } else if (partCount == 1 && "BYDAY" in parts) { - this.days = this.days.concat(this.expand_by_day(aYear)); - } else if (partCount == 2 && "BYDAY" in parts && "BYMONTH" in parts) { - for (var monthkey in this.by_data.BYMONTH) { - month = this.by_data.BYMONTH[monthkey]; - var daysInMonth = ICAL.Time.daysInMonth(month, aYear); - - t.year = aYear; - t.month = this.by_data.BYMONTH[monthkey]; - t.day = 1; - t.isDate = true; - - var first_dow = t.dayOfWeek(); - var doy_offset = t.dayOfYear() - 1; - - t.day = daysInMonth; - var last_dow = t.dayOfWeek(); - - if (this.has_by_data("BYSETPOS")) { - var set_pos_counter = 0; - var by_month_day = []; - for (var day = 1; day <= daysInMonth; day++) { - t.day = day; - if (this.is_day_in_byday(t)) { - by_month_day.push(day); - } - } - - for (var spIndex = 0; spIndex < by_month_day.length; spIndex++) { - if (this.check_set_position(spIndex + 1) || - this.check_set_position(spIndex - by_month_day.length)) { - this.days.push(doy_offset + by_month_day[spIndex]); - } - } - } else { - for (var daycodedkey in this.by_data.BYDAY) { - //TODO: This should return dates in order of occurrence - // (1,2,3, etc...) instead of by weekday (su, mo, etc..) - var coded_day = this.by_data.BYDAY[daycodedkey]; - var parts = this.ruleDayOfWeek(coded_day); - var pos = parts[0]; - var dow = parts[1]; - var month_day; - - var first_matching_day = ((dow + 7 - first_dow) % 7) + 1; - var last_matching_day = daysInMonth - ((last_dow + 7 - dow) % 7); - - if (pos == 0) { - for (var day = first_matching_day; day <= daysInMonth; day += 7) { - this.days.push(doy_offset + day); - } - } else if (pos > 0) { - month_day = first_matching_day + (pos - 1) * 7; - - if (month_day <= daysInMonth) { - this.days.push(doy_offset + month_day); - } - } else { - month_day = last_matching_day + (pos + 1) * 7; - - if (month_day > 0) { - this.days.push(doy_offset + month_day); - } - } - } - } - } - } else if (partCount == 2 && "BYDAY" in parts && "BYMONTHDAY" in parts) { - var expandedDays = this.expand_by_day(aYear); - - for (var daykey in expandedDays) { - var day = expandedDays[daykey]; - var tt = ICAL.Time.fromDayOfYear(day, aYear); - if (this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) { - this.days.push(day); - } - } - } else if (partCount == 3 && - "BYDAY" in parts && - "BYMONTHDAY" in parts && - "BYMONTH" in parts) { - var expandedDays = this.expand_by_day(aYear); - - for (var daykey in expandedDays) { - var day = expandedDays[daykey]; - var tt = ICAL.Time.fromDayOfYear(day, aYear); - - if (this.by_data.BYMONTH.indexOf(tt.month) >= 0 && - this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) { - this.days.push(day); - } - } - } else if (partCount == 2 && "BYDAY" in parts && "BYWEEKNO" in parts) { - var expandedDays = this.expand_by_day(aYear); - - for (var daykey in expandedDays) { - var day = expandedDays[daykey]; - var tt = ICAL.Time.fromDayOfYear(day, aYear); - var weekno = tt.weekNumber(this.rule.wkst); - - if (this.by_data.BYWEEKNO.indexOf(weekno)) { - this.days.push(day); - } - } - } else if (partCount == 3 && - "BYDAY" in parts && - "BYWEEKNO" in parts && - "BYMONTHDAY" in parts) { - // TODO unimplemted in libical - } else if (partCount == 1 && "BYYEARDAY" in parts) { - this.days = this.days.concat(this.by_data.BYYEARDAY); - } else { - this.days = []; - } - return 0; - }, - - expand_by_day: function expand_by_day(aYear) { - - var days_list = []; - var tmp = this.last.clone(); - - tmp.year = aYear; - tmp.month = 1; - tmp.day = 1; - tmp.isDate = true; - - var start_dow = tmp.dayOfWeek(); - - tmp.month = 12; - tmp.day = 31; - tmp.isDate = true; - - var end_dow = tmp.dayOfWeek(); - var end_year_day = tmp.dayOfYear(); - - for (var daykey in this.by_data.BYDAY) { - var day = this.by_data.BYDAY[daykey]; - var parts = this.ruleDayOfWeek(day); - var pos = parts[0]; - var dow = parts[1]; - - if (pos == 0) { - var tmp_start_doy = ((dow + 7 - start_dow) % 7) + 1; - - for (var doy = tmp_start_doy; doy <= end_year_day; doy += 7) { - days_list.push(doy); - } - - } else if (pos > 0) { - var first; - if (dow >= start_dow) { - first = dow - start_dow + 1; - } else { - first = dow - start_dow + 8; - } - - days_list.push(first + (pos - 1) * 7); - } else { - var last; - pos = -pos; - - if (dow <= end_dow) { - last = end_year_day - end_dow + dow; - } else { - last = end_year_day - end_dow + dow - 7; - } - - days_list.push(last - (pos - 1) * 7); - } - } - return days_list; - }, - - is_day_in_byday: function is_day_in_byday(tt) { - for (var daykey in this.by_data.BYDAY) { - var day = this.by_data.BYDAY[daykey]; - var parts = this.ruleDayOfWeek(day); - var pos = parts[0]; - var dow = parts[1]; - var this_dow = tt.dayOfWeek(); - - if ((pos == 0 && dow == this_dow) || - (tt.nthWeekDay(dow, pos) == tt.day)) { - return 1; - } - } - - return 0; - }, - - /** - * Checks if given value is in BYSETPOS. - * - * @param {Numeric} aPos position to check for. - * @return {Boolean} false unless BYSETPOS rules exist - * and the given value is present in rules. - */ - check_set_position: function check_set_position(aPos) { - if (this.has_by_data('BYSETPOS')) { - var idx = this.by_data.BYSETPOS.indexOf(aPos); - // negative numbers are not false-y - return idx !== -1; - } - return false; - }, - - sort_byday_rules: function icalrecur_sort_byday_rules(aRules, aWeekStart) { - for (var i = 0; i < aRules.length; i++) { - for (var j = 0; j < i; j++) { - var one = this.ruleDayOfWeek(aRules[j])[1]; - var two = this.ruleDayOfWeek(aRules[i])[1]; - one -= aWeekStart; - two -= aWeekStart; - if (one < 0) one += 7; - if (two < 0) two += 7; - - if (one > two) { - var tmp = aRules[i]; - aRules[i] = aRules[j]; - aRules[j] = tmp; - } - } - } - }, - - check_contract_restriction: function check_contract_restriction(aRuleType, v) { - var indexMapValue = icalrecur_iterator._indexMap[aRuleType]; - var ruleMapValue = icalrecur_iterator._expandMap[this.rule.freq][indexMapValue]; - var pass = false; - - if (aRuleType in this.by_data && - ruleMapValue == icalrecur_iterator.CONTRACT) { - - var ruleType = this.by_data[aRuleType]; - - for (var bydatakey in ruleType) { - if (ruleType[bydatakey] == v) { - pass = true; - break; - } - } - } else { - // Not a contracting byrule or has no data, test passes - pass = true; - } - return pass; - }, - - check_contracting_rules: function check_contracting_rules() { - var dow = this.last.dayOfWeek(); - var weekNo = this.last.weekNumber(this.rule.wkst); - var doy = this.last.dayOfYear(); - - return (this.check_contract_restriction("BYSECOND", this.last.second) && - this.check_contract_restriction("BYMINUTE", this.last.minute) && - this.check_contract_restriction("BYHOUR", this.last.hour) && - this.check_contract_restriction("BYDAY", ICAL.Recur.numericDayToIcalDay(dow)) && - this.check_contract_restriction("BYWEEKNO", weekNo) && - this.check_contract_restriction("BYMONTHDAY", this.last.day) && - this.check_contract_restriction("BYMONTH", this.last.month) && - this.check_contract_restriction("BYYEARDAY", doy)); - }, - - setup_defaults: function setup_defaults(aRuleType, req, deftime) { - var indexMapValue = icalrecur_iterator._indexMap[aRuleType]; - var ruleMapValue = icalrecur_iterator._expandMap[this.rule.freq][indexMapValue]; - - if (ruleMapValue != icalrecur_iterator.CONTRACT) { - if (!(aRuleType in this.by_data)) { - this.by_data[aRuleType] = [deftime]; - } - if (this.rule.freq != req) { - return this.by_data[aRuleType][0]; - } - } - return deftime; - }, - - /** - * Convert iterator into a serialize-able object. - * Will preserve current iteration sequence to ensure - * the seamless continuation of the recurrence rule. - */ - toJSON: function() { - var result = Object.create(null); - - result.initialized = this.initialized; - result.rule = this.rule.toJSON(); - result.dtstart = this.dtstart.toJSON(); - result.by_data = this.by_data; - result.days = this.days; - result.last = this.last.toJSON(); - result.by_indices = this.by_indices; - result.occurrence_number = this.occurrence_number; - - return result; - } - - }; - - icalrecur_iterator._indexMap = { - "BYSECOND": 0, - "BYMINUTE": 1, - "BYHOUR": 2, - "BYDAY": 3, - "BYMONTHDAY": 4, - "BYYEARDAY": 5, - "BYWEEKNO": 6, - "BYMONTH": 7, - "BYSETPOS": 8 - }; - - icalrecur_iterator._expandMap = { - "SECONDLY": [1, 1, 1, 1, 1, 1, 1, 1], - "MINUTELY": [2, 1, 1, 1, 1, 1, 1, 1], - "HOURLY": [2, 2, 1, 1, 1, 1, 1, 1], - "DAILY": [2, 2, 2, 1, 1, 1, 1, 1], - "WEEKLY": [2, 2, 2, 2, 3, 3, 1, 1], - "MONTHLY": [2, 2, 2, 2, 2, 3, 3, 1], - "YEARLY": [2, 2, 2, 2, 2, 2, 2, 2] - }; - icalrecur_iterator.UNKNOWN = 0; - icalrecur_iterator.CONTRACT = 1; - icalrecur_iterator.EXPAND = 2; - icalrecur_iterator.ILLEGAL = 3; - - return icalrecur_iterator; - -}()); -ICAL.RecurExpansion = (function() { - function formatTime(item) { - return ICAL.helpers.formatClassType(item, ICAL.Time); - } - - function compareTime(a, b) { - return a.compare(b); - } - - function isRecurringComponent(comp) { - return comp.hasProperty('rdate') || - comp.hasProperty('rrule') || - comp.hasProperty('recurrence-id'); - } - - /** - * Primary class for expanding recurring rules. - * Can take multiple rrules, rdates, exdate(s) - * and iterate (in order) over each next occurrence. - * - * Once initialized this class can also be serialized - * saved and continue iteration from the last point. - * - * NOTE: it is intended that this class is to be used - * with ICAL.Event which handles recurrence exceptions. - * - * Options: - * - dtstart: (ICAL.Time) start time of event (required) - * - component: (ICAL.Component) component (required unless resuming) - * - * Examples: - * - * // assuming event is a parsed ical component - * var event; - * - * var expand = new ICAL.RecurExpansion({ - * component: event, - * start: event.getFirstPropertyValue('DTSTART') - * }); - * - * // remember there are infinite rules - * // so its a good idea to limit the scope - * // of the iterations then resume later on. - * - * // next is always an ICAL.Time or null - * var next; - * - * while(someCondition && (next = expand.next())) { - * // do something with next - * } - * - * // save instance for later - * var json = JSON.stringify(expand); - * - * //... - * - * // NOTE: if the component's properties have - * // changed you will need to rebuild the - * // class and start over. This only works - * // when the component's recurrence info is the same. - * var expand = new ICAL.RecurExpansion(JSON.parse(json)); - * - * - * @param {Object} options see options block. - */ - function RecurExpansion(options) { - this.ruleDates = []; - this.exDates = []; - this.fromData(options); - } - - RecurExpansion.prototype = { - - /** - * True when iteration is fully completed. - */ - complete: false, - - /** - * Array of rrule iterators. - * - * @type Array[ICAL.RecurIterator] - * @private - */ - ruleIterators: null, - - /** - * Array of rdate instances. - * - * @type Array[ICAL.Time] - * @private - */ - ruleDates: null, - - /** - * Array of exdate instances. - * - * @type Array[ICAL.Time] - * @private - */ - exDates: null, - - /** - * Current position in ruleDates array. - * @type Numeric - * @private - */ - ruleDateInc: 0, - - /** - * Current position in exDates array - * @type Numeric - * @private - */ - exDateInc: 0, - - /** - * Current negative date. - * - * @type ICAL.Time - * @private - */ - exDate: null, - - /** - * Current additional date. - * - * @type ICAL.Time - * @private - */ - ruleDate: null, - - /** - * Start date of recurring rules. - * - * @type ICAL.Time - */ - dtstart: null, - - /** - * Last expanded time - * - * @type ICAL.Time - */ - last: null, - - fromData: function(options) { - var start = ICAL.helpers.formatClassType(options.dtstart, ICAL.Time); - - if (!start) { - throw new Error('.dtstart (ICAL.Time) must be given'); - } else { - this.dtstart = start; - } - - if (options.component) { - this._init(options.component); - } else { - this.last = formatTime(options.last); - - this.ruleIterators = options.ruleIterators.map(function(item) { - return ICAL.helpers.formatClassType(item, ICAL.RecurIterator); - }); - - this.ruleDateInc = options.ruleDateInc; - this.exDateInc = options.exDateInc; - - if (options.ruleDates) { - this.ruleDates = options.ruleDates.map(formatTime); - this.ruleDate = this.ruleDates[this.ruleDateInc]; - } - - if (options.exDates) { - this.exDates = options.exDates.map(formatTime); - this.exDate = this.exDates[this.exDateInc]; - } - - if (typeof(options.complete) !== 'undefined') { - this.complete = options.complete; - } - } - }, - - next: function() { - var iter; - var ruleOfDay; - var next; - var compare; - - var maxTries = 500; - var currentTry = 0; - - while (true) { - if (currentTry++ > maxTries) { - throw new Error( - 'max tries have occured, rule may be impossible to forfill.' - ); - } - - next = this.ruleDate; - iter = this._nextRecurrenceIter(this.last); - - // no more matches - // because we increment the rule day or rule - // _after_ we choose a value this should be - // the only spot where we need to worry about the - // end of events. - if (!next && !iter) { - // there are no more iterators or rdates - this.complete = true; - break; - } - - // no next rule day or recurrence rule is first. - if (!next || (iter && next.compare(iter.last) > 0)) { - // must be cloned, recur will reuse the time element. - next = iter.last.clone(); - // move to next so we can continue - iter.next(); - } - - // if the ruleDate is still next increment it. - if (this.ruleDate === next) { - this._nextRuleDay(); - } - - this.last = next; - - // check the negative rules - if (this.exDate) { - compare = this.exDate.compare(this.last); - - if (compare < 0) { - this._nextExDay(); - } - - // if the current rule is excluded skip it. - if (compare === 0) { - this._nextExDay(); - continue; - } - } - - //XXX: The spec states that after we resolve the final - // list of dates we execute exdate this seems somewhat counter - // intuitive to what I have seen most servers do so for now - // I exclude based on the original date not the one that may - // have been modified by the exception. - return this.last; - } - }, - - /** - * Converts object into a serialize-able format. - */ - toJSON: function() { - function toJSON(item) { - return item.toJSON(); - } - - var result = Object.create(null); - result.ruleIterators = this.ruleIterators.map(toJSON); - - if (this.ruleDates) { - result.ruleDates = this.ruleDates.map(toJSON); - } - - if (this.exDates) { - result.exDates = this.exDates.map(toJSON); - } - - result.ruleDateInc = this.ruleDateInc; - result.exDateInc = this.exDateInc; - result.last = this.last.toJSON(); - result.dtstart = this.dtstart.toJSON(); - result.complete = this.complete; - - return result; - }, - - - _extractDates: function(component, property) { - var result = []; - var props = component.getAllProperties(property); - var len = props.length; - var i = 0; - var prop; - - var idx; - - for (; i < len; i++) { - props[i].getValues().forEach(function(prop) { - idx = ICAL.helpers.binsearchInsert( - result, - prop, - compareTime - ); - - // ordered insert - result.splice(idx, 0, prop); - }); - } - - return result; - }, - - _init: function(component) { - this.ruleIterators = []; - - this.last = this.dtstart.clone(); - - // to provide api consistency non-recurring - // events can also use the iterator though it will - // only return a single time. - if (!isRecurringComponent(component)) { - this.ruleDate = this.last.clone(); - this.complete = true; - return; - } - - if (component.hasProperty('rdate')) { - this.ruleDates = this._extractDates(component, 'rdate'); - - // special hack for cases where first rdate is prior - // to the start date. We only check for the first rdate. - // This is mostly for google's crazy recurring date logic - // (contacts birthdays). - if ((this.ruleDates[0]) && - (this.ruleDates[0].compare(this.dtstart) < 0)) { - - this.ruleDateInc = 0; - this.last = this.ruleDates[0].clone(); - } else { - this.ruleDateInc = ICAL.helpers.binsearchInsert( - this.ruleDates, - this.last, - compareTime - ); - } - - this.ruleDate = this.ruleDates[this.ruleDateInc]; - } - - if (component.hasProperty('rrule')) { - var rules = component.getAllProperties('rrule'); - var i = 0; - var len = rules.length; - - var rule; - var iter; - - for (; i < len; i++) { - rule = rules[i].getFirstValue(); - iter = rule.iterator(this.dtstart); - this.ruleIterators.push(iter); - - // increment to the next occurrence so future - // calls to next return times beyond the initial iteration. - // XXX: I find this suspicious might be a bug? - iter.next(); - } - } - - if (component.hasProperty('exdate')) { - this.exDates = this._extractDates(component, 'exdate'); - // if we have a .last day we increment the index to beyond it. - this.exDateInc = ICAL.helpers.binsearchInsert( - this.exDates, - this.last, - compareTime - ); - - this.exDate = this.exDates[this.exDateInc]; - } - }, - - _nextExDay: function() { - this.exDate = this.exDates[++this.exDateInc]; - }, - - _nextRuleDay: function() { - this.ruleDate = this.ruleDates[++this.ruleDateInc]; - }, - - /** - * Find and return the recurrence rule with the most - * recent event and return it. - * - * @return {Object} iterator. - */ - _nextRecurrenceIter: function() { - var iters = this.ruleIterators; - - if (iters.length === 0) { - return null; - } - - var len = iters.length; - var iter; - var iterTime; - var iterIdx = 0; - var chosenIter; - - // loop through each iterator - for (; iterIdx < len; iterIdx++) { - iter = iters[iterIdx]; - iterTime = iter.last; - - // if iteration is complete - // then we must exclude it from - // the search and remove it. - if (iter.completed) { - len--; - if (iterIdx !== 0) { - iterIdx--; - } - iters.splice(iterIdx, 1); - continue; - } - - // find the most recent possible choice - if (!chosenIter || chosenIter.last.compare(iterTime) > 0) { - // that iterator is saved - chosenIter = iter; - } - } - - // the chosen iterator is returned but not mutated - // this iterator contains the most recent event. - return chosenIter; - } - - }; - - return RecurExpansion; - -}()); -ICAL.Event = (function() { - - function compareRangeException(a, b) { - if (a[0] > b[0]) return 1; - if (b[0] > a[0]) return -1; - return 0; - } - - function Event(component, options) { - if (!(component instanceof ICAL.Component)) { - options = component; - component = null; - } - - if (component) { - this.component = component; - } else { - this.component = new ICAL.Component('vevent'); - } - - this._rangeExceptionCache = Object.create(null); - this.exceptions = Object.create(null); - this.rangeExceptions = []; - - if (options && options.strictExceptions) { - this.strictExceptions = options.strictExceptions; - } - - if (options && options.exceptions) { - options.exceptions.forEach(this.relateException, this); - } - } - - Event.prototype = { - - THISANDFUTURE: 'THISANDFUTURE', - - /** - * List of related event exceptions. - * - * @type Array[ICAL.Event] - */ - exceptions: null, - - /** - * When true will verify exceptions are related by their UUID. - * - * @type {Boolean} - */ - strictExceptions: false, - - /** - * Relates a given event exception to this object. - * If the given component does not share the UID of - * this event it cannot be related and will throw an - * exception. - * - * If this component is an exception it cannot have other - * exceptions related to it. - * - * @param {ICAL.Component|ICAL.Event} obj component or event. - */ - relateException: function(obj) { - if (this.isRecurrenceException()) { - throw new Error('cannot relate exception to exceptions'); - } - - if (obj instanceof ICAL.Component) { - obj = new ICAL.Event(obj); - } - - if (this.strictExceptions && obj.uid !== this.uid) { - throw new Error('attempted to relate unrelated exception'); - } - - var id = obj.recurrenceId.toString(); - - // we don't sort or manage exceptions directly - // here the recurrence expander handles that. - this.exceptions[id] = obj; - - // index RANGE=THISANDFUTURE exceptions so we can - // look them up later in getOccurrenceDetails. - if (obj.modifiesFuture()) { - var item = [ - obj.recurrenceId.toUnixTime(), id - ]; - - // we keep them sorted so we can find the nearest - // value later on... - var idx = ICAL.helpers.binsearchInsert( - this.rangeExceptions, - item, - compareRangeException - ); - - this.rangeExceptions.splice(idx, 0, item); - } - }, - - /** - * If this record is an exception and has the RANGE=THISANDFUTURE value. - * - * @return {Boolean} true when is exception with range. - */ - modifiesFuture: function() { - var range = this.component.getFirstPropertyValue('range'); - return range === this.THISANDFUTURE; - }, - - /** - * Finds the range exception nearest to the given date. - * - * @param {ICAL.Time} time usually an occurrence time of an event. - * @return {ICAL.Event|Null} the related event/exception or null. - */ - findRangeException: function(time) { - if (!this.rangeExceptions.length) { - return null; - } - - var utc = time.toUnixTime(); - var idx = ICAL.helpers.binsearchInsert( - this.rangeExceptions, - [utc], - compareRangeException - ); - - idx -= 1; - - // occurs before - if (idx < 0) { - return null; - } - - var rangeItem = this.rangeExceptions[idx]; - - // sanity check - if (utc < rangeItem[0]) { - return null; - } - - return rangeItem[1]; - }, - - /** - * Returns the occurrence details based on its start time. - * If the occurrence has an exception will return the details - * for that exception. - * - * NOTE: this method is intend to be used in conjunction - * with the #iterator method. - * - * @param {ICAL.Time} occurrence time occurrence. - */ - getOccurrenceDetails: function(occurrence) { - var id = occurrence.toString(); - var utcId = occurrence.convertToZone(ICAL.Timezone.utcTimezone).toString(); - var result = { - //XXX: Clone? - recurrenceId: occurrence - }; - - if (id in this.exceptions) { - var item = result.item = this.exceptions[id]; - result.startDate = item.startDate; - result.endDate = item.endDate; - result.item = item; - } else if (utcId in this.exceptions) { - var item = this.exceptions[utcId]; - result.startDate = item.startDate; - result.endDate = item.endDate; - result.item = item; - } else { - // range exceptions (RANGE=THISANDFUTURE) have a - // lower priority then direct exceptions but - // must be accounted for first. Their item is - // always the first exception with the range prop. - var rangeExceptionId = this.findRangeException( - occurrence - ); - - if (rangeExceptionId) { - var exception = this.exceptions[rangeExceptionId]; - - // range exception must modify standard time - // by the difference (if any) in start/end times. - result.item = exception; - - var startDiff = this._rangeExceptionCache[rangeExceptionId]; - - if (!startDiff) { - var original = exception.recurrenceId.clone(); - var newStart = exception.startDate.clone(); - - // zones must be same otherwise subtract may be incorrect. - original.zone = newStart.zone; - var startDiff = newStart.subtractDate(original); - - this._rangeExceptionCache[rangeExceptionId] = startDiff; - } - - var start = occurrence.clone(); - start.zone = exception.startDate.zone; - start.addDuration(startDiff); - - var end = start.clone(); - end.addDuration(exception.duration); - - result.startDate = start; - result.endDate = end; - } else { - // no range exception standard expansion - var end = occurrence.clone(); - end.addDuration(this.duration); - - result.endDate = end; - result.startDate = occurrence; - result.item = this; - } - } - - return result; - }, - - /** - * Builds a recur expansion instance for a specific - * point in time (defaults to startDate). - * - * @return {ICAL.RecurExpansion} expander object. - */ - iterator: function(startTime) { - return new ICAL.RecurExpansion({ - component: this.component, - dtstart: startTime || this.startDate - }); - }, - - isRecurring: function() { - var comp = this.component; - return comp.hasProperty('rrule') || comp.hasProperty('rdate'); - }, - - isRecurrenceException: function() { - return this.component.hasProperty('recurrence-id'); - }, - - /** - * Returns the types of recurrences this event may have. - * - * Returned as an object with the following possible keys: - * - * - YEARLY - * - MONTHLY - * - WEEKLY - * - DAILY - * - MINUTELY - * - SECONDLY - * - * @return {Object} object of recurrence flags. - */ - getRecurrenceTypes: function() { - var rules = this.component.getAllProperties('rrule'); - var i = 0; - var len = rules.length; - var result = Object.create(null); - - for (; i < len; i++) { - var value = rules[i].getFirstValue(); - result[value.freq] = true; - } - - return result; - }, - - get uid() { - return this._firstProp('uid'); - }, - - set uid(value) { - this._setProp('uid', value); - }, - - get startDate() { - return this._firstProp('dtstart'); - }, - - set startDate(value) { - this._setTime('dtstart', value); - }, - - get endDate() { - return this._firstProp('dtend'); - }, - - set endDate(value) { - this._setTime('dtend', value); - }, - - get duration() { - return this.endDate.subtractDate(this.startDate); - }, - - get location() { - return this._firstProp('location'); - }, - - set location(value) { - return this._setProp('location', value); - }, - - get attendees() { - //XXX: This is way lame we should have a better - // data structure for this later. - return this.component.getAllProperties('attendee'); - }, - - get summary() { - return this._firstProp('summary'); - }, - - set summary(value) { - this._setProp('summary', value); - }, - - get description() { - return this._firstProp('description'); - }, - - set description(value) { - this._setProp('description', value); - }, - - get organizer() { - return this._firstProp('organizer'); - }, - - set organizer(value) { - this._setProp('organizer', value); - }, - - get sequence() { - return this._firstProp('sequence'); - }, - - set sequence(value) { - this._setProp('sequence', value); - }, - - get recurrenceId() { - return this._firstProp('recurrence-id'); - }, - - set recurrenceId(value) { - this._setProp('recurrence-id', value); - }, - - /** - * set/update a time property's value. - * This will also update the TZID of the property. - * - * TODO: this method handles the case where we are switching - * from a known timezone to an implied timezone (one without TZID). - * This does _not_ handle the case of moving between a known - * (by TimezoneService) timezone to an unknown timezone... - * - * We will not add/remove/update the VTIMEZONE subcomponents - * leading to invalid ICAL data... - */ - _setTime: function(propName, time) { - var prop = this.component.getFirstProperty(propName); - - if (!prop) { - prop = new ICAL.Property(propName); - this.component.addProperty(prop); - } - - // utc and local don't get a tzid - if ( - time.zone === ICAL.Timezone.localTimezone || - time.zone === ICAL.Timezone.utcTimezone - ) { - // remove the tzid - prop.removeParameter('tzid'); - } else { - prop.setParameter('tzid', time.zone.tzid); - } - - prop.setValue(time); - }, - - _setProp: function(name, value) { - this.component.updatePropertyWithValue(name, value); - }, - - _firstProp: function(name) { - return this.component.getFirstPropertyValue(name); - }, - - toString: function() { - return this.component.toString(); - } - - }; - - return Event; - -}()); -ICAL.ComponentParser = (function() { - - /** - * Component parser initializer. - * - * Usage: - * - * var options = { - * // when false no events will be emitted for type - * parseEvent: true, - * parseTimezone: true - * }; - * - * var parser = new ICAL.ComponentParser(options); - * - * parser.onevent() { - * //... - * } - * - * // ontimezone, etc... - * - * parser.oncomplete = function() { - * - * }; - * - * parser.process(string | component); - * - * - * @param {Object} options component parser options. - */ - function ComponentParser(options) { - if (typeof(options) === 'undefined') { - options = {}; - } - - var key; - for (key in options) { - if (options.hasOwnProperty(key)) { - this[key] = options[key]; - } - } - } - - ComponentParser.prototype = { - - /** - * When true parse events - * - * @type Boolean - */ - parseEvent: true, - - /** - * when true parse timezones - * - * @type Boolean - */ - parseTimezone: true, - - - /* SAX like events here for reference */ - - /** - * Fired when parsing is complete - */ - oncomplete: function() {}, - - /** - * Fired if an error occurs during parsing. - * - * @param {Error} err details of error. - */ - onerror: function(err) {}, - - /** - * Fired when a top level component (vtimezone) is found - * - * @param {ICAL.Timezone} timezone object. - */ - ontimezone: function(component) {}, - - /* - * Fired when a top level component (VEVENT) is found. - * @param {ICAL.Event} component top level component. - */ - onevent: function(component) {}, - - /** - * Process a string or parse ical object. - * This function itself will return nothing but - * will start the parsing process. - * - * Events must be registered prior to calling this method. - * - * @param {String|Object} ical string or parsed ical object. - */ - process: function(ical) { - //TODO: this is sync now in the future we will have a incremental parser. - if (typeof(ical) === 'string') { - ical = ICAL.parse(ical); - } - - if (!(ical instanceof ICAL.Component)) { - ical = new ICAL.Component(ical); - } - - var components = ical.getAllSubcomponents(); - var i = 0; - var len = components.length; - var component; - - for (; i < len; i++) { - component = components[i]; - - switch (component.name) { - case 'vtimezone': - if (this.parseTimezone) { - var tzid = component.getFirstPropertyValue('tzid'); - if (tzid) { - this.ontimezone(new ICAL.Timezone({ - tzid: tzid, - component: component - })); - } - } - break; - case 'vevent': - if (this.parseEvent) { - this.onevent(new ICAL.Event(component)); - } - break; - default: - continue; - } - } - - //XXX: ideally we should do a "nextTick" here - // so in all cases this is actually async. - this.oncomplete(); - } - }; - - return ComponentParser; - -}()); -return ICAL; }()); diff --git a/js/vendor/ical.js/samples/blank_description.ics b/js/vendor/ical.js/samples/blank_description.ics deleted file mode 100644 index 568d7e03f..000000000 --- a/js/vendor/ical.js/samples/blank_description.ics +++ /dev/null @@ -1,51 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@gmail.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;TZID=America/Los_Angeles:20120630T060000 -DTEND;TZID=America/Los_Angeles:20120630T070000 -DTSTAMP:20120724T212411Z -UID:dn4vrfmfn5p05roahsopg57h48@google.com -CREATED:20120724T212411Z -DESCRIPTION: -LAST-MODIFIED:20120724T212411Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Really long event name thing -TRANSP:OPAQUE -BEGIN:VALARM -ACTION:EMAIL -DESCRIPTION:This is an event reminder -SUMMARY:Alarm notification -ATTENDEE:mailto:calmozilla1@gmail.com -TRIGGER:-P0DT0H30M0S -END:VALARM -BEGIN:VALARM -ACTION:DISPLAY -DESCRIPTION:This is an event reminder -TRIGGER:-P0DT0H30M0S -END:VALARM -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/blank_line_end.ics b/js/vendor/ical.js/samples/blank_line_end.ics deleted file mode 100644 index 2c397c274..000000000 --- a/js/vendor/ical.js/samples/blank_line_end.ics +++ /dev/null @@ -1,4 +0,0 @@ -BEGIN:VCALENDAR -END:VCALENDAR - - diff --git a/js/vendor/ical.js/samples/blank_line_mid.ics b/js/vendor/ical.js/samples/blank_line_mid.ics deleted file mode 100644 index 5e54e2e92..000000000 --- a/js/vendor/ical.js/samples/blank_line_mid.ics +++ /dev/null @@ -1,4 +0,0 @@ -BEGIN:VCALENDAR -COMMENT:This blank line is invalid - -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/daily_recur.ics b/js/vendor/ical.js/samples/daily_recur.ics deleted file mode 100644 index 998309848..000000000 --- a/js/vendor/ical.js/samples/daily_recur.ics +++ /dev/null @@ -1,52 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@gmail.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;TZID=America/Los_Angeles:20120801T050000 -DTEND;TZID=America/Los_Angeles:20120801T060000 -RRULE:FREQ=DAILY -DTSTAMP:20120803T221236Z -UID:tgh9qho17b07pk2n2ji3gluans@google.com -CREATED:20120803T221236Z -DESCRIPTION: -LAST-MODIFIED:20120803T221236Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Every day recurring -TRANSP:OPAQUE -BEGIN:VALARM -ACTION:EMAIL -DESCRIPTION:This is an event reminder -SUMMARY:Alarm notification -ATTENDEE:mailto:calmozilla1@gmail.com -TRIGGER:-P0DT0H30M0S -END:VALARM -BEGIN:VALARM -ACTION:DISPLAY -DESCRIPTION:This is an event reminder -TRIGGER:-P0DT0H30M0S -END:VALARM -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/day_long_recur_yearly.ics b/js/vendor/ical.js/samples/day_long_recur_yearly.ics deleted file mode 100644 index 0c0aeb56e..000000000 --- a/js/vendor/ical.js/samples/day_long_recur_yearly.ics +++ /dev/null @@ -1,52 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@gmail.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;VALUE=DATE:20120803 -DTEND;VALUE=DATE:20120804 -RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR -DTSTAMP:20120803T221306Z -UID:4pfh824gvims850j0gar361t04@google.com -CREATED:20120803T221306Z -DESCRIPTION: -LAST-MODIFIED:20120803T221306Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Day Long Event -TRANSP:TRANSPARENT -BEGIN:VALARM -ACTION:EMAIL -DESCRIPTION:This is an event reminder -SUMMARY:Alarm notification -ATTENDEE:mailto:calmozilla1@gmail.com -TRIGGER;VALUE=DATE-TIME:20120802T233000Z -END:VALARM -BEGIN:VALARM -ACTION:DISPLAY -DESCRIPTION:This is an event reminder -TRIGGER;VALUE=DATE-TIME:20120802T233000Z -END:VALARM -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/duration_instead_of_dtend.ics b/js/vendor/ical.js/samples/duration_instead_of_dtend.ics deleted file mode 100644 index 8f4fc274f..000000000 --- a/js/vendor/ical.js/samples/duration_instead_of_dtend.ics +++ /dev/null @@ -1,39 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@example.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;TZID=America/Los_Angeles:20120630T060000 -DURATION:P1D -DTSTAMP:20120724T212411Z -UID:dn4vrfmfn5p05roahsopg57h48@example.com -CREATED:20120724T212411Z -DESCRIPTION: -LAST-MODIFIED:20120724T212411Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Really long event name thing -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/forced_types.ics b/js/vendor/ical.js/samples/forced_types.ics deleted file mode 100644 index f213f0143..000000000 --- a/js/vendor/ical.js/samples/forced_types.ics +++ /dev/null @@ -1,50 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@gmail.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;VALUE=DATE:20120904 -DTEND;VALUE=DATE:20120905 -DTSTAMP:20120905T084734Z -UID:redgrb1l0aju5edm6h0s102eu4@google.com -CREATED:20120905T084734Z -DESCRIPTION: -LAST-MODIFIED:20120905T084734Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Event -TRANSP:TRANSPARENT -BEGIN:VALARM -ACTION:EMAIL -DESCRIPTION:This is an event reminder -SUMMARY:Alarm notification -ATTENDEE:mailto:calmozilla1@gmail.com -TRIGGER;VALUE=DATE-TIME:20120903T233000Z -END:VALARM -BEGIN:VALARM -ACTION:DISPLAY -DESCRIPTION:This is an event reminder -END:VALARM -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/google_birthday.ics b/js/vendor/ical.js/samples/google_birthday.ics deleted file mode 100644 index f9b7c9da1..000000000 --- a/js/vendor/ical.js/samples/google_birthday.ics +++ /dev/null @@ -1,90 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:Contacts' birthdays and events -X-WR-TIMEZONE:America/Los_Angeles -X-WR-CALDESC:Your contacts' birthdays and anniversaries -BEGIN:VEVENT -DTSTART;VALUE=DATE:20141210 -DTEND;VALUE=DATE:20141211 -RRULE:FREQ=DAILY;INTERVAL=1;COUNT=1 -RDATE:20131210Z -RDATE:20121210Z -DTSTAMP:20121207T183041Z -UID:2014_BIRTHDAY_79d389868f96182e@google.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Contac - ts;X-NUM-GUESTS=0:mailto:4dhmurjkc5hn8sq0ctp6utbg5pr2sor1dhimsp31e8n6errfct - m6abj3dtmg@virtual -CLASS:PUBLIC -CREATED:20121207T183041Z -LAST-MODIFIED:20121207T183041Z -SEQUENCE:1 -STATUS:CONFIRMED -SUMMARY:PErson #2's birthday -TRANSP:OPAQUE -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20121210 -DTEND;VALUE=DATE:20121211 -DTSTAMP:20121207T183041Z -UID:BIRTHDAY_79d389868f96182e@google.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Contac - ts;X-NUM-GUESTS=0:mailto:4dhmurjkc5hn8sq0ctp6utbg5pr2sor1dhimsp31e8n6errfct - m6abj3dtmg@virtual -X-GOOGLE-CALENDAR-CONTENT-ICON:https://calendar.google.com/googlecalendar/i - mages/cake.gif -X-GOOGLE-CALENDAR-CONTENT-DISPLAY:chip -RECURRENCE-ID;VALUE=DATE:20121210 -CLASS:PUBLIC -CREATED:20121207T183041Z -DESCRIPTION:Today is PErson #2's birthday! -LAST-MODIFIED:20121207T183041Z -SEQUENCE:1 -STATUS:CONFIRMED -SUMMARY:PErson #2's birthday -TRANSP:OPAQUE -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20131210 -DTEND;VALUE=DATE:20131211 -DTSTAMP:20121207T183041Z -UID:BIRTHDAY_79d389868f96182e@google.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Contac - ts;X-NUM-GUESTS=0:mailto:4dhmurjkc5hn8sq0ctp6utbg5pr2sor1dhimsp31e8n6errfct - m6abj3dtmg@virtual -X-GOOGLE-CALENDAR-CONTENT-ICON:https://calendar.google.com/googlecalendar/i - mages/cake.gif -X-GOOGLE-CALENDAR-CONTENT-DISPLAY:chip -RECURRENCE-ID;VALUE=DATE:20131210 -CLASS:PUBLIC -CREATED:20121207T183041Z -DESCRIPTION:Today is PErson #2's birthday! -LAST-MODIFIED:20121207T183041Z -SEQUENCE:1 -STATUS:CONFIRMED -SUMMARY:PErson #2's birthday -TRANSP:OPAQUE -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20141210 -DTEND;VALUE=DATE:20141211 -DTSTAMP:20121207T183041Z -UID:BIRTHDAY_79d389868f96182e@google.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Contac - ts;X-NUM-GUESTS=0:mailto:4dhmurjkc5hn8sq0ctp6utbg5pr2sor1dhimsp31e8n6errfct - m6abj3dtmg@virtual -X-GOOGLE-CALENDAR-CONTENT-ICON:https://calendar.google.com/googlecalendar/i - mages/cake.gif -X-GOOGLE-CALENDAR-CONTENT-DISPLAY:chip -RECURRENCE-ID;VALUE=DATE:20141210 -CLASS:PUBLIC -CREATED:20121207T183041Z -DESCRIPTION:Today is PErson #2's birthday! -LAST-MODIFIED:20121207T183041Z -SEQUENCE:1 -STATUS:CONFIRMED -SUMMARY:PErson #2's birthday -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/minimal.ics b/js/vendor/ical.js/samples/minimal.ics deleted file mode 100644 index b97d2acfe..000000000 --- a/js/vendor/ical.js/samples/minimal.ics +++ /dev/null @@ -1,39 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@gmail.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;TZID=America/Los_Angeles:20120630T060000 -DTEND;TZID=America/Los_Angeles:20120630T070000 -DTSTAMP:20120724T212411Z -UID:dn4vrfmfn5p05roahsopg57h48@google.com -CREATED:20120724T212411Z -DESCRIPTION: -LAST-MODIFIED:20120724T212411Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Really long event name thing -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/multiple_rrules.ics b/js/vendor/ical.js/samples/multiple_rrules.ics deleted file mode 100644 index 339c31863..000000000 --- a/js/vendor/ical.js/samples/multiple_rrules.ics +++ /dev/null @@ -1,45 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:Zimbra-Calendar-Provider -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -BEGIN:STANDARD -DTSTART:19710101T020000 -TZOFFSETTO:-0800 -TZOFFSETFROM:-0700 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=11;BYDAY=1SU -TZNAME:PST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19710101T020000 -TZOFFSETTO:-0700 -TZOFFSETFROM:-0800 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=2SU -TZNAME:PDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -UID:1334F9B7-6136-444E-A58D-472564C6AA73 -RRULE:FREQ=WEEKLY;UNTIL=20120730T065959Z -RRULE:FREQ=MONTHLY;BYDAY=SU;UNTIL=20120730T065959Z -SUMMARY:sahaja <> frashed -DESCRIPTION:weekly 1on1 -ATTENDEE;CN=James Lal;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS - -ACTION;RSVP=TRUE:mailto:jlal@mozilla.com -ORGANIZER;CN=Faramarz Rashed:mailto:frashed@mozilla.com -DTSTART;TZID=America/Los_Angeles:20120326T110000 -DTEND;TZID=America/Los_Angeles:20120326T113000 -STATUS:CONFIRMED -CLASS:PUBLIC -TRANSP:OPAQUE -LAST-MODIFIED:20120326T161522Z -DTSTAMP:20120730T165637Z -SEQUENCE:9 -BEGIN:VALARM -ACTION:DISPLAY -TRIGGER;RELATED=START:-PT5M -DESCRIPTION:Reminder -END:VALARM -END:VEVENT -END:VCALENDAR - diff --git a/js/vendor/ical.js/samples/only_dtstart_date.ics b/js/vendor/ical.js/samples/only_dtstart_date.ics deleted file mode 100644 index 37a32dd1a..000000000 --- a/js/vendor/ical.js/samples/only_dtstart_date.ics +++ /dev/null @@ -1,38 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@example.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;VALUE=DATE:20120630 -DTSTAMP:20120724T212411Z -UID:dn4vrfmfn5p05roahsopg57h48@example.com -CREATED:20120724T212411Z -DESCRIPTION: -LAST-MODIFIED:20120724T212411Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Really long event name thing -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/only_dtstart_time.ics b/js/vendor/ical.js/samples/only_dtstart_time.ics deleted file mode 100644 index fa6e9f689..000000000 --- a/js/vendor/ical.js/samples/only_dtstart_time.ics +++ /dev/null @@ -1,38 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -X-WR-CALNAME:calmozilla1@example.com -X-WR-TIMEZONE:America/Los_Angeles -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;TZID=America/Los_Angeles:20120630T060000 -DTSTAMP:20120724T212411Z -UID:dn4vrfmfn5p05roahsopg57h48@example.com -CREATED:20120724T212411Z -DESCRIPTION: -LAST-MODIFIED:20120724T212411Z -LOCATION: -SEQUENCE:0 -STATUS:CONFIRMED -SUMMARY:Really long event name thing -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR \ No newline at end of file diff --git a/js/vendor/ical.js/samples/parserv2.ics b/js/vendor/ical.js/samples/parserv2.ics deleted file mode 100644 index 11c830151..000000000 --- a/js/vendor/ical.js/samples/parserv2.ics +++ /dev/null @@ -1,45 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:Zimbra-Calendar-Provider -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -BEGIN:STANDARD -DTSTART:19710101T020000 -TZOFFSETTO:-0800 -TZOFFSETFROM:-0700 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11 -TZNAME:PST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19710101T020000 -TZOFFSETTO:-0700 -TZOFFSETFROM:-0800 -RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3 -TZNAME:PDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -UID:44c10eaa-db0b-4223-8653-cf2b63f26326 -RRULE:FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR -SUMMARY:Calendar -DESCRIPTION:desc -ATTENDEE;CN=XXX;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRU - E:mailto:foo@bar.com -ATTENDEE;CN=XXXX;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TR - UE:mailto:x@bar.com -ORGANIZER;CN=foobar:mailto:x@bar.com -DTSTART;TZID=America/Los_Angeles:20120911T103000 -DTEND;TZID=America/Los_Angeles:20120911T110000 -STATUS:CONFIRMED -CLASS:PUBLIC -TRANSP:OPAQUE -LAST-MODIFIED:20120911T184851Z -DTSTAMP:20120911T184851Z -SEQUENCE:1 -BEGIN:VALARM -ACTION:DISPLAY -TRIGGER;RELATED=START:-PT5M -DESCRIPTION:Reminder -END:VALARM -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/recur_instances.ics b/js/vendor/ical.js/samples/recur_instances.ics deleted file mode 100644 index b22da09a5..000000000 --- a/js/vendor/ical.js/samples/recur_instances.ics +++ /dev/null @@ -1,97 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:Zimbra-Calendar-Provider -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -BEGIN:STANDARD -DTSTART:19710101T020000 -TZOFFSETTO:-0800 -TZOFFSETFROM:-0700 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=11;BYDAY=1SU -TZNAME:PST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19710101T020000 -TZOFFSETTO:-0700 -TZOFFSETFROM:-0800 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=2SU -TZNAME:PDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE -X-INVALID-TIMEZONE:TRUE -END:VTIMEZONE -BEGIN:VEVENT -UID:623c13c0-6c2b-45d6-a12b-c33ad61c4868 -DESCRIPTION:IAM FOO -RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TU -SUMMARY:Crazy Event Thingy! -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Sahaja - Lal;X-NUM-GUESTS=0:mailto:calmozilla1@gmail.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=ja - mes@lightsofapollo.com;X-NUM-GUESTS=0:mailto:james@lightsofapollo.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=ia - m.revelation@gmail.com;X-NUM-GUESTS=0:mailto:iam.revelation@gmail.com -LOCATION:PLACE -ORGANIZER;CN=James Lal:mailto:jlal@mozilla.com -DTSTART;TZID=America/Los_Angeles:20121002T100000 -DTEND;TZID=America/Los_Angeles:20121002T103000 -STATUS:CONFIRMED -CLASS:PUBLIC -TRANSP:OPAQUE -LAST-MODIFIED:20120912T171506Z -DTSTAMP:20120912T171506Z -SEQUENCE:0 -RDATE;TZID=America/Los_Angeles:20121105T100000 -RDATE;TZID=America/Los_Angeles:20121110T100000,20121130T100000 -EXDATE;TZID=America/Los_Angeles:20130402T100000 -EXDATE;TZID=America/Los_Angeles:20121204T100000 -EXDATE;TZID=America/Los_Angeles:20130205T100000 -BEGIN:VALARM -ACTION:DISPLAY -TRIGGER;RELATED=START:-PT5M -DESCRIPTION:Reminder -END:VALARM -END:VEVENT -BEGIN:VEVENT -UID:623c13c0-6c2b-45d6-a12b-c33ad61c4868 -SUMMARY:Crazy Event Thingy! -DESCRIPTION:I HAZ CHANGED! -ORGANIZER;CN=James Lal:mailto:jlal@mozilla.com -DTSTART;TZID=America/Los_Angeles:20121002T150000 -DTEND;TZID=America/Los_Angeles:20121002T153000 -STATUS:CONFIRMED -CLASS:PUBLIC -TRANSP:OPAQUE -RECURRENCE-ID;TZID=America/Los_Angeles:20121002T100000 -LAST-MODIFIED:20120912T171540Z -DTSTAMP:20120912T171540Z -SEQUENCE:1 -BEGIN:VALARM -ACTION:DISPLAY -TRIGGER;RELATED=START:-PT5M -DESCRIPTION:Reminder -END:VALARM -END:VEVENT -BEGIN:VEVENT -UID:623c13c0-6c2b-45d6-a12b-c33ad61c4868 -SUMMARY:Crazy Event Thingy! -ORGANIZER;CN=James Lal:mailto:jlal@mozilla.com -DTSTART;TZID=America/Los_Angeles:20121106T200000 -DTEND;TZID=America/Los_Angeles:20121106T203000 -STATUS:CONFIRMED -CLASS:PUBLIC -TRANSP:OPAQUE -RECURRENCE-ID:20121105T180000Z -LAST-MODIFIED:20120912T171820Z -DTSTAMP:20120912T171820Z -SEQUENCE:1 -BEGIN:VALARM -ACTION:DISPLAY -TRIGGER;RELATED=START:-PT5M -DESCRIPTION:Reminder -END:VALARM -END:VEVENT -BEGIN:X-UNKNOWN -END:X-UNKNOWN -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/recur_instances_finite.ics b/js/vendor/ical.js/samples/recur_instances_finite.ics deleted file mode 100644 index e7dc481b8..000000000 --- a/js/vendor/ical.js/samples/recur_instances_finite.ics +++ /dev/null @@ -1,50 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:Zimbra-Calendar-Provider -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -BEGIN:STANDARD -DTSTART:19710101T020000 -TZOFFSETTO:-0800 -TZOFFSETFROM:-0700 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=11;BYDAY=1SU -TZNAME:PST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19710101T020000 -TZOFFSETTO:-0700 -TZOFFSETFROM:-0800 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=2SU -TZNAME:PDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -UID:623c13c0-6c2b-45d6-a12b-c33ad61c4868 -DESCRIPTION:IAM FOO -RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TU;UNTIL=20121231T100000 -SUMMARY:Crazy Event Thingy! -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Sahaja - Lal;X-NUM-GUESTS=0:mailto:calmozilla1@gmail.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=ja - mes@lightsofapollo.com;X-NUM-GUESTS=0:mailto:james@lightsofapollo.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=ia - m.revelation@gmail.com;X-NUM-GUESTS=0:mailto:iam.revelation@gmail.com -LOCATION:PLACE -ORGANIZER;CN=James Lal:mailto:jlal@mozilla.com -DTSTART;TZID=America/Los_Angeles:20121002T100000 -DTEND;TZID=America/Los_Angeles:20121002T103000 -STATUS:CONFIRMED -CLASS:PUBLIC -TRANSP:OPAQUE -LAST-MODIFIED:20120912T171506Z -DTSTAMP:20120912T171506Z -SEQUENCE:0 -RDATE;TZID=America/Los_Angeles:20121110T100000 -RDATE;TZID=America/Los_Angeles:20121105T100000 -BEGIN:VALARM -ACTION:DISPLAY -TRIGGER;RELATED=START:-PT5M -DESCRIPTION:Reminder -END:VALARM -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/timezones/America/Atikokan.ics b/js/vendor/ical.js/samples/timezones/America/Atikokan.ics deleted file mode 100644 index 6cb955e10..000000000 --- a/js/vendor/ical.js/samples/timezones/America/Atikokan.ics +++ /dev/null @@ -1,14 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//tzurl.org//NONSGML Olson 2012h//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America/Atikokan -X-LIC-LOCATION:America/Atikokan -BEGIN:STANDARD -TZOFFSETFROM:-0500 -TZOFFSETTO:-0500 -TZNAME:EST -DTSTART:19700101T000000 -END:STANDARD -END:VTIMEZONE -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/timezones/America/Denver.ics b/js/vendor/ical.js/samples/timezones/America/Denver.ics deleted file mode 100644 index 93636f24f..000000000 --- a/js/vendor/ical.js/samples/timezones/America/Denver.ics +++ /dev/null @@ -1,41 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//custom/thing -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America/Denver -BEGIN:DAYLIGHT -TZOFFSETFROM:-0700 -TZOFFSETTO:-0600 -TZNAME:MDT -DTSTART:20070311T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0600 -TZOFFSETTO:-0700 -TZNAME:MST -DTSTART:20071104T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -BEGIN:DAYLIGHT -TZOFFSETFROM:-0700 -TZOFFSETTO:-0600 -TZNAME:MDT -DTSTART:19180331T020000 -RDATE:20030406T020000 -RDATE:20040404T020000 -RDATE:20050403T020000 -RDATE:20060402T020000 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0600 -TZOFFSETTO:-0700 -TZNAME:MST -DTSTART:19181027T020000 -RDATE:20031026T020000 -RDATE:20041031T020000 -RDATE:20051030T020000 -RDATE:20061029T020000 -END:STANDARD -END:VTIMEZONE -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/timezones/America/Los_Angeles.ics b/js/vendor/ical.js/samples/timezones/America/Los_Angeles.ics deleted file mode 100644 index 907319826..000000000 --- a/js/vendor/ical.js/samples/timezones/America/Los_Angeles.ics +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//tzurl.org//NONSGML Olson 2012h//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America/Los_Angeles -X-LIC-LOCATION:America/Los_Angeles -BEGIN:DAYLIGHT -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/timezones/America/New_York.ics b/js/vendor/ical.js/samples/timezones/America/New_York.ics deleted file mode 100644 index 59e6633bc..000000000 --- a/js/vendor/ical.js/samples/timezones/America/New_York.ics +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//tzurl.org//NONSGML Olson 2012h//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America/New_York -X-LIC-LOCATION:America/New_York -BEGIN:DAYLIGHT -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_test.ics b/js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_test.ics deleted file mode 100644 index 99b8c4b54..000000000 --- a/js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_test.ics +++ /dev/null @@ -1,26 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//ical.js//NONSGML Makebelieve//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:Makebelieve/RDATE_as_date -X-LIC-LOCATION:Makebelieve/RDATE_as_date -BEGIN:STANDARD -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:RDATE_as_date_standard -DTSTART:19700101T020000 -RDATE:19700101T020000 -RDATE;VALUE=DATE:19800101 -RDATE:19900101T070000Z -END:STANDARD -BEGIN:DAYLIGHT -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:RDATE_as_date_daylight -DTSTART:19750101T020000 -RDATE:19750101T020000 -RDATE;VALUE=DATE:19850101 -RDATE:19950101T070000Z -END:DAYLIGHT -END:VTIMEZONE -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_utc_test.ics b/js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_utc_test.ics deleted file mode 100644 index 331cf2536..000000000 --- a/js/vendor/ical.js/samples/timezones/Makebelieve/RDATE_utc_test.ics +++ /dev/null @@ -1,26 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//ical.js//NONSGML Makebelieve//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:Makebelieve/RDATE_as_date_utc -X-LIC-LOCATION:Makebelieve/RDATE_as_date_utc -BEGIN:STANDARD -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:RDATE_as_date_utc_standard -DTSTART:19700101T020000Z -RDATE:19700101T020000 -RDATE;VALUE=DATE:19800101 -RDATE:19900101T070000Z -END:STANDARD -BEGIN:DAYLIGHT -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:RDATE_as_date_utc_daylight -DTSTART:19750101T020000Z -RDATE:19750101T020000 -RDATE;VALUE=DATE:19850101 -RDATE:19950101T070000Z -END:DAYLIGHT -END:VTIMEZONE -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/timezones/Makebelieve/RRULE_UNTIL_test.ics b/js/vendor/ical.js/samples/timezones/Makebelieve/RRULE_UNTIL_test.ics deleted file mode 100644 index 07d6c05c2..000000000 --- a/js/vendor/ical.js/samples/timezones/Makebelieve/RRULE_UNTIL_test.ics +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//ical.js//NONSGML Makebelieve//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:Makebelieve/RRULE_UNTIL -X-LIC-LOCATION:Makebelieve/RRULE_UNTIL -BEGIN:STANDARD -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:RRULE_UNTIL_standard -DTSTART:19700101T020000Z -RRULE:FREQ=YEARLY;INTERVAL=5;UNTIL=19800101T020000Z -END:STANDARD -BEGIN:DAYLIGHT -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:RDATE_UNTIL_daylight -DTSTART:19750101T020000 -RRULE:FREQ=YEARLY;INTERVAL=5;UNTIL=19850101T020000Z -END:DAYLIGHT -END:VTIMEZONE -END:VCALENDAR diff --git a/js/vendor/ical.js/samples/utc_negative_zero.ics b/js/vendor/ical.js/samples/utc_negative_zero.ics deleted file mode 100644 index e61ad9a93..000000000 --- a/js/vendor/ical.js/samples/utc_negative_zero.ics +++ /dev/null @@ -1,27 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:Zimbra-Calendar-Provider -BEGIN:VTIMEZONE -TZID:Etc/GMT -BEGIN:STANDARD -DTSTART:19710101T000000 -TZOFFSETTO:-0000 -TZOFFSETFROM:-0000 -TZNAME:GMT -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -UID:d118e997-3683-4552-8fe8-57c641f1f179 -SUMMARY:And another -ORGANIZER;CN=Sahaja Lal:mailto:calmozilla1@yahoo.com -DTSTART;TZID=Etc/GMT:20120821T210000 -DTEND;TZID=Etc/GMT:20120821T213000 -STATUS:CONFIRMED -CLASS:PUBLIC -X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY -TRANSP:OPAQUE -X-MICROSOFT-DISALLOW-COUNTER:TRUE -DTSTAMP:20120817T032509Z -SEQUENCE:0 -END:VEVENT -END:VCALENDAR diff --git a/js/vendor/ical.js/sandbox/validator.html b/js/vendor/ical.js/sandbox/validator.html deleted file mode 100644 index 9f61945d8..000000000 --- a/js/vendor/ical.js/sandbox/validator.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -
        -

        iCalendar / jCal Validator

        -

        This validator form takes either iCalendar or jCal data. iCalendar data will be parsed to jCal and re-serialized to iCalendar. Similarly, jCal data will be parsed to iCalendar and re-serialized to jCal.

        -
        -
        -

        -
        -
        
        -      
        -      
        -    
        - - diff --git a/js/vendor/ical.js/tasks/tests.js b/js/vendor/ical.js/tasks/tests.js deleted file mode 100644 index e68c9abec..000000000 --- a/js/vendor/ical.js/tasks/tests.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -var path = require('path'); -var Agent = require('test-agent'), - AgentServer = Agent.server, - WebsocketServer = Agent.WebsocketServer, - StaticServer = require('node-static').Server; - -module.exports = function(grunt) { - - grunt.registerTask('check-browser-build', function(task) { - if (!task) { - grunt.task.run('package', 'check-browser-build:verify'); - return; - } - - var done = this.async(); - grunt.util.spawn({ - cmd: 'git', - args: ['diff', '--shortstat', 'build/ical.js', 'build/ical.min.js', 'build/ical.min.js.map'], - }, function(error, result, code) { - if (result.stdout.length) { - grunt.fail.fatal('Browser build is not up to date, please run `grunt package`'); - } else { - grunt.log.ok('Browser build is up to date, good job!'); - } - done(); - }); - }); - - grunt.registerTask('performance-update', function(version) { - function copyMaster(callback) { - grunt.util.spawn({ - cmd: 'git', - args: ['show', 'master:build/ical.js'] - }, function(error, result, code) { - grunt.file.write(filepath, header + result.stdout + footer); - callback(); - }); - } - - var filepath = 'build/benchmark/ical_' + version + '.js'; - var header = "var ICAL_" + version + " = (function() { var ICAL = {};\n" + - "if (typeof global !== 'undefined') global.ICAL_" + version + " = ICAL;\n"; - var footer = "\nreturn ICAL; }());"; - - if (!version) { - grunt.fail.fatal('Need to specify build version name or "upstream" as parameter'); - } else if (version == "upstream") { - var done = this.async(); - grunt.util.spawn({ - cmd: 'git', - args: ['diff', '--shortstat'], - }, function(error, result, code) { - if (result.stdout.length) { - grunt.log.ok('There are git changes, also comparing against master branch'); - copyMaster(done); - } else { - grunt.util.spawn({ - cmd: 'git', - args: ['symbolic-ref', 'HEAD'] - }, function(error, result, code) { - var branch = result.stdout.replace('refs/heads/', ''); - if (branch == 'master') { - grunt.log.ok('No git changes, not comparing against master branch'); - grunt.file.delete(filepath); - done(); - } else { - grunt.log.ok('Not on master, also comparing against master branch'); - copyMaster(done); - } - }); - } - }); - } else { - grunt.file.copy('build/ical.js', filepath, { - process: function(contents) { - return header + contents + footer; - } - }); - grunt.log.ok('Successfully created ' + filepath); - } - }); - - grunt.registerTask('test-node', 'internal', function(arg) { - if (!arg || arg == 'performance') { - grunt.task.run('performance-update:upstream'); - } - if (grunt.option('debug')) { - var done = this.async(); - var open = require('biased-opener'); - open('http://127.0.0.1:8080/debug?port=5858', { - preferredBrowsers : ['chrome', 'chromium', 'opera'] - }, function(err, okMsg) { - if (err) { - // unable to launch one of preferred browsers for some reason - console.log(err.message); - console.log('Please open the URL manually in Chrome/Chromium/Opera or similar browser'); - } - done(); - }); - grunt.task.run('concurrent:' + (arg || "all")); - } else { - grunt.task.run('mochacli' + (arg ? ":" + arg : "")); - } - }); - - grunt.registerTask('test-browser', 'Test browser agent', function() { - var done = this.async(); - var Client = require('test-agent/lib/node/client'); - - var client = new Client({ retry: true }); - var port = grunt.option('port') || 8789; - var reporter = grunt.config.get('mochacli.options.reporter') || 'spec'; - console.log("REPORTER: " + reporter); - client.url = 'ws://localhost:' + port; - client.use(AgentServer.MochaTestEvents, { - reporterClass: require('mocha').reporters[reporter] - }); - - client.on('open', function(socket) { - var file = grunt.option('test'); - var files = file ? [file] : []; - client.mirrorServerEvents(['set test envs', 'error', 'test data', 'coverage data'], true); - client.send('queue tests', {files: files}); - }); - - client.on('test runner end', function(runner){ - var reporter = runner.getMochaReporter(); - client.send('close'); - done(reporter.failures == 0); - }); - - client.start(); - }); - - grunt.registerTask('run-test-server', 'Start browser test server', function() { - var done = this.async(); - - var server = new WebsocketServer(); - var path = process.env.PWD; - var port = grunt.option('port') || 8789; - - var staticMiddleware = new StaticServer(path, { cache: 0 }); - var httpServer = require('http').createServer(function (request, response) { - staticMiddleware.serve(request, response); - }); - httpServer.listen(port); - grunt.log.ok("HTTP Server running on port: %s, serving: %s", port, path); - server.attach(httpServer); - - server.expose('test-agent-server.js', function onExpose(){ - server.use(AgentServer.Responder) - .use(AgentServer.Broadcast) - .use(AgentServer.MochaTestEvents) - .use(AgentServer.BlanketConsoleReporter, { - path: 'test-agent-coverage.json', - pattern: /([\S]+)/ - }) - .use(AgentServer.QueueTests) - .use(AgentServer.StartCoverages) - .use(AgentServer.EventMirror) - .use(AgentServer.Watcher) - .use(AgentServer.RunnerGrowl); - }); - require('open')('http://localhost:' + port + '/test-agent/'); - }); - - grunt.registerTask('test-agent-config', 'Create configuration for test-agent', function() { - var files = grunt.file.expand('test/**/*_test.js'); - var jsonData = { - tests: files.map(function(f) { return "/" + f; }) - }; - grunt.file.write(path.join('test-agent', 'config.json'), - JSON.stringify(jsonData)); - }); -}; diff --git a/js/vendor/ical.js/tasks/timezones.js b/js/vendor/ical.js/tasks/timezones.js deleted file mode 100644 index 4acc64e4c..000000000 --- a/js/vendor/ical.js/tasks/timezones.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var util = require('util'); -var exec = require('sync-exec'); -var path = require('path'); - -var OLSON_DB_REMOTE = 'http://www.iana.org/time-zones/repository/releases/tzdata%s.tar.gz'; -var TZURL_DIR = process.env.TZURL_DIR || path.join(__dirname, '..', 'tools', 'tzurl') -var OLSON_DIR = process.env.OLSON_DIR || path.join(TZURL_DIR, 'olson'); - -module.exports = function(grunt) { - grunt.registerTask('timezones', 'Get Olson timezone data', function() { - var olsonversion = grunt.option('olsondb'); - if (!olsonversion) { - olsonversion = (new Date()).getFullYear() + "a"; - grunt.fail.warn('Need to specify --olsondb=, e.g. ' + olsonversion); - return; - } - - if (grunt.file.isDir(TZURL_DIR)) { - grunt.log.ok('Using existing tzurl installation'); - } else { - grunt.log.ok('Retrieving tzurl from svn'); - exec('svn export -r40 http://tzurl.googlecode.com/svn/trunk/ ' + TZURL_DIR); - } - - if (grunt.file.isDir(OLSON_DIR)) { - grunt.log.ok('Using olson database from ' + OLSON_DIR); - } else { - var url = util.format(OLSON_DB_REMOTE, olsonversion); - grunt.log.ok('Downloading ' + url); - grunt.file.mkdir(OLSON_DIR); - exec('wget ' + url + ' -O - | tar xz -C ' + OLSON_DIR); - } - - grunt.log.ok('Building tzurl tool'); - exec('make -C "' + TZURL_DIR + '" OLSON_DIR="' + OLSON_DIR + '"'); - - grunt.log.ok('Running vzic'); - exec(path.join(TZURL_DIR, 'vzic')); - }); -}; diff --git a/js/vendor/ical.js/tasks/travis.js b/js/vendor/ical.js/tasks/travis.js deleted file mode 100644 index c86a9edc2..000000000 --- a/js/vendor/ical.js/tasks/travis.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -module.exports = function(grunt) { - - grunt.config.set("travis", { - branch: process.env.TRAVIS_BRANCH, - leader: (process.env.TRAVIS_JOB_NUMBER || "").substr(-2) == ".1", - commit: process.env.TRAVIS_COMMIT, - pullrequest: (process.env.TRAVIS_PULL_REQUEST || "false") == "false" ? null : process.env.TRAVIS_PULL_REQUEST, - secure: process.env.TRAVIS_SECURE_ENV_VARS == "true", - tag: process.env.TRAVIS_TAG - }); - - function registerCITask(name, descr, cond) { - grunt.registerTask(name, function(/* ...tasks */) { - var task = Array.prototype.join.call(arguments, ":"); - grunt.config.requires("travis"); - var travis = grunt.config.get("travis"); - - if (cond(travis, task)) { - grunt.task.run(task); - } else { - grunt.log.ok('Skipping ' + task + ', not on ' + descr); - } - }); - } - - grunt.registerTask('run-with-env', function(/* env, ...tasks */) { - var env = arguments[0]; - var task = Array.prototype.slice.call(arguments, 1).join(":"); - - if (process.env[env]) { - grunt.task.run(task); - } else { - grunt.fail.warn('Cannot run ' + task + ', environment ' + env + ' not available'); - } - }); - - registerCITask('run-on-master-leader', 'branch master leader', function(travis) { - return travis.branch == 'master' && !travis.pullrequest && - travis.secure && travis.leader; - }); - - registerCITask('run-on-leader', 'build leader', function(travis) { - return travis.leader; - }); - - registerCITask('run-on-pullrequest', 'pull request', function(travis) { - return travis.pullrequest; - }); -}; diff --git a/js/vendor/ical.js/test-agent-coverage.json b/js/vendor/ical.js/test-agent-coverage.json deleted file mode 100644 index 2c63c0851..000000000 --- a/js/vendor/ical.js/test-agent-coverage.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/js/vendor/ical.js/test-agent-server.js b/js/vendor/ical.js/test-agent-server.js deleted file mode 100644 index d8d871560..000000000 --- a/js/vendor/ical.js/test-agent-server.js +++ /dev/null @@ -1,12 +0,0 @@ -//all require paths must be absolute -- use __dirname -var Agent = require('test-agent'), - Apps = Agent.server, - Suite = Agent.Suite, - suite = new Suite({ - paths: [__dirname], - testDir: 'test/', - libDir: 'lib/ical/', - testSuffix: '_test.js' - }); - -server.use(Apps.Suite, suite); diff --git a/js/vendor/ical.js/test-agent/index.html b/js/vendor/ical.js/test-agent/index.html deleted file mode 100644 index d24fe9df1..000000000 --- a/js/vendor/ical.js/test-agent/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Serve the tests - - - - -
        -
        - - -
        - -
        -
        -
        - -
        -
        - - -
        -
        - - - - - - - - - diff --git a/js/vendor/ical.js/test-agent/index.js b/js/vendor/ical.js/test-agent/index.js deleted file mode 100644 index fac667258..000000000 --- a/js/vendor/ical.js/test-agent/index.js +++ /dev/null @@ -1,44 +0,0 @@ -(function(window) { - - var worker = new TestAgent.BrowserWorker({ - /* this is where your tests will be loaded into */ - sandbox: './sandbox.html' - }); - - worker.use(TestAgent.BrowserWorker.Config, { - /* config file which lists all available tests for the ui */ - url: './config.json' - }); - - worker.use(TestAgent.BrowserWorker.MochaDriver, { - /* path to mocha */ - mochaUrl: '/node_modules/mocha/mocha.js', - testHelperUrl: '../test/helper.js', - reporter: 'HTML', - ui: 'tdd' - }); - - worker.use(TestAgent.BrowserWorker.Websocket); - worker.use(TestAgent.BrowserWorker.TestUi); - worker.use(TestAgent.BrowserWorker.ErrorReporting); - - worker.on({ - - 'sandbox': function() { - }, - - 'open': function() { - setTimeout(worker.ready.bind(worker), 0); - }, - - 'close': function() { - console.log('lost client trying to reconnect'); - } - - }); - - worker.config(); - worker.start(); - -}(this)); - diff --git a/js/vendor/ical.js/test-agent/package.json b/js/vendor/ical.js/test-agent/package.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/js/vendor/ical.js/test-agent/sandbox.html b/js/vendor/ical.js/test-agent/sandbox.html deleted file mode 100644 index fa79ac34f..000000000 --- a/js/vendor/ical.js/test-agent/sandbox.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Tests - - - - - - - - -
        -
        - - -
        -
        - - - - - diff --git a/js/vendor/ical.js/test-agent/style.css b/js/vendor/ical.js/test-agent/style.css deleted file mode 100644 index 7e44e21d3..000000000 --- a/js/vendor/ical.js/test-agent/style.css +++ /dev/null @@ -1,199 +0,0 @@ -* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } - -body, -html { - height: 100%; - padding: 0; - margin: 0; -} - -body { - font: 14px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -body > iframe { - border: 1px solid #CCC; - width: 100%; - height: 100%; -} - -#test-agent-ui { - margin: 4em 2em 2em 1em; -} -#test-agent-ui .hidden { - display: none; -} -#test-agent-ui > .error { - margin: 15px 40px; -} -#test-agent-ui > .error h1, -#test-agent-ui > .error p { - padding: 0px; - margin: 0px; -} - - -#test-agent-ui ul { - padding: none; - border: none; - clear: both; - margin-top: 10px; -} - -#test-agent-ui li { - position: relative; - - list-style: none; - padding: 0 0 0 1.5rem; - margin: 0; - cursor: pointer; - - float: left; - width: 33%; -} - -#test-agent-ui li:not(.test-agent-list-head):hover { - color: #00d; - text-decoration: underline; -} - -#test-agent-ui .active { - font-weight: bold; -} - -#test-agent-ui .active:before { - content: '*'; - position: absolute; - display: block; - left: .7rem; - top: .2rem; - width: 1rem; -} - -#test-agent-ui .working { - font-style: italic; -} -#test-agent-ui .working:after { - content: '...'; -} - -#test-agent-panel .execute button { - clear: both; - font-size: 1.4rem; - width: 50%; - padding: .5rem; - height: 3rem; - border: 1px solid #E2E2E2; -} - -#test-agent-ui .test-agent-list-head { - position: relative; - - width: 100%; - margin: 1rem 0; - - font-weight: bolder; - font-size: 1.2rem; - background: #CCC; -} - -#test-agent-ui .test-agent-list-head-info { - position: absolute; - right: .5rem; - - font-style: italic; - font-weight: normal; -} - -#test-agent-ui .test-agent-list-head:hover { - text-decoration: none; -} - -#test-agent-panel { - position: fixed; - top: 0; - left: 0; - padding: 1rem 5rem; - background-color: rgb(250, 250, 250); - width: 100%; - height: 4.5rem; - z-index: 4; -} - -#test-agent-panel .options { - margin-top: 0.2rem; - margin-left: -0.3rem; - - /* disabled until we need it */ - visibility: hidden; -} - -#test-agent-panel .execute { - margin-top: -3.2rem; - text-align: right; -} - -@media only screen and (max-width: 720px) { - #test-agent-ui { - margin-left: 0; - margin-right: 0; - } - - #test-agent-ui li { - width: 100%; - padding: .5rem 1rem .5rem 2rem; - border-bottom: 1px solid #aaa; - } - - #test-agent-ui .active:before { - top: .8rem; - } - - #test-agent-panel { - height: 5.5rem; - border-bottom: 1px solid #aaa; - } - - #test-agent-panel .execute button { - margin-top: 2.8rem; - } - - #test-agent-panel .execute { - margin-top: -5.5rem; - } -} - -@media only screen and (max-width: 600px) { - #test-agent-panel { - height: 6rem; - padding: 0rem 1.5rem; - border-bottom: 1px solid #aaa; - } - - form { - margin-top: 1.7rem; - } - - #test-agent-ui ul { - margin: 5.9rem 0 0; - } -} - -@media only screen and (max-width: 460px) { - #test-agent-panel .execute { - position: fixed; - margin-left: 10.7rem; - } -} - -#blanket-main * { - -moz-box-sizing: initial; - -webkit-box-sizing: initial; - box-sizing: initial; -} - -code .comment { color: #ddd } -code .init { color: #2F6FAD } -code .string { color: #5890AD } -code .keyword { color: #8A6343 } -code .number { color: #2F6FAD } diff --git a/js/vendor/jquery-timepicker/.bower.json b/js/vendor/jquery-timepicker/.bower.json deleted file mode 100644 index b462b41ef..000000000 --- a/js/vendor/jquery-timepicker/.bower.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "jquery-timepicker", - "homepage": "https://github.com/fgelinas/timepicker", - "_release": "883bb2cd94", - "_resolution": { - "type": "branch", - "branch": "master", - "commit": "883bb2cd94ce65bc2a0a707b0c5911baf6de4ad4" - }, - "_source": "git://github.com/fgelinas/timepicker.git", - "_target": "*", - "_originalSource": "jquery-timepicker" -} \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/AUTHORS b/js/vendor/jquery-timepicker/AUTHORS new file mode 100644 index 000000000..4d5356752 --- /dev/null +++ b/js/vendor/jquery-timepicker/AUTHORS @@ -0,0 +1,8 @@ +# Authors ordered by first contribution. + +Willington Vega +Brian Link +Ian Enders +Jo Liss https://github.com/joliss +Billy Bednar https://github.com/billybednar +Conrad Frame https://github.com/sponrad diff --git a/js/vendor/jquery-timepicker/CHANGELOG b/js/vendor/jquery-timepicker/CHANGELOG new file mode 100644 index 000000000..70a61ea17 --- /dev/null +++ b/js/vendor/jquery-timepicker/CHANGELOG @@ -0,0 +1,70 @@ +* Fri May 20 2016 - Version 1.3.3 +- Prevent dropdown from closing in IE when user clicks scrollbar (#56). +- Prevent long-click from closing the timepicker (#50). + +* Sat Sep 13 2014 - Version 1.3.2 +- Add defaultTime option (#41). +- Fix position bug (#43). + +* Sat Nov 09 2013 - Version 1.3.1 +- Fix minor errors in jQuery Package Manifest. + +* Sat Nov 09 2013 - Version 1.3.0 +- Drop support for jQuery 1.4.2 or below. Plugin requires jQuery 1.6.0 or newer. +- Fix: Avoid showing dupliate time entries (#21) +- Fix: next, previous, open and close methods are now chainable (#23) +- Fix: getTime now takes into account values set using $.fn.val (#24) +- Fix: Parse values like 12:77 into a valid datetime entry (#27). +- Fix: Parse values like 6666 into a valid datetime entry (#33). +- Fix: Use default cursor in time selector dropdown (#34). +- Fix: Remove ReferenceError: event is not defined (#39). +- Added lowercase am/pm format. +- time-change event and change callbacks are triggered even if the new + time is null. +- Minor CSS fixes. + +* Sun Feb 26 2012 - Version 1.2.2 +- Fix too much recursion error in parseTime function (#20). +- Verifies argument passed to parseTime is string. +- Add support for jQuery 1.6 prop function. + +* Mon Nov 14 2011 - Version 1.2.1 +- Fix strings support for startTime, minTime and maxTime options. + +* Sun Nov 13 2011 - Version 1.2.0 +- Add support for calling API methods using the plugin function, + passing the method's name as first argument and options as + subsequent arguments. +- Add an option() method to allow changing options values after + initialization. +- Add dropdown option to control whether the dropdown is displayed or not. +- Add scrollbar option to control whether the scrollbars are displayed or not. +- Aceept strings as values for the minTime, maxTime and startTime options. + +* Tue Jul 26 2011 - Version 1.1.2 +- Released under MIT and GPL Version 2 licenses. +- Add zindex option to override input field's z-index (thanks to Ian Enders). + +* Tue Nov 23 2010 - Version 1.1.1 +- Fix Issue #11 (https://github.com/wvega/timepicker/issues/11) + +* Mon Nov 08 2010 - Version 1.1.0 +- Use input field's z-index. +- Do not use rounded corners by default. +- Use a single UL element for all timepicker in the same page. +- Interval greather than 60 minutes are now supported. +- Add time-change custom event. + +* Fri Oct 29 2010 - Version 1.0.3 +- Add dynamic option + +* Fri Oct 08 2010 - Version 1.0.2 +- Add support for jQuery 1.3 and superior (thanks to Brian Link) +- Fix bug with jQuery 1.4.3 + +* Thu Oct 07 2010 - Version 1.0.1 +- Fix selection issue in some versions of IE. + http://github.com/wvega/timepicker/issues/closed/#issue/3 + +* Wed Jul 17 2010 - Version 1.0.0 +- jQuery Timepicker official release diff --git a/js/vendor/jquery-timepicker/GPL-LICENSE.txt b/js/vendor/jquery-timepicker/GPL-LICENSE.txt deleted file mode 100644 index 932f11115..000000000 --- a/js/vendor/jquery-timepicker/GPL-LICENSE.txt +++ /dev/null @@ -1,278 +0,0 @@ -GNU GENERAL PUBLIC LICENSE -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by - the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for - this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software - patents. We wish to avoid the danger that redistributors of a free - program will individually obtain patent licenses, in effect making the - program proprietary. To prevent this, we have made it clear that any - patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains - a notice placed by the copyright holder saying it may be distributed - under the terms of this General Public License. The "Program", below, - refers to any such program or work, and a "work based on the Program" - means either the Program or any derivative work under copyright law: - that is to say, a work containing the Program or a portion of it, - either verbatim or with modifications and/or translated into another - language. (Hereinafter, translation is included without limitation in - the term "modification".) Each licensee is addressed as "you". - - Activities other than copying, distribution and modification are not - covered by this License; they are outside its scope. The act of - running the Program is not restricted, and the output from the Program - is covered only if its contents constitute a work based on the - Program (independent of having been made by running the Program). - Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's - source code as you receive it, in any medium, provided that you - conspicuously and appropriately publish on each copy an appropriate - copyright notice and disclaimer of warranty; keep intact all the - notices that refer to this License and to the absence of any warranty; - and give any other recipients of the Program a copy of this License - along with the Program. - - You may charge a fee for the physical act of transferring a copy, and - you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion - of it, thus forming a work based on the Program, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the Program, - and can be reasonably considered independent and separate works in - themselves, then this License, and its terms, do not apply to those - sections when you distribute them as separate works. But when you - distribute the same sections as part of a whole which is a work based - on the Program, the distribution of the whole must be on the terms of - this License, whose permissions for other licensees extend to the - entire whole, and thus to each and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or contest - your rights to work written entirely by you; rather, the intent is to - exercise the right to control the distribution of derivative or - collective works based on the Program. - - In addition, mere aggregation of another work not based on the Program - with the Program (or with a work based on the Program) on a volume of - a storage or distribution medium does not bring the other work under - the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms of - Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete source - code means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to - control compilation and installation of the executable. However, as a - special exception, the source code distributed need not include - anything that is normally distributed (in either source or binary - form) with the major components (compiler, kernel, and so on) of the - operating system on which the executable runs, unless that component - itself accompanies the executable. - - If distribution of executable or object code is made by offering - access to copy from a designated place, then offering equivalent - access to copy the source code from the same place counts as - distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense or distribute the Program is - void, and will automatically terminate your rights under this License. - However, parties who have received copies, or rights, from you under - this License will not have their licenses terminated so long as such - parties remain in full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify or - distribute the Program or its derivative works. These actions are - prohibited by law if you do not accept this License. Therefore, by - modifying or distributing the Program (or any work based on the - Program), you indicate your acceptance of this License to do so, and - all its terms and conditions for copying, distributing or modifying - the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program subject to - these terms and conditions. You may not impose any further - restrictions on the recipients' exercise of the rights granted herein. - You are not responsible for enforcing compliance by third parties to - this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent issues), - conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot - distribute so as to satisfy simultaneously your obligations under this - License and any other pertinent obligations, then as a consequence you - may not distribute the Program at all. For example, if a patent - license would not permit royalty-free redistribution of the Program by - all those who receive copies directly or indirectly through you, then - the only way you could satisfy both it and this License would be to - refrain entirely from distribution of the Program. - - If any portion of this section is held invalid or unenforceable under - any particular circumstance, the balance of the section is intended to - apply and the section as a whole is intended to apply in other - circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of any - such claims; this section has the sole purpose of protecting the - integrity of the free software distribution system, which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is willing - to distribute software through any other system and a licensee cannot - impose that choice. - - This section is intended to make thoroughly clear what is believed to - be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, the - original copyright holder who places the Program under this License - may add an explicit geographical distribution limitation excluding - those countries, so that distribution is permitted only in or among - countries not thus excluded. In such case, this License incorporates - the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions - of the General Public License from time to time. Such new versions will - be similar in spirit to the present version, but may differ in detail to - address new problems or concerns. - - Each version is given a distinguishing version number. If the Program - specifies a version number of this License which applies to it and "any - later version", you have the option of following the terms and conditions - either of that version or of any later version published by the Free - Software Foundation. If the Program does not specify a version number of - this License, you may choose any version ever published by the Free Software - Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the author - to ask for permission. For software which is copyrighted by the Free - Software Foundation, write to the Free Software Foundation; we sometimes - make exceptions for this. Our decision will be guided by the two goals - of preserving the free status of all derivatives of our free software and - of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY - FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN - OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES - PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED - OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS - TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, - REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING - WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR - REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, - INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING - OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED - TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY - YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER - PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGES.""'''''' diff --git a/js/vendor/jquery-timepicker/Gruntfile.js b/js/vendor/jquery-timepicker/Gruntfile.js new file mode 100644 index 000000000..e4ad5bd5c --- /dev/null +++ b/js/vendor/jquery-timepicker/Gruntfile.js @@ -0,0 +1,225 @@ +/*global module: false*/ +/*jslint indent: 2*/ + +module.exports = function(grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + meta: { + name: 'timepicker', + banner: '/**\n' + + ' * <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + + ' * <%= pkg.homepage %>\n' + + ' *\n' + + ' * <%= pkg.description %>\n' + + ' *\n' + + ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' + + ' */\n' + + '\n' + }, + + concat: { + options: { + banner: '<%= meta.banner %>', + stripBanners: true + }, + js: { + src: ['jquery.<%= meta.name %>.js'], + dest: 'dist/jquery.<%= meta.name %>.js' + }, + css: { + src: ['jquery.<%= meta.name %>.css'], + dest: 'dist/jquery.<%= meta.name %>.css' + }, + misc: { + files: { + 'dist/LICENSE-GPL': 'LICENSE-GPL', + 'dist/LICENSE-MIT': 'LICENSE-MIT', + 'dist/README.md': 'README.md', + 'dist/CHANGELOG': 'CHANGELOG', + 'dist/AUTHORS': 'AUTHORS' + } + }, + plugin: { + options: { + banner: '', + stripBanners: true + }, + files: { + '<%= pkg.name %>.jquery.json': ['package.json'] + } + } + }, + + uglify: { + options: { + banner: '<%= meta.banner %>' + }, + dist: { + files: { + 'dist/jquery.<%= meta.name %>.min.js': ['<%= concat.js.dest %>'] + } + } + }, + + cssmin: { + options: { + banner: '<%= meta.banner %>' + }, + dist: { + src: ['<%= concat.css.dest %>'], + dest: 'dist/jquery.<%= meta.name %>.min.css' + } + }, + + jshint: { + options: { + bitwise: true, + curly: true, + eqeqeq: true, + forin: true, + immed: true, + sub: true, + boss: true, + eqnull: true, + indent: 4, + latedef: true, + newcap: true, + noarg: true, + noempty: true, + nonew: true, + plusplus: true, + quotmark: true, + regexp: true, + undef: true, + unused: true, + trailing: true, + // relaxing options + evil: false, + regexdash: true, + white: false, + // environments + browser: true, + jquery: true + }, + dist: { + options: { + globals: { + jQuery: false, + LazyLoad: false + } + }, + files: { + src: ['Gruntfile.js', 'package.json', 'jquery.<%= meta.name %>.js'] + } + }, + test: { + options: { + globals: { + jQuery: false, + LazyLoad: false, + ok: false + } + }, + files: { + src: ['test/test.js'] + } + } + }, + + csslint: { + dist: { + src: ['jquery.<%= meta.name %>.css'], + options: { + 'box-model': false, + 'box-sizing': false + } + } + }, + + copy: { + legacy: { + files: [ + { + expand: true, + cwd: 'dist/', + src: ['jquery.<%= meta.name %>.min.js', 'jquery.<%= meta.name %>.min.css'], + dest: '.' + } + ] + } + }, + + compress: { + zip: { + options: { + archive: 'build/<%= pkg.name %>-<%= pkg.version %>.zip' + }, + files: [{expand: true, cwd: 'dist/', src: ['*']}] + } + }, + + qunit: { + all: { + options: { + urls: [ + // 'http://localhost:8000/test/index.html?jquery=1.3.2', + // 'http://localhost:8000/test/index.html?jquery=1.4.2', + 'http://localhost:8000/test/index.html?jquery=1.4.3', + 'http://localhost:8000/test/index.html?jquery=1.5.1', + 'http://localhost:8000/test/index.html?jquery=1.6.2', + 'http://localhost:8000/test/index.html?jquery=1.6.4', + 'http://localhost:8000/test/index.html?jquery=1.7.1', + 'http://localhost:8000/test/index.html?jquery=1.7.2', + 'http://localhost:8000/test/index.html?jquery=1.8.3', + 'http://localhost:8000/test/index.html?jquery=1.9.0', + 'http://localhost:8000/test/index.html?jquery=1.9.1', + 'http://localhost:8000/test/index.html?jquery=1.10.1', + 'http://localhost:8000/test/index.html?jquery=1.10.2', + 'http://localhost:8000/test/index.html?jquery=1.11.0', + 'http://localhost:8000/test/index.html?jquery=1.11.1', + 'http://localhost:8000/test/index.html?jquery=2.0.0', + 'http://localhost:8000/test/index.html?jquery=2.0.1', + 'http://localhost:8000/test/index.html?jquery=2.0.2', + 'http://localhost:8000/test/index.html?jquery=2.0.3', + 'http://localhost:8000/test/index.html?jquery=2.1.0', + 'http://localhost:8000/test/index.html?jquery=2.1.1' + ] + } + } + }, + + connect: { + 'default': {}, + 'server': { + options: { + keepalive: true + } + } + }, + + clean: ['build/', 'dist/'] + }); + + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-csslint'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-compress'); + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-qunit'); + + grunt.registerTask('lint', ['jshint', 'csslint']); + grunt.registerTask('min', ['uglify', 'cssmin']); + grunt.registerTask('build', ['copy:legacy', 'compress']); + grunt.registerTask('default', ['lint', 'concat', 'min', 'build']); + grunt.registerTask('test', ['default', 'connect:default', 'qunit']); + grunt.registerTask('server', ['default', 'connect:server']); + +}; diff --git a/js/vendor/jquery-timepicker/LICENSE-GPL b/js/vendor/jquery-timepicker/LICENSE-GPL new file mode 100644 index 000000000..11dddd00e --- /dev/null +++ b/js/vendor/jquery-timepicker/LICENSE-GPL @@ -0,0 +1,278 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/js/vendor/jquery-timepicker/LICENSE-MIT b/js/vendor/jquery-timepicker/LICENSE-MIT new file mode 100644 index 000000000..ceccb289c --- /dev/null +++ b/js/vendor/jquery-timepicker/LICENSE-MIT @@ -0,0 +1,27 @@ +jQuery TimePicker plugin + +A jQuery plugin to enhance standard form input fields helping +users to select (or type) times. + +Copyright (c) 2016 Willington Vega + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/js/vendor/jquery-timepicker/MIT-LICENSE.txt b/js/vendor/jquery-timepicker/MIT-LICENSE.txt deleted file mode 100644 index 532704636..000000000 --- a/js/vendor/jquery-timepicker/MIT-LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2011 John Resig, http://jquery.com/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/js/vendor/jquery-timepicker/Makefile b/js/vendor/jquery-timepicker/Makefile new file mode 100644 index 000000000..d7d54fd8d --- /dev/null +++ b/js/vendor/jquery-timepicker/Makefile @@ -0,0 +1,33 @@ +VERSION=1.2.2 +NAME=jquery.timepicker-${VERSION} + +SOURCES=${NAME}.js ${NAME}.css +COMPRESSED=${NAME}.min.js ${NAME}.min.css +MISC=AUTHORS CHANGELOG GPL-LICENSE.txt MIT-LICENSE.txt README.md + +FILES=${SOURCES} ${COMPRESSED} ${MISC} + +BUILD=builds/jquery-timepicker-${VERSION}.zip + + +build: ${NAME}.js ${NAME}.css + cp jquery.timepicker.js ${NAME}.js + cp jquery.timepicker.css ${NAME}.css + mkdir -p `dirname ${BUILD}` + zip ${BUILD} ${FILES} + +${NAME}.js: + curl -d compilation_level=WHITESPACE_ONLY \ + -d output_format=text \ + -d output_info=compiled_code \ + --data-urlencode js_code@jquery.timepicker.js \ + http://closure-compiler.appspot.com/compile > jquery.timepicker.min.js + cp jquery.timepicker.min.js jquery.timepicker-${VERSION}.min.js + +${NAME}.css: + curl http://mabblog.com/cssoptimizer/service.php \ + -F "data= jquery.timepicker.min.css + cp jquery.timepicker.min.css jquery.timepicker-${VERSION}.min.css + +clean: + rm ${SOURCES} ${COMPRESSED} diff --git a/js/vendor/jquery-timepicker/README.md b/js/vendor/jquery-timepicker/README.md index 34533328a..2aa630fa6 100644 --- a/js/vendor/jquery-timepicker/README.md +++ b/js/vendor/jquery-timepicker/README.md @@ -1,30 +1,14 @@ -jQuery UI Timepicker by François Gélinas -======================================== +# jQuery Timepicker [![Build Status](http://img.shields.io/travis/wvega/timepicker.svg)](https://travis-ci.org/wvega/timepicker) [![Gitter chat](https://badges.gitter.im/wvega/timepicker.png)](https://gitter.im/wvega/timepicker) -What ----- -This is a jQuery UI time picker plugin build to match with other official jQuery UI widgets. -Based on the existing date picker, it will blend nicely with your form and use your selected jQuery UI theme. -The plugin is very easy to integrate in your form for you time (hours / minutes) inputs. +A jQuery plugin to enhance standard form input fields helping users to select +(or type) times. -Why ---- -I built this plugin because I could not find a plugin that did what I needed. +Please visit http://timepicker.co for Documentation, Examples and Getting Started information. -Doc ---- -Examples are available on the main page at [http://fgelinas.com/code/timepicker](http://fgelinas.com/code/timepicker) -Most option parameters are documented at [http://fgelinas.com/code/timepicker/#usage](http://fgelinas.com/code/timepicker/#usage) +## Release History -Requirements ------------- -Work with jQuery 1.5.1 and more, also require jQuery UI core. -There is a legacy version of the plugin made to work with older jQuery 1.2.6 and UI 1.6 at [http://fgelinas.com/code/timepicker/#get_timepicker](http://fgelinas.com/code/timepicker/#get_timepicker) +See [CHANGELOG](https://github.com/wvega/timepicker/blob/master/CHANGELOG). -Licenses --------- -The plugin is licensed under the [MIT](https://github.com/fgelinas/timepicker/blob/master/MIT-LICENSE.txt) and [GPL](https://github.com/fgelinas/timepicker/blob/master/GPL-LICENSE.txt) licenses. - -Other Stuff ------------ -There is a jsFiddle page [here](http://jsfiddle.net/fgelinas/R6jLt/) with basic implementation for testing. \ No newline at end of file +## License +Copyright (c) 2016 Willington Vega +Licensed under the MIT, GPL licenses. diff --git a/js/vendor/jquery-timepicker/i18n/i18n.html b/js/vendor/jquery-timepicker/i18n/i18n.html deleted file mode 100644 index d1cf200c6..000000000 --- a/js/vendor/jquery-timepicker/i18n/i18n.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - Internationalisation page for the jquery ui timepicker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - -
        - -
        - - List of localisations : - - - - \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-cs.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-cs.js deleted file mode 100644 index ab4ad7201..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-cs.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Czech initialisation for the timepicker plugin */ -/* Written by David Spohr (spohr.david at gmail). */ -jQuery(function($){ - $.timepicker.regional['cs'] = { - hourText: 'Hodiny', - minuteText: 'Minuty', - amPmText: ['dop.', 'odp.'] , - closeButtonText: 'Zavřít', - nowButtonText: 'Nyní', - deselectButtonText: 'Odoznačit' } - $.timepicker.setDefaults($.timepicker.regional['cs']); -}); diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-de.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-de.js deleted file mode 100644 index 35b861e77..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-de.js +++ /dev/null @@ -1,12 +0,0 @@ -/* German initialisation for the timepicker plugin */ -/* Written by Lowie Hulzinga. */ -jQuery(function($){ - $.timepicker.regional['de'] = { - hourText: 'Stunde', - minuteText: 'Minuten', - amPmText: ['AM', 'PM'] , - closeButtonText: 'Beenden', - nowButtonText: 'Aktuelle Zeit', - deselectButtonText: 'Wischen' } - $.timepicker.setDefaults($.timepicker.regional['de']); -}); diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-es.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-es.js deleted file mode 100644 index 64f33171a..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-es.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Spanish initialisation for the jQuery time picker plugin. */ -/* Writen by Jandro González (agonzalezalves@gmail.com) */ -jQuery(function($){ - $.timepicker.regional['es'] = { - hourText: 'Hora', - minuteText: 'Minuto', - amPmText: ['AM', 'PM'], - closeButtonText: 'Aceptar', - nowButtonText: 'Ahora', - deselectButtonText: 'Deseleccionar' } - $.timepicker.setDefaults($.timepicker.regional['es']); -}); diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-fr.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-fr.js deleted file mode 100644 index e242dbd8a..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-fr.js +++ /dev/null @@ -1,13 +0,0 @@ -/* French initialisation for the jQuery time picker plugin. */ -/* Written by Bernd Plagge (bplagge@choicenet.ne.jp), - Francois Gelinas (frank@fgelinas.com) */ -jQuery(function($){ - $.timepicker.regional['fr'] = { - hourText: 'Heures', - minuteText: 'Minutes', - amPmText: ['AM', 'PM'], - closeButtonText: 'Fermer', - nowButtonText: 'Maintenant', - deselectButtonText: 'Désélectionner' } - $.timepicker.setDefaults($.timepicker.regional['fr']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hr.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hr.js deleted file mode 100644 index 83f676d5b..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hr.js +++ /dev/null @@ -1,13 +0,0 @@ -/* Croatian/Bosnian initialisation for the timepicker plugin */ -/* Written by Rene Brakus (rene.brakus@infobip.com). */ -jQuery(function($){ - $.timepicker.regional['hr'] = { - hourText: 'Sat', - minuteText: 'Minuta', - amPmText: ['Prijepodne', 'Poslijepodne'], - closeButtonText: 'Zatvoriti', - nowButtonText: 'Sada', - deselectButtonText: 'Poništite'} - - $.timepicker.setDefaults($.timepicker.regional['hr']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hu.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hu.js deleted file mode 100644 index d15e0cc31..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-hu.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Hungarian initialisation for the timepicker plugin */ -/* Written by Bálint Dávid Tarcsa. */ -jQuery(function($){ - $.timepicker.regional['hu'] = { - hourText: 'Óra', - minuteText: 'Perc', - amPmText: ['De.', 'Du.'] , - closeButtonText: 'Kész', - nowButtonText: 'Most', - deselectButtonText: 'Törlés' } - $.timepicker.setDefaults($.timepicker.regional['hu']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-it.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-it.js deleted file mode 100644 index 24f613fda..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-it.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Italian initialisation for the jQuery time picker plugin. */ -/* Written by Serge Margarita (serge.margarita@gmail.com) */ -jQuery(function($){ - $.timepicker.regional['it'] = { - hourText: 'Ore', - minuteText: 'Minuti', - amPmText: ['AM', 'PM'], - closeButtonText: 'Chiudi', - nowButtonText: 'Adesso', - deselectButtonText: 'Svuota' } - $.timepicker.setDefaults($.timepicker.regional['it']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ja.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ja.js deleted file mode 100644 index 407e0db04..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ja.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Japanese initialisation for the jQuery time picker plugin. */ -/* Written by Bernd Plagge (bplagge@choicenet.ne.jp). */ -jQuery(function($){ - $.timepicker.regional['ja'] = { - hourText: '時間', - minuteText: '分', - amPmText: ['午前', '午後'], - closeButtonText: '閉じる', - nowButtonText: '現時', - deselectButtonText: '選択解除' } - $.timepicker.setDefaults($.timepicker.regional['ja']); -}); diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-mk.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-mk.js deleted file mode 100644 index 732189d7d..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-mk.js +++ /dev/null @@ -1,13 +0,0 @@ -/* Macedonian initialisation for the timepicker plugin */ -/* Written by Stojance Panov. */ -jQuery(function($){ - $.timepicker.regional['mk'] = { - hourText: 'Час', - minuteText: 'Минути', - amPmText: ['Претпладне', 'Попладне'], - closeButtonText: 'Затвори', - nowButtonText: 'Сега', - deselectButtonText: 'Поништи'} - - $.timepicker.setDefaults($.timepicker.regional['mk']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-nl.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-nl.js deleted file mode 100644 index 18de7ccd5..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-nl.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Nederlands initialisation for the timepicker plugin */ -/* Written by Lowie Hulzinga. */ -jQuery(function($){ - $.timepicker.regional['nl'] = { - hourText: 'Uren', - minuteText: 'Minuten', - amPmText: ['AM', 'PM'], - closeButtonText: 'Sluiten', - nowButtonText: 'Actuele tijd', - deselectButtonText: 'Wissen' } - $.timepicker.setDefaults($.timepicker.regional['nl']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pl.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pl.js deleted file mode 100644 index 244361fdb..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pl.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Polish initialisation for the timepicker plugin */ -/* Written by Mateusz Wadolkowski (mw@pcdoctor.pl). */ -jQuery(function($){ - $.timepicker.regional['pl'] = { - hourText: 'Godziny', - minuteText: 'Minuty', - amPmText: ['', ''], - closeButtonText: 'Zamknij', - nowButtonText: 'Teraz', - deselectButtonText: 'Odznacz'} - $.timepicker.setDefaults($.timepicker.regional['pl']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pt-BR.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pt-BR.js deleted file mode 100644 index 6a2bb0c9c..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-pt-BR.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Brazilan initialisation for the timepicker plugin */ -/* Written by Daniel Almeida (quantodaniel@gmail.com). */ -jQuery(function($){ - $.timepicker.regional['pt-BR'] = { - hourText: 'Hora', - minuteText: 'Minuto', - amPmText: ['AM', 'PM'], - closeButtonText: 'Fechar', - nowButtonText: 'Agora', - deselectButtonText: 'Limpar' } - $.timepicker.setDefaults($.timepicker.regional['pt-BR']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ru.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ru.js deleted file mode 100644 index 34a5bcb82..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-ru.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Russian initialisation for the jQuery time picker plugin. */ -/* Writen by Zakhar Day (zakhar.day@gmail.com) */ -jQuery(function($){ - $.timepicker.regional['ru'] = { - hourText: 'Часы', - minuteText: 'Минуты', - amPmText: ['AM', 'PM'], - closeButtonText: 'Готово', - nowButtonText: 'Сейчас', - deselectButtonText: 'Снять выделение' } - $.timepicker.setDefaults($.timepicker.regional['ru']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sl.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sl.js deleted file mode 100644 index dbdb2c885..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sl.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Slovenian localization for the jQuery time picker plugin. */ -/* Written by Blaž Maležič (blaz@malezic.si) */ -jQuery(function($){ - $.timepicker.regional['sl'] = { - hourText: 'Ure', - minuteText: 'Minute', - amPmText: ['AM', 'PM'], - closeButtonText: 'Zapri', - nowButtonText: 'Zdaj', - deselectButtonText: 'Pobriši' } - $.timepicker.setDefaults($.timepicker.regional['sl']); -}); diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sv.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sv.js deleted file mode 100644 index d6d798ef3..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-sv.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Swedish initialisation for the timepicker plugin */ -/* Written by Björn Westlin (bjorn.westlin@su.se). */ -jQuery(function($){ - $.timepicker.regional['sv'] = { - hourText: 'Timme', - minuteText: 'Minut', - amPmText: ['AM', 'PM'] , - closeButtonText: 'Stäng', - nowButtonText: 'Nu', - deselectButtonText: 'Rensa' } - $.timepicker.setDefaults($.timepicker.regional['sv']); -}); diff --git a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-tr.js b/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-tr.js deleted file mode 100644 index 3d9673a3a..000000000 --- a/js/vendor/jquery-timepicker/i18n/jquery.ui.timepicker-tr.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Turkish initialisation for the jQuery time picker plugin. */ -/* Written by Mutlu Tevfik Koçak (mtkocak@gmail.com) */ -jQuery(function($){ - $.timepicker.regional['tr'] = { - hourText: 'Saat', - minuteText: 'Dakika', - amPmText: ['AM', 'PM'], - closeButtonText: 'Kapat', - nowButtonText: 'Şu anda', - deselectButtonText: 'Seçimi temizle' } - $.timepicker.setDefaults($.timepicker.regional['tr']); -}); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.core.min.js b/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.core.min.js deleted file mode 100644 index f242a50a1..000000000 --- a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.core.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.10.0 - 2013-01-24 -* http://jqueryui.com -* Includes: jquery.ui.core.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ -(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return e.css(this,"visibility")==="hidden"}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.10.0",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)}})})(jQuery); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.position.min.js b/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.position.min.js deleted file mode 100644 index 2a8fd1c55..000000000 --- a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.position.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.10.0 - 2013-01-24 -* http://jqueryui.com -* Includes: jquery.ui.position.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ -(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}function d(t){var n=t[0];return n.nodeType===9?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("
        "),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};lr(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML="",n.removeChild(t)}()})(jQuery); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.tabs.min.js b/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.tabs.min.js deleted file mode 100644 index 964b793bf..000000000 --- a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.tabs.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.10.0 - 2013-01-24 -* http://jqueryui.com -* Includes: jquery.ui.tabs.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ -(function(e,t){function i(){return++n}function s(e){return e.hash.length>1&&decodeURIComponent(e.href.replace(r,""))===decodeURIComponent(location.href.replace(r,""))}var n=0,r=/#.*$/;e.widget("ui.tabs",{version:"1.10.0",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,n=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),n.active=this._initialActive(),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(n.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var t=this.options.active,n=this.options.collapsible,r=location.hash.substring(1);if(t===null){r&&this.tabs.each(function(n,i){if(e(i).attr("aria-controls")===r)return t=n,!1}),t===null&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active")));if(t===null||t===-1)t=this.tabs.length?0:!1}return t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),t===-1&&(t=n?!1:0)),!n&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),r=this.tabs.index(n),i=!0;if(this._handlePageNav(t))return;switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:r++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:i=!1,r--;break;case e.ui.keyCode.END:r=this.anchors.length-1;break;case e.ui.keyCode.HOME:r=0;break;case e.ui.keyCode.SPACE:t.preventDefault(),clearTimeout(this.activating),this._activate(r);return;case e.ui.keyCode.ENTER:t.preventDefault(),clearTimeout(this.activating),this._activate(r===this.options.active?!1:r);return;default:return}t.preventDefault(),clearTimeout(this.activating),r=this._focusNextTab(r,i),t.ctrlKey||(n.attr("aria-selected","false"),this.tabs.eq(r).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",r)},this.delay))},_panelKeydown:function(t){if(this._handlePageNav(t))return;t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(t,n){function i(){return t>r&&(t=0),t<0&&(t=r),t}var r=this.tabs.length-1;while(e.inArray(i(),this.options.disabled)!==-1)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){if(e==="active"){this._activate(t);return}if(e==="disabled"){this._setupDisabled(t);return}this._super(e,t),e==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),!t&&this.options.active===!1&&this._activate(0)),e==="event"&&this._setupEvents(t),e==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active===!1||!this.anchors.length?(t.active=!1,this.active=e()):this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,r){var i,o,u,a=e(r).uniqueId().attr("id"),f=e(r).closest("li"),l=f.attr("aria-controls");s(r)?(i=r.hash,o=t.element.find(t._sanitizeSelector(i))):(u=t._tabId(f),i="#"+u,o=t.element.find(i),o.length||(o=t._createPanel(u),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),l&&f.data("ui-tabs-aria-controls",l),f.attr({"aria-controls":i.substring(1),"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("
        ").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n=0,r;r=this.tabs[n];n++)t===!0||e.inArray(n,t)!==-1?e(r).addClass("ui-state-disabled").attr("aria-disabled","true"):e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r=this.element.parent();t==="fill"?(n=r.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");if(r==="absolute"||r==="fixed")return;n-=t.outerHeight(!0)}),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):t==="auto"&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault();if(s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1)return;n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),!f.length&&!a.length&&e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l)},_toggle:function(t,n){function o(){r.running=!1,r._trigger("activate",t,n)}function u(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&r.options.show?r._show(i,r.options.show,o):(i.show(),o())}var r=this,i=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),u()),s.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),i.length&&s.length?n.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);if(r[0]===this.active[0])return;r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return typeof e=="string"&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;if(r===!1)return;n===t?r=!1:(n=this._getIndex(n),e.isArray(r)?r=e.map(r,function(e){return e!==n?e:null}):r=e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r)},disable:function(n){var r=this.options.disabled;if(r===!0)return;if(n===t)r=!0;else{n=this._getIndex(n);if(e.inArray(n,r)!==-1)return;e.isArray(r)?r=e.merge([n],r).sort():r=[n]}this._setupDisabled(r)},load:function(t,n){t=this._getIndex(t);var r=this,i=this.tabs.eq(t),o=i.find(".ui-tabs-anchor"),u=this._getPanelForTab(i),a={tab:i,panel:u};if(s(o[0]))return;this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),r._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){t==="abort"&&r.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr},1)}))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}})})(jQuery); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.widget.min.js b/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.widget.min.js deleted file mode 100644 index 14925b12a..000000000 --- a/js/vendor/jquery-timepicker/include/ui-1.10.0/jquery.ui.widget.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.10.0 - 2013-01-24 -* http://jqueryui.com -* Includes: jquery.ui.widget.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ -(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;(r=t[n])!=null;n++)try{e(r).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(t,n,r){var i,s,o,u,a={},f=t.split(".")[0];t=t.split(".")[1],i=f+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[f]=e[f]||{},s=e[f][t],o=e[f][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,r){if(!e.isFunction(r)){a[t]=r;return}a[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},i=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;return this._super=e,this._superApply=i,s=r.apply(this,arguments),this._super=t,this._superApply=n,s}}()}),o.prototype=e.widget.extend(u,{widgetEventPrefix:s?u.widgetEventPrefix:t},a,{constructor:o,namespace:f,widgetName:t,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;uYvsgk=}99w^d^D^d*@m74oMo<%#FcopJf?u00-~YVKV2wzrI*_R6;UORMea zBFVSEnN~eiVA6V&z`E)YLz5Aok^D)In}Yn=OzDpgR5Wv0XfT8pOkmV{sKAJ-PO9#T zZK}IXj&Q-V!U)!LcB_3K0&C*{ diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png deleted file mode 100644 index 64ece5707d91a6edf9fad4bfcce0c4dbcafcf58d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251 zcmVbvPcjKS|RKP(6sDcCAB(_QB%0978a<$Ah$!b|E zwn;|HO0i8cQj@~)s!ajF0S002ovPDHLkV1oEp BYH0uf diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_flat_10_000000_40x100.png deleted file mode 100644 index abdc01082bf3534eafecc5819d28c9574d44ea89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQY-ImG zFPf9b{J;c_6SHRK%WcbN_hZpM=(Ry;4Rxv2@@2Y=$K57eF$X$=!PC{xWt~$(69B)$ BI)4BF diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png deleted file mode 100644 index 9b383f4d2eab09c0f2a739d6b232c32934bc620b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104 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 diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png deleted file mode 100644 index f1273672d253263b7564e9e21d69d7d9d0b337d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l%l7LV~E7mxPQ=F85a&M@g_{ d|GeK{$Y5lo%PMu^>wln`44$rjF6*2UngE4^EGqy2 diff --git a/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/jquery-ui-1.10.0.custom.min.css b/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/jquery-ui-1.10.0.custom.min.css deleted file mode 100644 index 6fbe54e31..000000000 --- a/js/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/jquery-ui-1.10.0.custom.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.10.0 - 2013-01-25 -* http://jqueryui.com -* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px -* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px;background-position:16px 16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_ef8c08_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_ef8c08_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_ef8c08_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_228ef1_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffd27a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/index.html b/js/vendor/jquery-timepicker/index.html deleted file mode 100644 index 269c99956..000000000 --- a/js/vendor/jquery-timepicker/index.html +++ /dev/null @@ -1,1177 +0,0 @@ - - - - - jQuery UI Time Picker by Francois Gelinas - - - - - - - - - - - - - - - - - - -
        - - -
        - - -
        -
        - - - - -
        - aka beer! -
        -
        - -
        -
        - - -
        - -

        jQuery UI Timepicker - (By François Gélinas) - - -

        - -

        What is this?

        -

        - - This is a jQuery UI time picker plugin built to match with other official jQuery UI widgets. - Based on the existing date picker, it will blend nicely with your form and use your selected jQuery UI theme. - The plugin is very easy to integrate in your form for time (hours / minutes) inputs. -

        -

        - Licensed under the same license as jQuery : MIT and GPL licenses -

        - -
        - -
        - - - -
        -
        - - - - - [Show code] - -
        - - -
        - -
        - - - - - [Show code] - -
        - -
        - -
        - - -
        - See the internationalisation page for more information and details. - - [Show code] - -
        - -
        - -
        - - - - - [Show code] - -
        - -
        - -
        - - -
        - - - - - [Show code] - - -
        - - -
        - -
        - - - - - [Show code] - - -
        - - -
        - -
        - - - - - - [Show code] - -
        - - - -
        -
        - - - - - [Show code] - -
        - -
        - -
        - - - , - - - - - [Show code] - - -
        - - - - - [Show code] - - -
        - - -
        - -
        - - - - - - - [Show code] - - -
        - - -
        - -
        - - - - - [Show code] - -
        - -
        - - -
        - -
        - -
        - Inline time picker : - - - - -
        - -
        - -
        - -
        - [Show code] -
        -
        - -
        - - - -
        - - -
        - -
        - - Two timepickers to select chronological time range, the first timepicker is restricted to before the time selected in the second timepicker, and vice versa. Updated code to use the new minTime and maxTime options -
        - - - - - - [Show code] - - - - - -
        - - - - -
        -
        -
        - Example of using the new minTime and maxTime options -
        - -
        - -
        - [Show code] -
        - -
        -
        - - - -
        - - -
        - -
        - Example to disable and re-enable a timepicker. - -
        - -
        - - -
        -
        - -
        - -
        - [Show code] -
        - -
        -
        - - - -
        - - - - -
        - -
        - Set the timepicker date with a Date object and get the selected time as a Date object -
        -
        - -
        - -
        - -
        - Also, note that in the returned date object, the time is correct but the yeat/month/day part of the date is wrong, you have to extract the time of the object. -
        - [Show code] -
        -
        -
        - - - -
        - - - - - -
        - - - - - -
        - -

        Usage:

        -
        $('#timepicker').timepicker({
        -    // Options
        -    timeSeparator: ':',           // The character to use to separate hours and minutes. (default: ':')
        -    showLeadingZero: true,        // Define whether or not to show a leading zero for hours < 10.
        -                                     (default: true)
        -    showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10.
        -                                     (default: true)
        -    showPeriod: false,            // Define whether or not to show AM/PM with selected time. (default: false)
        -    showPeriodLabels: true,       // Define if the AM/PM labels on the left are displayed. (default: true)
        -    periodSeparator: ' ',         // The character to use to separate the time from the time period.
        -    altField: '#alternate_input', // Define an alternate input to parse selected time to
        -    defaultTime: '12:34',         // Used as default time when input field is empty or for inline timePicker
        -                                  // (set to 'now' for the current time, '' for no highlighted time,
        -                                     default value: now)
        -
        -    // trigger options
        -    showOn: 'focus',              // Define when the timepicker is shown.
        -                                  // 'focus': when the input gets focus, 'button' when the button trigger element is clicked,
        -                                  // 'both': when the input gets focus and when the button is clicked.
        -    button: null,                 // jQuery selector that acts as button trigger. ex: '#trigger_button'
        -
        -    // Localization
        -    hourText: 'Hour',             // Define the locale text for "Hours"
        -    minuteText: 'Minute',         // Define the locale text for "Minute"
        -    amPmText: ['AM', 'PM'],       // Define the locale text for periods
        -
        -    // Position
        -    myPosition: 'left top',       // Corner of the dialog to position, used with the jQuery UI Position utility if present.
        -    atPosition: 'left bottom',    // Corner of the input to position
        -
        -    // Events
        -    beforeShow: beforeShowCallback, // Callback function executed before the timepicker is rendered and displayed.
        -    onSelect: onSelectCallback,   // Define a callback function when an hour / minutes is selected.
        -    onClose: onCloseCallback,     // Define a callback function when the timepicker is closed.
        -    onHourShow: onHourShow,       // Define a callback to enable / disable certain hours. ex: function onHourShow(hour)
        -    onMinuteShow: onMinuteShow,   // Define a callback to enable / disable certain minutes. ex: function onMinuteShow(hour, minute)
        -
        -    // custom hours and minutes
        -    hours: {
        -        starts: 0,                // First displayed hour
        -        ends: 23                  // Last displayed hour
        -    },
        -    minutes: {
        -        starts: 0,                // First displayed minute
        -        ends: 55,                 // Last displayed minute
        -        interval: 5,              // Interval of displayed minutes
        -        manual: []                // Optional extra entries for minutes
        -    },
        -    rows: 4,                      // Number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
        -    showHours: true,              // Define if the hours section is displayed or not. Set to false to get a minute only dialog
        -    showMinutes: true,            // Define if the minutes section is displayed or not. Set to false to get an hour only dialog
        -
        -    // Min and Max time
        -    minTime: {                    // Set the minimum time selectable by the user, disable hours and minutes
        -        hour: minHour,            // previous to min time
        -        minute: minMinute
        -    },
        -    maxTime: {                    // Set the minimum time selectable by the user, disable hours and minutes
        -        hour: maxHour,            // after max time
        -        minute: maxMinute
        -    },
        -
        -
        -    // buttons
        -    showCloseButton: false,       // shows an OK button to confirm the edit
        -    closeButtonText: 'Done',      // Text for the confirmation button (ok button)
        -    showNowButton: false,         // Shows the 'now' button
        -    nowButtonText: 'Now',         // Text for the now button
        -    showDeselectButton: false,    // Shows the deselect time button
        -    deselectButtonText: 'Deselect' // Text for the deselect button
        -
        -});
        - -
        - - - - - - - - - - - -
        - -

        Releases :

        -
        - -
        0.3.3 - 23 October 2013
        -
        Better zIndex detection - Thanks Mark Larter ref #62
        -
        Added Hungarian localisation - Thanks Bálint Dávid Tarcsa.
        -
        Added the button self if showOn is "button" or "both" and the button element is not explicitely set. Thanks Kevin Reintjes ref #75
        -
        Fixed rounding time using not 5 minutes but using minutes from interval. Thanks Jan Dvořák ref #73
        -
        Added Option for adding manual entries in minutes display. Thanks Mischa Gorinskat ref #71
        -
        Added support for minTime and maxTime options. Thanks @phazei ref #76
        - -
        0.3.2 - 25 January 2013
        -
        Updated to jQuery 1.9.0 and UI 1.10.0. Removed deprecated IE6 hacks.
        -
        Added support for Date object with the setTime and getTimeAsDate function - thanks AAverin.
        -
        Removed an extra </tr>, thanks FishB8.
        -
        Fixed an error that occurs on some showAnim effects like 'blind'.
        -
        Fixed a problem when wither hours or minutes was required and missing, the parsed time was not formatted correctly.
        -
        Fixed a problem when available hours are all AM or all PM only and they would not show in the grid, thanks @malerbabomba
        - - -
        0.3.1 - 19 July 2012
        -
        Added the "destroy" method.
        -
        Fixed a bug in the deselect function, thanks Kazu.
        -
        Allow for hours and minutes outside normal time range (0-23, 0-59) for more flexibility.
        -
        Fixed a bug with the onClose callback that could generate an infinite loop.
        -
        Added Croatian/Bosnian translation, thanks Rene Brakus.
        -
        Added Portuguese/Brazilan tranlsation, thanks Daniel Almeida.
        -
        Added Spanish tranlsation, thanks Jandro González.
        - - -
        Release 0.3.0 - 27 March 2012
        -
        Fixed a zIndex problem in jQuery Dialog when the user clicked on the input while the timepicker was still visible.
        -
        Added Czech translation, thanks David Spohr
        -
        Added Swedish translation, thanks Björn Westlin
        -
        Added Dutch translation, thanks Lowie Hulzinga
        -
        Prevent showing the timepicker dialog with the button when disabled(Thanks ruhley. ref #38)
        -
        Add ui-state-disabled class to button trigger when disabled.
        -
        Fixed onClose function on first time passes the hours variable as string (Thanks Zanisimo, ref #39)
        -
        Added refresh method. ex: $('selector').timepicker('refresh');
        - -
        Release 0.2.9 - November 13, 2011
        -
        Fixed the zIndex problem and removed the zIndex option (Thanks everyone who reported the problem)
        -
        Fix a bug where repeatedly clicking on hour cells made the timepicker very slow.
        -
        Added Italian translation, thanks to Serge Margarita.
        - -
        Release 0.2.8 - October 28, 2011
        -
        Updated defaultTime to allow for Date object (github issue #26)
        -
        Fixed the now and deselect buttons in IE
        - -
        Release 0.2.7 - October 19, 2011
        -
        Added option to omit minutes in parsed time when user select 0 for minutes. (Thanks tribalvibes, Github issue #23)
        -
        Added support for internationalisation (fr, de and ja, Thanks Bernd Plagge).
        -
        Added an internationalisation page
        - -
        0.2.6 - October 12, 2011
        -
        Fixed a bug when input ID have more then one special char. (Thanks Jacqueline Krijnen)
        -
        Fixed a bug when parsing hours only or minutes only time. (Thanks protron, github issue #20)
        -
        Added 'Now', 'Deselect' and 'Close' buttons. (Thanks Christian Grobmeier for the close button code, github issue #22)
        - -
        0.2.5 - September 13, 2011
        -
        Added support for disable and enable. (Suggested by danielrex, github issue #17)
        -
        Added an example for 2 timepicker to behave as a period selector (start time and end time). (Thanks Bill Pellowe)
        -
        Renamed the stylesheet to jquery.ui.timepicker.css to be more consistent with jQuery UI file name convention.
        - -
        0.2.4 - August 5, 2011
        -
        Fixed the hand cursor in the css file. (Thanks Mike Neumegen)
        -
        Added position option to use with the jquery ui position utility.
        -
        Added option to display only hours or only minutes.
        - -
        0.2.3 - July 11, 2011
        -
        Fix github issue #3 : Bug when hours or minutes choices does not divide by number of rows (thanks wukimus).
        -
        Changed default behavior of the defaultTime option, if set to '' and input is empty, there will be no highlighted time in the popup (Thanks Rasmus Schultz)
        -
        Fix github issue #4 : Error when generating empty minute cell. (Thanks 123Haynes)
        -
        Fix github issue #5 : Add functionality for "getTime" option. (Thanks edanuff)
        -
        Added the periodSeparator option. (thanks jrchamp)
        -
        Fixed "getTime" for inline timepickers. (thanks Mike Neumegen)
        -
        Added "getHour" and "getMinute" to get individual values.
        -
        New page interface, about time :)
        - -
        0.2.2 - June 16, 2011
        -
        Fixed a "console.log" line that I forgot to remove before release 0.2.1. (Thanks Derek Lavine)
        - -
        0.2.1 - June 8, 2011
        -
        Timepicker does not give the focus back to the input any more after time selection. This is similar to the datepicker behaviour and is more natural to the user because it shows the dialog again when the user click on the input again, as expected.
        -
        Added options to customize the hours and minutes ranges and interval for more customization.
        - -
        0.2 - May 28, 2011
        -
        In the last release, I messed up versions and lost some changes so I'm fixing all this up with release 0.2
        - - -
        0.1.2 - May 26, 2011
        -
        Fixed a bug with inline timepickers that would append a #timepickr hashtag when selecting hours and minutes.
        -
        Fixed z-index problem with IE6 (Thanks Graham Bentley)
        -
        Added selection of highlighted text when enter is pressed on the input field (Thanks Glen Chiacchieri)
        -
        Adjusted some focus problems, now the input gets the focus back when the used click on hours / minutes.
        - -
        0.1.something aka the lost release - around April 11
        -
        Fixed a bug for when input Id had a dot in it, it was getting double escaped when it should not. (Thanks Zdenek Machac)
        -
        So in 0.1.1 I created a bug that made timepicker changes the location hash, well now it's fixed. (Thanks Lucas Falk)
        - -
        0.1.1 - April 6, 2011
        -
        Changed the cells click and dblclick binding for faster rendering in IE6/7 (Thanks Blair Parsons)
        -
        Fixed a class naming bug created in 0.1.0 (Thanks Morlion Peter)
        - -
        0.1.0 - March 23, 2011
        -
        Fixed some bugs with version 0.0.9
        - -
        0.0.9 - March 22, 2011
        -
        Added zIndex option (Thanks Frank Enderle)
        -
        Added showPeriodLabels option (default: true) to show/hide AM/PM labels on the left (thanks Frank Enderle)
        -
        Added showOn ['focus'|'button'|'both'] and button options for alternate trigger method
        - -
        0.0.8 - February 17, 2011
        -
        Fixed close event not triggered when switching to another input with time picker (thanks Stuart Gregg)
        - -
        0.0.7 - February 10, 2011
        -
        Added function to set time after initialisation :$('#timepicker').timepicker('setTime',newTime);
        -
        Added support for disabled period of time : onHourShow and onMinuteShow (thanks Rene Felgenträger)
        - -
        0.0.6 - January 19, 2011
        -
        Replaced some div with tables to : fix some display bugs in IE7, fix inline display and fix my headhake.
        -
        Added standard "change" event being triggered on the input when the content changes. (Thanks Rasmus Schultz)
        -
        Added support for inline timePicker, attached to div or span.
        -
        Added altField that receive the parsed time value when selected time changes.
        -
        Added defaultTime value to use when input field is missing (inline) or input value is empty. If defaultTime is missing then current time is used.
        - -
        0.0.5 - January 18, 2011
        -
        Now updating time picker selected value when manually typing in the text field (thanks Rasmus Schultz)
        - Another step toward inline time picker ?
        -
        Fixed : with showPeriod: true and showLeadingZero: true, PM hours did not show leading zeros (thanks Chandler May)
        -
        Fixed : with showPeriod: true and showLeadingZero: true, Selecting 12 AM shows as 00 AM in the input field, also parsing 12AM did not work correctly (thanks Rasmus Schultz)
        - -
        0.0.4 - January 10, 2011
        -
        Changed showLeadingZero to affect only hours, added showMinutesLeadingZero for minutes display.
        -
        Changed the default value of timeSeparator from 'h' to ':'.
        -
        Removed width:100% on tables in the css, caused a bug in some browsers.
        - -
        0.0.3 - January 8, 2011
        -
        Fixed a bug with the widget not displaying with some jQuery UI 1.8.7 css. (Thanks Alexander Fietz)
        -
        Fixed a display bug on page load, a small empty div was visible at the bottom of pages. (Thanks Gertjan van Roekel)
        -
        Modified the jquery-ui-timepicker.css to make the widget more dynamic to style and sizes changes.
        - -
        0.0.2 - January 4, 2011
        -
        Added showPeriod: period (AM/PM) in input and showLeadingZero: to control display of number < 10. (big thanks Steve Commisso)
        - -
        0.0.1 - December 2010
        -
        First release
        -
        - - -
        - - - - - -
        - -

        Download Timepicker

        - -

        - Current version : 0.3.3 - released 25 January 2013 -

        - -

        - Get it on github -

        - -

        - Download from here (.zip) -

        - -
        - -

        - I put a lot of time and effort in this project. If you like it, buy me a beer please donate - -

        - -
        - - - - -
        - -
        - -

        - Instruction for legacy jQuery integration (jQuery 1.2.6 and jQuery UI 1.6) -

        - -
          -
        • - Get the legacy package here - , built with jQuery Timepicker 0.2.4 but should work with newer versions -
        • -
        • - Make sure to include jquery-1.2.6.js, jquery.fix.for.1.2.6.js and jquery.ui.1.6.all.js -
        • -
        • - See the working example in index.html in the "legacy_1.2.6" folder. -
        • -
        • - Support for previous versions of jquery is limited. -
        • -
        - - - -
        -
        - - -
        - - - - -
        - - - diff --git a/js/vendor/jquery-timepicker/jquery-timepicker.jquery.json b/js/vendor/jquery-timepicker/jquery-timepicker.jquery.json new file mode 100644 index 000000000..25bba5672 --- /dev/null +++ b/js/vendor/jquery-timepicker/jquery-timepicker.jquery.json @@ -0,0 +1,62 @@ +{ + "name": "jquery-timepicker", + "title": "jQuery Timepicker", + "description": "Enhances standard form input fields helping users to select (or type) times.", + "version": "1.3.3", + "homepage": "http://timepicker.co", + "license": "(GPL-2.0 OR MIT)", + "downloads": "https://github.com/wvega/timepicker/releases", + "author": { + "name": "Willington Vega", + "email": "wvega@wvega.com", + "url": "http://wvega.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/wvega/timepicker.git" + }, + "bugs": { + "url": "https://github.com/wvega/timepicker/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/wvega/timepicker/blob/master/LICENSE-MIT" + }, + { + "type": "GPL", + "url": "http://github.com/wvega/timepicker/blob/master/LICENSE-GPL" + } + ], + "dependencies": { + "jquery": ">= 1.4.3" + }, + "devDependencies": { + "grunt": "~0.4.5", + "grunt-contrib-clean": "0.4.1", + "grunt-contrib-compress": "0.5.0", + "grunt-contrib-concat": "0.1.3", + "grunt-contrib-connect": "0.3.0", + "grunt-contrib-copy": "0.4.0", + "grunt-contrib-csslint": "0.1.1", + "grunt-contrib-cssmin": "0.5.0", + "grunt-contrib-jshint": "0.3.0", + "grunt-contrib-qunit": "^0.7.0", + "grunt-contrib-uglify": "^0.9.2" + }, + "engines": { + "node": ">= 0.6.0" + }, + "scripts": { + "test": "grunt test" + }, + "keywords": [ + "timepicker", + "time", + "picker", + "calendar", + "dropdown", + "input", + "form" + ] +} diff --git a/js/vendor/jquery-timepicker/jquery.timepicker.css b/js/vendor/jquery-timepicker/jquery.timepicker.css new file mode 100644 index 000000000..6dc1066aa --- /dev/null +++ b/js/vendor/jquery-timepicker/jquery.timepicker.css @@ -0,0 +1,84 @@ +/** + * jQuery Timepicker + * http://timepicker.co + * + * Enhances standard form input fields helping users to select (or type) times. + * + * Copyright (c) 2016 Willington Vega; Licensed MIT, GPL + */ + + .ui-timepicker-container { + position: absolute; + overflow: hidden; + box-sizing: border-box; +} + +.ui-timepicker { + box-sizing: content-box; + display: block; + height: 205px; + list-style: none outside none; + margin: 0; + padding: 0 1px; + text-align: center; +} + +.ui-timepicker-viewport { + box-sizing: content-box; + display: block; + height: 205px; + margin: 0; + padding: 0; + overflow: auto; + overflow-x: hidden; /* IE */ +} + +.ui-timepicker-standard { + /* overwrites .ui-widget */ + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; + /* overwrites .ui-widget-content */ + background-color: #FFF; + border: 1px solid #AAA; + color: #222; + /* overwrites .ui-menu */ + margin: 0; + padding: 2px; +} +.ui-timepicker-standard a { + border: 1px solid transparent; + color: #222; + display: block; + padding: 0.2em 0.4em; + text-decoration: none; +} +.ui-timepicker-standard .ui-state-hover { + /* overwrites .ui-state-hover */ + background-color: #DADADA; + border: 1px solid #999; + font-weight: normal; + color: #212121; +} +.ui-timepicker-standard .ui-menu-item { + /* overwrites .ui-menu and .ui-menu-item */ + /*clear: left; + float: left;*/ + margin: 0; + padding: 0; +} + +.ui-timepicker-corners, +.ui-timepicker-corners .ui-corner-all { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} + +.ui-timepicker-hidden { + /* overwrites .ui-helper-hidden */ + display: none; +} + +.ui-timepicker-no-scrollbar .ui-timepicker { + border: none; +} diff --git a/js/vendor/jquery-timepicker/jquery.timepicker.js b/js/vendor/jquery-timepicker/jquery.timepicker.js new file mode 100644 index 000000000..c9a06b49a --- /dev/null +++ b/js/vendor/jquery-timepicker/jquery.timepicker.js @@ -0,0 +1,858 @@ +/** + * jQuery Timepicker + * http://timepicker.co + * + * Enhances standard form input fields helping users to select (or type) times. + * + * Copyright (c) 2016 Willington Vega; Licensed MIT, GPL + */ + +if (typeof jQuery !== 'undefined') { + (function($, undefined) { + + function pad(str, ch, length) { + return (new Array(length + 1 - str.length).join(ch)) + str; + } + + function normalize() { + if (arguments.length === 1) { + var date = arguments[0]; + if (typeof date === 'string') { + date = $.fn.timepicker.parseTime(date); + } + return new Date(0, 0, 0, date.getHours(), date.getMinutes(), date.getSeconds()); + } else if (arguments.length === 3) { + return new Date(0, 0, 0, arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 2) { + return new Date(0, 0, 0, arguments[0], arguments[1], 0); + } else { + return new Date(0, 0, 0); + } + } + + $.TimePicker = function() { + var widget = this; + + widget.container = $('.ui-timepicker-container'); + widget.ui = widget.container.find('.ui-timepicker'); + + if (widget.container.length === 0) { + widget.container = $('
        ').addClass('ui-timepicker-container') + .addClass('ui-timepicker-hidden ui-helper-hidden') + .appendTo('body') + .hide(); + widget.ui = $( '
        ' ).addClass('ui-timepicker') + .addClass('ui-widget ui-widget-content ui-menu') + .addClass('ui-corner-all') + .appendTo(widget.container); + widget.viewport = $('
          ').addClass( 'ui-timepicker-viewport' ) + .appendTo( widget.ui ); + + if ($.fn.jquery >= '1.4.2') { + widget.ui.delegate('a', 'mouseenter.timepicker', function() { + // passing false instead of an instance object tells the function + // to use the current instance + widget.activate(false, $(this).parent()); + }).delegate('a', 'mouseleave.timepicker', function() { + widget.deactivate(false); + }).delegate('a', 'click.timepicker', function(event) { + event.preventDefault(); + widget.select(false, $(this).parent()); + }); + } + } + }; + + $.TimePicker.count = 0; + $.TimePicker.instance = function() { + if (!$.TimePicker._instance) { + $.TimePicker._instance = new $.TimePicker(); + } + return $.TimePicker._instance; + }; + + $.TimePicker.prototype = { + // extracted from from jQuery UI Core + // http://github,com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js + keyCode: { + ALT: 18, + BLOQ_MAYUS: 20, + CTRL: 17, + DOWN: 40, + END: 35, + ENTER: 13, + HOME: 36, + LEFT: 37, + NUMPAD_ENTER: 108, + PAGE_DOWN: 34, + PAGE_UP: 33, + RIGHT: 39, + SHIFT: 16, + TAB: 9, + UP: 38 + }, + + _items: function(i, startTime) { + var widget = this, ul = $('
            '), item = null, time, end; + + // interval should be a multiple of 60 if timeFormat is not + // showing minutes + if (i.options.timeFormat.indexOf('m') === -1 && i.options.interval % 60 !== 0) { + i.options.interval = Math.max(Math.round(i.options.interval / 60), 1) * 60; + } + + if (startTime) { + time = normalize(startTime); + } else if (i.options.startTime) { + time = normalize(i.options.startTime); + } else { + time = normalize(i.options.startHour, i.options.startMinutes); + } + + end = new Date(time.getTime() + 24 * 60 * 60 * 1000); + + while(time < end) { + if (widget._isValidTime(i, time)) { + item = $('
          • ').addClass('ui-menu-item').appendTo(ul); + $('').addClass('ui-corner-all').text($.fn.timepicker.formatTime(i.options.timeFormat, time)).appendTo(item); + item.data('time-value', time); + } + time = new Date(time.getTime() + i.options.interval * 60 * 1000); + } + + return ul.children(); + }, + + _isValidTime: function(i, time) { + var min = null, max = null; + + time = normalize(time); + + if (i.options.minTime !== null) { + min = normalize(i.options.minTime); + } else if (i.options.minHour !== null || i.options.minMinutes !== null) { + min = normalize(i.options.minHour, i.options.minMinutes); + } + + if (i.options.maxTime !== null) { + max = normalize(i.options.maxTime); + } else if (i.options.maxHour !== null || i.options.maxMinutes !== null) { + max = normalize(i.options.maxHour, i.options.maxMinutes); + } + + if (min !== null && max !== null) { + return time >= min && time <= max; + } else if (min !== null) { + return time >= min; + } else if (max !== null) { + return time <= max; + } + + return true; + }, + + _hasScroll: function() { + // fix for jQuery 1.6 new prop method + var m = typeof this.ui.prop !== 'undefined' ? 'prop' : 'attr'; + return this.ui.height() < this.ui[m]('scrollHeight'); + }, + + /** + * TODO: Write me! + * + * @param i + * @param direction + * @param edge + * */ + _move: function(i, direction, edge) { + var widget = this; + if (widget.closed()) { + widget.open(i); + } + if (!widget.active) { + widget.activate( i, widget.viewport.children( edge ) ); + return; + } + var next = widget.active[direction + 'All']('.ui-menu-item').eq(0); + if (next.length) { + widget.activate(i, next); + } else { + widget.activate( i, widget.viewport.children( edge ) ); + } + }, + + // + // protected methods + // + + register: function(node, options) { + var widget = this, i = {}; // timepicker instance object + + i.element = $(node); + + if (i.element.data('TimePicker')) { + return; + } + + i.options = $.metadata ? $.extend({}, options, i.element.metadata()) : $.extend({}, options); + i.widget = widget; + + // proxy functions for the exposed api methods + $.extend(i, { + next: function() {return widget.next(i) ;}, + previous: function() {return widget.previous(i) ;}, + first: function() { return widget.first(i) ;}, + last: function() { return widget.last(i) ;}, + selected: function() { return widget.selected(i) ;}, + open: function() { return widget.open(i) ;}, + close: function() { return widget.close(i) ;}, + closed: function() { return widget.closed(i) ;}, + destroy: function() { return widget.destroy(i) ;}, + + parse: function(str) { return widget.parse(i, str) ;}, + format: function(time, format) { return widget.format(i, time, format); }, + getTime: function() { return widget.getTime(i) ;}, + setTime: function(time, silent) { return widget.setTime(i, time, silent); }, + option: function(name, value) { return widget.option(i, name, value); } + }); + + widget._setDefaultTime(i); + widget._addInputEventsHandlers(i); + + i.element.data('TimePicker', i); + }, + + _setDefaultTime: function(i) { + if (i.options.defaultTime === 'now') { + i.setTime(normalize(new Date())); + } else if (i.options.defaultTime && i.options.defaultTime.getFullYear) { + i.setTime(normalize(i.options.defaultTime)); + } else if (i.options.defaultTime) { + i.setTime($.fn.timepicker.parseTime(i.options.defaultTime)); + } + }, + + _addInputEventsHandlers: function(i) { + var widget = this; + + i.element.bind('keydown.timepicker', function(event) { + switch (event.which || event.keyCode) { + case widget.keyCode.ENTER: + case widget.keyCode.NUMPAD_ENTER: + event.preventDefault(); + if (widget.closed()) { + i.element.trigger('change.timepicker'); + } else { + widget.select(i, widget.active); + } + break; + case widget.keyCode.UP: + i.previous(); + break; + case widget.keyCode.DOWN: + i.next(); + break; + default: + if (!widget.closed()) { + i.close(true); + } + break; + } + }).bind('focus.timepicker', function() { + i.open(); + }).bind('blur.timepicker', function() { + setTimeout(function() { + if (i.element.data('timepicker-user-clicked-outside')) { + i.close(); + } + }); + }).bind('change.timepicker', function() { + if (i.closed()) { + i.setTime($.fn.timepicker.parseTime(i.element.val())); + } + }); + }, + + select: function(i, item) { + var widget = this, instance = i === false ? widget.instance : i; + widget.setTime(instance, $.fn.timepicker.parseTime(item.children('a').text())); + widget.close(instance, true); + }, + + activate: function(i, item) { + var widget = this, instance = i === false ? widget.instance : i; + + if (instance !== widget.instance) { + return; + } else { + widget.deactivate(); + } + + if (widget._hasScroll()) { + var offset = item.offset().top - widget.ui.offset().top, + scroll = widget.ui.scrollTop(), + height = widget.ui.height(); + if (offset < 0) { + widget.ui.scrollTop(scroll + offset); + } else if (offset >= height) { + widget.ui.scrollTop(scroll + offset - height + item.height()); + } + } + + widget.active = item.eq(0).children('a').addClass('ui-state-hover') + .attr('id', 'ui-active-item') + .end(); + }, + + deactivate: function() { + var widget = this; + if (!widget.active) { return; } + widget.active.children('a').removeClass('ui-state-hover').removeAttr('id'); + widget.active = null; + }, + + /** + * _activate, _deactivate, first, last, next, previous, _move and + * _hasScroll were extracted from jQuery UI Menu + * http://github,com/jquery/jquery-ui/blob/menu/ui/jquery.ui.menu.js + */ + + // + // public methods + // + + next: function(i) { + if (this.closed() || this.instance === i) { + this._move(i, 'next', '.ui-menu-item:first'); + } + return i.element; + }, + + previous: function(i) { + if (this.closed() || this.instance === i) { + this._move(i, 'prev', '.ui-menu-item:last'); + } + return i.element; + }, + + first: function(i) { + if (this.instance === i) { + return this.active && this.active.prevAll('.ui-menu-item').length === 0; + } + return false; + }, + + last: function(i) { + if (this.instance === i) { + return this.active && this.active.nextAll('.ui-menu-item').length === 0; + } + return false; + }, + + selected: function(i) { + if (this.instance === i) { + return this.active ? this.active : null; + } + return null; + }, + + open: function(i) { + var widget = this, + selectedTime = i.getTime(), + arrange = i.options.dynamic && selectedTime; + + // return if dropdown is disabled + if (!i.options.dropdown) { return i.element; } + + // fix for issue https://github.com/wvega/timepicker/issues/56 + // idea from https://prototype.lighthouseapp.com/projects/8887/tickets/248-results-popup-from-ajaxautocompleter-disappear-when-user-clicks-on-scrollbars-in-ie6ie7 + i.element.data('timepicker-event-namespace', Math.random()); + + $(document).bind('click.timepicker-' + i.element.data('timepicker-event-namespace'), function(event) { + if (i.element.get(0) === event.target) { + i.element.data('timepicker-user-clicked-outside', false); + } else { + i.element.data('timepicker-user-clicked-outside', true).blur(); + } + }); + + // if a date is already selected and options.dynamic is true, + // arrange the items in the list so the first item is + // cronologically right after the selected date. + // TODO: set selectedTime + if (i.rebuild || !i.items || arrange) { + i.items = widget._items(i, arrange ? selectedTime : null); + } + + // remove old li elements keeping associated events, then append + // the new li elements to the ul + if (i.rebuild || widget.instance !== i || arrange) { + // handle menu events when using jQuery versions previous to + // 1.4.2 (thanks to Brian Link) + // http://github.com/wvega/timepicker/issues#issue/4 + if ($.fn.jquery < '1.4.2') { + widget.viewport.children().remove(); + widget.viewport.append(i.items); + widget.viewport.find('a').bind('mouseover.timepicker', function() { + widget.activate(i, $(this).parent()); + }).bind('mouseout.timepicker', function() { + widget.deactivate(i); + }).bind('click.timepicker', function(event) { + event.preventDefault(); + widget.select(i, $(this).parent()); + }); + } else { + widget.viewport.children().detach(); + widget.viewport.append(i.items); + } + } + + i.rebuild = false; + + // theme + widget.container.removeClass('ui-helper-hidden ui-timepicker-hidden ui-timepicker-standard ui-timepicker-corners').show(); + + switch (i.options.theme) { + case 'standard': + widget.container.addClass('ui-timepicker-standard'); + break; + case 'standard-rounded-corners': + widget.container.addClass('ui-timepicker-standard ui-timepicker-corners'); + break; + default: + break; + } + + /* resize ui */ + + // we are hiding the scrollbar in the dropdown menu adding a 40px + // padding to the wrapper element making the scrollbar appear in the + // part of the wrapper that's hidden by the container (a DIV). + if ( ! widget.container.hasClass( 'ui-timepicker-no-scrollbar' ) && ! i.options.scrollbar ) { + widget.container.addClass( 'ui-timepicker-no-scrollbar' ); + widget.viewport.css( { paddingRight: 40 } ); + } + + var containerDecorationHeight = widget.container.outerHeight() - widget.container.height(), + zindex = i.options.zindex ? i.options.zindex : i.element.offsetParent().css( 'z-index' ), + elementOffset = i.element.offset(); + + // position the container right below the element, or as close to as possible. + widget.container.css( { + top: elementOffset.top + i.element.outerHeight(), + left: elementOffset.left + } ); + + // then show the container so that the browser can consider the timepicker's + // height to calculate the page's total height and decide if adding scrollbars + // is necessary. + widget.container.show(); + + // now we need to calculate the element offset and position the container again. + // If the browser added scrollbars, the container's original position is not aligned + // with the element's final position. This step fixes that problem. + widget.container.css( { + left: i.element.offset().left, + height: widget.ui.outerHeight() + containerDecorationHeight, + width: i.element.outerWidth(), + zIndex: zindex, + cursor: 'default' + } ); + + var calculatedWidth = widget.container.width() - ( widget.ui.outerWidth() - widget.ui.width() ); + + // hardcode ui, viewport and item's width. I couldn't get it to work using CSS only + widget.ui.css( { width: calculatedWidth } ); + widget.viewport.css( { width: calculatedWidth } ); + i.items.css( { width: calculatedWidth } ); + + // XXX: what's this line doing here? + widget.instance = i; + + // try to match input field's current value with an item in the + // dropdown + if (selectedTime) { + i.items.each(function() { + var item = $(this), time; + + if ($.fn.jquery < '1.4.2') { + time = $.fn.timepicker.parseTime(item.find('a').text()); + } else { + time = item.data('time-value'); + } + + if (time.getTime() === selectedTime.getTime()) { + widget.activate(i, item); + return false; + } + return true; + }); + } else { + widget.deactivate(i); + } + + // don't break the chain + return i.element; + }, + + close: function(i) { + var widget = this; + + if (widget.instance === i) { + widget.container.addClass('ui-helper-hidden ui-timepicker-hidden').hide(); + widget.ui.scrollTop(0); + widget.ui.children().removeClass('ui-state-hover'); + } + + $(document).unbind('click.timepicker-' + i.element.data('timepicker-event-namespace')); + + return i.element; + }, + + closed: function() { + return this.ui.is(':hidden'); + }, + + destroy: function(i) { + var widget = this; + widget.close(i, true); + return i.element.unbind('.timepicker').data('TimePicker', null); + }, + + // + + parse: function(i, str) { + return $.fn.timepicker.parseTime(str); + }, + + format: function(i, time, format) { + format = format || i.options.timeFormat; + return $.fn.timepicker.formatTime(format, time); + }, + + getTime: function(i) { + var widget = this, + current = $.fn.timepicker.parseTime(i.element.val()); + + // if current value is not valid, we return null. + // stored Date object is ignored, because the current value + // (valid or invalid) always takes priority + if (current instanceof Date && !widget._isValidTime(i, current)) { + return null; + } else if (current instanceof Date && i.selectedTime) { + // if the textfield's value and the stored Date object + // have the same representation using current format + // we prefer the stored Date object to avoid unnecesary + // lost of precision. + if (i.format(current) === i.format(i.selectedTime)) { + return i.selectedTime; + } else { + return current; + } + } else if (current instanceof Date) { + return current; + } else { + return null; + } + }, + + setTime: function(i, time, silent) { + var widget = this, previous = i.selectedTime; + + if (typeof time === 'string') { + time = i.parse(time); + } + + if (time && time.getMinutes && widget._isValidTime(i, time)) { + time = normalize(time); + i.selectedTime = time; + i.element.val(i.format(time, i.options.timeFormat)); + + // TODO: add documentaion about setTime being chainable + if (silent) { return i; } + } else { + i.selectedTime = null; + } + + // custom change event and change callback + // TODO: add documentation about this event + if (previous !== null || i.selectedTime !== null) { + i.element.trigger('time-change', [time]); + if ($.isFunction(i.options.change)) { + i.options.change.apply(i.element, [time]); + } + } + + return i.element; + }, + + option: function(i, name, value) { + if (typeof value === 'undefined') { + return i.options[name]; + } + + var time = i.getTime(), + options, destructive; + + if (typeof name === 'string') { + options = {}; + options[name] = value; + } else { + options = name; + } + + // some options require rebuilding the dropdown items + destructive = ['minHour', 'minMinutes', 'minTime', + 'maxHour', 'maxMinutes', 'maxTime', + 'startHour', 'startMinutes', 'startTime', + 'timeFormat', 'interval', 'dropdown']; + + + $.each(options, function(name) { + i.options[name] = options[name]; + i.rebuild = i.rebuild || $.inArray(name, destructive) > -1; + }); + + if (i.rebuild) { + i.setTime(time); + } + } + }; + + $.TimePicker.defaults = { + timeFormat: 'hh:mm p', + minHour: null, + minMinutes: null, + minTime: null, + maxHour: null, + maxMinutes: null, + maxTime: null, + startHour: null, + startMinutes: null, + startTime: null, + interval: 30, + dynamic: true, + theme: 'standard', + zindex: null, + dropdown: true, + scrollbar: false, + // callbacks + change: function(/*time*/) {} + }; + + $.TimePicker.methods = { + chainable: [ + 'next', + 'previous', + 'open', + 'close', + 'destroy', + 'setTime' + ] + }; + + $.fn.timepicker = function(options) { + // support calling API methods using the following syntax: + // $(...).timepicker('parse', '11p'); + if (typeof options === 'string') { + var args = Array.prototype.slice.call(arguments, 1), + method, result; + + // chainable API methods + if (options === 'option' && arguments.length > 2) { + method = 'each'; + } else if ($.inArray(options, $.TimePicker.methods.chainable) !== -1) { + method = 'each'; + // API methods that return a value + } else { + method = 'map'; + } + + result = this[method](function() { + var element = $(this), i = element.data('TimePicker'); + if (typeof i === 'object') { + return i[options].apply(i, args); + } + }); + + if (method === 'map' && this.length === 1) { + return $.makeArray(result).shift(); + } else if (method === 'map') { + return $.makeArray(result); + } else { + return result; + } + } + + // calling the constructor again on a jQuery object with a single + // element returns a reference to a TimePicker object. + if (this.length === 1 && this.data('TimePicker')) { + return this.data('TimePicker'); + } + + var globals = $.extend({}, $.TimePicker.defaults, options); + + return this.each(function() { + $.TimePicker.instance().register(this, globals); + }); + }; + + /** + * TODO: documentation + */ + $.fn.timepicker.formatTime = function(format, time) { + var hours = time.getHours(), + hours12 = hours % 12, + minutes = time.getMinutes(), + seconds = time.getSeconds(), + replacements = { + hh: pad((hours12 === 0 ? 12 : hours12).toString(), '0', 2), + HH: pad(hours.toString(), '0', 2), + mm: pad(minutes.toString(), '0', 2), + ss: pad(seconds.toString(), '0', 2), + h: (hours12 === 0 ? 12 : hours12), + H: hours, + m: minutes, + s: seconds, + p: hours > 11 ? 'PM' : 'AM' + }, + str = format, k = ''; + for (k in replacements) { + if (replacements.hasOwnProperty(k)) { + str = str.replace(new RegExp(k,'g'), replacements[k]); + } + } + // replacements is not guaranteed to be order and the 'p' can cause problems + str = str.replace(new RegExp('a','g'), hours > 11 ? 'pm' : 'am'); + return str; + }; + + /** + * Convert a string representing a given time into a Date object. + * + * The Date object will have attributes others than hours, minutes and + * seconds set to current local time values. The function will return + * false if given string can't be converted. + * + * If there is an 'a' in the string we set am to true, if there is a 'p' + * we set pm to true, if both are present only am is setted to true. + * + * All non-digit characters are removed from the string before trying to + * parse the time. + * + * '' can't be converted and the function returns false. + * '1' is converted to 01:00:00 am + * '11' is converted to 11:00:00 am + * '111' is converted to 01:11:00 am + * '1111' is converted to 11:11:00 am + * '11111' is converted to 01:11:11 am + * '111111' is converted to 11:11:11 am + * + * Only the first six (or less) characters are considered. + * + * Special case: + * + * When hours is greater than 24 and the last digit is less or equal than 6, and minutes + * and seconds are less or equal than 60, we append a trailing zero and + * start parsing process again. Examples: + * + * '95' is treated as '950' and converted to 09:50:00 am + * '46' is treated as '460' and converted to 05:00:00 am + * '57' can't be converted and the function returns false. + * + * For a detailed list of supported formats check the unit tests at + * http://github.com/wvega/timepicker/tree/master/tests/ + */ + $.fn.timepicker.parseTime = (function() { + var patterns = [ + // 1, 12, 123, 1234, 12345, 123456 + [/^(\d+)$/, '$1'], + // :1, :2, :3, :4 ... :9 + [/^:(\d)$/, '$10'], + // :1, :12, :123, :1234 ... + [/^:(\d+)/, '$1'], + // 6:06, 5:59, 5:8 + [/^(\d):([7-9])$/, '0$10$2'], + [/^(\d):(\d\d)$/, '$1$2'], + [/^(\d):(\d{1,})$/, '0$1$20'], + // 10:8, 10:10, 10:34 + [/^(\d\d):([7-9])$/, '$10$2'], + [/^(\d\d):(\d)$/, '$1$20'], + [/^(\d\d):(\d*)$/, '$1$2'], + // 123:4, 1234:456 + [/^(\d{3,}):(\d)$/, '$10$2'], + [/^(\d{3,}):(\d{2,})/, '$1$2'], + // + [/^(\d):(\d):(\d)$/, '0$10$20$3'], + [/^(\d{1,2}):(\d):(\d\d)/, '$10$2$3'] + ], + length = patterns.length; + + return function(str) { + var time = normalize(new Date()), + am = false, pm = false, h = false, m = false, s = false; + + if (typeof str === 'undefined' || !str.toLowerCase) { return null; } + + str = str.toLowerCase(); + am = /a/.test(str); + pm = am ? false : /p/.test(str); + str = str.replace(/[^0-9:]/g, '').replace(/:+/g, ':'); + + for (var k = 0; k < length; k = k + 1) { + if (patterns[k][0].test(str)) { + str = str.replace(patterns[k][0], patterns[k][1]); + break; + } + } + str = str.replace(/:/g, ''); + + if (str.length === 1) { + h = str; + } else if (str.length === 2) { + h = str; + } else if (str.length === 3 || str.length === 5) { + h = str.substr(0, 1); + m = str.substr(1, 2); + s = str.substr(3, 2); + } else if (str.length === 4 || str.length > 5) { + h = str.substr(0, 2); + m = str.substr(2, 2); + s = str.substr(4, 2); + } + + if (str.length > 0 && str.length < 5) { + if (str.length < 3) { + m = 0; + } + s = 0; + } + + if (h === false || m === false || s === false) { + return false; + } + + h = parseInt(h, 10); + m = parseInt(m, 10); + s = parseInt(s, 10); + + if (am && h === 12) { + h = 0; + } else if (pm && h < 12) { + h = h + 12; + } + + if (h > 24) { + if (str.length >= 6) { + return $.fn.timepicker.parseTime(str.substr(0,5)); + } else { + return $.fn.timepicker.parseTime(str + '0' + (am ? 'a' : '') + (pm ? 'p' : '')); + } + } else { + time.setHours(h, m, s); + return time; + } + }; + })(); + })(jQuery); +} diff --git a/js/vendor/jquery-timepicker/jquery.ui.timepicker.css b/js/vendor/jquery-timepicker/jquery.ui.timepicker.css deleted file mode 100644 index b5930fb73..000000000 --- a/js/vendor/jquery-timepicker/jquery.ui.timepicker.css +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Timepicker stylesheet - * Highly inspired from datepicker - * FG - Nov 2010 - Web3R - * - * version 0.0.3 : Fixed some settings, more dynamic - * version 0.0.4 : Removed width:100% on tables - * version 0.1.1 : set width 0 on tables to fix an ie6 bug - */ - -.ui-timepicker-inline { display: inline; } - -#ui-timepicker-div { padding: 0.2em; } -.ui-timepicker-table { display: inline-table; width: 0; } -.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; } - -.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; } - -.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; } -.ui-timepicker-table td { padding: 0.1em; width: 2.2em; } -.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; } - -/* span for disabled cells */ -.ui-timepicker-table td span { - display:block; - padding:0.2em 0.3em 0.2em 0.5em; - width: 1.2em; - - text-align:right; - text-decoration:none; -} -/* anchors for clickable cells */ -.ui-timepicker-table td a { - display:block; - padding:0.2em 0.3em 0.2em 0.5em; - width: 1.2em; - cursor: pointer; - text-align:right; - text-decoration:none; -} - - -/* buttons and button pane styling */ -.ui-timepicker .ui-timepicker-buttonpane { - background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; -} -.ui-timepicker .ui-timepicker-buttonpane button { margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -/* The close button */ -.ui-timepicker .ui-timepicker-close { float: right } - -/* the now button */ -.ui-timepicker .ui-timepicker-now { float: left; } - -/* the deselect button */ -.ui-timepicker .ui-timepicker-deselect { float: left; } - - diff --git a/js/vendor/jquery-timepicker/jquery.ui.timepicker.js b/js/vendor/jquery-timepicker/jquery.ui.timepicker.js deleted file mode 100644 index 7b4d04dc7..000000000 --- a/js/vendor/jquery-timepicker/jquery.ui.timepicker.js +++ /dev/null @@ -1,1496 +0,0 @@ -/* - * jQuery UI Timepicker - * - * Copyright 2010-2013, Francois Gelinas - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://fgelinas.com/code/timepicker - * - * Depends: - * jquery.ui.core.js - * jquery.ui.position.js (only if position settings are used) - * - * Change version 0.1.0 - moved the t-rex up here - * - ____ - ___ .-~. /_"-._ - `-._~-. / /_ "~o\ :Y - \ \ / : \~x. ` ') - ] Y / | Y< ~-.__j - / ! _.--~T : l l< /.-~ - / / ____.--~ . ` l /~\ \<|Y - / / .-~~" /| . ',-~\ \L| - / / / .^ \ Y~Y \.^>/l_ "--' - / Y .-"( . l__ j_j l_/ /~_.-~ . - Y l / \ ) ~~~." / `/"~ / \.__/l_ - | \ _.-" ~-{__ l : l._Z~-.___.--~ - | ~---~ / ~~"---\_ ' __[> - l . _.^ ___ _>-y~ - \ \ . .-~ .-~ ~>--" / - \ ~---" / ./ _.-' - "-.,_____.,_ _.--~\ _.-~ - ~~ ( _} -Row - `. ~( - ) \ - /,`--'~\--'~\ - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ->T-Rex<- -*/ - -(function ($) { - - $.extend($.ui, { timepicker: { version: "0.3.3"} }); - - var PROP_NAME = 'timepicker', - tpuuid = new Date().getTime(); - - /* Time picker manager. - Use the singleton instance of this class, $.timepicker, to interact with the time picker. - Settings for (groups of) time pickers are maintained in an instance object, - allowing multiple different settings on the same page. */ - - function Timepicker() { - this.debug = true; // Change this to true to start debugging - this._curInst = null; // The current instance in use - this._disabledInputs = []; // List of time picker inputs that have been disabled - this._timepickerShowing = false; // True if the popup picker is showing , false if not - this._inDialog = false; // True if showing within a "dialog", false if not - this._dialogClass = 'ui-timepicker-dialog'; // The name of the dialog marker class - this._mainDivId = 'ui-timepicker-div'; // The ID of the main timepicker division - this._inlineClass = 'ui-timepicker-inline'; // The name of the inline marker class - this._currentClass = 'ui-timepicker-current'; // The name of the current hour / minutes marker class - this._dayOverClass = 'ui-timepicker-days-cell-over'; // The name of the day hover marker class - - this.regional = []; // Available regional settings, indexed by language code - this.regional[''] = { // Default regional settings - hourText: 'Hour', // Display text for hours section - minuteText: 'Minute', // Display text for minutes link - amPmText: ['AM', 'PM'], // Display text for AM PM - closeButtonText: 'Done', // Text for the confirmation button (ok button) - nowButtonText: 'Now', // Text for the now button - deselectButtonText: 'Deselect' // Text for the deselect button - }; - this._defaults = { // Global defaults for all the time picker instances - showOn: 'focus', // 'focus' for popup on focus, - // 'button' for trigger button, or 'both' for either (not yet implemented) - button: null, // 'button' element that will trigger the timepicker - showAnim: 'fadeIn', // Name of jQuery animation for popup - showOptions: {}, // Options for enhanced animations - appendText: '', // Display text following the input box, e.g. showing the format - - beforeShow: null, // Define a callback function executed before the timepicker is shown - onSelect: null, // Define a callback function when a hour / minutes is selected - onClose: null, // Define a callback function when the timepicker is closed - - timeSeparator: ':', // The character to use to separate hours and minutes. - periodSeparator: ' ', // The character to use to separate the time from the time period. - showPeriod: false, // Define whether or not to show AM/PM with selected time - showPeriodLabels: true, // Show the AM/PM labels on the left of the time picker - showLeadingZero: true, // Define whether or not to show a leading zero for hours < 10. [true/false] - showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10. - altField: '', // Selector for an alternate field to store selected time into - defaultTime: 'now', // Used as default time when input field is empty or for inline timePicker - // (set to 'now' for the current time, '' for no highlighted time) - myPosition: 'left top', // Position of the dialog relative to the input. - // see the position utility for more info : http://jqueryui.com/demos/position/ - atPosition: 'left bottom', // Position of the input element to match - // Note : if the position utility is not loaded, the timepicker will attach left top to left bottom - //NEW: 2011-02-03 - onHourShow: null, // callback for enabling / disabling on selectable hours ex : function(hour) { return true; } - onMinuteShow: null, // callback for enabling / disabling on time selection ex : function(hour,minute) { return true; } - - hours: { - starts: 0, // first displayed hour - ends: 23 // last displayed hour - }, - minutes: { - starts: 0, // first displayed minute - ends: 55, // last displayed minute - interval: 5, // interval of displayed minutes - manual: [] // optional extra manual entries for minutes - }, - rows: 4, // number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2 - // 2011-08-05 0.2.4 - showHours: true, // display the hours section of the dialog - showMinutes: true, // display the minute section of the dialog - optionalMinutes: false, // optionally parse inputs of whole hours with minutes omitted - - // buttons - showCloseButton: false, // shows an OK button to confirm the edit - showNowButton: false, // Shows the 'now' button - showDeselectButton: false, // Shows the deselect time button - - maxTime: { - hour: null, - minute: null - }, - minTime: { - hour: null, - minute: null - } - - }; - $.extend(this._defaults, this.regional['']); - - this.tpDiv = $(''); - } - - $.extend(Timepicker.prototype, { - /* Class name added to elements to indicate already configured with a time picker. */ - markerClassName: 'hasTimepicker', - - /* Debug logging (if enabled). */ - log: function () { - if (this.debug) - console.log.apply('', arguments); - }, - - _widgetTimepicker: function () { - return this.tpDiv; - }, - - /* Override the default settings for all instances of the time picker. - @param settings object - the new settings to use as defaults (anonymous object) - @return the manager object */ - setDefaults: function (settings) { - extendRemove(this._defaults, settings || {}); - return this; - }, - - /* Attach the time picker to a jQuery selection. - @param target element - the target input field or division or span - @param settings object - the new settings to use for this time picker instance (anonymous) */ - _attachTimepicker: function (target, settings) { - // check for settings on the control itself - in namespace 'time:' - var inlineSettings = null; - for (var attrName in this._defaults) { - var attrValue = target.getAttribute('time:' + attrName); - if (attrValue) { - inlineSettings = inlineSettings || {}; - try { - inlineSettings[attrName] = eval(attrValue); - } catch (err) { - inlineSettings[attrName] = attrValue; - } - } - } - var nodeName = target.nodeName.toLowerCase(); - var inline = (nodeName == 'div' || nodeName == 'span'); - - if (!target.id) { - this.uuid += 1; - target.id = 'tp' + this.uuid; - } - var inst = this._newInst($(target), inline); - inst.settings = $.extend({}, settings || {}, inlineSettings || {}); - if (nodeName == 'input') { - this._connectTimepicker(target, inst); - // init inst.hours and inst.minutes from the input value - this._setTimeFromField(inst); - } else if (inline) { - this._inlineTimepicker(target, inst); - } - - - }, - - /* Create a new instance object. */ - _newInst: function (target, inline) { - var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars - return { - id: id, input: target, // associated target - inline: inline, // is timepicker inline or not : - tpDiv: (!inline ? this.tpDiv : // presentation div - $('
            ')) - }; - }, - - /* Attach the time picker to an input field. */ - _connectTimepicker: function (target, inst) { - var input = $(target); - inst.append = $([]); - inst.trigger = $([]); - if (input.hasClass(this.markerClassName)) { return; } - this._attachments(input, inst); - input.addClass(this.markerClassName). - keydown(this._doKeyDown). - keyup(this._doKeyUp). - bind("setData.timepicker", function (event, key, value) { - inst.settings[key] = value; - }). - bind("getData.timepicker", function (event, key) { - return this._get(inst, key); - }); - $.data(target, PROP_NAME, inst); - }, - - /* Handle keystrokes. */ - _doKeyDown: function (event) { - var inst = $.timepicker._getInst(event.target); - var handled = true; - inst._keyEvent = true; - if ($.timepicker._timepickerShowing) { - switch (event.keyCode) { - case 9: $.timepicker._hideTimepicker(); - handled = false; - break; // hide on tab out - case 13: - $.timepicker._updateSelectedValue(inst); - $.timepicker._hideTimepicker(); - - return false; // don't submit the form - break; // select the value on enter - case 27: $.timepicker._hideTimepicker(); - break; // hide on escape - default: handled = false; - } - } - else if (event.keyCode == 36 && event.ctrlKey) { // display the time picker on ctrl+home - $.timepicker._showTimepicker(this); - } - else { - handled = false; - } - if (handled) { - event.preventDefault(); - event.stopPropagation(); - } - }, - - /* Update selected time on keyUp */ - /* Added verion 0.0.5 */ - _doKeyUp: function (event) { - var inst = $.timepicker._getInst(event.target); - $.timepicker._setTimeFromField(inst); - $.timepicker._updateTimepicker(inst); - }, - - /* Make attachments based on settings. */ - _attachments: function (input, inst) { - var appendText = this._get(inst, 'appendText'); - var isRTL = this._get(inst, 'isRTL'); - if (inst.append) { inst.append.remove(); } - if (appendText) { - inst.append = $('' + appendText + ''); - input[isRTL ? 'before' : 'after'](inst.append); - } - input.unbind('focus.timepicker', this._showTimepicker); - input.unbind('click.timepicker', this._adjustZIndex); - - if (inst.trigger) { inst.trigger.remove(); } - - var showOn = this._get(inst, 'showOn'); - if (showOn == 'focus' || showOn == 'both') { // pop-up time picker when in the marked field - input.bind("focus.timepicker", this._showTimepicker); - input.bind("click.timepicker", this._adjustZIndex); - } - if (showOn == 'button' || showOn == 'both') { // pop-up time picker when 'button' element is clicked - var button = this._get(inst, 'button'); - - // Add button if button element is not set - if(button == null) { - button = $(''); - input.after(button); - } - - $(button).bind("click.timepicker", function () { - if ($.timepicker._timepickerShowing && $.timepicker._lastInput == input[0]) { - $.timepicker._hideTimepicker(); - } else if (!inst.input.is(':disabled')) { - $.timepicker._showTimepicker(input[0]); - } - return false; - }); - - } - }, - - - /* Attach an inline time picker to a div. */ - _inlineTimepicker: function(target, inst) { - var divSpan = $(target); - if (divSpan.hasClass(this.markerClassName)) - return; - divSpan.addClass(this.markerClassName).append(inst.tpDiv). - bind("setData.timepicker", function(event, key, value){ - inst.settings[key] = value; - }).bind("getData.timepicker", function(event, key){ - return this._get(inst, key); - }); - $.data(target, PROP_NAME, inst); - - this._setTimeFromField(inst); - this._updateTimepicker(inst); - inst.tpDiv.show(); - }, - - _adjustZIndex: function(input) { - input = input.target || input; - var inst = $.timepicker._getInst(input); - inst.tpDiv.css('zIndex', $.timepicker._getZIndex(input) +1); - }, - - /* Pop-up the time picker for a given input field. - @param input element - the input field attached to the time picker or - event - if triggered by focus */ - _showTimepicker: function (input) { - input = input.target || input; - if (input.nodeName.toLowerCase() != 'input') { input = $('input', input.parentNode)[0]; } // find from button/image trigger - - if ($.timepicker._isDisabledTimepicker(input) || $.timepicker._lastInput == input) { return; } // already here - - // fix v 0.0.8 - close current timepicker before showing another one - $.timepicker._hideTimepicker(); - - var inst = $.timepicker._getInst(input); - if ($.timepicker._curInst && $.timepicker._curInst != inst) { - $.timepicker._curInst.tpDiv.stop(true, true); - } - var beforeShow = $.timepicker._get(inst, 'beforeShow'); - extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {})); - inst.lastVal = null; - $.timepicker._lastInput = input; - - $.timepicker._setTimeFromField(inst); - - // calculate default position - if ($.timepicker._inDialog) { input.value = ''; } // hide cursor - if (!$.timepicker._pos) { // position below input - $.timepicker._pos = $.timepicker._findPos(input); - $.timepicker._pos[1] += input.offsetHeight; // add the height - } - var isFixed = false; - $(input).parents().each(function () { - isFixed |= $(this).css('position') == 'fixed'; - return !isFixed; - }); - - var offset = { left: $.timepicker._pos[0], top: $.timepicker._pos[1] }; - - $.timepicker._pos = null; - // determine sizing offscreen - inst.tpDiv.css({ position: 'absolute', display: 'block', top: '-1000px' }); - $.timepicker._updateTimepicker(inst); - - - // position with the ui position utility, if loaded - if ( ( ! inst.inline ) && ( typeof $.ui.position == 'object' ) ) { - inst.tpDiv.position({ - of: inst.input, - my: $.timepicker._get( inst, 'myPosition' ), - at: $.timepicker._get( inst, 'atPosition' ), - // offset: $( "#offset" ).val(), - // using: using, - collision: 'flip' - }); - var offset = inst.tpDiv.offset(); - $.timepicker._pos = [offset.top, offset.left]; - } - - - // reset clicked state - inst._hoursClicked = false; - inst._minutesClicked = false; - - // fix width for dynamic number of time pickers - // and adjust position before showing - offset = $.timepicker._checkOffset(inst, offset, isFixed); - inst.tpDiv.css({ position: ($.timepicker._inDialog && $.blockUI ? - 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none', - left: offset.left + 'px', top: offset.top + 'px' - }); - if ( ! inst.inline ) { - var showAnim = $.timepicker._get(inst, 'showAnim'); - var duration = $.timepicker._get(inst, 'duration'); - - var postProcess = function () { - $.timepicker._timepickerShowing = true; - var borders = $.timepicker._getBorders(inst.tpDiv); - inst.tpDiv.find('iframe.ui-timepicker-cover'). // IE6- only - css({ left: -borders[0], top: -borders[1], - width: inst.tpDiv.outerWidth(), height: inst.tpDiv.outerHeight() - }); - }; - - // Fixed the zIndex problem for real (I hope) - FG - v 0.2.9 - $.timepicker._adjustZIndex(input); - //inst.tpDiv.css('zIndex', $.timepicker._getZIndex(input) +1); - - if ($.effects && $.effects[showAnim]) { - inst.tpDiv.show(showAnim, $.timepicker._get(inst, 'showOptions'), duration, postProcess); - } - else { - inst.tpDiv.show((showAnim ? duration : null), postProcess); - } - if (!showAnim || !duration) { postProcess(); } - if (inst.input.is(':visible') && !inst.input.is(':disabled')) { inst.input.focus(); } - $.timepicker._curInst = inst; - } - }, - - // This is an enhanced copy of the zIndex function of UI core 1.8.?? For backward compatibility. - // Enhancement returns maximum zindex value discovered while traversing parent elements, - // rather than the first zindex value found. Ensures the timepicker popup will be in front, - // even in funky scenarios like non-jq dialog containers with large fixed zindex values and - // nested zindex-influenced elements of their own. - _getZIndex: function (target) { - var elem = $(target); - var maxValue = 0; - var position, value; - while (elem.length && elem[0] !== document) { - position = elem.css("position"); - if (position === "absolute" || position === "relative" || position === "fixed") { - value = parseInt(elem.css("zIndex"), 10); - if (!isNaN(value) && value !== 0) { - if (value > maxValue) { maxValue = value; } - } - } - elem = elem.parent(); - } - - return maxValue; - }, - - /* Refresh the time picker - @param target element - The target input field or inline container element. */ - _refreshTimepicker: function(target) { - var inst = this._getInst(target); - if (inst) { - this._updateTimepicker(inst); - } - }, - - - /* Generate the time picker content. */ - _updateTimepicker: function (inst) { - inst.tpDiv.empty().append(this._generateHTML(inst)); - this._rebindDialogEvents(inst); - - }, - - _rebindDialogEvents: function (inst) { - var borders = $.timepicker._getBorders(inst.tpDiv), - self = this; - inst.tpDiv - .find('iframe.ui-timepicker-cover') // IE6- only - .css({ left: -borders[0], top: -borders[1], - width: inst.tpDiv.outerWidth(), height: inst.tpDiv.outerHeight() - }) - .end() - // after the picker html is appended bind the click & double click events (faster in IE this way - // then letting the browser interpret the inline events) - // the binding for the minute cells also exists in _updateMinuteDisplay - .find('.ui-timepicker-minute-cell') - .unbind() - .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectMinutes, this)) - .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectMinutes, this)) - .end() - .find('.ui-timepicker-hour-cell') - .unbind() - .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectHours, this)) - .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectHours, this)) - .end() - .find('.ui-timepicker td a') - .unbind() - .bind('mouseout', function () { - $(this).removeClass('ui-state-hover'); - if (this.className.indexOf('ui-timepicker-prev') != -1) $(this).removeClass('ui-timepicker-prev-hover'); - if (this.className.indexOf('ui-timepicker-next') != -1) $(this).removeClass('ui-timepicker-next-hover'); - }) - .bind('mouseover', function () { - if ( ! self._isDisabledTimepicker(inst.inline ? inst.tpDiv.parent()[0] : inst.input[0])) { - $(this).parents('.ui-timepicker-calendar').find('a').removeClass('ui-state-hover'); - $(this).addClass('ui-state-hover'); - if (this.className.indexOf('ui-timepicker-prev') != -1) $(this).addClass('ui-timepicker-prev-hover'); - if (this.className.indexOf('ui-timepicker-next') != -1) $(this).addClass('ui-timepicker-next-hover'); - } - }) - .end() - .find('.' + this._dayOverClass + ' a') - .trigger('mouseover') - .end() - .find('.ui-timepicker-now').bind("click", function(e) { - $.timepicker.selectNow(e); - }).end() - .find('.ui-timepicker-deselect').bind("click",function(e) { - $.timepicker.deselectTime(e); - }).end() - .find('.ui-timepicker-close').bind("click",function(e) { - $.timepicker._hideTimepicker(); - }).end(); - }, - - /* Generate the HTML for the current state of the time picker. */ - _generateHTML: function (inst) { - - var h, m, row, col, html, hoursHtml, minutesHtml = '', - showPeriod = (this._get(inst, 'showPeriod') == true), - showPeriodLabels = (this._get(inst, 'showPeriodLabels') == true), - showLeadingZero = (this._get(inst, 'showLeadingZero') == true), - showHours = (this._get(inst, 'showHours') == true), - showMinutes = (this._get(inst, 'showMinutes') == true), - amPmText = this._get(inst, 'amPmText'), - rows = this._get(inst, 'rows'), - amRows = 0, - pmRows = 0, - amItems = 0, - pmItems = 0, - amFirstRow = 0, - pmFirstRow = 0, - hours = Array(), - hours_options = this._get(inst, 'hours'), - hoursPerRow = null, - hourCounter = 0, - hourLabel = this._get(inst, 'hourText'), - showCloseButton = this._get(inst, 'showCloseButton'), - closeButtonText = this._get(inst, 'closeButtonText'), - showNowButton = this._get(inst, 'showNowButton'), - nowButtonText = this._get(inst, 'nowButtonText'), - showDeselectButton = this._get(inst, 'showDeselectButton'), - deselectButtonText = this._get(inst, 'deselectButtonText'), - showButtonPanel = showCloseButton || showNowButton || showDeselectButton; - - - - // prepare all hours and minutes, makes it easier to distribute by rows - for (h = hours_options.starts; h <= hours_options.ends; h++) { - hours.push (h); - } - hoursPerRow = Math.ceil(hours.length / rows); // always round up - - if (showPeriodLabels) { - for (hourCounter = 0; hourCounter < hours.length; hourCounter++) { - if (hours[hourCounter] < 12) { - amItems++; - } - else { - pmItems++; - } - } - hourCounter = 0; - - amRows = Math.floor(amItems / hours.length * rows); - pmRows = Math.floor(pmItems / hours.length * rows); - - // assign the extra row to the period that is more densely populated - if (rows != amRows + pmRows) { - // Make sure: AM Has Items and either PM Does Not, AM has no rows yet, or AM is more dense - if (amItems && (!pmItems || !amRows || (pmRows && amItems / amRows >= pmItems / pmRows))) { - amRows++; - } else { - pmRows++; - } - } - amFirstRow = Math.min(amRows, 1); - pmFirstRow = amRows + 1; - - if (amRows == 0) { - hoursPerRow = Math.ceil(pmItems / pmRows); - } else if (pmRows == 0) { - hoursPerRow = Math.ceil(amItems / amRows); - } else { - hoursPerRow = Math.ceil(Math.max(amItems / amRows, pmItems / pmRows)); - } - } - - - html = ''; - - if (showHours) { - - html += ''; // Close the Hour td - } - - if (showMinutes) { - html += ''; - } - - html += ''; - - - if (showButtonPanel) { - var buttonPanel = ''; - } - html += '
            ' + - '
            ' + - hourLabel + - '
            ' + - ''; - - for (row = 1; row <= rows; row++) { - html += ''; - // AM - if (row == amFirstRow && showPeriodLabels) { - html += ''; - } - // PM - if (row == pmFirstRow && showPeriodLabels) { - html += ''; - } - for (col = 1; col <= hoursPerRow; col++) { - if (showPeriodLabels && row < pmFirstRow && hours[hourCounter] >= 12) { - html += this._generateHTMLHourCell(inst, undefined, showPeriod, showLeadingZero); - } else { - html += this._generateHTMLHourCell(inst, hours[hourCounter], showPeriod, showLeadingZero); - hourCounter++; - } - } - html += ''; - } - html += '
            ' + amPmText[0] + '' + amPmText[1] + '
            ' + // Close the hours cells table - '
            '; - html += this._generateHTMLMinutes(inst); - html += '
            '; - if (showNowButton) { - buttonPanel += ''; - } - if (showDeselectButton) { - buttonPanel += ''; - } - if (showCloseButton) { - buttonPanel += ''; - } - - html += buttonPanel + '
            '; - - return html; - }, - - /* Special function that update the minutes selection in currently visible timepicker - * called on hour selection when onMinuteShow is defined */ - _updateMinuteDisplay: function (inst) { - var newHtml = this._generateHTMLMinutes(inst); - inst.tpDiv.find('td.ui-timepicker-minutes').html(newHtml); - this._rebindDialogEvents(inst); - // after the picker html is appended bind the click & double click events (faster in IE this way - // then letting the browser interpret the inline events) - // yes I know, duplicate code, sorry -/* .find('.ui-timepicker-minute-cell') - .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectMinutes, this)) - .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectMinutes, this)); -*/ - - }, - - /* - * Generate the minutes table - * This is separated from the _generateHTML function because is can be called separately (when hours changes) - */ - _generateHTMLMinutes: function (inst) { - - var m, row, html = '', - rows = this._get(inst, 'rows'), - minutes = Array(), - minutes_options = this._get(inst, 'minutes'), - minutesPerRow = null, - minuteCounter = 0, - showMinutesLeadingZero = (this._get(inst, 'showMinutesLeadingZero') == true), - onMinuteShow = this._get(inst, 'onMinuteShow'), - minuteLabel = this._get(inst, 'minuteText'); - - if ( ! minutes_options.starts) { - minutes_options.starts = 0; - } - if ( ! minutes_options.ends) { - minutes_options.ends = 59; - } - if ( ! minutes_options.manual) { - minutes_options.manual = []; - } - for (m = minutes_options.starts; m <= minutes_options.ends; m += minutes_options.interval) { - minutes.push(m); - } - for (i = 0; i < minutes_options.manual.length;i++) { - var currMin = minutes_options.manual[i]; - - // Validate & filter duplicates of manual minute input - if (typeof currMin != 'number' || currMin < 0 || currMin > 59 || $.inArray(currMin, minutes) >= 0) { - continue; - } - minutes.push(currMin); - } - - // Sort to get correct order after adding manual minutes - // Use compare function to sort by number, instead of string (default) - minutes.sort(function(a, b) { - return a-b; - }); - - minutesPerRow = Math.round(minutes.length / rows + 0.49); // always round up - - /* - * The minutes table - */ - // if currently selected minute is not enabled, we have a problem and need to select a new minute. - if (onMinuteShow && - (onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours , inst.minutes]) == false) ) { - // loop minutes and select first available - for (minuteCounter = 0; minuteCounter < minutes.length; minuteCounter += 1) { - m = minutes[minuteCounter]; - if (onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours, m])) { - inst.minutes = m; - break; - } - } - } - - - - html += '
            ' + - minuteLabel + - '
            ' + - ''; - - minuteCounter = 0; - for (row = 1; row <= rows; row++) { - html += ''; - while (minuteCounter < row * minutesPerRow) { - var m = minutes[minuteCounter]; - var displayText = ''; - if (m !== undefined ) { - displayText = (m < 10) && showMinutesLeadingZero ? "0" + m.toString() : m.toString(); - } - html += this._generateHTMLMinuteCell(inst, m, displayText); - minuteCounter++; - } - html += ''; - } - - html += '
            '; - - return html; - }, - - /* Generate the content of a "Hour" cell */ - _generateHTMLHourCell: function (inst, hour, showPeriod, showLeadingZero) { - - var displayHour = hour; - if ((hour > 12) && showPeriod) { - displayHour = hour - 12; - } - if ((displayHour == 0) && showPeriod) { - displayHour = 12; - } - if ((displayHour < 10) && showLeadingZero) { - displayHour = '0' + displayHour; - } - - var html = ""; - var enabled = true; - var onHourShow = this._get(inst, 'onHourShow'); //custom callback - var maxTime = this._get(inst, 'maxTime'); - var minTime = this._get(inst, 'minTime'); - - if (hour == undefined) { - html = ' '; - return html; - } - - if (onHourShow) { - enabled = onHourShow.apply((inst.input ? inst.input[0] : null), [hour]); - } - - if (enabled) { - if ( !isNaN(parseInt(maxTime.hour)) && hour > maxTime.hour ) enabled = false; - if ( !isNaN(parseInt(minTime.hour)) && hour < minTime.hour ) enabled = false; - } - - if (enabled) { - html = '' + - '
            ' + - displayHour.toString() + - ''; - } - else { - html = - '' + - '' + - displayHour.toString() + - '' + - ''; - } - return html; - }, - - /* Generate the content of a "Hour" cell */ - _generateHTMLMinuteCell: function (inst, minute, displayText) { - var html = ""; - var enabled = true; - var hour = inst.hours; - var onMinuteShow = this._get(inst, 'onMinuteShow'); //custom callback - var maxTime = this._get(inst, 'maxTime'); - var minTime = this._get(inst, 'minTime'); - - if (onMinuteShow) { - //NEW: 2011-02-03 we should give the hour as a parameter as well! - enabled = onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours,minute]); //trigger callback - } - - if (minute == undefined) { - html = ' '; - return html; - } - - if (enabled && hour !== null) { - if ( !isNaN(parseInt(maxTime.hour)) && !isNaN(parseInt(maxTime.minute)) && hour >= maxTime.hour && minute > maxTime.minute ) enabled = false; - if ( !isNaN(parseInt(minTime.hour)) && !isNaN(parseInt(minTime.minute)) && hour <= minTime.hour && minute < minTime.minute ) enabled = false; - } - - if (enabled) { - html = '' + - '' + - displayText + - ''; - } - else { - - html = '' + - '' + - displayText + - '' + - ''; - } - return html; - }, - - - /* Detach a timepicker from its control. - @param target element - the target input field or division or span */ - _destroyTimepicker: function(target) { - var $target = $(target); - var inst = $.data(target, PROP_NAME); - if (!$target.hasClass(this.markerClassName)) { - return; - } - var nodeName = target.nodeName.toLowerCase(); - $.removeData(target, PROP_NAME); - if (nodeName == 'input') { - inst.append.remove(); - inst.trigger.remove(); - $target.removeClass(this.markerClassName) - .unbind('focus.timepicker', this._showTimepicker) - .unbind('click.timepicker', this._adjustZIndex); - } else if (nodeName == 'div' || nodeName == 'span') - $target.removeClass(this.markerClassName).empty(); - }, - - /* Enable the date picker to a jQuery selection. - @param target element - the target input field or division or span */ - _enableTimepicker: function(target) { - var $target = $(target), - target_id = $target.attr('id'), - inst = $.data(target, PROP_NAME); - - if (!$target.hasClass(this.markerClassName)) { - return; - } - var nodeName = target.nodeName.toLowerCase(); - if (nodeName == 'input') { - target.disabled = false; - var button = this._get(inst, 'button'); - $(button).removeClass('ui-state-disabled').disabled = false; - inst.trigger.filter('button'). - each(function() { this.disabled = false; }).end(); - } - else if (nodeName == 'div' || nodeName == 'span') { - var inline = $target.children('.' + this._inlineClass); - inline.children().removeClass('ui-state-disabled'); - inline.find('button').each( - function() { this.disabled = false } - ) - } - this._disabledInputs = $.map(this._disabledInputs, - function(value) { return (value == target_id ? null : value); }); // delete entry - }, - - /* Disable the time picker to a jQuery selection. - @param target element - the target input field or division or span */ - _disableTimepicker: function(target) { - var $target = $(target); - var inst = $.data(target, PROP_NAME); - if (!$target.hasClass(this.markerClassName)) { - return; - } - var nodeName = target.nodeName.toLowerCase(); - if (nodeName == 'input') { - var button = this._get(inst, 'button'); - - $(button).addClass('ui-state-disabled').disabled = true; - target.disabled = true; - - inst.trigger.filter('button'). - each(function() { this.disabled = true; }).end(); - - } - else if (nodeName == 'div' || nodeName == 'span') { - var inline = $target.children('.' + this._inlineClass); - inline.children().addClass('ui-state-disabled'); - inline.find('button').each( - function() { this.disabled = true } - ) - - } - this._disabledInputs = $.map(this._disabledInputs, - function(value) { return (value == target ? null : value); }); // delete entry - this._disabledInputs[this._disabledInputs.length] = $target.attr('id'); - }, - - /* Is the first field in a jQuery collection disabled as a timepicker? - @param target_id element - the target input field or division or span - @return boolean - true if disabled, false if enabled */ - _isDisabledTimepicker: function (target_id) { - if ( ! target_id) { return false; } - for (var i = 0; i < this._disabledInputs.length; i++) { - if (this._disabledInputs[i] == target_id) { return true; } - } - return false; - }, - - /* Check positioning to remain on screen. */ - _checkOffset: function (inst, offset, isFixed) { - var tpWidth = inst.tpDiv.outerWidth(); - var tpHeight = inst.tpDiv.outerHeight(); - var inputWidth = inst.input ? inst.input.outerWidth() : 0; - var inputHeight = inst.input ? inst.input.outerHeight() : 0; - var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft(); - var viewHeight = document.documentElement.clientHeight + $(document).scrollTop(); - - offset.left -= (this._get(inst, 'isRTL') ? (tpWidth - inputWidth) : 0); - offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0; - offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; - - // now check if timepicker is showing outside window viewport - move to a better place if so. - offset.left -= Math.min(offset.left, (offset.left + tpWidth > viewWidth && viewWidth > tpWidth) ? - Math.abs(offset.left + tpWidth - viewWidth) : 0); - offset.top -= Math.min(offset.top, (offset.top + tpHeight > viewHeight && viewHeight > tpHeight) ? - Math.abs(tpHeight + inputHeight) : 0); - - return offset; - }, - - /* Find an object's position on the screen. */ - _findPos: function (obj) { - var inst = this._getInst(obj); - var isRTL = this._get(inst, 'isRTL'); - while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) { - obj = obj[isRTL ? 'previousSibling' : 'nextSibling']; - } - var position = $(obj).offset(); - return [position.left, position.top]; - }, - - /* Retrieve the size of left and top borders for an element. - @param elem (jQuery object) the element of interest - @return (number[2]) the left and top borders */ - _getBorders: function (elem) { - var convert = function (value) { - return { thin: 1, medium: 2, thick: 3}[value] || value; - }; - return [parseFloat(convert(elem.css('border-left-width'))), - parseFloat(convert(elem.css('border-top-width')))]; - }, - - - /* Close time picker if clicked elsewhere. */ - _checkExternalClick: function (event) { - if (!$.timepicker._curInst) { return; } - var $target = $(event.target); - if ($target[0].id != $.timepicker._mainDivId && - $target.parents('#' + $.timepicker._mainDivId).length == 0 && - !$target.hasClass($.timepicker.markerClassName) && - !$target.hasClass($.timepicker._triggerClass) && - $.timepicker._timepickerShowing && !($.timepicker._inDialog && $.blockUI)) - $.timepicker._hideTimepicker(); - }, - - /* Hide the time picker from view. - @param input element - the input field attached to the time picker */ - _hideTimepicker: function (input) { - var inst = this._curInst; - if (!inst || (input && inst != $.data(input, PROP_NAME))) { return; } - if (this._timepickerShowing) { - var showAnim = this._get(inst, 'showAnim'); - var duration = this._get(inst, 'duration'); - var postProcess = function () { - $.timepicker._tidyDialog(inst); - this._curInst = null; - }; - if ($.effects && $.effects[showAnim]) { - inst.tpDiv.hide(showAnim, $.timepicker._get(inst, 'showOptions'), duration, postProcess); - } - else { - inst.tpDiv[(showAnim == 'slideDown' ? 'slideUp' : - (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess); - } - if (!showAnim) { postProcess(); } - - this._timepickerShowing = false; - - this._lastInput = null; - if (this._inDialog) { - this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' }); - if ($.blockUI) { - $.unblockUI(); - $('body').append(this.tpDiv); - } - } - this._inDialog = false; - - var onClose = this._get(inst, 'onClose'); - if (onClose) { - onClose.apply( - (inst.input ? inst.input[0] : null), - [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback - } - - } - }, - - - - /* Tidy up after a dialog display. */ - _tidyDialog: function (inst) { - inst.tpDiv.removeClass(this._dialogClass).unbind('.ui-timepicker'); - }, - - /* Retrieve the instance data for the target control. - @param target element - the target input field or division or span - @return object - the associated instance data - @throws error if a jQuery problem getting data */ - _getInst: function (target) { - try { - return $.data(target, PROP_NAME); - } - catch (err) { - throw 'Missing instance data for this timepicker'; - } - }, - - /* Get a setting value, defaulting if necessary. */ - _get: function (inst, name) { - return inst.settings[name] !== undefined ? - inst.settings[name] : this._defaults[name]; - }, - - /* Parse existing time and initialise time picker. */ - _setTimeFromField: function (inst) { - if (inst.input.val() == inst.lastVal) { return; } - var defaultTime = this._get(inst, 'defaultTime'); - - var timeToParse = defaultTime == 'now' ? this._getCurrentTimeRounded(inst) : defaultTime; - if ((inst.inline == false) && (inst.input.val() != '')) { timeToParse = inst.input.val() } - - if (timeToParse instanceof Date) { - inst.hours = timeToParse.getHours(); - inst.minutes = timeToParse.getMinutes(); - } else { - var timeVal = inst.lastVal = timeToParse; - if (timeToParse == '') { - inst.hours = -1; - inst.minutes = -1; - } else { - var time = this.parseTime(inst, timeVal); - inst.hours = time.hours; - inst.minutes = time.minutes; - } - } - - - $.timepicker._updateTimepicker(inst); - }, - - /* Update or retrieve the settings for an existing time picker. - @param target element - the target input field or division or span - @param name object - the new settings to update or - string - the name of the setting to change or retrieve, - when retrieving also 'all' for all instance settings or - 'defaults' for all global defaults - @param value any - the new value for the setting - (omit if above is an object or to retrieve a value) */ - _optionTimepicker: function(target, name, value) { - var inst = this._getInst(target); - if (arguments.length == 2 && typeof name == 'string') { - return (name == 'defaults' ? $.extend({}, $.timepicker._defaults) : - (inst ? (name == 'all' ? $.extend({}, inst.settings) : - this._get(inst, name)) : null)); - } - var settings = name || {}; - if (typeof name == 'string') { - settings = {}; - settings[name] = value; - } - if (inst) { - extendRemove(inst.settings, settings); - if (this._curInst == inst) { - this._hideTimepicker(); - this._updateTimepicker(inst); - } - if (inst.inline) { - this._updateTimepicker(inst); - } - } - }, - - - /* Set the time for a jQuery selection. - @param target element - the target input field or division or span - @param time String - the new time */ - _setTimeTimepicker: function(target, time) { - var inst = this._getInst(target); - if (inst) { - this._setTime(inst, time); - this._updateTimepicker(inst); - this._updateAlternate(inst, time); - } - }, - - /* Set the time directly. */ - _setTime: function(inst, time, noChange) { - var origHours = inst.hours; - var origMinutes = inst.minutes; - if (time instanceof Date) { - inst.hours = time.getHours(); - inst.minutes = time.getMinutes(); - } else { - var time = this.parseTime(inst, time); - inst.hours = time.hours; - inst.minutes = time.minutes; - } - - if ((origHours != inst.hours || origMinutes != inst.minutes) && !noChange) { - inst.input.trigger('change'); - } - this._updateTimepicker(inst); - this._updateSelectedValue(inst); - }, - - /* Return the current time, ready to be parsed, rounded to the closest minute by interval */ - _getCurrentTimeRounded: function (inst) { - var currentTime = new Date(), - currentMinutes = currentTime.getMinutes(), - minutes_options = this._get(inst, 'minutes'), - // round to closest interval - adjustedMinutes = Math.round(currentMinutes / minutes_options.interval) * minutes_options.interval; - currentTime.setMinutes(adjustedMinutes); - return currentTime; - }, - - /* - * Parse a time string into hours and minutes - */ - parseTime: function (inst, timeVal) { - var retVal = new Object(); - retVal.hours = -1; - retVal.minutes = -1; - - if(!timeVal) - return ''; - - var timeSeparator = this._get(inst, 'timeSeparator'), - amPmText = this._get(inst, 'amPmText'), - showHours = this._get(inst, 'showHours'), - showMinutes = this._get(inst, 'showMinutes'), - optionalMinutes = this._get(inst, 'optionalMinutes'), - showPeriod = (this._get(inst, 'showPeriod') == true), - p = timeVal.indexOf(timeSeparator); - - // check if time separator found - if (p != -1) { - retVal.hours = parseInt(timeVal.substr(0, p), 10); - retVal.minutes = parseInt(timeVal.substr(p + 1), 10); - } - // check for hours only - else if ( (showHours) && ( !showMinutes || optionalMinutes ) ) { - retVal.hours = parseInt(timeVal, 10); - } - // check for minutes only - else if ( ( ! showHours) && (showMinutes) ) { - retVal.minutes = parseInt(timeVal, 10); - } - - if (showHours) { - var timeValUpper = timeVal.toUpperCase(); - if ((retVal.hours < 12) && (showPeriod) && (timeValUpper.indexOf(amPmText[1].toUpperCase()) != -1)) { - retVal.hours += 12; - } - // fix for 12 AM - if ((retVal.hours == 12) && (showPeriod) && (timeValUpper.indexOf(amPmText[0].toUpperCase()) != -1)) { - retVal.hours = 0; - } - } - - return retVal; - }, - - selectNow: function(event) { - var id = $(event.target).attr("data-timepicker-instance-id"), - $target = $(id), - inst = this._getInst($target[0]); - //if (!inst || (input && inst != $.data(input, PROP_NAME))) { return; } - var currentTime = new Date(); - inst.hours = currentTime.getHours(); - inst.minutes = currentTime.getMinutes(); - this._updateSelectedValue(inst); - this._updateTimepicker(inst); - this._hideTimepicker(); - }, - - deselectTime: function(event) { - var id = $(event.target).attr("data-timepicker-instance-id"), - $target = $(id), - inst = this._getInst($target[0]); - inst.hours = -1; - inst.minutes = -1; - this._updateSelectedValue(inst); - this._hideTimepicker(); - }, - - - selectHours: function (event) { - var $td = $(event.currentTarget), - id = $td.attr("data-timepicker-instance-id"), - newHours = parseInt($td.attr("data-hour")), - fromDoubleClick = event.data.fromDoubleClick, - $target = $(id), - inst = this._getInst($target[0]), - showMinutes = (this._get(inst, 'showMinutes') == true); - - // don't select if disabled - if ( $.timepicker._isDisabledTimepicker($target.attr('id')) ) { return false } - - $td.parents('.ui-timepicker-hours:first').find('a').removeClass('ui-state-active'); - $td.children('a').addClass('ui-state-active'); - inst.hours = newHours; - - // added for onMinuteShow callback - var onMinuteShow = this._get(inst, 'onMinuteShow'), - maxTime = this._get(inst, 'maxTime'), - minTime = this._get(inst, 'minTime'); - if (onMinuteShow || !isNaN(parseInt(maxTime.minute)) || !isNaN(parseInt(minTime.minute))) { - // this will trigger a callback on selected hour to make sure selected minute is allowed. - this._updateMinuteDisplay(inst); - } - - this._updateSelectedValue(inst); - - inst._hoursClicked = true; - if ((inst._minutesClicked) || (fromDoubleClick) || (showMinutes == false)) { - $.timepicker._hideTimepicker(); - } - // return false because if used inline, prevent the url to change to a hashtag - return false; - }, - - selectMinutes: function (event) { - var $td = $(event.currentTarget), - id = $td.attr("data-timepicker-instance-id"), - newMinutes = parseInt($td.attr("data-minute")), - fromDoubleClick = event.data.fromDoubleClick, - $target = $(id), - inst = this._getInst($target[0]), - showHours = (this._get(inst, 'showHours') == true); - - // don't select if disabled - if ( $.timepicker._isDisabledTimepicker($target.attr('id')) ) { return false } - - $td.parents('.ui-timepicker-minutes:first').find('a').removeClass('ui-state-active'); - $td.children('a').addClass('ui-state-active'); - - inst.minutes = newMinutes; - this._updateSelectedValue(inst); - - inst._minutesClicked = true; - if ((inst._hoursClicked) || (fromDoubleClick) || (showHours == false)) { - $.timepicker._hideTimepicker(); - // return false because if used inline, prevent the url to change to a hashtag - return false; - } - - // return false because if used inline, prevent the url to change to a hashtag - return false; - }, - - _updateSelectedValue: function (inst) { - var newTime = this._getParsedTime(inst); - if (inst.input) { - inst.input.val(newTime); - inst.input.trigger('change'); - } - var onSelect = this._get(inst, 'onSelect'); - if (onSelect) { onSelect.apply((inst.input ? inst.input[0] : null), [newTime, inst]); } // trigger custom callback - this._updateAlternate(inst, newTime); - return newTime; - }, - - /* this function process selected time and return it parsed according to instance options */ - _getParsedTime: function(inst) { - - if (inst.hours == -1 && inst.minutes == -1) { - return ''; - } - - // default to 0 AM if hours is not valid - if ((inst.hours < inst.hours.starts) || (inst.hours > inst.hours.ends )) { inst.hours = 0; } - // default to 0 minutes if minute is not valid - if ((inst.minutes < inst.minutes.starts) || (inst.minutes > inst.minutes.ends)) { inst.minutes = 0; } - - var period = "", - showPeriod = (this._get(inst, 'showPeriod') == true), - showLeadingZero = (this._get(inst, 'showLeadingZero') == true), - showHours = (this._get(inst, 'showHours') == true), - showMinutes = (this._get(inst, 'showMinutes') == true), - optionalMinutes = (this._get(inst, 'optionalMinutes') == true), - amPmText = this._get(inst, 'amPmText'), - selectedHours = inst.hours ? inst.hours : 0, - selectedMinutes = inst.minutes ? inst.minutes : 0, - displayHours = selectedHours ? selectedHours : 0, - parsedTime = ''; - - // fix some display problem when hours or minutes are not selected yet - if (displayHours == -1) { displayHours = 0 } - if (selectedMinutes == -1) { selectedMinutes = 0 } - - if (showPeriod) { - if (inst.hours == 0) { - displayHours = 12; - } - if (inst.hours < 12) { - period = amPmText[0]; - } - else { - period = amPmText[1]; - if (displayHours > 12) { - displayHours -= 12; - } - } - } - - var h = displayHours.toString(); - if (showLeadingZero && (displayHours < 10)) { h = '0' + h; } - - var m = selectedMinutes.toString(); - if (selectedMinutes < 10) { m = '0' + m; } - - if (showHours) { - parsedTime += h; - } - if (showHours && showMinutes && (!optionalMinutes || m != 0)) { - parsedTime += this._get(inst, 'timeSeparator'); - } - if (showMinutes && (!optionalMinutes || m != 0)) { - parsedTime += m; - } - if (showHours) { - if (period.length > 0) { parsedTime += this._get(inst, 'periodSeparator') + period; } - } - - return parsedTime; - }, - - /* Update any alternate field to synchronise with the main field. */ - _updateAlternate: function(inst, newTime) { - var altField = this._get(inst, 'altField'); - if (altField) { // update alternate field too - $(altField).each(function(i,e) { - $(e).val(newTime); - }); - } - }, - - _getTimeAsDateTimepicker: function(input) { - var inst = this._getInst(input); - if (inst.hours == -1 && inst.minutes == -1) { - return ''; - } - - // default to 0 AM if hours is not valid - if ((inst.hours < inst.hours.starts) || (inst.hours > inst.hours.ends )) { inst.hours = 0; } - // default to 0 minutes if minute is not valid - if ((inst.minutes < inst.minutes.starts) || (inst.minutes > inst.minutes.ends)) { inst.minutes = 0; } - - return new Date(0, 0, 0, inst.hours, inst.minutes, 0); - }, - /* This might look unused but it's called by the $.fn.timepicker function with param getTime */ - /* added v 0.2.3 - gitHub issue #5 - Thanks edanuff */ - _getTimeTimepicker : function(input) { - var inst = this._getInst(input); - return this._getParsedTime(inst); - }, - _getHourTimepicker: function(input) { - var inst = this._getInst(input); - if ( inst == undefined) { return -1; } - return inst.hours; - }, - _getMinuteTimepicker: function(input) { - var inst= this._getInst(input); - if ( inst == undefined) { return -1; } - return inst.minutes; - } - - }); - - - - /* Invoke the timepicker functionality. - @param options string - a command, optionally followed by additional parameters or - Object - settings for attaching new timepicker functionality - @return jQuery object */ - $.fn.timepicker = function (options) { - /* Initialise the time picker. */ - if (!$.timepicker.initialized) { - $(document).mousedown($.timepicker._checkExternalClick); - $.timepicker.initialized = true; - } - - /* Append timepicker main container to body if not exist. */ - if ($("#"+$.timepicker._mainDivId).length === 0) { - $('body').append($.timepicker.tpDiv); - } - - var otherArgs = Array.prototype.slice.call(arguments, 1); - if (typeof options == 'string' && (options == 'getTime' || options == 'getTimeAsDate' || options == 'getHour' || options == 'getMinute' )) - return $.timepicker['_' + options + 'Timepicker']. - apply($.timepicker, [this[0]].concat(otherArgs)); - if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') - return $.timepicker['_' + options + 'Timepicker']. - apply($.timepicker, [this[0]].concat(otherArgs)); - return this.each(function () { - typeof options == 'string' ? - $.timepicker['_' + options + 'Timepicker']. - apply($.timepicker, [this].concat(otherArgs)) : - $.timepicker._attachTimepicker(this, options); - }); - }; - - /* jQuery extend now ignores nulls! */ - function extendRemove(target, props) { - $.extend(target, props); - for (var name in props) - if (props[name] == null || props[name] == undefined) - target[name] = props[name]; - return target; - }; - - $.timepicker = new Timepicker(); // singleton instance - $.timepicker.initialized = false; - $.timepicker.uuid = new Date().getTime(); - $.timepicker.version = "0.3.3"; - - // Workaround for #4055 - // Add another global to avoid noConflict issues with inline event handlers - window['TP_jQuery_' + tpuuid] = $; - -})(jQuery); diff --git a/js/vendor/jquery-timepicker/legacy_1.2.6/index.html b/js/vendor/jquery-timepicker/legacy_1.2.6/index.html deleted file mode 100644 index e811c0266..000000000 --- a/js/vendor/jquery-timepicker/legacy_1.2.6/index.html +++ /dev/null @@ -1,762 +0,0 @@ - - - - - jQuery UI Time Picker by Francois Gelinas - - - - - - - - - - - - - - - - - - -
            - -
            -
            -
            - - -
            - -

            jQuery UI Timepicker - (By François Gélinas) - - -

            - -

            What is this?

            -

            - - This is a jQuery UI time picker plugin build to match with other official jQuery UI widgets. - Based on the existing date picker, it will blend nicely with your form and use your selected jQuery UI theme. - The plugin is very easy to integrate in your form for you time (hours / minutes) inputs. -

            -

            - Licensed under the same license as jQuery : MIT and GPL licenses -

            - -
            - -
            - - - -
            -
            - Default time picker : - - - - [Show code] - -
            - - -
            - -
            - Time picker with period (AM/PM) in input and with hours leading 0s : - - - - [Show code] - -
            - -
            - -
            - Time picker with labels in another language (Français) : - - - [Show code] - -
            - -
            - -
            - Time picker with restricted (disabled) hours / minutes. 8:30 PM to 6:30 AM disabled : - - - - [Show code] - -
            - -
            - -
            - Define when the time picker is shown with the showOn option and set a trigger element with the button option - -
            - - - - - - [Show code] - - -
            - - -
            - -
            - Time picker without the AM/PM labels on the left (showPeriodLabels option set to false: - - - - [Show code] - - -
            - - -
            - -
            - - Custom defined hours range (Business hours 6am to 7pm) and minutes increment set to 15 instead of 5, on 3 rows - - - - [Show code] - -
            - -
            - -
            - Input for hours only : - - , input for minutes only : - - - - - [Show code] - - -
            - - -
            - -
            - onSelect (hours and minutes both trigger event), beforeShow and onClose events : - - - - [Show code] - -
            - -
            - - -
            - -
            - -
            - Inline time picker : - - Alternate field : - - -
            - -
            - -
            - -
            - [Show code] -
            -
            - -
            - - - -
            - -
            - - - - - -
            - -

            Usage:

            -
            $('#timepicker').timepicker({
            -    // Options
            -    timeSeparator: ':',           // The character to use to separate hours and minutes. (default: ':')
            -    showLeadingZero: true,        // Define whether or not to show a leading zero for hours < 10. (default: true)
            -    showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10. (default: true)
            -    showPeriod: false,            // Define whether or not to show AM/PM with selected time. (default: false)
            -    showPeriodLabels: true,       // Define if the AM/PM labels on the left are displayed. (default: true)
            -    periodSeparator: ' ',         // The character to use to separate the time from the time period.
            -    altField: '#alternate_input', // Define an alternate input to parse selected time to
            -    defaultTime: '12:34',         // Used as default time when input field is empty or for inline timePicker
            -                                  // (set to 'now' for the current time, '' for no highlighted time, default value: now)
            -
            -    zIndex: null,                 // Overwrite the default zIndex used by the time picker
            -
            -    // trigger options
            -    showOn: 'focus',              // Define when the timepicker is shown.
            -                                  // 'focus': when the input gets focus, 'button' when the button trigger element is clicked,
            -                                  // 'both': when the input gets focus and when the button is clicked.
            -    button: null,                 // jQuery selector that acts as button trigger. ex: '#trigger_button'
            -
            -    // Localization
            -    hourText: 'Hour',             // Define the locale text for "Hours"
            -    minuteText: 'Minute',         // Define the locale text for "Minute"
            -    amPmText: ['AM', 'PM'],       // Define the locale text for periods
            -
            -    // Position
            -    myPosition: 'left top',       // Corner of the dialog to position, used with the jQuery UI Position utility if present.
            -    atPosition: 'left bottom',    // Corner of the input to position
            -
            -    // Events
            -    onSelect: onSelectCallback,   // Define a callback function when an hour / minutes is selected.
            -    onClose: onCloseCallback,     // Define a callback function when the timepicker is closed.
            -    onHourShow: onHourShow,       // Define a callback to enable / disable certain hours. ex: function onHourShow(hour)
            -    onMinuteShow: onMinuteShow,   // Define a callback to enable / disable certain minutes. ex: function onMinuteShow(hour, minute)
            -
            -    // custom hours and minutes
            -    hours: {
            -        starts: 0,                // First displayed hour
            -        ends: 23                  // Last displayed hour
            -    },
            -    minutes: {
            -        starts: 0,                // First displayed minute
            -        ends: 55,                 // Last displayed minute
            -        interval: 5               // Interval of displayed minutes
            -    },
            -    rows: 4,                      // Number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
            -    showHours: true,              // Define if the hours section is displayed or not. Set to false to get a minute only dialog
            -    showMinutes: true             // Define if the minutes section is displayed or not. Set to false to get an hour only dialog
            -});
            - -
            - - - - - - - - - - - -
            - -

            Releases :

            -
            - -
            0.2.4 - August 5, 2011
            -
            Fixed the hand cursor in the css file. (Thanks Mike Neumegen)
            -
            Added position option to use with the jquery ui position utility.
            -
            Added option to display only hours or only minutes.
            - -
            0.2.3 - July 11, 2011
            -
            Fix github issue #3 : Bug when hours or minutes choices does not divide by number of rows (thanks wukimus).
            -
            Changed default behavior of the defaultTime option, if set to '' and input is empty, there will be no highlighted time in the popup (Thanks Rasmus Schultz)
            -
            Fix github issue #4 : Error when generating empty minute cell. (Thanks 123Haynes)
            -
            Fix github issue #5 : Add functionality for "getTime" option. (Thanks edanuff)
            -
            Added the periodSeparator option. (thanks jrchamp)
            -
            Fixed "getTime" for inline timepickers. (thanks Mike Neumegen)
            -
            Added "getHour" and "getMinute" to get individual values.
            -
            New page interface, about time :)
            - -
            0.2.2 - June 16, 2011
            -
            Fixed a "console.log" line that I forgot to remove before release 0.2.1. (Thanks Derek Lavine)
            - -
            0.2.1 - June 8, 2011
            -
            Timepicker does not give the focus back to the input any more after time selection. This is similar to the datepicker behaviour and is more natural to the user because it shows the dialog again when the user click on the input again, as expected.
            -
            Added options to customize the hours and minutes ranges and interval for more customization.
            - -
            0.2 - May 28, 2011
            -
            In the last release, I messed up versions and lost some changes so I'm fixing all this up with release 0.2
            - - -
            0.1.2 - May 26, 2011
            -
            Fixed a bug with inline timepickers that would append a #timepickr hashtag when selecting hours and minutes.
            -
            Fixed z-index problem with IE6 (Thanks Graham Bentley)
            -
            Added selection of highlighted text when enter is pressed on the input field (Thanks Glen Chiacchieri)
            -
            Adjusted some focus problems, now the input gets the focus back when the used click on hours / minutes.
            - -
            0.1.something aka the lost release - around April 11
            -
            Fixed a bug for when input Id had a dot in it, it was getting double escaped when it should not. (Thanks Zdenek Machac)
            -
            So in 0.1.1 I created a bug that made timepicker changes the location hash, well now it's fixed. (Thanks Lucas Falk)
            - -
            0.1.1 - April 6, 2011
            -
            Changed the cells click and dblclick binding for faster rendering in IE6/7 (Thanks Blair Parsons)
            -
            Fixed a class naming bug created in 0.1.0 (Thanks Morlion Peter)
            - -
            0.1.0 - March 23, 2011
            -
            Fixed some bugs with version 0.0.9
            - -
            0.0.9 - March 22, 2011
            -
            Added zIndex option (Thanks Frank Enderle)
            -
            Added showPeriodLabels option (default: true) to show/hide AM/PM labels on the left (thanks Frank Enderle)
            -
            Added showOn ['focus'|'button'|'both'] and button options for alternate trigger method
            - -
            0.0.8 - February 17, 2011
            -
            Fixed close event not triggered when switching to another input with time picker (thanks Stuart Gregg)
            - -
            0.0.7 - February 10, 2011
            -
            Added function to set time after initialisation :$('#timepicker').timepicker('setTime',newTime);
            -
            Added support for disabled period of time : onHourShow and onMinuteShow (thanks Rene Felgenträger)
            - -
            0.0.6 - January 19, 2011
            -
            Replaced some div with tables to : fix some display bugs in IE7, fix inline display and fix my headhake.
            -
            Added standard "change" event being triggered on the input when the content changes. (Thanks Rasmus Schultz)
            -
            Added support for inline timePicker, attached to div or span.
            -
            Added altField that receive the parsed time value when selected time changes.
            -
            Added defaultTime value to use when input field is missing (inline) or input value is empty. If defaultTime is missing then current time is used.
            - -
            0.0.5 - January 18, 2011
            -
            Now updating time picker selected value when manually typing in the text field (thanks Rasmus Schultz)
            - Another step toward inline time picker ?
            -
            Fixed : with showPeriod: true and showLeadingZero: true, PM hours did not show leading zeros (thanks Chandler May)
            -
            Fixed : with showPeriod: true and showLeadingZero: true, Selecting 12 AM shows as 00 AM in the input field, also parsing 12AM did not work correctly (thanks Rasmus Schultz)
            - -
            0.0.4 - January 10, 2011
            -
            Changed showLeadingZero to affect only hours, added showMinutesLeadingZero for minutes display.
            -
            Changed the default value of timeSeparator from 'h' to ':'.
            -
            Removed width:100% on tables in the css, caused a bug in some browsers.
            - -
            0.0.3 - January 8, 2011
            -
            Fixed a bug with the widget not displaying with some jQuery UI 1.8.7 css. (Thanks Alexander Fietz)
            -
            Fixed a display bug on page load, a small empty div was visible at the bottom of pages. (Thanks Gertjan van Roekel)
            -
            Modified the jquery-ui-timepicker.css to make the widget more dynamic to style and sizes changes.
            - -
            0.0.2 - January 4, 2011
            -
            Added showPeriod: period (AM/PM) in input and showLeadingZero: to control display of number < 10. (big thanks Steve Commisso)
            - -
            0.0.1 - December 2010
            -
            First release
            -
            - -
            - -

            To Do :

            - -
              -
            • - Possibility to use the timepicker for hours only, or minutes only. -
            • - -
            • - Change the code style to use the jQuery widget framework. -
            • -
            • - Detect a second click on the same cell and close the picker (ie: the user selected hours and do not want to select different minutes or vice versa, and click twice on the same cell instead) - This is already simulated with the handling of the double click. -
            • -
            - -
            - - - - - -
            - -

            Download Timepicker

            - -

            - Current version : 0.2.4 - released August 5, 2011 -

            - -

            - Get it on github -

            - -

            - Download from here (.zip) -

            - -
            - -

            - I put a lot of time and effort in this project. If you like it, please pay me a beer donate -

            - - - - -
            -

            - -
            - -

            - Instruction for legacy jQuery integration (jQuery 1.2.6 and jQuery UI 1.6) -
            - -

              -
            • - Get the legacy package here - , built with jQuery Timepicker 0.2.4 but should work with newer versions -
            • -
            • - Make sure to include jquery-1.2.6.js, jquery.fix.for.1.2.6.js and jquery.ui.1.6.all.js -
            • -
            • - See the working example in index.html in the "legacy_1.2.6" folder. -
            • -
            • - Support for previous versions of jquery is limited. -
            • -
            - -

            - -
            -
            - - - - - - -
            - - - - - - diff --git a/js/vendor/jquery-timepicker/legacy_1.2.6/jquery-1.2.6.js b/js/vendor/jquery-timepicker/legacy_1.2.6/jquery-1.2.6.js deleted file mode 100644 index 11d502d20..000000000 --- a/js/vendor/jquery-timepicker/legacy_1.2.6/jquery-1.2.6.js +++ /dev/null @@ -1,3549 +0,0 @@ -(function(){ -/* - * jQuery legacy_1.2.6 - New Wave Javascript - * - * Copyright (c) 2008 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ - * $Rev: 5685 $ - */ - -// Map over jQuery in case of overwrite -var _jQuery = window.jQuery, -// Map over the $ in case of overwrite - _$ = window.$; - -var jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); -}; - -// A simple way to check for HTML strings or ID strings -// (both of which we optimize for) -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, - -// Is it a simple selector - isSimple = /^.[^:#\[\.]*$/, - -// Will speed up references to undefined, and allows munging its name. - undefined; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - return this; - } - // Handle HTML strings - if ( typeof selector == "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Make sure an element was located - if ( elem ){ - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - return jQuery( elem ); - } - selector = []; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); - - return this.setArray(jQuery.makeArray(selector)); - }, - - // The current version of jQuery being used - jquery: "legacy_1.2.6", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // The number of elements contained in the matched element set - length: 0, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == undefined ? - - // Return a 'clean' array - jQuery.makeArray( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - var ret = -1; - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( name.constructor == String ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text != "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) - // The elements to wrap the target around - jQuery( html, this[0].ownerDocument ) - .clone() - .insertBefore( this[0] ) - .map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }) - .append(this); - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, false, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, true, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - find: function( selector ) { - var elems = jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - }); - - return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? - jQuery.unique( elems ) : - elems ); - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var clone = this.cloneNode(true), - container = document.createElement("div"); - container.appendChild(clone); - return jQuery.clean([container.innerHTML])[0]; - } else - return this.cloneNode(true); - }); - - // Need to set the expando to null on the cloned set if it exists - // removeData doesn't work here, IE removes it from the original as well - // this is primarily for IE but the data expando shouldn't be copied over in any browser - var clone = ret.find("*").andSelf().each(function(){ - if ( this[ expando ] != undefined ) - this[ expando ] = null; - }); - - // Copy the events from the original to the clone - if ( events === true ) - this.find("*").andSelf().each(function(i){ - if (this.nodeType == 3) - return; - var events = jQuery.data( this, "events" ); - - for ( var type in events ) - for ( var handler in events[ type ] ) - jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); - }); - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, this ) ); - }, - - not: function( selector ) { - if ( selector.constructor == String ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ) ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector == 'string' ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return this.is( "." + selector ); - }, - - val: function( value ) { - if ( value == undefined ) { - - if ( this.length ) { - var elem = this[0]; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - - // Everything else, we just grab the value - } else - return (this[0].value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if( value.constructor == Number ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value == undefined ? - (this[0] ? - this[0].innerHTML : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - data: function( key, value ){ - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - if ( data === undefined && this.length ) - data = jQuery.data( this[0], key ); - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } else - return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ - jQuery.data( this, key, value ); - }); - }, - - removeData: function( key ){ - return this.each(function(){ - jQuery.removeData( this, key ); - }); - }, - - domManip: function( args, table, reverse, callback ) { - var clone = this.length > 1, elems; - - return this.each(function(){ - if ( !elems ) { - elems = jQuery.clean( args, this.ownerDocument ); - - if ( reverse ) - elems.reverse(); - } - - var obj = this; - - if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) - obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); - - var scripts = jQuery( [] ); - - jQuery.each(elems, function(){ - var elem = clone ? - jQuery( this ).clone( true )[0] : - this; - - // execute all scripts after the elements have been injected - if ( jQuery.nodeName( elem, "script" ) ) - scripts = scripts.add( elem ); - else { - // Remove any inner scripts for later evaluation - if ( elem.nodeType == 1 ) - scripts = scripts.add( jQuery( "script", elem ).remove() ); - - // Inject the elements into the document - callback.call( obj, elem ); - } - }); - - scripts.each( evalScript ); - }); - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( target.constructor == Boolean ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target != "object" && typeof target != "function" ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy == "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -var expando = "jQuery" + now(), uuid = 0, windowData = {}, - // exclude the following css properties to add px - exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning this function. - isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && - fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.documentElement && !elem.body || - elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - data = jQuery.trim( data ); - - if ( data ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.browser.msie ) - script.text = data; - else - script.appendChild( document.createTextNode( data ) ); - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - cache: {}, - - data: function( elem, name, data ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // Compute a unique ID for the element - if ( !id ) - id = elem[ expando ] = ++uuid; - - // Only generate the data cache if we're - // trying to access or manipulate it - if ( name && !jQuery.cache[ id ] ) - jQuery.cache[ id ] = {}; - - // Prevent overriding the named cache with undefined values - if ( data !== undefined ) - jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element - return name ? - jQuery.cache[ id ][ name ] : - id; - }, - - removeData: function( elem, name ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // If we want to remove a specific section of the element's data - if ( name ) { - if ( jQuery.cache[ id ] ) { - // Remove the section of cache data - delete jQuery.cache[ id ][ name ]; - - // If we've removed all the data, remove the element's cache - name = ""; - - for ( name in jQuery.cache[ id ] ) - break; - - if ( !name ) - jQuery.removeData( elem ); - } - - // Otherwise, we want to remove all of the element's data - } else { - // Clean up the element expando - try { - delete elem[ expando ]; - } catch(e){ - // IE has trouble directly removing the expando - // but it's ok with using removeAttribute - if ( elem.removeAttribute ) - elem.removeAttribute( expando ); - } - - // Completely remove the data cache - delete jQuery.cache[ id ]; - } - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length == undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length == undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames != undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - var padding = 0, border = 0; - jQuery.each( which, function() { - padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - val -= Math.round(padding + border); - } - - if ( jQuery(elem).is(":visible") ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, val); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // A helper method for determining if an element's values are broken - function color( elem ) { - if ( !jQuery.browser.safari ) - return false; - - // defaultView is cached - var ret = defaultView.getComputedStyle( elem, null ); - return !ret || ret.getPropertyValue("color") == ""; - } - - // We need to handle opacity special in IE - if ( name == "opacity" && jQuery.browser.msie ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - // Opera sometimes will give the wrong display answer, this fixes it, see #2037 - if ( jQuery.browser.opera && name == "display" ) { - var save = style.outline; - style.outline = "0 solid black"; - style.outline = save; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var computedStyle = defaultView.getComputedStyle( elem, null ); - - if ( computedStyle && !color( elem ) ) - ret = computedStyle.getPropertyValue( name ); - - // If the element isn't reporting its values properly in Safari - // then some display: none elements are involved - else { - var swap = [], stack = [], a = elem, i = 0; - - // Locate all of the parent display: none elements - for ( ; a && color(a); a = a.parentNode ) - stack.unshift(a); - - // Go through and make them visible, but in reverse - // (It would be better if we knew the exact display type that they had) - for ( ; i < stack.length; i++ ) - if ( color( stack[ i ] ) ) { - swap[ i ] = stack[ i ].style.display; - stack[ i ].style.display = "block"; - } - - // Since we flip the display style, we have to handle that - // one special, otherwise get the value - ret = name == "display" && swap[ stack.length - 1 ] != null ? - "none" : - ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; - - // Finally, revert the display styles back - for ( i = 0; i < swap.length; i++ ) - if ( swap[ i ] != null ) - stack[ i ].style.display = swap[ i ]; - } - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context ) { - var ret = []; - context = context || document; - // !context.createElement fails in IE with an error but returns typeof 'object' - if (typeof context.createElement == 'undefined') - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - jQuery.each(elems, function(i, elem){ - if ( !elem ) - return; - - if ( elem.constructor == Number ) - elem += ''; - - // Convert html string into DOM nodes - if ( typeof elem == "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
            " ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and + + + + + + + +

            Core Tests

            +

            +

            +
              + +
              +
              + +
              +
              + + \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui.js b/js/vendor/jquery-timepicker/test/resources/jquery-ui.js new file mode 100644 index 000000000..2af4057ef --- /dev/null +++ b/js/vendor/jquery-timepicker/test/resources/jquery-ui.js @@ -0,0 +1,31 @@ +(function() { + + var parts = document.location.search.slice( 1 ).split( "&" ), + length = parts.length, + version = "1.11.1", + current, + i = 0; + + for ( ; i < length; i++ ) { + current = parts[ i ].split( "=" ); + if ( current[ 0 ] === "jquery-ui" && current[ 1 ].length > 0 ) { + version = current[ 1 ]; + break; + } + } + + if ( version.substr( 0, 3 ) == '1.8' ) { + css = "resources/jquery-ui/jquery-ui-" + version + "/jquery-ui-" + version + ".custom.css"; + js = "resources/jquery-ui/jquery-ui-" + version + "/jquery-ui-" + version + ".custom.min.js"; + } else if ( version.substr( 0, 3 ) == '1.9' || version.substr( 0, 4 ) == '1.10' ) { + css = "resources/jquery-ui/jquery-ui-" + version + "/css/ui-lightness/jquery-ui-" + version + ".custom.min.css"; + js = "resources/jquery-ui/jquery-ui-" + version + "/js/jquery-ui-" + version + ".custom.min.js"; + } else if ( version.substr( 0, 4 ) == '1.11' ) { + css = "resources/jquery-ui/jquery-ui-" + version + "/jquery-ui.min.css"; + js = "resources/jquery-ui/jquery-ui-" + version + "/jquery-ui.min.js"; + } + + document.write( "" ); + document.write( "" ); + +})(); diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/animated-overlay.gif b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/animated-overlay.gif new file mode 100644 index 0000000000000000000000000000000000000000..d441f75ebfbdf26a265dfccd670120d25c0a341c GIT binary patch literal 1738 zcmZ|OX;ji_6b5ixNYt8>l?gOuO)6lU%W(mxn(`>1S(XO;u`D+P%xqBvMr|w-Vyr1s z7R|Cn0b8|Hu<=Zmv1mFqh9Fj!NuZfKB2MP$e75`XJ@>=!y!Ux9xR3x;EW!q1^V>X| znVFuRUN`NqJ2)ybXh%e__h!!pv(M|S3+?9F%(K}zyE40MGyhWF5-IDgL&=%2-9`Nk z!1@8uk4t%_{(K~>N;sK&dzJbwJ=$kYTlL=$%#0Pfh>U{%i@~wWbvYsD_K-D`&+u1( z#Ma`>%q<^UhzGvi(hyE`zCD{-=2|zL5>wnB=DE!U?(CZG%q4@lDnCq_%&3DCla#(X zmBhDD+RN$aMWWHm?ig*>1Onn6~r?Ma~N2JKAxN>H%UtRyRqS)6Um!-Tz%-r=& zQmTb^JFIe3W^-kAm`}`2P|niMh>RYyd)S^f(dbrx965?rzbhP|XeP}o&&DSZ4|oYQ z)I{f!SfycYw?3=9W;o-B%U5xs(pP267X~9-7L|4WzaYexC0GtG8wWygm63rF{llCEraxzkc=IxvFQ-y37=_;e5 zJLq^gsSO0Ayz?a>E_?{dmUc+t#qv$)XN8$<<}rQ#)lsiw+pmL&J>~+hgpo>i$m+;l zZIa_ZRIfSeT$~v5d`EBV&*k`apPgjv&B|+d`Q!nyu{L4rs%ZfoF0*Kq8I%ByOcFpL zK=>wzofZo<+0GZLCnWM3oQ^pb(gRSf02;~cEn@LJ>~XB9IkEX{$N#Z`m%>S!U{uPx zloI%bLdo$Adxlh(Uv^yX7s5G&C zLwNRG>~T?G{kzupp8EcyLGPoPf)@&9Wqfw_l&uU-6cexk%5;uQg%wb=0k_733{i#& z1a2p)gV3S2+QG1-K9tZ}E~I<(P0r2aFFY-c{o?TUOz3Xjod#TLE2A_c?*T7t z=1>~%YW450{Qqno4t`}gvLnuMrcu8+#xEBoY%2_+Mb#Z6S38+r*M4O`-+!zl(@m`D zQsi|GA2l3gEy}LFe<#Hv8?$_L#u8E|3-bP$*La*E>B{X!Sy4i6?TKam!49aXCAW4S*P_O^H4^*DpiA40o}Uqw~Eo&veh1`|8i zD2$x+>_b^bXE4N;AW=5>iYak2%!JAh0j1*k1{p#iRCjbB7!cSws~U{1IA@acLII$t z$>X#A+^s6iJ5~DFG!xa?>z{=lxtdi1rzbM-(nqAu3D8h-&64xo6|E!p?pK0xT;qoK z`6%+SpBk+~M?nO}>2mTw!A{yZ6O>Z@kwSd4;8aWU5z!P~tQl?u==^+R`{OmOS}oZh zOXQ3{6kuz?Is^n^L7;9ieB9C+8B{>t+pDrlq4xGDDn#T#3T5$l1g`FTQkU;b-981j zNm{zC`$wn7etklM#qHI4=3m5gwa6DNS{?Z!vSObi_od{4eUo=_S2BKNpkSdiqe(k9WtkeM79;2-%CFbb)aB=&H1?i1}uwFzoZQ(38Kn1zBP ORn*B%u*Wk|4g3!*Rv{Mv literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..1359ae291fbd7fd3e7cf5b9d711d98426a64ac79 GIT binary patch literal 418 zcmeAS@N?(olHy`uVBq!ia0vp^8Xzpd1SErbK34)Mwj^(Nm;YeE8S(uNP=vFJ#Am<$En9-cLebC{re^wgoll|t(`&s7)9J{YxO^N-aI z$5L3jD^ISzl+wQbw$Cm(|Mhq4jH=@2wI8o7+Gd%b|IIx5*Zn&?>lgCSXrXO^WskXw=UX3LH%8!s;k z#x%*aEGp*Jjm(QM&8zq~)!)n5QqVsS=vUPe*NBpo#FA922>S z4={E+nQaGTRC&5MhIkx*d-b$ng949h;3{8svn*F5o}?c;Kir+G=xvlfb9Ucnx!LzV zKYw1UzcGecb6t~6xWlB=3a51)dX2qx%p0t(H?ll;Xvl-Ua7M6%M)vm*~w}RD4lnZuhbmcl2i$G2U9fNc+T-xj%reP%UwdC`m~y zNwrEYN(E93Mh1o^x&{`yMkXPKmR6>wRtCnp2If`<1~Xvob^$xN%ntzqTrAL2j_44$rjF6*2U FngB_NGAIB5 literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..e0fde09ad8f7df8668b40ee9167f1afe179373f3 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^j6gI&0LWmFTHNUZq?nSt-Ch3w7g=q17Rci)@Q5r1 z(jH*!b~4)z#PD=+46!(!{KIr+qDZgOs>S*DCH8q6)|^lLQ8(vdyV&7=Rv!DK5_Nv5 zKU5EWSl#{5ocZwkn6~@klK(Ue|8%DOm~7JJCTPgP@M)6!J>`Xd0YEcVOI#yLQW8s2 zt&)pUffR$0fuV`6frYM-Nr<7Pm8q$ffsw9(xs`!IU8A==iiX_$l+3hB+#2}rd|nLH Oz~JfX=d#Wzp$PzIZ%|+W literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..bda04ef4d4c258f1fa57d321e53ffb4c468b46c5 GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0vp^j6gI&fCnc6a#?2AmP!?*K(O3p^r= zfwTu0yPeFo12SfLx;Tb-9DjS>o|}bBPw4YFRSXO})J!^(4ctv-3U*RGnKs-FC}~_ugTe~DWM4f9qoM? literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..35384ca3d05ca0390df6bdea16878ad520e38d91 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^j6gI2NH8$CE1Q=ADW)WEcNYf6yIsOdfIQ9ukH}&m z?E%JaC$sH<3_(v9#}JM4$r%X}t&0mp9yKsb%{ak$*<@oTP*SzTHKHUXu_V=o*=X7+PAHnpznc=^B_@85qzopr0OO@IDgXcg literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000000000000000000000000000000000000..66b3849d4195f5a3a4c22b2db9048d84bc4c9553 GIT binary patch literal 5815 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 literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_222222_256x240.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..c1cb1170c8b3795835b8831ab81fa9ae63b606b1 GIT binary patch literal 6922 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 QJ~;stWz}Trq%1=J3#jBGg8%>k literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0140cff67999e0b6daf269723e019335f5fee6 GIT binary patch literal 4549 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 F{Rh^YY-Iod literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..036ee072d4aea1db3a78cbede62f8a0ba31972dc GIT binary patch literal 4549 zcmeHK_fr!pS|$Jh z@YDrtLTOItaUI>m(+y@LJu}osJoNv^e-(J`n)UotAS-_p15*GGiwqcQ)bcn>^5RV& zqzjgpUAm9yf-v;r*}+@We%K#UTuIWjS6UgMQ;4QOd3;b zWi07yXVVa4;m`x!4T|?q&n5{1%0ZiE$gh%W%&u(1pzA=GM^cJGC0r1f`&AU1l?vp+ zuGN*1bQT!tpH0{|i2Kd zj$X?=gYNqltl~PxiABxc^PwIBrZpcZLLz;pHbAFR{6nLrT9?{lHl%ms+`}C)z=7{o z|1VRGA;C%jH={h+O@W`wDNZD-K4NRSOC@0ffO*>zY6DY!Y^f+3e~(Z`^9-8U5p8UK z{yNb13E%KQyEBxPa0N%GR6p=HFy(@w=@q#$T)TYc+-Gy*kZm zsd=={(oS$3Q@!CGFrIVsch*vMToep1Pk02A*L4AYcmY`Xp=h5Ua0@U>i{^qo00v1K zzP!%eKHU#gPWnuUw8CLUcYvTTaJ0#HJV$nG{;o|$irV*Sdb;oz;0+)HDXU9G0Kc-} zc<~>!6MCED{BA@kUv<0g*qDf_S6Iwwese-dA}tOCLR>uF?E1cz>Sr`adAEAN^{Iho z+|!2`P(CW8Vi-eb8-jsg=@|scJ8Ymm=_58$=%+@#tzb2rhibcRrOVnbEnWXdl48gT zSoUX89Ik_ndAlfRRwUQcCI|A2{-h6&qG!V}Sk*I(Yqd_qh!+mQST}OdiUO-K?kY{h zi0o`V>`>NWaLeT!Xsu@w%;6Xeg|SWx{ElaiGw5a)3}2M1h6&43Nw3rzqU+bmsJ|a) z>s4TJtnK2XM5wbxHUG4KP0h>zmG_Dj?WaR5Xf9li3PfGduHkO0m0;kg6uxPSHbyvg z28ft(=4~^quqg<7i%mfu?r7AFVJHcUeQ>~4w)lq`Pc3J_ohY31VGes5TNWFRN{?BM zPQ2{F#fRYrC`BraMJi~mB7rGOw>iL8p&Q*s7F2;w5tTV*uv439Uor~1ItRVbU#CNY} z0CJ(wMs}g`6`zl>TRmdO!$!}!wyMUySpHq^93l&;D#Z)8M5yoou#Q?LOqx6L6`Vz- zn8PFc7(pyFd3ye@-6mzA$tVHc>Izv|PLlOT#Zw}!0oK=lM->ao=q;qe7{g&KK+ql& zNWCSGJp)8RqmUABi9ZV7>&7SSE$PD^mw{atZP9Nf!WY!02LWBRwN-2L1lc zuUF(XML5gM7|39&qK1SC^9XnBB|FEloeNg!%wKAV{GeHRuaNR?S>SKll=4*$UNkgp zRjOpdPLR>bOWym&k6r{0$KJ(fqJq@vdtb$xiGIGXaIIP8 z=H%Buav_YHnTwVDh3xNIw)!U)<=-pa7JeBs(=!J2G!m-xi{9dMi;%5lX<=WO-BIP9e zt9pa6t_wpDASG?>UMbJ>r96p`IK#td=(~JW>$}!hyhlEN?IJIoi#I-*->mJHjN^xe zi+Sg1lWF-0uYTrxCJzhfe~%I;NzStWu}~@W*A*kBSrSCvd3(^pHWd+=)3YPvDQpOrkxhJL8Kz|2;OTbnMt^`4$;~vc;D1@AJh0n^nYOl+Kt0?D9W165DW5;$ zoyi^me9RVTv#<}L$OVUI`{nIOUQjDvZ%w`8?KM)6O5yDH*OZwV?Abx`H5s>v#C-QB zw_yp?`P&!7oUE=ty{0aWFPc7hve$G{x+%H#w4%5QN6X;(!@tT5qdMGL_EpfXOAn$H z=!4fCY)$u#AKPrJvf1Ne%d-{tkN(ztEXRao-|Vj&colY(;5lH1d`}QnN&`6dLeo-> z@3w1ReOvm}?C3{Uc9J?++0^ZReOt}#DHMQ7@?*oLX6q>;XN`pOyD-<^G2ce_Cy4ev z1w6hM4jR{-G8dk&W2#YgIrc zw80iV{pGgrTFepl&lRK$$0EBifx*GJv*_k72`S}xps$=ZtzTh;qQWrqHT7MViH=vm*gVVT83PLagvSS;gL!fYU zuN$@g4~hYm5qz; zY1z)BUTzP>#C4w2+%m*q+N4C@-FJ;WJlU<_lY>tKn(jpjWE=0t*vY#gCT}iJzl$0h zId`MkjnA@;?bW70oQz;?-L|{cR?DjWV9~=jpps7Tv@2-3_Im6Dc3Y5MA7&GnM_0m# zxo>D6*xRBt`HtgL+|}X=IyXbzGaNsJL45M*$DUhXZF8JQm~?RbKr<+%vt-h}onJEk zCV6H4bKCGt?frlh34G|r+=P-~yKfAbqkmUo63kK1OY^c=foa7{5H6=zG}nnKKAinm zz_LD%2L;bM)3|h`d|!k;Q5~OnLyox76b!-{VOfld3KcY^Fe5Kg)T8%%R&|7JEQCSsRDRbAdNLa8_ehqY)=GoC<)L&J~3<_CZ3z2)y7Scf&Z>1&v&x$ zr9$Z&mHuGKuR6dqP~?vMVvz5MU%{qncvc+MU;7zM+e}2V`3~cv|M; z;IV3;4GuQWm-~~rwTKYi2xq8XKtbM^Dr6}_>mNj5nY}|FB*su&6*XcC@bgsf>(}PI z=5`I}5opU=+XqgzPGJZU$Evr;}~NxP@Q zcZ^K#Q6F5OnO+9*9%>v$bJf^-6p9n=Yov{=6o@m+J9S^lv=50Ri3ZOk?jF&GPPftx zo<)kvN5uxp9n69%nPaxL{WI((QzpLsS6<}e~}fX)(9V(m1!qMv}qF)z0V_X57zpJ$4EvwAs$`0^6*l%PqXPK7F`gs zH8P#LygV}os%Sb1*#I$9D%ZGKaHG`aapWMV0l74FtgRK#Po=9SJk5UW-pGC0cwhEM zS^7IU_&X~)`Z}K)fHXo%MjRn6j*v1#$SKOmC`uv35ekY3gb0@K?0*qFyqxa2Jo>*0 zmMRY=P6<4JBba)*_y;)nIs??5yly+gbvzvIIGZ>-I6d;|c2+(;1kgblXjN!nAO8m_ C(P9<= literal 0 HcmV?d00001 diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.10.4/css/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..8b6c05868b55d63ff932afa2efbd9d7cedd5909a GIT binary patch literal 4549 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
              + value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + } + + return 0; + }, + + uniqueId: function() { + return this.each(function() { + if ( !this.id ) { + this.id = "ui-id-" + (++uuid); + } + }); + }, + + removeUniqueId: function() { + return this.each(function() { + if ( runiqueId.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + }); + } +}); + +// selectors +function focusable( element, isTabIndexNotNaN ) { + var map, mapName, img, + nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap=#" + mapName + "]" )[0]; + return !!img && visible( img ); + } + return ( /input|select|textarea|button|object/.test( nodeName ) ? + !element.disabled : + "a" === nodeName ? + element.href || isTabIndexNotNaN : + isTabIndexNotNaN) && + // the element and all of its ancestors must be visible + visible( element ); +} + +function visible( element ) { + return $.expr.filters.visible( element ) && + !$( element ).parents().addBack().filter(function() { + return $.css( this, "visibility" ) === "hidden"; + }).length; +} + +$.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo(function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + }) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + }, + + focusable: function( element ) { + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); + }, + + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); + } +}); + +// support: jQuery <1.8 +if ( !$( "" ).outerWidth( 1 ).jquery ) { + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + }); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each(function() { + $( this ).css( type, reduce( this, size ) + "px" ); + }); + }; + + $.fn[ "outer" + name] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each(function() { + $( this).css( type, reduce( this, size, true, margin ) + "px" ); + }); + }; + }); +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) +if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { + $.fn.removeData = (function( removeData ) { + return function( key ) { + if ( arguments.length ) { + return removeData.call( this, $.camelCase( key ) ); + } else { + return removeData.call( this ); + } + }; + })( $.fn.removeData ); +} + + + + + +// deprecated +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + +$.support.selectstart = "onselectstart" in document.createElement( "div" ); +$.fn.extend({ + disableSelection: function() { + return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }, + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + } +}); + +$.extend( $.ui, { + // $.ui.plugin is deprecated. Use $.widget() extensions instead. + plugin: { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args ) { + var i, + set = instance.plugins[ name ]; + if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } + }, + + // only used by resizable + hasScroll: function( el, a ) { + + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ( $( el ).css( "overflow" ) === "hidden") { + return false; + } + + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", + has = false; + + if ( el[ scroll ] > 0 ) { + return true; + } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[ scroll ] = 1; + has = ( el[ scroll ] > 0 ); + el[ scroll ] = 0; + return has; + } +}); + +})( jQuery ); +(function( $, undefined ) { + +var uuid = 0, + slice = Array.prototype.slice, + _cleanData = $.cleanData; +$.cleanData = function( elems ) { + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + try { + $( elem ).triggerHandler( "remove" ); + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + } + _cleanData( elems ); +}; + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); +}; + +$.widget.extend = function( target ) { + var input = slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = slice.call( arguments, 1 ), + returnValue = this; + + // allow multiple hashes to be passed on init + options = !isMethodCall && args.length ? + $.widget.extend.apply( null, [ options ].concat(args) ) : + options; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} )._init(); + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
              ", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData( this.widgetName ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + + return this; + }, + + enable: function() { + return this._setOption( "disabled", false ); + }, + disable: function() { + return this._setOption( "disabled", true ); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + // accept selectors, DOM elements + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^(\w+)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +})( jQuery ); +(function( $, undefined ) { + +var mouseHandled = false; +$( document ).mouseup( function() { + mouseHandled = false; +}); + +$.widget("ui.mouse", { + version: "1.10.4", + options: { + cancel: "input,textarea,button,select,option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .bind("mousedown."+this.widgetName, function(event) { + return that._mouseDown(event); + }) + .bind("click."+this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { + $.removeData(event.target, that.widgetName + ".preventClickEvent"); + event.stopImmediatePropagation(); + return false; + } + }); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind("."+this.widgetName); + if ( this._mouseMoveDelegate ) { + $(document) + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); + } + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + if( mouseHandled ) { return; } + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = (event.which === 1), + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + that.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { + $.removeData(event.target, this.widgetName + ".preventClickEvent"); + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return that._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return that._mouseUp(event); + }; + $(document) + .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .bind("mouseup."+this.widgetName, this._mouseUpDelegate); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + $(document) + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); + + if (this._mouseStarted) { + this._mouseStarted = false; + + if (event.target === this._mouseDownEvent.target) { + $.data(event.target, this.widgetName + ".preventClickEvent", true); + } + + this._mouseStop(event); + } + + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(/* event */) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(/* event */) {}, + _mouseDrag: function(/* event */) {}, + _mouseStop: function(/* event */) {}, + _mouseCapture: function(/* event */) { return true; } +}); + +})(jQuery); +(function( $, undefined ) { + +$.ui = $.ui || {}; + +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[0]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
              " ), + innerDiv = div.children()[0]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[0].clientWidth; + } + + div.remove(); + + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[0] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: isWindow ? withinElement.width() : withinElement.outerWidth(), + height: isWindow ? withinElement.height() : withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[0].preventDefault ) { + // force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + // clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + }); + + // normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each(function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + // if the browser doesn't support fractions, then round for consistent results + if ( !$.support.offsetFractions ) { + position.left = round( position.left ); + position.top = round( position.top ); + } + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem : elem + }); + } + }); + + if ( options.using ) { + // adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + }); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // element is wider than within + if ( data.collisionWidth > outerWidth ) { + // element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + // too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + // too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + // adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // element is taller than within + if ( data.collisionHeight > outerHeight ) { + // element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + // too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + // too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } + else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; + if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { + position.top += myOffset + atOffset + offset; + } + } + else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; + if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +// fraction support test +(function () { + var testElement, testElementParent, testElementStyle, offsetLeft, i, + body = document.getElementsByTagName( "body" )[ 0 ], + div = document.createElement( "div" ); + + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + $.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || document.documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + div.style.cssText = "position: absolute; left: 10.7432222px;"; + + offsetLeft = $( div ).offset().left; + $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; + + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); +})(); + +}( jQuery ) ); +(function( $, undefined ) { + +$.widget("ui.draggable", $.ui.mouse, { + version: "1.10.4", + widgetEventPrefix: "drag", + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false, + + // callbacks + drag: null, + start: null, + stop: null + }, + _create: function() { + + if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) { + this.element[0].style.position = "relative"; + } + if (this.options.addClasses){ + this.element.addClass("ui-draggable"); + } + if (this.options.disabled){ + this.element.addClass("ui-draggable-disabled"); + } + + this._mouseInit(); + + }, + + _destroy: function() { + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + + var o = this.options; + + // among others, prevent a drag on a resizable-handle + if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { + return false; + } + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) { + return false; + } + + $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { + $("
              ") + .css({ + width: this.offsetWidth+"px", height: this.offsetHeight+"px", + position: "absolute", opacity: "0.001", zIndex: 1000 + }) + .css($(this).offset()) + .appendTo("body"); + }); + + return true; + + }, + + _mouseStart: function(event) { + + var o = this.options; + + //Create and append the visible helper + this.helper = this._createHelper(event); + + this.helper.addClass("ui-draggable-dragging"); + + //Cache the helper size + this._cacheHelperProportions(); + + //If ddmanager is used for droppables, set the global draggable + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Store the helper's css position + this.cssPosition = this.helper.css( "position" ); + this.scrollParent = this.helper.scrollParent(); + this.offsetParent = this.helper.offsetParent(); + this.offsetParentCssPosition = this.offsetParent.css( "position" ); + + //The element's absolute position on the page minus margins + this.offset = this.positionAbs = this.element.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + //Reset scroll cache + this.offset.scroll = false; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + //Generate the original position + this.originalPosition = this.position = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Set a containment if given in the options + this._setContainment(); + + //Trigger event + callbacks + if(this._trigger("start", event) === false) { + this._clear(); + return false; + } + + //Recache the helper size + this._cacheHelperProportions(); + + //Prepare the droppable offsets + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position + + //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) + if ( $.ui.ddmanager ) { + $.ui.ddmanager.dragStart(this, event); + } + + return true; + }, + + _mouseDrag: function(event, noPropagation) { + // reset any necessary cached properties (see #5009) + if ( this.offsetParentCssPosition === "fixed" ) { + this.offset.parent = this._getParentOffset(); + } + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + //Call plugins and callbacks and use the resulting position if something is returned + if (!noPropagation) { + var ui = this._uiHash(); + if(this._trigger("drag", event, ui) === false) { + this._mouseUp({}); + return false; + } + this.position = ui.position; + } + + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + return false; + }, + + _mouseStop: function(event) { + + //If we are using droppables, inform the manager about the drop + var that = this, + dropped = false; + if ($.ui.ddmanager && !this.options.dropBehaviour) { + dropped = $.ui.ddmanager.drop(this, event); + } + + //if a drop comes from outside (a sortable) + if(this.dropped) { + dropped = this.dropped; + this.dropped = false; + } + + //if the original element is no longer in the DOM don't bother to continue (see #8269) + if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) { + return false; + } + + if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { + if(that._trigger("stop", event) !== false) { + that._clear(); + } + }); + } else { + if(this._trigger("stop", event) !== false) { + this._clear(); + } + } + + return false; + }, + + _mouseUp: function(event) { + //Remove frame helpers + $("div.ui-draggable-iframeFix").each(function() { + this.parentNode.removeChild(this); + }); + + //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) + if( $.ui.ddmanager ) { + $.ui.ddmanager.dragStop(this, event); + } + + return $.ui.mouse.prototype._mouseUp.call(this, event); + }, + + cancel: function() { + + if(this.helper.is(".ui-draggable-dragging")) { + this._mouseUp({}); + } else { + this._clear(); + } + + return this; + + }, + + _getHandle: function(event) { + return this.options.handle ? + !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : + true; + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element); + + if(!helper.parents("body").length) { + helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); + } + + if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { + helper.css("position", "absolute"); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + //Get the offsetParent and cache its position + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + //This needs to be actually done for all browsers, since pageX/pageY includes this information + //Ugly IE fix + if((this.offsetParent[0] === document.body) || + (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.element.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.element.css("marginLeft"),10) || 0), + top: (parseInt(this.element.css("marginTop"),10) || 0), + right: (parseInt(this.element.css("marginRight"),10) || 0), + bottom: (parseInt(this.element.css("marginBottom"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var over, c, ce, + o = this.options; + + if ( !o.containment ) { + this.containment = null; + return; + } + + if ( o.containment === "window" ) { + this.containment = [ + $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, + $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, + $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left, + $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment === "document") { + this.containment = [ + 0, + 0, + $( document ).width() - this.helperProportions.width - this.margins.left, + ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment.constructor === Array ) { + this.containment = o.containment; + return; + } + + if ( o.containment === "parent" ) { + o.containment = this.helper[ 0 ].parentNode; + } + + c = $( o.containment ); + ce = c[ 0 ]; + + if( !ce ) { + return; + } + + over = c.css( "overflow" ) !== "hidden"; + + this.containment = [ + ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), + ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) , + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right, + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom + ]; + this.relative_container = c; + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent; + + //Cache the scroll + if (!this.offset.scroll) { + this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; + } + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod ) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod ) + ) + }; + + }, + + _generatePosition: function(event) { + + var containment, co, top, left, + o = this.options, + scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent, + pageX = event.pageX, + pageY = event.pageY; + + //Cache the scroll + if (!this.offset.scroll) { + this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + // If we are not dragging yet, we won't check for options + if ( this.originalPosition ) { + if ( this.containment ) { + if ( this.relative_container ){ + co = this.relative_container.offset(); + containment = [ + this.containment[ 0 ] + co.left, + this.containment[ 1 ] + co.top, + this.containment[ 2 ] + co.left, + this.containment[ 3 ] + co.top + ]; + } + else { + containment = this.containment; + } + + if(event.pageX - this.offset.click.left < containment[0]) { + pageX = containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < containment[1]) { + pageY = containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > containment[2]) { + pageX = containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > containment[3]) { + pageY = containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) + top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; + pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; + pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) + ) + }; + + }, + + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { + this.helper.remove(); + } + this.helper = null; + this.cancelHelperRemoval = false; + }, + + // From now on bulk stuff - mainly helpers + + _trigger: function(type, event, ui) { + ui = ui || this._uiHash(); + $.ui.plugin.call(this, type, [event, ui]); + //The absolute position has to be recalculated after plugins + if(type === "drag") { + this.positionAbs = this._convertPositionTo("absolute"); + } + return $.Widget.prototype._trigger.call(this, type, event, ui); + }, + + plugins: {}, + + _uiHash: function() { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs + }; + } + +}); + +$.ui.plugin.add("draggable", "connectToSortable", { + start: function(event, ui) { + + var inst = $(this).data("ui-draggable"), o = inst.options, + uiSortable = $.extend({}, ui, { item: inst.element }); + inst.sortables = []; + $(o.connectToSortable).each(function() { + var sortable = $.data(this, "ui-sortable"); + if (sortable && !sortable.options.disabled) { + inst.sortables.push({ + instance: sortable, + shouldRevert: sortable.options.revert + }); + sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page). + sortable._trigger("activate", event, uiSortable); + } + }); + + }, + stop: function(event, ui) { + + //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper + var inst = $(this).data("ui-draggable"), + uiSortable = $.extend({}, ui, { item: inst.element }); + + $.each(inst.sortables, function() { + if(this.instance.isOver) { + + this.instance.isOver = 0; + + inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance + this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) + + //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid" + if(this.shouldRevert) { + this.instance.options.revert = this.shouldRevert; + } + + //Trigger the stop of the sortable + this.instance._mouseStop(event); + + this.instance.options.helper = this.instance.options._helper; + + //If the helper has been the original item, restore properties in the sortable + if(inst.options.helper === "original") { + this.instance.currentItem.css({ top: "auto", left: "auto" }); + } + + } else { + this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance + this.instance._trigger("deactivate", event, uiSortable); + } + + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("ui-draggable"), that = this; + + $.each(inst.sortables, function() { + + var innermostIntersecting = false, + thisSortable = this; + + //Copy over some variables to allow calling the sortable's native _intersectsWith + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + + if(this.instance._intersectsWith(this.instance.containerCache)) { + innermostIntersecting = true; + $.each(inst.sortables, function () { + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + if (this !== thisSortable && + this.instance._intersectsWith(this.instance.containerCache) && + $.contains(thisSortable.instance.element[0], this.instance.element[0]) + ) { + innermostIntersecting = false; + } + return innermostIntersecting; + }); + } + + + if(innermostIntersecting) { + //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once + if(!this.instance.isOver) { + + this.instance.isOver = 1; + //Now we fake the start of dragging for the sortable instance, + //by cloning the list group item, appending it to the sortable and using it as inst.currentItem + //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) + this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true); + this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it + this.instance.options.helper = function() { return ui.helper[0]; }; + + event.target = this.instance.currentItem[0]; + this.instance._mouseCapture(event, true); + this.instance._mouseStart(event, true, true); + + //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes + this.instance.offset.click.top = inst.offset.click.top; + this.instance.offset.click.left = inst.offset.click.left; + this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; + this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; + + inst._trigger("toSortable", event); + inst.dropped = this.instance.element; //draggable revert needs that + //hack so receive/update callbacks work (mostly) + inst.currentItem = inst.element; + this.instance.fromOutside = inst; + + } + + //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable + if(this.instance.currentItem) { + this.instance._mouseDrag(event); + } + + } else { + + //If it doesn't intersect with the sortable, and it intersected before, + //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval + if(this.instance.isOver) { + + this.instance.isOver = 0; + this.instance.cancelHelperRemoval = true; + + //Prevent reverting on this forced stop + this.instance.options.revert = false; + + // The out event needs to be triggered independently + this.instance._trigger("out", event, this.instance._uiHash(this.instance)); + + this.instance._mouseStop(event, true); + this.instance.options.helper = this.instance.options._helper; + + //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size + this.instance.currentItem.remove(); + if(this.instance.placeholder) { + this.instance.placeholder.remove(); + } + + inst._trigger("fromSortable", event); + inst.dropped = false; //draggable revert needs that + } + + } + + }); + + } +}); + +$.ui.plugin.add("draggable", "cursor", { + start: function() { + var t = $("body"), o = $(this).data("ui-draggable").options; + if (t.css("cursor")) { + o._cursor = t.css("cursor"); + } + t.css("cursor", o.cursor); + }, + stop: function() { + var o = $(this).data("ui-draggable").options; + if (o._cursor) { + $("body").css("cursor", o._cursor); + } + } +}); + +$.ui.plugin.add("draggable", "opacity", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data("ui-draggable").options; + if(t.css("opacity")) { + o._opacity = t.css("opacity"); + } + t.css("opacity", o.opacity); + }, + stop: function(event, ui) { + var o = $(this).data("ui-draggable").options; + if(o._opacity) { + $(ui.helper).css("opacity", o._opacity); + } + } +}); + +$.ui.plugin.add("draggable", "scroll", { + start: function() { + var i = $(this).data("ui-draggable"); + if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { + i.overflowOffset = i.scrollParent.offset(); + } + }, + drag: function( event ) { + + var i = $(this).data("ui-draggable"), o = i.options, scrolled = false; + + if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { + + if(!o.axis || o.axis !== "x") { + if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) { + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; + } + } + + if(!o.axis || o.axis !== "y") { + if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) { + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; + } + } + + } else { + + if(!o.axis || o.axis !== "x") { + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + } + + if(!o.axis || o.axis !== "y") { + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(i, event); + } + + } +}); + +$.ui.plugin.add("draggable", "snap", { + start: function() { + + var i = $(this).data("ui-draggable"), + o = i.options; + + i.snapElements = []; + + $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { + var $t = $(this), + $o = $t.offset(); + if(this !== i.element[0]) { + i.snapElements.push({ + item: this, + width: $t.outerWidth(), height: $t.outerHeight(), + top: $o.top, left: $o.left + }); + } + }); + + }, + drag: function(event, ui) { + + var ts, bs, ls, rs, l, r, t, b, i, first, + inst = $(this).data("ui-draggable"), + o = inst.options, + d = o.snapTolerance, + x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, + y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; + + for (i = inst.snapElements.length - 1; i >= 0; i--){ + + l = inst.snapElements[i].left; + r = l + inst.snapElements[i].width; + t = inst.snapElements[i].top; + b = t + inst.snapElements[i].height; + + if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) { + if(inst.snapElements[i].snapping) { + (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = false; + continue; + } + + if(o.snapMode !== "inner") { + ts = Math.abs(t - y2) <= d; + bs = Math.abs(b - y1) <= d; + ls = Math.abs(l - x2) <= d; + rs = Math.abs(r - x1) <= d; + if(ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + } + if(bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; + } + if(ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; + } + if(rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; + } + } + + first = (ts || bs || ls || rs); + + if(o.snapMode !== "outer") { + ts = Math.abs(t - y1) <= d; + bs = Math.abs(b - y2) <= d; + ls = Math.abs(l - x1) <= d; + rs = Math.abs(r - x2) <= d; + if(ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; + } + if(bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + } + if(ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; + } + if(rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; + } + } + + if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = (ts || bs || ls || rs || first); + + } + + } +}); + +$.ui.plugin.add("draggable", "stack", { + start: function() { + var min, + o = this.data("ui-draggable").options, + group = $.makeArray($(o.stack)).sort(function(a,b) { + return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); + }); + + if (!group.length) { return; } + + min = parseInt($(group[0]).css("zIndex"), 10) || 0; + $(group).each(function(i) { + $(this).css("zIndex", min + i); + }); + this.css("zIndex", (min + group.length)); + } +}); + +$.ui.plugin.add("draggable", "zIndex", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data("ui-draggable").options; + if(t.css("zIndex")) { + o._zIndex = t.css("zIndex"); + } + t.css("zIndex", o.zIndex); + }, + stop: function(event, ui) { + var o = $(this).data("ui-draggable").options; + if(o._zIndex) { + $(ui.helper).css("zIndex", o._zIndex); + } + } +}); + +})(jQuery); +(function( $, undefined ) { + +function isOverAxis( x, reference, size ) { + return ( x > reference ) && ( x < ( reference + size ) ); +} + +$.widget("ui.droppable", { + version: "1.10.4", + widgetEventPrefix: "drop", + options: { + accept: "*", + activeClass: false, + addClasses: true, + greedy: false, + hoverClass: false, + scope: "default", + tolerance: "intersect", + + // callbacks + activate: null, + deactivate: null, + drop: null, + out: null, + over: null + }, + _create: function() { + + var proportions, + o = this.options, + accept = o.accept; + + this.isover = false; + this.isout = true; + + this.accept = $.isFunction(accept) ? accept : function(d) { + return d.is(accept); + }; + + this.proportions = function( /* valueToWrite */ ) { + if ( arguments.length ) { + // Store the droppable's proportions + proportions = arguments[ 0 ]; + } else { + // Retrieve or derive the droppable's proportions + return proportions ? + proportions : + proportions = { + width: this.element[ 0 ].offsetWidth, + height: this.element[ 0 ].offsetHeight + }; + } + }; + + // Add the reference and positions to the manager + $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || []; + $.ui.ddmanager.droppables[o.scope].push(this); + + (o.addClasses && this.element.addClass("ui-droppable")); + + }, + + _destroy: function() { + var i = 0, + drop = $.ui.ddmanager.droppables[this.options.scope]; + + for ( ; i < drop.length; i++ ) { + if ( drop[i] === this ) { + drop.splice(i, 1); + } + } + + this.element.removeClass("ui-droppable ui-droppable-disabled"); + }, + + _setOption: function(key, value) { + + if(key === "accept") { + this.accept = $.isFunction(value) ? value : function(d) { + return d.is(value); + }; + } + $.Widget.prototype._setOption.apply(this, arguments); + }, + + _activate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) { + this.element.addClass(this.options.activeClass); + } + if(draggable){ + this._trigger("activate", event, this.ui(draggable)); + } + }, + + _deactivate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) { + this.element.removeClass(this.options.activeClass); + } + if(draggable){ + this._trigger("deactivate", event, this.ui(draggable)); + } + }, + + _over: function(event) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { + return; + } + + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) { + this.element.addClass(this.options.hoverClass); + } + this._trigger("over", event, this.ui(draggable)); + } + + }, + + _out: function(event) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { + return; + } + + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) { + this.element.removeClass(this.options.hoverClass); + } + this._trigger("out", event, this.ui(draggable)); + } + + }, + + _drop: function(event,custom) { + + var draggable = custom || $.ui.ddmanager.current, + childrenIntersection = false; + + // Bail if draggable and droppable are same element + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { + return false; + } + + this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() { + var inst = $.data(this, "ui-droppable"); + if( + inst.options.greedy && + !inst.options.disabled && + inst.options.scope === draggable.options.scope && + inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) && + $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance) + ) { childrenIntersection = true; return false; } + }); + if(childrenIntersection) { + return false; + } + + if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.activeClass) { + this.element.removeClass(this.options.activeClass); + } + if(this.options.hoverClass) { + this.element.removeClass(this.options.hoverClass); + } + this._trigger("drop", event, this.ui(draggable)); + return this.element; + } + + return false; + + }, + + ui: function(c) { + return { + draggable: (c.currentItem || c.element), + helper: c.helper, + position: c.position, + offset: c.positionAbs + }; + } + +}); + +$.ui.intersect = function(draggable, droppable, toleranceMode) { + + if (!droppable.offset) { + return false; + } + + var draggableLeft, draggableTop, + x1 = (draggable.positionAbs || draggable.position.absolute).left, + y1 = (draggable.positionAbs || draggable.position.absolute).top, + x2 = x1 + draggable.helperProportions.width, + y2 = y1 + draggable.helperProportions.height, + l = droppable.offset.left, + t = droppable.offset.top, + r = l + droppable.proportions().width, + b = t + droppable.proportions().height; + + switch (toleranceMode) { + case "fit": + return (l <= x1 && x2 <= r && t <= y1 && y2 <= b); + case "intersect": + return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half + x2 - (draggable.helperProportions.width / 2) < r && // Left Half + t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half + y2 - (draggable.helperProportions.height / 2) < b ); // Top Half + case "pointer": + draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left); + draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top); + return isOverAxis( draggableTop, t, droppable.proportions().height ) && isOverAxis( draggableLeft, l, droppable.proportions().width ); + case "touch": + return ( + (y1 >= t && y1 <= b) || // Top edge touching + (y2 >= t && y2 <= b) || // Bottom edge touching + (y1 < t && y2 > b) // Surrounded vertically + ) && ( + (x1 >= l && x1 <= r) || // Left edge touching + (x2 >= l && x2 <= r) || // Right edge touching + (x1 < l && x2 > r) // Surrounded horizontally + ); + default: + return false; + } + +}; + +/* + This manager tracks offsets of draggables and droppables +*/ +$.ui.ddmanager = { + current: null, + droppables: { "default": [] }, + prepareOffsets: function(t, event) { + + var i, j, + m = $.ui.ddmanager.droppables[t.options.scope] || [], + type = event ? event.type : null, // workaround for #2317 + list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); + + droppablesLoop: for (i = 0; i < m.length; i++) { + + //No disabled and non-accepted + if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) { + continue; + } + + // Filter out elements in the current dragged item + for (j=0; j < list.length; j++) { + if(list[j] === m[i].element[0]) { + m[i].proportions().height = 0; + continue droppablesLoop; + } + } + + m[i].visible = m[i].element.css("display") !== "none"; + if(!m[i].visible) { + continue; + } + + //Activate the droppable if used directly from draggables + if(type === "mousedown") { + m[i]._activate.call(m[i], event); + } + + m[ i ].offset = m[ i ].element.offset(); + m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight }); + + } + + }, + drop: function(draggable, event) { + + var dropped = false; + // Create a copy of the droppables in case the list changes during the drop (#9116) + $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() { + + if(!this.options) { + return; + } + if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) { + dropped = this._drop.call(this, event) || dropped; + } + + if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + this.isout = true; + this.isover = false; + this._deactivate.call(this, event); + } + + }); + return dropped; + + }, + dragStart: function( draggable, event ) { + //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) + draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { + if( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + }); + }, + drag: function(draggable, event) { + + //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. + if(draggable.options.refreshPositions) { + $.ui.ddmanager.prepareOffsets(draggable, event); + } + + //Run through all droppables and check their positions based on specific tolerance options + $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { + + if(this.options.disabled || this.greedyChild || !this.visible) { + return; + } + + var parentInstance, scope, parent, + intersects = $.ui.intersect(draggable, this, this.options.tolerance), + c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null); + if(!c) { + return; + } + + if (this.options.greedy) { + // find droppable parents with same scope + scope = this.options.scope; + parent = this.element.parents(":data(ui-droppable)").filter(function () { + return $.data(this, "ui-droppable").options.scope === scope; + }); + + if (parent.length) { + parentInstance = $.data(parent[0], "ui-droppable"); + parentInstance.greedyChild = (c === "isover"); + } + } + + // we just moved into a greedy child + if (parentInstance && c === "isover") { + parentInstance.isover = false; + parentInstance.isout = true; + parentInstance._out.call(parentInstance, event); + } + + this[c] = true; + this[c === "isout" ? "isover" : "isout"] = false; + this[c === "isover" ? "_over" : "_out"].call(this, event); + + // we just moved out of a greedy child + if (parentInstance && c === "isout") { + parentInstance.isout = false; + parentInstance.isover = true; + parentInstance._over.call(parentInstance, event); + } + }); + + }, + dragStop: function( draggable, event ) { + draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); + //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) + if( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + } +}; + +})(jQuery); +(function( $, undefined ) { + +function num(v) { + return parseInt(v, 10) || 0; +} + +function isNumber(value) { + return !isNaN(parseInt(value, 10)); +} + +$.widget("ui.resizable", $.ui.mouse, { + version: "1.10.4", + widgetEventPrefix: "resize", + options: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + containment: false, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + // See #7960 + zIndex: 90, + + // callbacks + resize: null, + start: null, + stop: null + }, + _create: function() { + + var n, i, handle, axis, hname, + that = this, + o = this.options; + this.element.addClass("ui-resizable"); + + $.extend(this, { + _aspectRatio: !!(o.aspectRatio), + aspectRatio: o.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null + }); + + //Wrap the element if it cannot hold child nodes + if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { + + //Create a wrapper element and set the wrapper to the new current internal element + this.element.wrap( + $("
              ").css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left") + }) + ); + + //Overwrite the original this.element + this.element = this.element.parent().data( + "ui-resizable", this.element.data("ui-resizable") + ); + + this.elementIsWrapper = true; + + //Move margins to the wrapper + this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); + this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); + + //Prevent Safari textarea resize + this.originalResizeStyle = this.originalElement.css("resize"); + this.originalElement.css("resize", "none"); + + //Push the actual element to our proportionallyResize internal array + this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })); + + // avoid IE jump (hard set the margin) + this.originalElement.css({ margin: this.originalElement.css("margin") }); + + // fix handlers offset + this._proportionallyResize(); + + } + + this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" }); + if(this.handles.constructor === String) { + + if ( this.handles === "all") { + this.handles = "n,e,s,w,se,sw,ne,nw"; + } + + n = this.handles.split(","); + this.handles = {}; + + for(i = 0; i < n.length; i++) { + + handle = $.trim(n[i]); + hname = "ui-resizable-"+handle; + axis = $("
              "); + + // Apply zIndex to all handles - see #7960 + axis.css({ zIndex: o.zIndex }); + + //TODO : What's going on here? + if ("se" === handle) { + axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); + } + + //Insert into internal handles object and append to element + this.handles[handle] = ".ui-resizable-"+handle; + this.element.append(axis); + } + + } + + this._renderAxis = function(target) { + + var i, axis, padPos, padWrapper; + + target = target || this.element; + + for(i in this.handles) { + + if(this.handles[i].constructor === String) { + this.handles[i] = $(this.handles[i], this.element).show(); + } + + //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls) + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { + + axis = $(this.handles[i], this.element); + + //Checking the correct pad and border + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); + + //The padding type i have to apply... + padPos = [ "padding", + /ne|nw|n/.test(i) ? "Top" : + /se|sw|s/.test(i) ? "Bottom" : + /^e$/.test(i) ? "Right" : "Left" ].join(""); + + target.css(padPos, padWrapper); + + this._proportionallyResize(); + + } + + //TODO: What's that good for? There's not anything to be executed left + if(!$(this.handles[i]).length) { + continue; + } + } + }; + + //TODO: make renderAxis a prototype function + this._renderAxis(this.element); + + this._handles = $(".ui-resizable-handle", this.element) + .disableSelection(); + + //Matching axis name + this._handles.mouseover(function() { + if (!that.resizing) { + if (this.className) { + axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + } + //Axis, default = se + that.axis = axis && axis[1] ? axis[1] : "se"; + } + }); + + //If we want to auto hide the elements + if (o.autoHide) { + this._handles.hide(); + $(this.element) + .addClass("ui-resizable-autohide") + .mouseenter(function() { + if (o.disabled) { + return; + } + $(this).removeClass("ui-resizable-autohide"); + that._handles.show(); + }) + .mouseleave(function(){ + if (o.disabled) { + return; + } + if (!that.resizing) { + $(this).addClass("ui-resizable-autohide"); + that._handles.hide(); + } + }); + } + + //Initialize the mouse interaction + this._mouseInit(); + + }, + + _destroy: function() { + + this._mouseDestroy(); + + var wrapper, + _destroy = function(exp) { + $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") + .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove(); + }; + + //TODO: Unwrap at same DOM position + if (this.elementIsWrapper) { + _destroy(this.element); + wrapper = this.element; + this.originalElement.css({ + position: wrapper.css("position"), + width: wrapper.outerWidth(), + height: wrapper.outerHeight(), + top: wrapper.css("top"), + left: wrapper.css("left") + }).insertAfter( wrapper ); + wrapper.remove(); + } + + this.originalElement.css("resize", this.originalResizeStyle); + _destroy(this.originalElement); + + return this; + }, + + _mouseCapture: function(event) { + var i, handle, + capture = false; + + for (i in this.handles) { + handle = $(this.handles[i])[0]; + if (handle === event.target || $.contains(handle, event.target)) { + capture = true; + } + } + + return !this.options.disabled && capture; + }, + + _mouseStart: function(event) { + + var curleft, curtop, cursor, + o = this.options, + iniPos = this.element.position(), + el = this.element; + + this.resizing = true; + + // bugfix for http://dev.jquery.com/ticket/1749 + if ( (/absolute/).test( el.css("position") ) ) { + el.css({ position: "absolute", top: el.css("top"), left: el.css("left") }); + } else if (el.is(".ui-draggable")) { + el.css({ position: "absolute", top: iniPos.top, left: iniPos.left }); + } + + this._renderProxy(); + + curleft = num(this.helper.css("left")); + curtop = num(this.helper.css("top")); + + if (o.containment) { + curleft += $(o.containment).scrollLeft() || 0; + curtop += $(o.containment).scrollTop() || 0; + } + + //Store needed variables + this.offset = this.helper.offset(); + this.position = { left: curleft, top: curtop }; + this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() }; + this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; + this.originalPosition = { left: curleft, top: curtop }; + this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; + this.originalMousePosition = { left: event.pageX, top: event.pageY }; + + //Aspect Ratio + this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); + + cursor = $(".ui-resizable-" + this.axis).css("cursor"); + $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor); + + el.addClass("ui-resizable-resizing"); + this._propagate("start", event); + return true; + }, + + _mouseDrag: function(event) { + + //Increase performance, avoid regex + var data, + el = this.helper, props = {}, + smp = this.originalMousePosition, + a = this.axis, + prevTop = this.position.top, + prevLeft = this.position.left, + prevWidth = this.size.width, + prevHeight = this.size.height, + dx = (event.pageX-smp.left)||0, + dy = (event.pageY-smp.top)||0, + trigger = this._change[a]; + + if (!trigger) { + return false; + } + + // Calculate the attrs that will be change + data = trigger.apply(this, [event, dx, dy]); + + // Put this in the mouseDrag handler since the user can start pressing shift while resizing + this._updateVirtualBoundaries(event.shiftKey); + if (this._aspectRatio || event.shiftKey) { + data = this._updateRatio(data, event); + } + + data = this._respectSize(data, event); + + this._updateCache(data); + + // plugins callbacks need to be called first + this._propagate("resize", event); + + if (this.position.top !== prevTop) { + props.top = this.position.top + "px"; + } + if (this.position.left !== prevLeft) { + props.left = this.position.left + "px"; + } + if (this.size.width !== prevWidth) { + props.width = this.size.width + "px"; + } + if (this.size.height !== prevHeight) { + props.height = this.size.height + "px"; + } + el.css(props); + + if (!this._helper && this._proportionallyResizeElements.length) { + this._proportionallyResize(); + } + + // Call the user callback if the element was resized + if ( ! $.isEmptyObject(props) ) { + this._trigger("resize", event, this.ui()); + } + + return false; + }, + + _mouseStop: function(event) { + + this.resizing = false; + var pr, ista, soffseth, soffsetw, s, left, top, + o = this.options, that = this; + + if(this._helper) { + + pr = this._proportionallyResizeElements; + ista = pr.length && (/textarea/i).test(pr[0].nodeName); + soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height; + soffsetw = ista ? 0 : that.sizeDiff.width; + + s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) }; + left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null; + top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; + + if (!o.animate) { + this.element.css($.extend(s, { top: top, left: left })); + } + + that.helper.height(that.size.height); + that.helper.width(that.size.width); + + if (this._helper && !o.animate) { + this._proportionallyResize(); + } + } + + $("body").css("cursor", "auto"); + + this.element.removeClass("ui-resizable-resizing"); + + this._propagate("stop", event); + + if (this._helper) { + this.helper.remove(); + } + + return false; + + }, + + _updateVirtualBoundaries: function(forceAspectRatio) { + var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, + o = this.options; + + b = { + minWidth: isNumber(o.minWidth) ? o.minWidth : 0, + maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity, + minHeight: isNumber(o.minHeight) ? o.minHeight : 0, + maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity + }; + + if(this._aspectRatio || forceAspectRatio) { + // We want to create an enclosing box whose aspect ration is the requested one + // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension + pMinWidth = b.minHeight * this.aspectRatio; + pMinHeight = b.minWidth / this.aspectRatio; + pMaxWidth = b.maxHeight * this.aspectRatio; + pMaxHeight = b.maxWidth / this.aspectRatio; + + if(pMinWidth > b.minWidth) { + b.minWidth = pMinWidth; + } + if(pMinHeight > b.minHeight) { + b.minHeight = pMinHeight; + } + if(pMaxWidth < b.maxWidth) { + b.maxWidth = pMaxWidth; + } + if(pMaxHeight < b.maxHeight) { + b.maxHeight = pMaxHeight; + } + } + this._vBoundaries = b; + }, + + _updateCache: function(data) { + this.offset = this.helper.offset(); + if (isNumber(data.left)) { + this.position.left = data.left; + } + if (isNumber(data.top)) { + this.position.top = data.top; + } + if (isNumber(data.height)) { + this.size.height = data.height; + } + if (isNumber(data.width)) { + this.size.width = data.width; + } + }, + + _updateRatio: function( data ) { + + var cpos = this.position, + csize = this.size, + a = this.axis; + + if (isNumber(data.height)) { + data.width = (data.height * this.aspectRatio); + } else if (isNumber(data.width)) { + data.height = (data.width / this.aspectRatio); + } + + if (a === "sw") { + data.left = cpos.left + (csize.width - data.width); + data.top = null; + } + if (a === "nw") { + data.top = cpos.top + (csize.height - data.height); + data.left = cpos.left + (csize.width - data.width); + } + + return data; + }, + + _respectSize: function( data ) { + + var o = this._vBoundaries, + a = this.axis, + ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), + isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height), + dw = this.originalPosition.left + this.originalSize.width, + dh = this.position.top + this.size.height, + cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); + if (isminw) { + data.width = o.minWidth; + } + if (isminh) { + data.height = o.minHeight; + } + if (ismaxw) { + data.width = o.maxWidth; + } + if (ismaxh) { + data.height = o.maxHeight; + } + + if (isminw && cw) { + data.left = dw - o.minWidth; + } + if (ismaxw && cw) { + data.left = dw - o.maxWidth; + } + if (isminh && ch) { + data.top = dh - o.minHeight; + } + if (ismaxh && ch) { + data.top = dh - o.maxHeight; + } + + // fixing jump error on top/left - bug #2330 + if (!data.width && !data.height && !data.left && data.top) { + data.top = null; + } else if (!data.width && !data.height && !data.top && data.left) { + data.left = null; + } + + return data; + }, + + _proportionallyResize: function() { + + if (!this._proportionallyResizeElements.length) { + return; + } + + var i, j, borders, paddings, prel, + element = this.helper || this.element; + + for ( i=0; i < this._proportionallyResizeElements.length; i++) { + + prel = this._proportionallyResizeElements[i]; + + if (!this.borderDif) { + this.borderDif = []; + borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")]; + paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")]; + + for ( j = 0; j < borders.length; j++ ) { + this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 ); + } + } + + prel.css({ + height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, + width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 + }); + + } + + }, + + _renderProxy: function() { + + var el = this.element, o = this.options; + this.elementOffset = el.offset(); + + if(this._helper) { + + this.helper = this.helper || $("
              "); + + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() - 1, + height: this.element.outerHeight() - 1, + position: "absolute", + left: this.elementOffset.left +"px", + top: this.elementOffset.top +"px", + zIndex: ++o.zIndex //TODO: Don't modify option + }); + + this.helper + .appendTo("body") + .disableSelection(); + + } else { + this.helper = this.element; + } + + }, + + _change: { + e: function(event, dx) { + return { width: this.originalSize.width + dx }; + }, + w: function(event, dx) { + var cs = this.originalSize, sp = this.originalPosition; + return { left: sp.left + dx, width: cs.width - dx }; + }, + n: function(event, dx, dy) { + var cs = this.originalSize, sp = this.originalPosition; + return { top: sp.top + dy, height: cs.height - dy }; + }, + s: function(event, dx, dy) { + return { height: this.originalSize.height + dy }; + }, + se: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + sw: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + }, + ne: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + nw: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + } + }, + + _propagate: function(n, event) { + $.ui.plugin.call(this, n, [event, this.ui()]); + (n !== "resize" && this._trigger(n, event, this.ui())); + }, + + plugins: {}, + + ui: function() { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + }; + } + +}); + +/* + * Resizable Extensions + */ + +$.ui.plugin.add("resizable", "animate", { + + stop: function( event ) { + var that = $(this).data("ui-resizable"), + o = that.options, + pr = that._proportionallyResizeElements, + ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height, + soffsetw = ista ? 0 : that.sizeDiff.width, + style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, + left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null, + top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; + + that.element.animate( + $.extend(style, top && left ? { top: top, left: left } : {}), { + duration: o.animateDuration, + easing: o.animateEasing, + step: function() { + + var data = { + width: parseInt(that.element.css("width"), 10), + height: parseInt(that.element.css("height"), 10), + top: parseInt(that.element.css("top"), 10), + left: parseInt(that.element.css("left"), 10) + }; + + if (pr && pr.length) { + $(pr[0]).css({ width: data.width, height: data.height }); + } + + // propagating resize, and updating values for each animation step + that._updateCache(data); + that._propagate("resize", event); + + } + } + ); + } + +}); + +$.ui.plugin.add("resizable", "containment", { + + start: function() { + var element, p, co, ch, cw, width, height, + that = $(this).data("ui-resizable"), + o = that.options, + el = that.element, + oc = o.containment, + ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; + + if (!ce) { + return; + } + + that.containerElement = $(ce); + + if (/document/.test(oc) || oc === document) { + that.containerOffset = { left: 0, top: 0 }; + that.containerPosition = { left: 0, top: 0 }; + + that.parentData = { + element: $(document), left: 0, top: 0, + width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight + }; + } + + // i'm a node, so compute top, left, right, bottom + else { + element = $(ce); + p = []; + $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); + + that.containerOffset = element.offset(); + that.containerPosition = element.position(); + that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; + + co = that.containerOffset; + ch = that.containerSize.height; + cw = that.containerSize.width; + width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ); + height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); + + that.parentData = { + element: ce, left: co.left, top: co.top, width: width, height: height + }; + } + }, + + resize: function( event ) { + var woset, hoset, isParent, isOffsetRelative, + that = $(this).data("ui-resizable"), + o = that.options, + co = that.containerOffset, cp = that.position, + pRatio = that._aspectRatio || event.shiftKey, + cop = { top:0, left:0 }, ce = that.containerElement; + + if (ce[0] !== document && (/static/).test(ce.css("position"))) { + cop = co; + } + + if (cp.left < (that._helper ? co.left : 0)) { + that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left)); + if (pRatio) { + that.size.height = that.size.width / that.aspectRatio; + } + that.position.left = o.helper ? co.left : 0; + } + + if (cp.top < (that._helper ? co.top : 0)) { + that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top); + if (pRatio) { + that.size.width = that.size.height * that.aspectRatio; + } + that.position.top = that._helper ? co.top : 0; + } + + that.offset.left = that.parentData.left+that.position.left; + that.offset.top = that.parentData.top+that.position.top; + + woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ); + hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height ); + + isParent = that.containerElement.get(0) === that.element.parent().get(0); + isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position")); + + if ( isParent && isOffsetRelative ) { + woset -= Math.abs( that.parentData.left ); + } + + if (woset + that.size.width >= that.parentData.width) { + that.size.width = that.parentData.width - woset; + if (pRatio) { + that.size.height = that.size.width / that.aspectRatio; + } + } + + if (hoset + that.size.height >= that.parentData.height) { + that.size.height = that.parentData.height - hoset; + if (pRatio) { + that.size.width = that.size.height * that.aspectRatio; + } + } + }, + + stop: function(){ + var that = $(this).data("ui-resizable"), + o = that.options, + co = that.containerOffset, + cop = that.containerPosition, + ce = that.containerElement, + helper = $(that.helper), + ho = helper.offset(), + w = helper.outerWidth() - that.sizeDiff.width, + h = helper.outerHeight() - that.sizeDiff.height; + + if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) { + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + } + + if (that._helper && !o.animate && (/static/).test(ce.css("position"))) { + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + } + + } +}); + +$.ui.plugin.add("resizable", "alsoResize", { + + start: function () { + var that = $(this).data("ui-resizable"), + o = that.options, + _store = function (exp) { + $(exp).each(function() { + var el = $(this); + el.data("ui-resizable-alsoresize", { + width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), + left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) + }); + }); + }; + + if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) { + if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); } + else { $.each(o.alsoResize, function (exp) { _store(exp); }); } + }else{ + _store(o.alsoResize); + } + }, + + resize: function (event, ui) { + var that = $(this).data("ui-resizable"), + o = that.options, + os = that.originalSize, + op = that.originalPosition, + delta = { + height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0, + top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0 + }, + + _alsoResize = function (exp, c) { + $(exp).each(function() { + var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {}, + css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; + + $.each(css, function (i, prop) { + var sum = (start[prop]||0) + (delta[prop]||0); + if (sum && sum >= 0) { + style[prop] = sum || null; + } + }); + + el.css(style); + }); + }; + + if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) { + $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); }); + }else{ + _alsoResize(o.alsoResize); + } + }, + + stop: function () { + $(this).removeData("resizable-alsoresize"); + } +}); + +$.ui.plugin.add("resizable", "ghost", { + + start: function() { + + var that = $(this).data("ui-resizable"), o = that.options, cs = that.size; + + that.ghost = that.originalElement.clone(); + that.ghost + .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) + .addClass("ui-resizable-ghost") + .addClass(typeof o.ghost === "string" ? o.ghost : ""); + + that.ghost.appendTo(that.helper); + + }, + + resize: function(){ + var that = $(this).data("ui-resizable"); + if (that.ghost) { + that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width }); + } + }, + + stop: function() { + var that = $(this).data("ui-resizable"); + if (that.ghost && that.helper) { + that.helper.get(0).removeChild(that.ghost.get(0)); + } + } + +}); + +$.ui.plugin.add("resizable", "grid", { + + resize: function() { + var that = $(this).data("ui-resizable"), + o = that.options, + cs = that.size, + os = that.originalSize, + op = that.originalPosition, + a = that.axis, + grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid, + gridX = (grid[0]||1), + gridY = (grid[1]||1), + ox = Math.round((cs.width - os.width) / gridX) * gridX, + oy = Math.round((cs.height - os.height) / gridY) * gridY, + newWidth = os.width + ox, + newHeight = os.height + oy, + isMaxWidth = o.maxWidth && (o.maxWidth < newWidth), + isMaxHeight = o.maxHeight && (o.maxHeight < newHeight), + isMinWidth = o.minWidth && (o.minWidth > newWidth), + isMinHeight = o.minHeight && (o.minHeight > newHeight); + + o.grid = grid; + + if (isMinWidth) { + newWidth = newWidth + gridX; + } + if (isMinHeight) { + newHeight = newHeight + gridY; + } + if (isMaxWidth) { + newWidth = newWidth - gridX; + } + if (isMaxHeight) { + newHeight = newHeight - gridY; + } + + if (/^(se|s|e)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + } else if (/^(ne)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.top = op.top - oy; + } else if (/^(sw)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.left = op.left - ox; + } else { + if ( newHeight - gridY > 0 ) { + that.size.height = newHeight; + that.position.top = op.top - oy; + } else { + that.size.height = gridY; + that.position.top = op.top + os.height - gridY; + } + if ( newWidth - gridX > 0 ) { + that.size.width = newWidth; + that.position.left = op.left - ox; + } else { + that.size.width = gridX; + that.position.left = op.left + os.width - gridX; + } + } + } + +}); + +})(jQuery); +(function( $, undefined ) { + +$.widget("ui.selectable", $.ui.mouse, { + version: "1.10.4", + options: { + appendTo: "body", + autoRefresh: true, + distance: 0, + filter: "*", + tolerance: "touch", + + // callbacks + selected: null, + selecting: null, + start: null, + stop: null, + unselected: null, + unselecting: null + }, + _create: function() { + var selectees, + that = this; + + this.element.addClass("ui-selectable"); + + this.dragged = false; + + // cache selectee children based on filter + this.refresh = function() { + selectees = $(that.options.filter, that.element[0]); + selectees.addClass("ui-selectee"); + selectees.each(function() { + var $this = $(this), + pos = $this.offset(); + $.data(this, "selectable-item", { + element: this, + $element: $this, + left: pos.left, + top: pos.top, + right: pos.left + $this.outerWidth(), + bottom: pos.top + $this.outerHeight(), + startselected: false, + selected: $this.hasClass("ui-selected"), + selecting: $this.hasClass("ui-selecting"), + unselecting: $this.hasClass("ui-unselecting") + }); + }); + }; + this.refresh(); + + this.selectees = selectees.addClass("ui-selectee"); + + this._mouseInit(); + + this.helper = $("
              "); + }, + + _destroy: function() { + this.selectees + .removeClass("ui-selectee") + .removeData("selectable-item"); + this.element + .removeClass("ui-selectable ui-selectable-disabled"); + this._mouseDestroy(); + }, + + _mouseStart: function(event) { + var that = this, + options = this.options; + + this.opos = [event.pageX, event.pageY]; + + if (this.options.disabled) { + return; + } + + this.selectees = $(options.filter, this.element[0]); + + this._trigger("start", event); + + $(options.appendTo).append(this.helper); + // position helper (lasso) + this.helper.css({ + "left": event.pageX, + "top": event.pageY, + "width": 0, + "height": 0 + }); + + if (options.autoRefresh) { + this.refresh(); + } + + this.selectees.filter(".ui-selected").each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.startselected = true; + if (!event.metaKey && !event.ctrlKey) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + }); + + $(event.target).parents().addBack().each(function() { + var doSelect, + selectee = $.data(this, "selectable-item"); + if (selectee) { + doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected"); + selectee.$element + .removeClass(doSelect ? "ui-unselecting" : "ui-selected") + .addClass(doSelect ? "ui-selecting" : "ui-unselecting"); + selectee.unselecting = !doSelect; + selectee.selecting = doSelect; + selectee.selected = doSelect; + // selectable (UN)SELECTING callback + if (doSelect) { + that._trigger("selecting", event, { + selecting: selectee.element + }); + } else { + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + return false; + } + }); + + }, + + _mouseDrag: function(event) { + + this.dragged = true; + + if (this.options.disabled) { + return; + } + + var tmp, + that = this, + options = this.options, + x1 = this.opos[0], + y1 = this.opos[1], + x2 = event.pageX, + y2 = event.pageY; + + if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } + if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; } + this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1}); + + this.selectees.each(function() { + var selectee = $.data(this, "selectable-item"), + hit = false; + + //prevent helper from being selected if appendTo: selectable + if (!selectee || selectee.element === that.element[0]) { + return; + } + + if (options.tolerance === "touch") { + hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); + } else if (options.tolerance === "fit") { + hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); + } + + if (hit) { + // SELECT + if (selectee.selected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + } + if (selectee.unselecting) { + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + } + if (!selectee.selecting) { + selectee.$element.addClass("ui-selecting"); + selectee.selecting = true; + // selectable SELECTING callback + that._trigger("selecting", event, { + selecting: selectee.element + }); + } + } else { + // UNSELECT + if (selectee.selecting) { + if ((event.metaKey || event.ctrlKey) && selectee.startselected) { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + selectee.$element.addClass("ui-selected"); + selectee.selected = true; + } else { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + if (selectee.startselected) { + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + } + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + if (selectee.selected) { + if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + } + }); + + return false; + }, + + _mouseStop: function(event) { + var that = this; + + this.dragged = false; + + $(".ui-unselecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + selectee.startselected = false; + that._trigger("unselected", event, { + unselected: selectee.element + }); + }); + $(".ui-selecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-selecting").addClass("ui-selected"); + selectee.selecting = false; + selectee.selected = true; + selectee.startselected = true; + that._trigger("selected", event, { + selected: selectee.element + }); + }); + this._trigger("stop", event); + + this.helper.remove(); + + return false; + } + +}); + +})(jQuery); +(function( $, undefined ) { + +function isOverAxis( x, reference, size ) { + return ( x > reference ) && ( x < ( reference + size ) ); +} + +function isFloating(item) { + return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); +} + +$.widget("ui.sortable", $.ui.mouse, { + version: "1.10.4", + widgetEventPrefix: "sort", + ready: false, + options: { + appendTo: "parent", + axis: false, + connectWith: false, + containment: false, + cursor: "auto", + cursorAt: false, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: "> *", + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1000, + + // callbacks + activate: null, + beforeStop: null, + change: null, + deactivate: null, + out: null, + over: null, + receive: null, + remove: null, + sort: null, + start: null, + stop: null, + update: null + }, + _create: function() { + + var o = this.options; + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine if the items are being displayed horizontally + this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + //We're ready to go + this.ready = true; + + }, + + _destroy: function() { + this.element + .removeClass("ui-sortable ui-sortable-disabled"); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) { + this.items[i].item.removeData(this.widgetName + "-item"); + } + + return this; + }, + + _setOption: function(key, value){ + if ( key === "disabled" ) { + this.options[ key ] = value; + + this.widget().toggleClass( "ui-sortable-disabled", !!value ); + } else { + // Don't call widget base _setOption for disable as it adds ui-state-disabled class + $.Widget.prototype._setOption.apply(this, arguments); + } + }, + + _mouseCapture: function(event, overrideHandle) { + var currentItem = null, + validHandle = false, + that = this; + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type === "static") { + return false; + } + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + $(event.target).parents().each(function() { + if($.data(this, that.widgetName + "-item") === that) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, that.widgetName + "-item") === that) { + currentItem = $(event.target); + } + + if(!currentItem) { + return false; + } + if(this.options.handle && !overrideHandle) { + $(this.options.handle, currentItem).find("*").addBack().each(function() { + if(this === event.target) { + validHandle = true; + } + }); + if(!validHandle) { + return false; + } + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var i, body, + o = this.options; + + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way + if(this.helper[0] !== this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) { + this._setContainment(); + } + + if( o.cursor && o.cursor !== "auto" ) { // cursor option + body = this.document.find( "body" ); + + // support: IE + this.storedCursor = body.css( "cursor" ); + body.css( "cursor", o.cursor ); + + this.storedStylesheet = $( "" ).appendTo( body ); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) { + this._storedOpacity = this.helper.css("opacity"); + } + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) { + this._storedZIndex = this.helper.css("zIndex"); + } + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { + this.overflowOffset = this.scrollParent.offset(); + } + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) { + this._cacheHelperProportions(); + } + + + //Post "activate" events to possible containers + if( !noActivation ) { + for ( i = this.containers.length - 1; i >= 0; i-- ) { + this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); + } + } + + //Prepare possible droppables + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + var i, item, itemElement, intersection, + o = this.options, + scrolled = false; + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + + //Rearrange + for (i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + item = this.items[i]; + itemElement = item.item[0]; + intersection = this._intersectsWithPointer(item); + if (!intersection) { + continue; + } + + // Only put the placeholder inside the current Container, skip all + // items from other containers. This works because when moving + // an item from one container to another the + // currentContainer is switched before the placeholder is moved. + // + // Without this, moving items in "sub-sortables" can cause + // the placeholder to jitter beetween the outer and inner container. + if (item.instance !== this.currentContainer) { + continue; + } + + // cannot intersect with itself + // no useless actions that have been done before + // no action if the item moved is the parent of the item checked + if (itemElement !== this.currentItem[0] && + this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && + !$.contains(this.placeholder[0], itemElement) && + (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection === 1 ? "down" : "up"; + + if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + //Call callbacks + this._trigger("sort", event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) { + return; + } + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) { + $.ui.ddmanager.drop(this, event); + } + + if(this.options.revert) { + var that = this, + cur = this.placeholder.offset(), + axis = this.options.axis, + animation = {}; + + if ( !axis || axis === "x" ) { + animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); + } + if ( !axis || axis === "y" ) { + animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); + } + this.reverting = true; + $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { + that._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp({ target: null }); + + if(this.options.helper === "original") { + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, this._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + if (this.placeholder) { + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) { + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + } + if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { + this.helper.remove(); + } + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + } + + return this; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + str = []; + o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); + if (res) { + str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); + } + }); + + if(!str.length && o.key) { + str.push(o.key + "="); + } + + return str.join("&"); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + ret = []; + + o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height, + l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height, + dyClick = this.offset.click.top, + dxClick = this.offset.click.left, + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), + isOverElement = isOverElementHeight && isOverElementWidth; + + if ( this.options.tolerance === "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) && // Right Half + x2 - (this.helperProportions.width / 2) < r && // Left Half + t < y1 + (this.helperProportions.height / 2) && // Bottom Half + y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) { + return false; + } + + return this.floating ? + ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta !== 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta !== 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this.refreshPositions(); + return this; + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var i, j, cur, inst, + items = [], + queries = [], + connectWith = this._connectWith(); + + if(connectWith && connected) { + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i]); + for ( j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); + } + } + } + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); + + function addItems() { + items.push( this ); + } + for (i = queries.length - 1; i >= 0; i--){ + queries[i][0].each( addItems ); + } + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); + + this.items = $.grep(this.items, function (item) { + for (var j=0; j < list.length; j++) { + if(list[j] === item.item[0]) { + return false; + } + } + return true; + }); + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + + var i, j, cur, inst, targetData, _queries, item, queriesLength, + items = this.items, + queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], + connectWith = this._connectWith(); + + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i]); + for (j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + } + } + } + + for (i = queries.length - 1; i >= 0; i--) { + targetData = queries[i][1]; + _queries = queries[i][0]; + + for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { + item = $(_queries[j]); + + item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + } + } + + }, + + refreshPositions: function(fast) { + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + var i, item, t, p; + + for (i = this.items.length - 1; i >= 0; i--){ + item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { + continue; + } + + t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + p = t.offset(); + item.left = p.left; + item.top = p.top; + } + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (i = this.containers.length - 1; i >= 0; i--){ + p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + } + } + + return this; + }, + + _createPlaceholder: function(that) { + that = that || this; + var className, + o = that.options; + + if(!o.placeholder || o.placeholder.constructor === String) { + className = o.placeholder; + o.placeholder = { + element: function() { + + var nodeName = that.currentItem[0].nodeName.toLowerCase(), + element = $( "<" + nodeName + ">", that.document[0] ) + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper"); + + if ( nodeName === "tr" ) { + that.currentItem.children().each(function() { + $( " ", that.document[0] ) + .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) + .appendTo( element ); + }); + } else if ( nodeName === "img" ) { + element.attr( "src", that.currentItem.attr( "src" ) ); + } + + if ( !className ) { + element.css( "visibility", "hidden" ); + } + + return element; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) { + return; + } + + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } + } + }; + } + + //Create the placeholder + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); + + //Append it after the actual current item + that.currentItem.after(that.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(that, that.placeholder); + + }, + + _contactContainers: function(event) { + var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, + innermostContainer = null, + innermostIndex = null; + + // get innermost container that intersects with item + for (i = this.containers.length - 1; i >= 0; i--) { + + // never consider a container that's located within the item itself + if($.contains(this.currentItem[0], this.containers[i].element[0])) { + continue; + } + + if(this._intersectsWith(this.containers[i].containerCache)) { + + // if we've already found a container and it's more "inner" than this, then continue + if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { + continue; + } + + innermostContainer = this.containers[i]; + innermostIndex = i; + + } else { + // container doesn't intersect. trigger "out" event if necessary + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + // if no intersecting containers found, return + if(!innermostContainer) { + return; + } + + // move the item into the container if it's not there already + if(this.containers.length === 1) { + if (!this.containers[innermostIndex].containerCache.over) { + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + } else { + + //When entering a new container, we will find the item with the least distance and append our item near it + dist = 10000; + itemWithLeastDistance = null; + floating = innermostContainer.floating || isFloating(this.currentItem); + posProperty = floating ? "left" : "top"; + sizeProperty = floating ? "width" : "height"; + base = this.positionAbs[posProperty] + this.offset.click[posProperty]; + for (j = this.items.length - 1; j >= 0; j--) { + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { + continue; + } + if(this.items[j].item[0] === this.currentItem[0]) { + continue; + } + if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { + continue; + } + cur = this.items[j].item.offset()[posProperty]; + nearBottom = false; + if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ + nearBottom = true; + cur += this.items[j][sizeProperty]; + } + + if(Math.abs(cur - base) < dist) { + dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; + this.direction = nearBottom ? "up": "down"; + } + } + + //Check if dropOnEmpty is enabled + if(!itemWithLeastDistance && !this.options.dropOnEmpty) { + return; + } + + if(this.currentContainer === this.containers[innermostIndex]) { + return; + } + + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); + this.currentContainer = this.containers[innermostIndex]; + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + + + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); + + //Add the helper to the DOM if that didn't happen already + if(!helper.parents("body").length) { + $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + } + + if(helper[0] === this.currentItem[0]) { + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + } + + if(!helper[0].style.width || o.forceHelperSize) { + helper.width(this.currentItem.width()); + } + if(!helper[0].style.height || o.forceHelperSize) { + helper.height(this.currentItem.height()); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + // This needs to be actually done for all browsers, since pageX/pageY includes this information + // with an ugly IE fix + if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var ce, co, over, + o = this.options; + if(o.containment === "parent") { + o.containment = this.helper[0].parentNode; + } + if(o.containment === "document" || o.containment === "window") { + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + } + + if(!(/^(document|window|parent)$/).test(o.containment)) { + ce = $(o.containment)[0]; + co = $(o.containment).offset(); + over = ($(ce).css("overflow") !== "hidden"); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var top, left, + o = this.options, + pageX = event.pageX, + pageY = event.pageY, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) { + pageX = this.containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < this.containment[1]) { + pageY = this.containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > this.containment[2]) { + pageX = this.containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > this.containment[3]) { + pageY = this.containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var counter = this.counter; + + this._delay(function() { + if(counter === this.counter) { + this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + } + }); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var i, + delayedTriggers = []; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem.parent().length) { + this.placeholder.before(this.currentItem); + } + this._noFinalSort = null; + + if(this.helper[0] === this.currentItem[0]) { + for(i in this._storedCSS) { + if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { + this._storedCSS[i] = ""; + } + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.fromOutside && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); + } + if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed + } + + // Check if the items Container has Changed and trigger appropriate + // events. + if (this !== this.currentContainer) { + if(!noPropagation) { + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + } + } + + + //Post events to containers + function delayEvent( type, instance, container ) { + return function( event ) { + container._trigger( type, event, instance._uiHash( instance ) ); + }; + } + for (i = this.containers.length - 1; i >= 0; i--){ + if (!noPropagation) { + delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); + } + if(this.containers[i].containerCache.over) { + delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if ( this.storedCursor ) { + this.document.find( "body" ).css( "cursor", this.storedCursor ); + this.storedStylesheet.remove(); + } + if(this._storedOpacity) { + this.helper.css("opacity", this._storedOpacity); + } + if(this._storedZIndex) { + this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); + } + + this.dragging = false; + if(this.cancelHelperRemoval) { + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return false; + } + + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if(this.helper[0] !== this.currentItem[0]) { + this.helper.remove(); + } + this.helper = null; + + if(!noPropagation) { + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return true; + + }, + + _trigger: function() { + if ($.Widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(_inst) { + var inst = _inst || this; + return { + helper: inst.helper, + placeholder: inst.placeholder || $([]), + position: inst.position, + originalPosition: inst.originalPosition, + offset: inst.positionAbs, + item: inst.currentItem, + sender: _inst ? _inst.element : null + }; + } + +}); + +})(jQuery); +(function( $, undefined ) { + +var uid = 0, + hideProps = {}, + showProps = {}; + +hideProps.height = hideProps.paddingTop = hideProps.paddingBottom = + hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide"; +showProps.height = showProps.paddingTop = showProps.paddingBottom = + showProps.borderTopWidth = showProps.borderBottomWidth = "show"; + +$.widget( "ui.accordion", { + version: "1.10.4", + options: { + active: 0, + animate: {}, + collapsible: false, + event: "click", + header: "> li > :first-child,> :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, + + // callbacks + activate: null, + beforeActivate: null + }, + + _create: function() { + var options = this.options; + this.prevShow = this.prevHide = $(); + this.element.addClass( "ui-accordion ui-widget ui-helper-reset" ) + // ARIA + .attr( "role", "tablist" ); + + // don't allow collapsible: false and active: false / null + if ( !options.collapsible && (options.active === false || options.active == null) ) { + options.active = 0; + } + + this._processPanels(); + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } + this._refresh(); + }, + + _getCreateEventData: function() { + return { + header: this.active, + panel: !this.active.length ? $() : this.active.next(), + content: !this.active.length ? $() : this.active.next() + }; + }, + + _createIcons: function() { + var icons = this.options.icons; + if ( icons ) { + $( "" ) + .addClass( "ui-accordion-header-icon ui-icon " + icons.header ) + .prependTo( this.headers ); + this.active.children( ".ui-accordion-header-icon" ) + .removeClass( icons.header ) + .addClass( icons.activeHeader ); + this.headers.addClass( "ui-accordion-icons" ); + } + }, + + _destroyIcons: function() { + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); + }, + + _destroy: function() { + var contents; + + // clean up main element + this.element + .removeClass( "ui-accordion ui-widget ui-helper-reset" ) + .removeAttr( "role" ); + + // clean up headers + this.headers + .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeAttr( "role" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-controls" ) + .removeAttr( "tabIndex" ) + .each(function() { + if ( /^ui-accordion/.test( this.id ) ) { + this.removeAttribute( "id" ); + } + }); + this._destroyIcons(); + + // clean up content panels + contents = this.headers.next() + .css( "display", "" ) + .removeAttr( "role" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-labelledby" ) + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" ) + .each(function() { + if ( /^ui-accordion/.test( this.id ) ) { + this.removeAttribute( "id" ); + } + }); + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); + } + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); + } + this._setupEvents( value ); + } + + this._super( key, value ); + + // setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } + } + + // #5332 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + if ( key === "disabled" ) { + this.headers.add( this.headers.next() ) + .toggleClass( "ui-state-disabled", !!value ); + } + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + toFocus = false; + + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[ ( currentIndex + 1 ) % length ]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + toFocus.focus(); + event.preventDefault(); + } + }, + + _panelKeyDown : function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().focus(); + } + }, + + refresh: function() { + var options = this.options; + this._processPanels(); + + // was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { + options.active = false; + this.active = $(); + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + // all remaining panel are disabled + if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) { + options.active = false; + this.active = $(); + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); + } + // was active, active panel still exists + } else { + // make sure active index is correct + options.active = this.headers.index( this.active ); + } + + this._destroyIcons(); + + this._refresh(); + }, + + _processPanels: function() { + this.headers = this.element.find( this.options.header ) + .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" ); + + this.headers.next() + .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) + .filter(":not(.ui-accordion-content-active)") + .hide(); + }, + + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(), + accordionId = this.accordionId = "ui-accordion-" + + (this.element.attr( "id" ) || ++uid); + + this.active = this._findActive( options.active ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) + .removeClass( "ui-corner-all" ); + this.active.next() + .addClass( "ui-accordion-content-active" ) + .show(); + + this.headers + .attr( "role", "tab" ) + .each(function( i ) { + var header = $( this ), + headerId = header.attr( "id" ), + panel = header.next(), + panelId = panel.attr( "id" ); + if ( !headerId ) { + headerId = accordionId + "-header-" + i; + header.attr( "id", headerId ); + } + if ( !panelId ) { + panelId = accordionId + "-panel-" + i; + panel.attr( "id", panelId ); + } + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + }) + .next() + .attr( "role", "tabpanel" ); + + this.headers + .not( this.active ) + .attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }) + .next() + .attr({ + "aria-hidden": "true" + }) + .hide(); + + // make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }) + .next() + .attr({ + "aria-hidden": "false" + }); + } + + this._createIcons(); + + this._setupEvents( options.event ); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.headers.each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.headers.next() + .each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each(function() { + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + }) + .height( maxHeight ); + } + }, + + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; + + // trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + + this._eventHandler({ + target: active, + currentTarget: active, + preventDefault: $.noop + }); + }, + + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, + + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" }); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; + + event.preventDefault(); + + if ( + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.headers.index( clicked ); + + // when the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); + + // switch classes + // corner classes on the previously active header stay after the animation + active.removeClass( "ui-accordion-header-active ui-state-active" ); + if ( options.icons ) { + active.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.activeHeader ) + .addClass( options.icons.header ); + } + + if ( !clickedIsActive ) { + clicked + .removeClass( "ui-corner-all" ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ); + if ( options.icons ) { + clicked.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.header ) + .addClass( options.icons.activeHeader ); + } + + clicked + .next() + .addClass( "ui-accordion-content-active" ); + } + }, + + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; + + // handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; + + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } + + toHide.attr({ + "aria-hidden": "true" + }); + toHide.prev().attr( "aria-selected", "false" ); + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr({ + "tabIndex": -1, + "aria-expanded": "false" + }); + } else if ( toShow.length ) { + this.headers.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr({ + "aria-selected": "true", + tabIndex: 0, + "aria-expanded": "true" + }); + }, + + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; + + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; + + if ( !toHide.length ) { + return toShow.animate( showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( hideProps, duration, easing, complete ); + } + + total = toShow.show().outerHeight(); + toHide.animate( hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + }); + toShow + .hide() + .animate( showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + adjust += fx.now; + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; + } + } + }); + }, + + _toggleComplete: function( data ) { + var toHide = data.oldPanel; + + toHide + .removeClass( "ui-accordion-content-active" ) + .prev() + .removeClass( "ui-corner-top" ) + .addClass( "ui-corner-all" ); + + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[0].className = toHide.parent()[0].className; + } + this._trigger( "activate", null, data ); + } +}); + +})( jQuery ); +(function( $, undefined ) { + +$.widget( "ui.autocomplete", { + version: "1.10.4", + defaultElement: "", + options: { + appendTo: null, + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, + + requestIndex: 0, + pending: 0, + + _create: function() { + // Some browsers only repeat keydown events, not keypress events, + // so we use the suppressKeyPress flag to determine if we've already + // handled the keydown event. #7269 + // Unfortunately the code for & in keypress is the same as the up arrow, + // so we use the suppressKeyPressRepeat flag to avoid handling keypress + // events when we know the keydown event was used to modify the + // search term. #7799 + var suppressKeyPress, suppressKeyPressRepeat, suppressInput, + nodeName = this.element[0].nodeName.toLowerCase(), + isTextarea = nodeName === "textarea", + isInput = nodeName === "input"; + + this.isMultiLine = + // Textareas are always multi-line + isTextarea ? true : + // Inputs are always single-line, even if inside a contentEditable element + // IE also treats inputs as contentEditable + isInput ? false : + // All other element types are determined by whether or not they're contentEditable + this.element.prop( "isContentEditable" ); + + this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; + this.isNewMenu = true; + + this.element + .addClass( "ui-autocomplete-input" ) + .attr( "autocomplete", "off" ); + + this._on( this.element, { + keydown: function( event ) { + if ( this.element.prop( "readOnly" ) ) { + suppressKeyPress = true; + suppressInput = true; + suppressKeyPressRepeat = true; + return; + } + + suppressKeyPress = false; + suppressInput = false; + suppressKeyPressRepeat = false; + var keyCode = $.ui.keyCode; + switch( event.keyCode ) { + case keyCode.PAGE_UP: + suppressKeyPress = true; + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + suppressKeyPress = true; + this._move( "nextPage", event ); + break; + case keyCode.UP: + suppressKeyPress = true; + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + suppressKeyPress = true; + this._keyEvent( "next", event ); + break; + case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: + // when menu is open and has focus + if ( this.menu.active ) { + // #6055 - Opera still allows the keypress to occur + // which causes forms to submit + suppressKeyPress = true; + event.preventDefault(); + this.menu.select( event ); + } + break; + case keyCode.TAB: + if ( this.menu.active ) { + this.menu.select( event ); + } + break; + case keyCode.ESCAPE: + if ( this.menu.element.is( ":visible" ) ) { + this._value( this.term ); + this.close( event ); + // Different browsers have different default behavior for escape + // Single press can mean undo or clear + // Double press in IE means clear the whole form + event.preventDefault(); + } + break; + default: + suppressKeyPressRepeat = true; + // search timeout should be triggered before the input value is changed + this._searchTimeout( event ); + break; + } + }, + keypress: function( event ) { + if ( suppressKeyPress ) { + suppressKeyPress = false; + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + event.preventDefault(); + } + return; + } + if ( suppressKeyPressRepeat ) { + return; + } + + // replicate some key handlers to allow them to repeat in Firefox and Opera + var keyCode = $.ui.keyCode; + switch( event.keyCode ) { + case keyCode.PAGE_UP: + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + this._move( "nextPage", event ); + break; + case keyCode.UP: + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + this._keyEvent( "next", event ); + break; + } + }, + input: function( event ) { + if ( suppressInput ) { + suppressInput = false; + event.preventDefault(); + return; + } + this._searchTimeout( event ); + }, + focus: function() { + this.selectedItem = null; + this.previous = this._value(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + clearTimeout( this.searching ); + this.close( event ); + this._change( event ); + } + }); + + this._initSource(); + this.menu = $( "
                " ) + .addClass( "ui-autocomplete ui-front" ) + .appendTo( this._appendTo() ) + .menu({ + // disable ARIA support, the live region takes care of that + role: null + }) + .hide() + .data( "ui-menu" ); + + this._on( this.menu.element, { + mousedown: function( event ) { + // prevent moving focus out of the text field + event.preventDefault(); + + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + }); + + // clicking on the scrollbar causes focus to shift to the body + // but we can't detect a mouseup or a click immediately afterward + // so we have to track the next mousedown and close the menu if + // the user clicks somewhere outside of the autocomplete + var menuElement = this.menu.element[ 0 ]; + if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { + this._delay(function() { + var that = this; + this.document.one( "mousedown", function( event ) { + if ( event.target !== that.element[ 0 ] && + event.target !== menuElement && + !$.contains( menuElement, event.target ) ) { + that.close(); + } + }); + }); + } + }, + menufocus: function( event, ui ) { + // support: Firefox + // Prevent accidental activation of menu items in Firefox (#7024 #9118) + if ( this.isNewMenu ) { + this.isNewMenu = false; + if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { + this.menu.blur(); + + this.document.one( "mousemove", function() { + $( event.target ).trigger( event.originalEvent ); + }); + + return; + } + } + + var item = ui.item.data( "ui-autocomplete-item" ); + if ( false !== this._trigger( "focus", event, { item: item } ) ) { + // use value to match what will end up in the input, if it was a key event + if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { + this._value( item.value ); + } + } else { + // Normally the input is populated with the item's value as the + // menu is navigated, causing screen readers to notice a change and + // announce the item. Since the focus event was canceled, this doesn't + // happen, so we update the live region so that screen readers can + // still notice the change and announce it. + this.liveRegion.text( item.value ); + } + }, + menuselect: function( event, ui ) { + var item = ui.item.data( "ui-autocomplete-item" ), + previous = this.previous; + + // only trigger when focus was lost (click on menu) + if ( this.element[0] !== this.document[0].activeElement ) { + this.element.focus(); + this.previous = previous; + // #6109 - IE triggers two focus events and the second + // is asynchronous, so we need to reset the previous + // term synchronously and asynchronously :-( + this._delay(function() { + this.previous = previous; + this.selectedItem = item; + }); + } + + if ( false !== this._trigger( "select", event, { item: item } ) ) { + this._value( item.value ); + } + // reset the term after the select event + // this allows custom select handling to work properly + this.term = this._value(); + + this.close( event ); + this.selectedItem = item; + } + }); + + this.liveRegion = $( "", { + role: "status", + "aria-live": "polite" + }) + .addClass( "ui-helper-hidden-accessible" ) + .insertBefore( this.element ); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _destroy: function() { + clearTimeout( this.searching ); + this.element + .removeClass( "ui-autocomplete-input" ) + .removeAttr( "autocomplete" ); + this.menu.element.remove(); + this.liveRegion.remove(); + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "source" ) { + this._initSource(); + } + if ( key === "appendTo" ) { + this.menu.element.appendTo( this._appendTo() ); + } + if ( key === "disabled" && value && this.xhr ) { + this.xhr.abort(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + + if ( element ) { + element = element.jquery || element.nodeType ? + $( element ) : + this.document.find( element ).eq( 0 ); + } + + if ( !element ) { + element = this.element.closest( ".ui-front" ); + } + + if ( !element.length ) { + element = this.document[0].body; + } + + return element; + }, + + _initSource: function() { + var array, url, + that = this; + if ( $.isArray(this.options.source) ) { + array = this.options.source; + this.source = function( request, response ) { + response( $.ui.autocomplete.filter( array, request.term ) ); + }; + } else if ( typeof this.options.source === "string" ) { + url = this.options.source; + this.source = function( request, response ) { + if ( that.xhr ) { + that.xhr.abort(); + } + that.xhr = $.ajax({ + url: url, + data: request, + dataType: "json", + success: function( data ) { + response( data ); + }, + error: function() { + response( [] ); + } + }); + }; + } else { + this.source = this.options.source; + } + }, + + _searchTimeout: function( event ) { + clearTimeout( this.searching ); + this.searching = this._delay(function() { + // only search if the value has changed + if ( this.term !== this._value() ) { + this.selectedItem = null; + this.search( null, event ); + } + }, this.options.delay ); + }, + + search: function( value, event ) { + value = value != null ? value : this._value(); + + // always save the actual value, not the one passed as an argument + this.term = this._value(); + + if ( value.length < this.options.minLength ) { + return this.close( event ); + } + + if ( this._trigger( "search", event ) === false ) { + return; + } + + return this._search( value ); + }, + + _search: function( value ) { + this.pending++; + this.element.addClass( "ui-autocomplete-loading" ); + this.cancelSearch = false; + + this.source( { term: value }, this._response() ); + }, + + _response: function() { + var index = ++this.requestIndex; + + return $.proxy(function( content ) { + if ( index === this.requestIndex ) { + this.__response( content ); + } + + this.pending--; + if ( !this.pending ) { + this.element.removeClass( "ui-autocomplete-loading" ); + } + }, this ); + }, + + __response: function( content ) { + if ( content ) { + content = this._normalize( content ); + } + this._trigger( "response", null, { content: content } ); + if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { + this._suggest( content ); + this._trigger( "open" ); + } else { + // use ._close() instead of .close() so we don't cancel future searches + this._close(); + } + }, + + close: function( event ) { + this.cancelSearch = true; + this._close( event ); + }, + + _close: function( event ) { + if ( this.menu.element.is( ":visible" ) ) { + this.menu.element.hide(); + this.menu.blur(); + this.isNewMenu = true; + this._trigger( "close", event ); + } + }, + + _change: function( event ) { + if ( this.previous !== this._value() ) { + this._trigger( "change", event, { item: this.selectedItem } ); + } + }, + + _normalize: function( items ) { + // assume all items have the right format when the first item is complete + if ( items.length && items[0].label && items[0].value ) { + return items; + } + return $.map( items, function( item ) { + if ( typeof item === "string" ) { + return { + label: item, + value: item + }; + } + return $.extend({ + label: item.label || item.value, + value: item.value || item.label + }, item ); + }); + }, + + _suggest: function( items ) { + var ul = this.menu.element.empty(); + this._renderMenu( ul, items ); + this.isNewMenu = true; + this.menu.refresh(); + + // size and position menu + ul.show(); + this._resizeMenu(); + ul.position( $.extend({ + of: this.element + }, this.options.position )); + + if ( this.options.autoFocus ) { + this.menu.next(); + } + }, + + _resizeMenu: function() { + var ul = this.menu.element; + ul.outerWidth( Math.max( + // Firefox wraps long text (possibly a rounding bug) + // so we add 1px to avoid the wrapping (#7513) + ul.width( "" ).outerWidth() + 1, + this.element.outerWidth() + ) ); + }, + + _renderMenu: function( ul, items ) { + var that = this; + $.each( items, function( index, item ) { + that._renderItemData( ul, item ); + }); + }, + + _renderItemData: function( ul, item ) { + return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); + }, + + _renderItem: function( ul, item ) { + return $( "
              • " ) + .append( $( "" ).text( item.label ) ) + .appendTo( ul ); + }, + + _move: function( direction, event ) { + if ( !this.menu.element.is( ":visible" ) ) { + this.search( null, event ); + return; + } + if ( this.menu.isFirstItem() && /^previous/.test( direction ) || + this.menu.isLastItem() && /^next/.test( direction ) ) { + this._value( this.term ); + this.menu.blur(); + return; + } + this.menu[ direction ]( event ); + }, + + widget: function() { + return this.menu.element; + }, + + _value: function() { + return this.valueMethod.apply( this.element, arguments ); + }, + + _keyEvent: function( keyEvent, event ) { + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + this._move( keyEvent, event ); + + // prevents moving cursor to beginning/end of the text field in some browsers + event.preventDefault(); + } + } +}); + +$.extend( $.ui.autocomplete, { + escapeRegex: function( value ) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); + }, + filter: function(array, term) { + var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" ); + return $.grep( array, function(value) { + return matcher.test( value.label || value.value || value ); + }); + } +}); + + +// live region extension, adding a `messages` option +// NOTE: This is an experimental API. We are still investigating +// a full solution for string manipulation and internationalization. +$.widget( "ui.autocomplete", $.ui.autocomplete, { + options: { + messages: { + noResults: "No search results.", + results: function( amount ) { + return amount + ( amount > 1 ? " results are" : " result is" ) + + " available, use up and down arrow keys to navigate."; + } + } + }, + + __response: function( content ) { + var message; + this._superApply( arguments ); + if ( this.options.disabled || this.cancelSearch ) { + return; + } + if ( content && content.length ) { + message = this.options.messages.results( content.length ); + } else { + message = this.options.messages.noResults; + } + this.liveRegion.text( message ); + } +}); + +}( jQuery )); +(function( $, undefined ) { + +var lastActive, + baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", + typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", + formResetHandler = function() { + var form = $( this ); + setTimeout(function() { + form.find( ":ui-button" ).button( "refresh" ); + }, 1 ); + }, + radioGroup = function( radio ) { + var name = radio.name, + form = radio.form, + radios = $( [] ); + if ( name ) { + name = name.replace( /'/g, "\\'" ); + if ( form ) { + radios = $( form ).find( "[name='" + name + "']" ); + } else { + radios = $( "[name='" + name + "']", radio.ownerDocument ) + .filter(function() { + return !this.form; + }); + } + } + return radios; + }; + +$.widget( "ui.button", { + version: "1.10.4", + defaultElement: "").addClass(this._triggerClass). + html(!buttonImage ? buttonText : $("").attr( + { src:buttonImage, alt:buttonText, title:buttonText }))); + input[isRTL ? "before" : "after"](inst.trigger); + inst.trigger.click(function() { + if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { + $.datepicker._hideDatepicker(); + } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { + $.datepicker._hideDatepicker(); + $.datepicker._showDatepicker(input[0]); + } else { + $.datepicker._showDatepicker(input[0]); + } + return false; + }); + } + }, + + /* Apply the maximum length for the date format. */ + _autoSize: function(inst) { + if (this._get(inst, "autoSize") && !inst.inline) { + var findMax, max, maxI, i, + date = new Date(2009, 12 - 1, 20), // Ensure double digits + dateFormat = this._get(inst, "dateFormat"); + + if (dateFormat.match(/[DM]/)) { + findMax = function(names) { + max = 0; + maxI = 0; + for (i = 0; i < names.length; i++) { + if (names[i].length > max) { + max = names[i].length; + maxI = i; + } + } + return maxI; + }; + date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? + "monthNames" : "monthNamesShort")))); + date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? + "dayNames" : "dayNamesShort"))) + 20 - date.getDay()); + } + inst.input.attr("size", this._formatDate(inst, date).length); + } + }, + + /* Attach an inline date picker to a div. */ + _inlineDatepicker: function(target, inst) { + var divSpan = $(target); + if (divSpan.hasClass(this.markerClassName)) { + return; + } + divSpan.addClass(this.markerClassName).append(inst.dpDiv); + $.data(target, PROP_NAME, inst); + this._setDate(inst, this._getDefaultDate(inst), true); + this._updateDatepicker(inst); + this._updateAlternate(inst); + //If disabled option is true, disable the datepicker before showing it (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements + // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height + inst.dpDiv.css( "display", "block" ); + }, + + /* Pop-up the date picker in a "dialog" box. + * @param input element - ignored + * @param date string or Date - the initial date to display + * @param onSelect function - the function to call when a date is selected + * @param settings object - update the dialog date picker instance's settings (anonymous object) + * @param pos int[2] - coordinates for the dialog's position within the screen or + * event - with x/y coordinates or + * leave empty for default (screen centre) + * @return the manager object + */ + _dialogDatepicker: function(input, date, onSelect, settings, pos) { + var id, browserWidth, browserHeight, scrollX, scrollY, + inst = this._dialogInst; // internal instance + + if (!inst) { + this.uuid += 1; + id = "dp" + this.uuid; + this._dialogInput = $(""); + this._dialogInput.keydown(this._doKeyDown); + $("body").append(this._dialogInput); + inst = this._dialogInst = this._newInst(this._dialogInput, false); + inst.settings = {}; + $.data(this._dialogInput[0], PROP_NAME, inst); + } + extendRemove(inst.settings, settings || {}); + date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); + this._dialogInput.val(date); + + this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); + if (!this._pos) { + browserWidth = document.documentElement.clientWidth; + browserHeight = document.documentElement.clientHeight; + scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; + scrollY = document.documentElement.scrollTop || document.body.scrollTop; + this._pos = // should use actual width/height below + [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; + } + + // move input on screen for focus, but hidden behind dialog + this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); + inst.settings.onSelect = onSelect; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + if ($.blockUI) { + $.blockUI(this.dpDiv); + } + $.data(this._dialogInput[0], PROP_NAME, inst); + return this; + }, + + /* Detach a datepicker from its control. + * @param target element - the target input field or division or span + */ + _destroyDatepicker: function(target) { + var nodeName, + $target = $(target), + inst = $.data(target, PROP_NAME); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + $.removeData(target, PROP_NAME); + if (nodeName === "input") { + inst.append.remove(); + inst.trigger.remove(); + $target.removeClass(this.markerClassName). + unbind("focus", this._showDatepicker). + unbind("keydown", this._doKeyDown). + unbind("keypress", this._doKeyPress). + unbind("keyup", this._doKeyUp); + } else if (nodeName === "div" || nodeName === "span") { + $target.removeClass(this.markerClassName).empty(); + } + }, + + /* Enable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _enableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, PROP_NAME); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = false; + inst.trigger.filter("button"). + each(function() { this.disabled = false; }).end(). + filter("img").css({opacity: "1.0", cursor: ""}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().removeClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", false); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + }, + + /* Disable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _disableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, PROP_NAME); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = true; + inst.trigger.filter("button"). + each(function() { this.disabled = true; }).end(). + filter("img").css({opacity: "0.5", cursor: "default"}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().addClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", true); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + this._disabledInputs[this._disabledInputs.length] = target; + }, + + /* Is the first field in a jQuery collection disabled as a datepicker? + * @param target element - the target input field or division or span + * @return boolean - true if disabled, false if enabled + */ + _isDisabledDatepicker: function(target) { + if (!target) { + return false; + } + for (var i = 0; i < this._disabledInputs.length; i++) { + if (this._disabledInputs[i] === target) { + return true; + } + } + return false; + }, + + /* Retrieve the instance data for the target control. + * @param target element - the target input field or division or span + * @return object - the associated instance data + * @throws error if a jQuery problem getting data + */ + _getInst: function(target) { + try { + return $.data(target, PROP_NAME); + } + catch (err) { + throw "Missing instance data for this datepicker"; + } + }, + + /* Update or retrieve the settings for a date picker attached to an input field or division. + * @param target element - the target input field or division or span + * @param name object - the new settings to update or + * string - the name of the setting to change or retrieve, + * when retrieving also "all" for all instance settings or + * "defaults" for all global defaults + * @param value any - the new value for the setting + * (omit if above is an object or to retrieve a value) + */ + _optionDatepicker: function(target, name, value) { + var settings, date, minDate, maxDate, + inst = this._getInst(target); + + if (arguments.length === 2 && typeof name === "string") { + return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : + (inst ? (name === "all" ? $.extend({}, inst.settings) : + this._get(inst, name)) : null)); + } + + settings = name || {}; + if (typeof name === "string") { + settings = {}; + settings[name] = value; + } + + if (inst) { + if (this._curInst === inst) { + this._hideDatepicker(); + } + + date = this._getDateDatepicker(target, true); + minDate = this._getMinMaxDate(inst, "min"); + maxDate = this._getMinMaxDate(inst, "max"); + extendRemove(inst.settings, settings); + // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided + if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { + inst.settings.minDate = this._formatDate(inst, minDate); + } + if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { + inst.settings.maxDate = this._formatDate(inst, maxDate); + } + if ( "disabled" in settings ) { + if ( settings.disabled ) { + this._disableDatepicker(target); + } else { + this._enableDatepicker(target); + } + } + this._attachments($(target), inst); + this._autoSize(inst); + this._setDate(inst, date); + this._updateAlternate(inst); + this._updateDatepicker(inst); + } + }, + + // change method deprecated + _changeDatepicker: function(target, name, value) { + this._optionDatepicker(target, name, value); + }, + + /* Redraw the date picker attached to an input field or division. + * @param target element - the target input field or division or span + */ + _refreshDatepicker: function(target) { + var inst = this._getInst(target); + if (inst) { + this._updateDatepicker(inst); + } + }, + + /* Set the dates for a jQuery selection. + * @param target element - the target input field or division or span + * @param date Date - the new date + */ + _setDateDatepicker: function(target, date) { + var inst = this._getInst(target); + if (inst) { + this._setDate(inst, date); + this._updateDatepicker(inst); + this._updateAlternate(inst); + } + }, + + /* Get the date(s) for the first entry in a jQuery selection. + * @param target element - the target input field or division or span + * @param noDefault boolean - true if no default date is to be used + * @return Date - the current date + */ + _getDateDatepicker: function(target, noDefault) { + var inst = this._getInst(target); + if (inst && !inst.inline) { + this._setDateFromField(inst, noDefault); + } + return (inst ? this._getDate(inst) : null); + }, + + /* Handle keystrokes. */ + _doKeyDown: function(event) { + var onSelect, dateStr, sel, + inst = $.datepicker._getInst(event.target), + handled = true, + isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); + + inst._keyEvent = true; + if ($.datepicker._datepickerShowing) { + switch (event.keyCode) { + case 9: $.datepicker._hideDatepicker(); + handled = false; + break; // hide on tab out + case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + + $.datepicker._currentClass + ")", inst.dpDiv); + if (sel[0]) { + $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); + } + + onSelect = $.datepicker._get(inst, "onSelect"); + if (onSelect) { + dateStr = $.datepicker._formatDate(inst); + + // trigger custom callback + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); + } else { + $.datepicker._hideDatepicker(); + } + + return false; // don't submit the form + case 27: $.datepicker._hideDatepicker(); + break; // hide on escape + case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + break; // previous month/year on page up/+ ctrl + case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + break; // next month/year on page down/+ ctrl + case 35: if (event.ctrlKey || event.metaKey) { + $.datepicker._clearDate(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // clear on ctrl or command +end + case 36: if (event.ctrlKey || event.metaKey) { + $.datepicker._gotoToday(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // current on ctrl or command +home + case 37: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // -1 day on ctrl or command +left + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +left on Mac + break; + case 38: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, -7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // -1 week on ctrl or command +up + case 39: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // +1 day on ctrl or command +right + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +right + break; + case 40: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, +7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // +1 week on ctrl or command +down + default: handled = false; + } + } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home + $.datepicker._showDatepicker(this); + } else { + handled = false; + } + + if (handled) { + event.preventDefault(); + event.stopPropagation(); + } + }, + + /* Filter entered characters - based on date format. */ + _doKeyPress: function(event) { + var chars, chr, + inst = $.datepicker._getInst(event.target); + + if ($.datepicker._get(inst, "constrainInput")) { + chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); + chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); + return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); + } + }, + + /* Synchronise manual entry and field/alternate field. */ + _doKeyUp: function(event) { + var date, + inst = $.datepicker._getInst(event.target); + + if (inst.input.val() !== inst.lastVal) { + try { + date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + (inst.input ? inst.input.val() : null), + $.datepicker._getFormatConfig(inst)); + + if (date) { // only if valid + $.datepicker._setDateFromField(inst); + $.datepicker._updateAlternate(inst); + $.datepicker._updateDatepicker(inst); + } + } + catch (err) { + } + } + return true; + }, + + /* Pop-up the date picker for a given input field. + * If false returned from beforeShow event handler do not show. + * @param input element - the input field attached to the date picker or + * event - if triggered by focus + */ + _showDatepicker: function(input) { + input = input.target || input; + if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger + input = $("input", input.parentNode)[0]; + } + + if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here + return; + } + + var inst, beforeShow, beforeShowSettings, isFixed, + offset, showAnim, duration; + + inst = $.datepicker._getInst(input); + if ($.datepicker._curInst && $.datepicker._curInst !== inst) { + $.datepicker._curInst.dpDiv.stop(true, true); + if ( inst && $.datepicker._datepickerShowing ) { + $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); + } + } + + beforeShow = $.datepicker._get(inst, "beforeShow"); + beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; + if(beforeShowSettings === false){ + return; + } + extendRemove(inst.settings, beforeShowSettings); + + inst.lastVal = null; + $.datepicker._lastInput = input; + $.datepicker._setDateFromField(inst); + + if ($.datepicker._inDialog) { // hide cursor + input.value = ""; + } + if (!$.datepicker._pos) { // position below input + $.datepicker._pos = $.datepicker._findPos(input); + $.datepicker._pos[1] += input.offsetHeight; // add the height + } + + isFixed = false; + $(input).parents().each(function() { + isFixed |= $(this).css("position") === "fixed"; + return !isFixed; + }); + + offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; + $.datepicker._pos = null; + //to avoid flashes on Firefox + inst.dpDiv.empty(); + // determine sizing offscreen + inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); + $.datepicker._updateDatepicker(inst); + // fix width for dynamic number of date pickers + // and adjust position before showing + offset = $.datepicker._checkOffset(inst, offset, isFixed); + inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? + "static" : (isFixed ? "fixed" : "absolute")), display: "none", + left: offset.left + "px", top: offset.top + "px"}); + + if (!inst.inline) { + showAnim = $.datepicker._get(inst, "showAnim"); + duration = $.datepicker._get(inst, "duration"); + inst.dpDiv.zIndex($(input).zIndex()+1); + $.datepicker._datepickerShowing = true; + + if ( $.effects && $.effects.effect[ showAnim ] ) { + inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); + } else { + inst.dpDiv[showAnim || "show"](showAnim ? duration : null); + } + + if ( $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + $.datepicker._curInst = inst; + } + }, + + /* Generate the date picker content. */ + _updateDatepicker: function(inst) { + this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) + instActive = inst; // for delegate hover events + inst.dpDiv.empty().append(this._generateHTML(inst)); + this._attachHandlers(inst); + inst.dpDiv.find("." + this._dayOverClass + " a").mouseover(); + + var origyearshtml, + numMonths = this._getNumberOfMonths(inst), + cols = numMonths[1], + width = 17; + + inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); + if (cols > 1) { + inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); + } + inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + + "Class"]("ui-datepicker-multi"); + inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + + "Class"]("ui-datepicker-rtl"); + + if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + // deffered render of the years select (to avoid flashes on Firefox) + if( inst.yearshtml ){ + origyearshtml = inst.yearshtml; + setTimeout(function(){ + //assure that inst.yearshtml didn't change. + if( origyearshtml === inst.yearshtml && inst.yearshtml ){ + inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); + } + origyearshtml = inst.yearshtml = null; + }, 0); + } + }, + + // #6694 - don't focus the input if it's already focused + // this breaks the change event in IE + // Support: IE and jQuery <1.9 + _shouldFocusInput: function( inst ) { + return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); + }, + + /* Check positioning to remain on screen. */ + _checkOffset: function(inst, offset, isFixed) { + var dpWidth = inst.dpDiv.outerWidth(), + dpHeight = inst.dpDiv.outerHeight(), + inputWidth = inst.input ? inst.input.outerWidth() : 0, + inputHeight = inst.input ? inst.input.outerHeight() : 0, + viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), + viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); + + offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); + offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; + offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; + + // now check if datepicker is showing outside window viewport - move to a better place if so. + offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? + Math.abs(offset.left + dpWidth - viewWidth) : 0); + offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? + Math.abs(dpHeight + inputHeight) : 0); + + return offset; + }, + + /* Find an object's position on the screen. */ + _findPos: function(obj) { + var position, + inst = this._getInst(obj), + isRTL = this._get(inst, "isRTL"); + + while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { + obj = obj[isRTL ? "previousSibling" : "nextSibling"]; + } + + position = $(obj).offset(); + return [position.left, position.top]; + }, + + /* Hide the date picker from view. + * @param input element - the input field attached to the date picker + */ + _hideDatepicker: function(input) { + var showAnim, duration, postProcess, onClose, + inst = this._curInst; + + if (!inst || (input && inst !== $.data(input, PROP_NAME))) { + return; + } + + if (this._datepickerShowing) { + showAnim = this._get(inst, "showAnim"); + duration = this._get(inst, "duration"); + postProcess = function() { + $.datepicker._tidyDialog(inst); + }; + + // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed + if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { + inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); + } else { + inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : + (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess); + } + + if (!showAnim) { + postProcess(); + } + this._datepickerShowing = false; + + onClose = this._get(inst, "onClose"); + if (onClose) { + onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); + } + + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); + if ($.blockUI) { + $.unblockUI(); + $("body").append(this.dpDiv); + } + } + this._inDialog = false; + } + }, + + /* Tidy up after a dialog display. */ + _tidyDialog: function(inst) { + inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); + }, + + /* Close date picker if clicked elsewhere. */ + _checkExternalClick: function(event) { + if (!$.datepicker._curInst) { + return; + } + + var $target = $(event.target), + inst = $.datepicker._getInst($target[0]); + + if ( ( ( $target[0].id !== $.datepicker._mainDivId && + $target.parents("#" + $.datepicker._mainDivId).length === 0 && + !$target.hasClass($.datepicker.markerClassName) && + !$target.closest("." + $.datepicker._triggerClass).length && + $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || + ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { + $.datepicker._hideDatepicker(); + } + }, + + /* Adjust one of the date sub-fields. */ + _adjustDate: function(id, offset, period) { + var target = $(id), + inst = this._getInst(target[0]); + + if (this._isDisabledDatepicker(target[0])) { + return; + } + this._adjustInstDate(inst, offset + + (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning + period); + this._updateDatepicker(inst); + }, + + /* Action for current link. */ + _gotoToday: function(id) { + var date, + target = $(id), + inst = this._getInst(target[0]); + + if (this._get(inst, "gotoCurrent") && inst.currentDay) { + inst.selectedDay = inst.currentDay; + inst.drawMonth = inst.selectedMonth = inst.currentMonth; + inst.drawYear = inst.selectedYear = inst.currentYear; + } else { + date = new Date(); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + } + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a new month/year. */ + _selectMonthYear: function(id, select, period) { + var target = $(id), + inst = this._getInst(target[0]); + + inst["selected" + (period === "M" ? "Month" : "Year")] = + inst["draw" + (period === "M" ? "Month" : "Year")] = + parseInt(select.options[select.selectedIndex].value,10); + + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a day. */ + _selectDay: function(id, month, year, td) { + var inst, + target = $(id); + + if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { + return; + } + + inst = this._getInst(target[0]); + inst.selectedDay = inst.currentDay = $("a", td).html(); + inst.selectedMonth = inst.currentMonth = month; + inst.selectedYear = inst.currentYear = year; + this._selectDate(id, this._formatDate(inst, + inst.currentDay, inst.currentMonth, inst.currentYear)); + }, + + /* Erase the input field and hide the date picker. */ + _clearDate: function(id) { + var target = $(id); + this._selectDate(target, ""); + }, + + /* Update the input field with the selected date. */ + _selectDate: function(id, dateStr) { + var onSelect, + target = $(id), + inst = this._getInst(target[0]); + + dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); + if (inst.input) { + inst.input.val(dateStr); + } + this._updateAlternate(inst); + + onSelect = this._get(inst, "onSelect"); + if (onSelect) { + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback + } else if (inst.input) { + inst.input.trigger("change"); // fire the change event + } + + if (inst.inline){ + this._updateDatepicker(inst); + } else { + this._hideDatepicker(); + this._lastInput = inst.input[0]; + if (typeof(inst.input[0]) !== "object") { + inst.input.focus(); // restore focus + } + this._lastInput = null; + } + }, + + /* Update any alternate field to synchronise with the main field. */ + _updateAlternate: function(inst) { + var altFormat, date, dateStr, + altField = this._get(inst, "altField"); + + if (altField) { // update alternate field too + altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); + date = this._getDate(inst); + dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); + $(altField).each(function() { $(this).val(dateStr); }); + } + }, + + /* Set as beforeShowDay function to prevent selection of weekends. + * @param date Date - the date to customise + * @return [boolean, string] - is this date selectable?, what is its CSS class? + */ + noWeekends: function(date) { + var day = date.getDay(); + return [(day > 0 && day < 6), ""]; + }, + + /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. + * @param date Date - the date to get the week for + * @return number - the number of the week within the year that contains this date + */ + iso8601Week: function(date) { + var time, + checkDate = new Date(date.getTime()); + + // Find Thursday of this week starting on Monday + checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); + + time = checkDate.getTime(); + checkDate.setMonth(0); // Compare with Jan 1 + checkDate.setDate(1); + return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; + }, + + /* Parse a string value into a date object. + * See formatDate below for the possible formats. + * + * @param format string - the expected format of the date + * @param value string - the date in the above format + * @param settings Object - attributes include: + * shortYearCutoff number - the cutoff year for determining the century (optional) + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return Date - the extracted date value or null if value is blank + */ + parseDate: function (format, value, settings) { + if (format == null || value == null) { + throw "Invalid arguments"; + } + + value = (typeof value === "object" ? value.toString() : value + ""); + if (value === "") { + return null; + } + + var iFormat, dim, extra, + iValue = 0, + shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, + shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp : + new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + year = -1, + month = -1, + day = -1, + doy = -1, + literal = false, + date, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Extract a number from the string value + getNumber = function(match) { + var isDoubled = lookAhead(match), + size = (match === "@" ? 14 : (match === "!" ? 20 : + (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), + digits = new RegExp("^\\d{1," + size + "}"), + num = value.substring(iValue).match(digits); + if (!num) { + throw "Missing number at position " + iValue; + } + iValue += num[0].length; + return parseInt(num[0], 10); + }, + // Extract a name from the string value and convert to an index + getName = function(match, shortNames, longNames) { + var index = -1, + names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { + return [ [k, v] ]; + }).sort(function (a, b) { + return -(a[1].length - b[1].length); + }); + + $.each(names, function (i, pair) { + var name = pair[1]; + if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { + index = pair[0]; + iValue += name.length; + return false; + } + }); + if (index !== -1) { + return index + 1; + } else { + throw "Unknown name at position " + iValue; + } + }, + // Confirm that a literal character matches the string value + checkLiteral = function() { + if (value.charAt(iValue) !== format.charAt(iFormat)) { + throw "Unexpected literal at position " + iValue; + } + iValue++; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + checkLiteral(); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + day = getNumber("d"); + break; + case "D": + getName("D", dayNamesShort, dayNames); + break; + case "o": + doy = getNumber("o"); + break; + case "m": + month = getNumber("m"); + break; + case "M": + month = getName("M", monthNamesShort, monthNames); + break; + case "y": + year = getNumber("y"); + break; + case "@": + date = new Date(getNumber("@")); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "!": + date = new Date((getNumber("!") - this._ticksTo1970) / 10000); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "'": + if (lookAhead("'")){ + checkLiteral(); + } else { + literal = true; + } + break; + default: + checkLiteral(); + } + } + } + + if (iValue < value.length){ + extra = value.substr(iValue); + if (!/^\s+/.test(extra)) { + throw "Extra/unparsed characters found in date: " + extra; + } + } + + if (year === -1) { + year = new Date().getFullYear(); + } else if (year < 100) { + year += new Date().getFullYear() - new Date().getFullYear() % 100 + + (year <= shortYearCutoff ? 0 : -100); + } + + if (doy > -1) { + month = 1; + day = doy; + do { + dim = this._getDaysInMonth(year, month - 1); + if (day <= dim) { + break; + } + month++; + day -= dim; + } while (true); + } + + date = this._daylightSavingAdjust(new Date(year, month - 1, day)); + if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { + throw "Invalid date"; // E.g. 31/02/00 + } + return date; + }, + + /* Standard date formats. */ + ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) + COOKIE: "D, dd M yy", + ISO_8601: "yy-mm-dd", + RFC_822: "D, d M y", + RFC_850: "DD, dd-M-y", + RFC_1036: "D, d M y", + RFC_1123: "D, d M yy", + RFC_2822: "D, d M yy", + RSS: "D, d M y", // RFC 822 + TICKS: "!", + TIMESTAMP: "@", + W3C: "yy-mm-dd", // ISO 8601 + + _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), + + /* Format a date object into a string value. + * The format can be combinations of the following: + * d - day of month (no leading zero) + * dd - day of month (two digit) + * o - day of year (no leading zeros) + * oo - day of year (three digit) + * D - day name short + * DD - day name long + * m - month of year (no leading zero) + * mm - month of year (two digit) + * M - month name short + * MM - month name long + * y - year (two digit) + * yy - year (four digit) + * @ - Unix timestamp (ms since 01/01/1970) + * ! - Windows ticks (100ns since 01/01/0001) + * "..." - literal text + * '' - single quote + * + * @param format string - the desired format of the date + * @param date Date - the date value to format + * @param settings Object - attributes include: + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return string - the date in the above format + */ + formatDate: function (format, date, settings) { + if (!date) { + return ""; + } + + var iFormat, + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Format a number, with leading zero if necessary + formatNumber = function(match, value, len) { + var num = "" + value; + if (lookAhead(match)) { + while (num.length < len) { + num = "0" + num; + } + } + return num; + }, + // Format a name, short or long as requested + formatName = function(match, value, shortNames, longNames) { + return (lookAhead(match) ? longNames[value] : shortNames[value]); + }, + output = "", + literal = false; + + if (date) { + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + output += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + output += formatNumber("d", date.getDate(), 2); + break; + case "D": + output += formatName("D", date.getDay(), dayNamesShort, dayNames); + break; + case "o": + output += formatNumber("o", + Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); + break; + case "m": + output += formatNumber("m", date.getMonth() + 1, 2); + break; + case "M": + output += formatName("M", date.getMonth(), monthNamesShort, monthNames); + break; + case "y": + output += (lookAhead("y") ? date.getFullYear() : + (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); + break; + case "@": + output += date.getTime(); + break; + case "!": + output += date.getTime() * 10000 + this._ticksTo1970; + break; + case "'": + if (lookAhead("'")) { + output += "'"; + } else { + literal = true; + } + break; + default: + output += format.charAt(iFormat); + } + } + } + } + return output; + }, + + /* Extract all possible characters from the date format. */ + _possibleChars: function (format) { + var iFormat, + chars = "", + literal = false, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + chars += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": case "m": case "y": case "@": + chars += "0123456789"; + break; + case "D": case "M": + return null; // Accept anything + case "'": + if (lookAhead("'")) { + chars += "'"; + } else { + literal = true; + } + break; + default: + chars += format.charAt(iFormat); + } + } + } + return chars; + }, + + /* Get a setting value, defaulting if necessary. */ + _get: function(inst, name) { + return inst.settings[name] !== undefined ? + inst.settings[name] : this._defaults[name]; + }, + + /* Parse existing date and initialise date picker. */ + _setDateFromField: function(inst, noDefault) { + if (inst.input.val() === inst.lastVal) { + return; + } + + var dateFormat = this._get(inst, "dateFormat"), + dates = inst.lastVal = inst.input ? inst.input.val() : null, + defaultDate = this._getDefaultDate(inst), + date = defaultDate, + settings = this._getFormatConfig(inst); + + try { + date = this.parseDate(dateFormat, dates, settings) || defaultDate; + } catch (event) { + dates = (noDefault ? "" : dates); + } + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + inst.currentDay = (dates ? date.getDate() : 0); + inst.currentMonth = (dates ? date.getMonth() : 0); + inst.currentYear = (dates ? date.getFullYear() : 0); + this._adjustInstDate(inst); + }, + + /* Retrieve the default date shown on opening. */ + _getDefaultDate: function(inst) { + return this._restrictMinMax(inst, + this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); + }, + + /* A date may be specified as an exact value or a relative one. */ + _determineDate: function(inst, date, defaultDate) { + var offsetNumeric = function(offset) { + var date = new Date(); + date.setDate(date.getDate() + offset); + return date; + }, + offsetString = function(offset) { + try { + return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + offset, $.datepicker._getFormatConfig(inst)); + } + catch (e) { + // Ignore + } + + var date = (offset.toLowerCase().match(/^c/) ? + $.datepicker._getDate(inst) : null) || new Date(), + year = date.getFullYear(), + month = date.getMonth(), + day = date.getDate(), + pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, + matches = pattern.exec(offset); + + while (matches) { + switch (matches[2] || "d") { + case "d" : case "D" : + day += parseInt(matches[1],10); break; + case "w" : case "W" : + day += parseInt(matches[1],10) * 7; break; + case "m" : case "M" : + month += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + case "y": case "Y" : + year += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day); + }, + newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : + (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); + + newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); + if (newDate) { + newDate.setHours(0); + newDate.setMinutes(0); + newDate.setSeconds(0); + newDate.setMilliseconds(0); + } + return this._daylightSavingAdjust(newDate); + }, + + /* Handle switch to/from daylight saving. + * Hours may be non-zero on daylight saving cut-over: + * > 12 when midnight changeover, but then cannot generate + * midnight datetime, so jump to 1AM, otherwise reset. + * @param date (Date) the date to check + * @return (Date) the corrected date + */ + _daylightSavingAdjust: function(date) { + if (!date) { + return null; + } + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); + return date; + }, + + /* Set the date(s) directly. */ + _setDate: function(inst, date, noChange) { + var clear = !date, + origMonth = inst.selectedMonth, + origYear = inst.selectedYear, + newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); + + inst.selectedDay = inst.currentDay = newDate.getDate(); + inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); + inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); + if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { + this._notifyChange(inst); + } + this._adjustInstDate(inst); + if (inst.input) { + inst.input.val(clear ? "" : this._formatDate(inst)); + } + }, + + /* Retrieve the date(s) directly. */ + _getDate: function(inst) { + var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : + this._daylightSavingAdjust(new Date( + inst.currentYear, inst.currentMonth, inst.currentDay))); + return startDate; + }, + + /* Attach the onxxx handlers. These are declared statically so + * they work with static code transformers like Caja. + */ + _attachHandlers: function(inst) { + var stepMonths = this._get(inst, "stepMonths"), + id = "#" + inst.id.replace( /\\\\/g, "\\" ); + inst.dpDiv.find("[data-handler]").map(function () { + var handler = { + prev: function () { + $.datepicker._adjustDate(id, -stepMonths, "M"); + }, + next: function () { + $.datepicker._adjustDate(id, +stepMonths, "M"); + }, + hide: function () { + $.datepicker._hideDatepicker(); + }, + today: function () { + $.datepicker._gotoToday(id); + }, + selectDay: function () { + $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); + return false; + }, + selectMonth: function () { + $.datepicker._selectMonthYear(id, this, "M"); + return false; + }, + selectYear: function () { + $.datepicker._selectMonthYear(id, this, "Y"); + return false; + } + }; + $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); + }); + }, + + /* Generate the HTML for the current state of the date picker. */ + _generateHTML: function(inst) { + var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, + controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, + monthNames, monthNamesShort, beforeShowDay, showOtherMonths, + selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, + cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, + printDate, dRow, tbody, daySettings, otherMonth, unselectable, + tempDate = new Date(), + today = this._daylightSavingAdjust( + new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time + isRTL = this._get(inst, "isRTL"), + showButtonPanel = this._get(inst, "showButtonPanel"), + hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), + navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), + numMonths = this._getNumberOfMonths(inst), + showCurrentAtPos = this._get(inst, "showCurrentAtPos"), + stepMonths = this._get(inst, "stepMonths"), + isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), + currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : + new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + drawMonth = inst.drawMonth - showCurrentAtPos, + drawYear = inst.drawYear; + + if (drawMonth < 0) { + drawMonth += 12; + drawYear--; + } + if (maxDate) { + maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), + maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); + maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); + while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { + drawMonth--; + if (drawMonth < 0) { + drawMonth = 11; + drawYear--; + } + } + } + inst.drawMonth = drawMonth; + inst.drawYear = drawYear; + + prevText = this._get(inst, "prevText"); + prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), + this._getFormatConfig(inst))); + + prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? + "" + prevText + "" : + (hideIfNoPrevNext ? "" : "" + prevText + "")); + + nextText = this._get(inst, "nextText"); + nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), + this._getFormatConfig(inst))); + + next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? + "" + nextText + "" : + (hideIfNoPrevNext ? "" : "" + nextText + "")); + + currentText = this._get(inst, "currentText"); + gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); + currentText = (!navigationAsDateFormat ? currentText : + this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); + + controls = (!inst.inline ? "" : ""); + + buttonPanel = (showButtonPanel) ? "
                " + (isRTL ? controls : "") + + (this._isInRange(inst, gotoDate) ? "" : "") + (isRTL ? "" : controls) + "
                " : ""; + + firstDay = parseInt(this._get(inst, "firstDay"),10); + firstDay = (isNaN(firstDay) ? 0 : firstDay); + + showWeek = this._get(inst, "showWeek"); + dayNames = this._get(inst, "dayNames"); + dayNamesMin = this._get(inst, "dayNamesMin"); + monthNames = this._get(inst, "monthNames"); + monthNamesShort = this._get(inst, "monthNamesShort"); + beforeShowDay = this._get(inst, "beforeShowDay"); + showOtherMonths = this._get(inst, "showOtherMonths"); + selectOtherMonths = this._get(inst, "selectOtherMonths"); + defaultDate = this._getDefaultDate(inst); + html = ""; + dow; + for (row = 0; row < numMonths[0]; row++) { + group = ""; + this.maxRows = 4; + for (col = 0; col < numMonths[1]; col++) { + selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); + cornerClass = " ui-corner-all"; + calender = ""; + if (isMultiMonth) { + calender += "
                "; + } + calender += "
                " + + (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + + (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, + row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers + "
                " + + ""; + thead = (showWeek ? "" : ""); + for (dow = 0; dow < 7; dow++) { // days of the week + day = (dow + firstDay) % 7; + thead += "= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + + "" + dayNamesMin[day] + ""; + } + calender += thead + ""; + daysInMonth = this._getDaysInMonth(drawYear, drawMonth); + if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { + inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); + } + leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; + curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate + numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) + this.maxRows = numRows; + printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); + for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows + calender += ""; + tbody = (!showWeek ? "" : ""); + for (dow = 0; dow < 7; dow++) { // create date picker days + daySettings = (beforeShowDay ? + beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); + otherMonth = (printDate.getMonth() !== drawMonth); + unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || + (minDate && printDate < minDate) || (maxDate && printDate > maxDate); + tbody += ""; // display selectable date + printDate.setDate(printDate.getDate() + 1); + printDate = this._daylightSavingAdjust(printDate); + } + calender += tbody + ""; + } + drawMonth++; + if (drawMonth > 11) { + drawMonth = 0; + drawYear++; + } + calender += "
                " + this._get(inst, "weekHeader") + "
                " + + this._get(inst, "calculateWeek")(printDate) + "" + // actions + (otherMonth && !showOtherMonths ? " " : // display for other months + (unselectable ? "" + printDate.getDate() + "" : "" + printDate.getDate() + "")) + "
                " + (isMultiMonth ? "
                " + + ((numMonths[0] > 0 && col === numMonths[1]-1) ? "
                " : "") : ""); + group += calender; + } + html += group; + } + html += buttonPanel; + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { + + var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, + changeMonth = this._get(inst, "changeMonth"), + changeYear = this._get(inst, "changeYear"), + showMonthAfterYear = this._get(inst, "showMonthAfterYear"), + html = "
                ", + monthHtml = ""; + + // month selection + if (secondary || !changeMonth) { + monthHtml += "" + monthNames[drawMonth] + ""; + } else { + inMinYear = (minDate && minDate.getFullYear() === drawYear); + inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); + monthHtml += ""; + } + + if (!showMonthAfterYear) { + html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); + } + + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ""; + if (secondary || !changeYear) { + html += "" + drawYear + ""; + } else { + // determine range of years to display + years = this._get(inst, "yearRange").split(":"); + thisYear = new Date().getFullYear(); + determineYear = function(value) { + var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + year = determineYear(years[0]); + endYear = Math.max(year, determineYear(years[1] || "")); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += ""; + + html += inst.yearshtml; + inst.yearshtml = null; + } + } + + html += this._get(inst, "yearSuffix"); + if (showMonthAfterYear) { + html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; + } + html += "
                "; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period === "Y" ? offset : 0), + month = inst.drawMonth + (period === "M" ? offset : 0), + day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), + date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); + + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period === "M" || period === "Y") { + this._notifyChange(inst); + } + }, + + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + newDate = (minDate && date < minDate ? minDate : date); + return (maxDate && newDate > maxDate ? maxDate : newDate); + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, "onChangeMonthYear"); + if (onChange) { + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + } + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, "numberOfMonths"); + return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + "Date"), null); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst), + date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); + + if (offset < 0) { + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + } + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var yearSplit, currentYear, + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + minYear = null, + maxYear = null, + years = this._get(inst, "yearRange"); + if (years){ + yearSplit = years.split(":"); + currentYear = new Date().getFullYear(); + minYear = parseInt(yearSplit[0], 10); + maxYear = parseInt(yearSplit[1], 10); + if ( yearSplit[0].match(/[+\-].*/) ) { + minYear += currentYear; + } + if ( yearSplit[1].match(/[+\-].*/) ) { + maxYear += currentYear; + } + } + + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime()) && + (!minYear || date.getFullYear() >= minYear) && + (!maxYear || date.getFullYear() <= maxYear)); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, "shortYearCutoff"); + shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), + monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day === "object" ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function bindHover(dpDiv) { + var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; + return dpDiv.delegate(selector, "mouseout", function() { + $(this).removeClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).removeClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).removeClass("ui-datepicker-next-hover"); + } + }) + .delegate(selector, "mouseover", function(){ + if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { + $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); + $(this).addClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).addClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).addClass("ui-datepicker-next-hover"); + } + } + }); +} + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) { + if (props[name] == null) { + target[name] = props[name]; + } + } + return target; +} + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick); + $.datepicker.initialized = true; + } + + /* Append datepicker main container to body if not exist. */ + if ($("#"+$.datepicker._mainDivId).length === 0) { + $("body").append($.datepicker.dpDiv); + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + return this.each(function() { + typeof options === "string" ? + $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.10.4"; + +})(jQuery); +(function( $, undefined ) { + +var sizeRelatedOptions = { + buttons: true, + height: true, + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true, + width: true + }, + resizableRelatedOptions = { + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true + }; + +$.widget( "ui.dialog", { + version: "1.10.4", + options: { + appendTo: "body", + autoOpen: true, + buttons: [], + closeOnEscape: true, + closeText: "close", + dialogClass: "", + draggable: true, + hide: null, + height: "auto", + maxHeight: null, + maxWidth: null, + minHeight: 150, + minWidth: 150, + modal: false, + position: { + my: "center", + at: "center", + of: window, + collision: "fit", + // Ensure the titlebar is always visible + using: function( pos ) { + var topOffset = $( this ).css( pos ).offset().top; + if ( topOffset < 0 ) { + $( this ).css( "top", pos.top - topOffset ); + } + } + }, + resizable: true, + show: null, + title: null, + width: 300, + + // callbacks + beforeClose: null, + close: null, + drag: null, + dragStart: null, + dragStop: null, + focus: null, + open: null, + resize: null, + resizeStart: null, + resizeStop: null + }, + + _create: function() { + this.originalCss = { + display: this.element[0].style.display, + width: this.element[0].style.width, + minHeight: this.element[0].style.minHeight, + maxHeight: this.element[0].style.maxHeight, + height: this.element[0].style.height + }; + this.originalPosition = { + parent: this.element.parent(), + index: this.element.parent().children().index( this.element ) + }; + this.originalTitle = this.element.attr("title"); + this.options.title = this.options.title || this.originalTitle; + + this._createWrapper(); + + this.element + .show() + .removeAttr("title") + .addClass("ui-dialog-content ui-widget-content") + .appendTo( this.uiDialog ); + + this._createTitlebar(); + this._createButtonPane(); + + if ( this.options.draggable && $.fn.draggable ) { + this._makeDraggable(); + } + if ( this.options.resizable && $.fn.resizable ) { + this._makeResizable(); + } + + this._isOpen = false; + }, + + _init: function() { + if ( this.options.autoOpen ) { + this.open(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + if ( element && (element.jquery || element.nodeType) ) { + return $( element ); + } + return this.document.find( element || "body" ).eq( 0 ); + }, + + _destroy: function() { + var next, + originalPosition = this.originalPosition; + + this._destroyOverlay(); + + this.element + .removeUniqueId() + .removeClass("ui-dialog-content ui-widget-content") + .css( this.originalCss ) + // Without detaching first, the following becomes really slow + .detach(); + + this.uiDialog.stop( true, true ).remove(); + + if ( this.originalTitle ) { + this.element.attr( "title", this.originalTitle ); + } + + next = originalPosition.parent.children().eq( originalPosition.index ); + // Don't try to place the dialog next to itself (#8613) + if ( next.length && next[0] !== this.element[0] ) { + next.before( this.element ); + } else { + originalPosition.parent.append( this.element ); + } + }, + + widget: function() { + return this.uiDialog; + }, + + disable: $.noop, + enable: $.noop, + + close: function( event ) { + var activeElement, + that = this; + + if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { + return; + } + + this._isOpen = false; + this._destroyOverlay(); + + if ( !this.opener.filter(":focusable").focus().length ) { + + // support: IE9 + // IE9 throws an "Unspecified error" accessing document.activeElement from an ' : ''); + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { + var changeMonth = this._get(inst, 'changeMonth'); + var changeYear = this._get(inst, 'changeYear'); + var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); + var html = '
                '; + var monthHtml = ''; + // month selection + if (secondary || !changeMonth) + monthHtml += '' + monthNames[drawMonth] + ''; + else { + var inMinYear = (minDate && minDate.getFullYear() == drawYear); + var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); + monthHtml += ''; + } + if (!showMonthAfterYear) + html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : ''); + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ''; + if (secondary || !changeYear) + html += '' + drawYear + ''; + else { + // determine range of years to display + var years = this._get(inst, 'yearRange').split(':'); + var thisYear = new Date().getFullYear(); + var determineYear = function(value) { + var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + var year = determineYear(years[0]); + var endYear = Math.max(year, determineYear(years[1] || '')); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += ''; + + html += inst.yearshtml; + inst.yearshtml = null; + } + } + html += this._get(inst, 'yearSuffix'); + if (showMonthAfterYear) + html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml; + html += '
                '; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period == 'Y' ? offset : 0); + var month = inst.drawMonth + (period == 'M' ? offset : 0); + var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + + (period == 'D' ? offset : 0); + var date = this._restrictMinMax(inst, + this._daylightSavingAdjust(new Date(year, month, day))); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period == 'M' || period == 'Y') + this._notifyChange(inst); + }, + + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + var newDate = (minDate && date < minDate ? minDate : date); + newDate = (maxDate && newDate > maxDate ? maxDate : newDate); + return newDate; + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, 'onChangeMonthYear'); + if (onChange) + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, 'numberOfMonths'); + return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + 'Date'), null); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst); + var date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); + if (offset < 0) + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime())); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, 'shortYearCutoff'); + shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), + monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day == 'object' ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function bindHover(dpDiv) { + var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a'; + return dpDiv.delegate(selector, 'mouseout', function() { + $(this).removeClass('ui-state-hover'); + if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover'); + if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover'); + }) + .delegate(selector, 'mouseover', function(){ + if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { + $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); + $(this).addClass('ui-state-hover'); + if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover'); + if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover'); + } + }); +} + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) + if (props[name] == null || props[name] == undefined) + target[name] = props[name]; + return target; +}; + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick). + find(document.body).append($.datepicker.dpDiv); + $.datepicker.initialized = true; + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget')) + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + return this.each(function() { + typeof options == 'string' ? + $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.9.2"; + +// Workaround for #4055 +// Add another global to avoid noConflict issues with inline event handlers +window['DP_jQuery_' + dpuuid] = $; + +})(jQuery); +(function( $, undefined ) { + +var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ", + sizeRelatedOptions = { + buttons: true, + height: true, + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true, + width: true + }, + resizableRelatedOptions = { + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true + }; + +$.widget("ui.dialog", { + version: "1.9.2", + options: { + autoOpen: true, + buttons: {}, + closeOnEscape: true, + closeText: "close", + dialogClass: "", + draggable: true, + hide: null, + height: "auto", + maxHeight: false, + maxWidth: false, + minHeight: 150, + minWidth: 150, + modal: false, + position: { + my: "center", + at: "center", + of: window, + collision: "fit", + // ensure that the titlebar is never outside the document + using: function( pos ) { + var topOffset = $( this ).css( pos ).offset().top; + if ( topOffset < 0 ) { + $( this ).css( "top", pos.top - topOffset ); + } + } + }, + resizable: true, + show: null, + stack: true, + title: "", + width: 300, + zIndex: 1000 + }, + + _create: function() { + this.originalTitle = this.element.attr( "title" ); + // #5742 - .attr() might return a DOMElement + if ( typeof this.originalTitle !== "string" ) { + this.originalTitle = ""; + } + this.oldPosition = { + parent: this.element.parent(), + index: this.element.parent().children().index( this.element ) + }; + this.options.title = this.options.title || this.originalTitle; + var that = this, + options = this.options, + + title = options.title || " ", + uiDialog, + uiDialogTitlebar, + uiDialogTitlebarClose, + uiDialogTitle, + uiDialogButtonPane; + + uiDialog = ( this.uiDialog = $( "
                " ) ) + .addClass( uiDialogClasses + options.dialogClass ) + .css({ + display: "none", + outline: 0, // TODO: move to stylesheet + zIndex: options.zIndex + }) + // setting tabIndex makes the div focusable + .attr( "tabIndex", -1) + .keydown(function( event ) { + if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && + event.keyCode === $.ui.keyCode.ESCAPE ) { + that.close( event ); + event.preventDefault(); + } + }) + .mousedown(function( event ) { + that.moveToTop( false, event ); + }) + .appendTo( "body" ); + + this.element + .show() + .removeAttr( "title" ) + .addClass( "ui-dialog-content ui-widget-content" ) + .appendTo( uiDialog ); + + uiDialogTitlebar = ( this.uiDialogTitlebar = $( "
                " ) ) + .addClass( "ui-dialog-titlebar ui-widget-header " + + "ui-corner-all ui-helper-clearfix" ) + .bind( "mousedown", function() { + // Dialog isn't getting focus when dragging (#8063) + uiDialog.focus(); + }) + .prependTo( uiDialog ); + + uiDialogTitlebarClose = $( "" ) + .addClass( "ui-dialog-titlebar-close ui-corner-all" ) + .attr( "role", "button" ) + .click(function( event ) { + event.preventDefault(); + that.close( event ); + }) + .appendTo( uiDialogTitlebar ); + + ( this.uiDialogTitlebarCloseText = $( "" ) ) + .addClass( "ui-icon ui-icon-closethick" ) + .text( options.closeText ) + .appendTo( uiDialogTitlebarClose ); + + uiDialogTitle = $( "" ) + .uniqueId() + .addClass( "ui-dialog-title" ) + .html( title ) + .prependTo( uiDialogTitlebar ); + + uiDialogButtonPane = ( this.uiDialogButtonPane = $( "
                " ) ) + .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); + + ( this.uiButtonSet = $( "
                " ) ) + .addClass( "ui-dialog-buttonset" ) + .appendTo( uiDialogButtonPane ); + + uiDialog.attr({ + role: "dialog", + "aria-labelledby": uiDialogTitle.attr( "id" ) + }); + + uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection(); + this._hoverable( uiDialogTitlebarClose ); + this._focusable( uiDialogTitlebarClose ); + + if ( options.draggable && $.fn.draggable ) { + this._makeDraggable(); + } + if ( options.resizable && $.fn.resizable ) { + this._makeResizable(); + } + + this._createButtons( options.buttons ); + this._isOpen = false; + + if ( $.fn.bgiframe ) { + uiDialog.bgiframe(); + } + + // prevent tabbing out of modal dialogs + this._on( uiDialog, { keydown: function( event ) { + if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) { + return; + } + + var tabbables = $( ":tabbable", uiDialog ), + first = tabbables.filter( ":first" ), + last = tabbables.filter( ":last" ); + + if ( event.target === last[0] && !event.shiftKey ) { + first.focus( 1 ); + return false; + } else if ( event.target === first[0] && event.shiftKey ) { + last.focus( 1 ); + return false; + } + }}); + }, + + _init: function() { + if ( this.options.autoOpen ) { + this.open(); + } + }, + + _destroy: function() { + var next, + oldPosition = this.oldPosition; + + if ( this.overlay ) { + this.overlay.destroy(); + } + this.uiDialog.hide(); + this.element + .removeClass( "ui-dialog-content ui-widget-content" ) + .hide() + .appendTo( "body" ); + this.uiDialog.remove(); + + if ( this.originalTitle ) { + this.element.attr( "title", this.originalTitle ); + } + + next = oldPosition.parent.children().eq( oldPosition.index ); + // Don't try to place the dialog next to itself (#8613) + if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { + next.before( this.element ); + } else { + oldPosition.parent.append( this.element ); + } + }, + + widget: function() { + return this.uiDialog; + }, + + close: function( event ) { + var that = this, + maxZ, thisZ; + + if ( !this._isOpen ) { + return; + } + + if ( false === this._trigger( "beforeClose", event ) ) { + return; + } + + this._isOpen = false; + + if ( this.overlay ) { + this.overlay.destroy(); + } + + if ( this.options.hide ) { + this._hide( this.uiDialog, this.options.hide, function() { + that._trigger( "close", event ); + }); + } else { + this.uiDialog.hide(); + this._trigger( "close", event ); + } + + $.ui.dialog.overlay.resize(); + + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) + if ( this.options.modal ) { + maxZ = 0; + $( ".ui-dialog" ).each(function() { + if ( this !== that.uiDialog[0] ) { + thisZ = $( this ).css( "z-index" ); + if ( !isNaN( thisZ ) ) { + maxZ = Math.max( maxZ, thisZ ); + } + } + }); + $.ui.dialog.maxZ = maxZ; + } + + return this; + }, + + isOpen: function() { + return this._isOpen; + }, + + // the force parameter allows us to move modal dialogs to their correct + // position on open + moveToTop: function( force, event ) { + var options = this.options, + saveScroll; + + if ( ( options.modal && !force ) || + ( !options.stack && !options.modal ) ) { + return this._trigger( "focus", event ); + } + + if ( options.zIndex > $.ui.dialog.maxZ ) { + $.ui.dialog.maxZ = options.zIndex; + } + if ( this.overlay ) { + $.ui.dialog.maxZ += 1; + $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ; + this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ ); + } + + // Save and then restore scroll + // Opera 9.5+ resets when parent z-index is changed. + // http://bugs.jqueryui.com/ticket/3193 + saveScroll = { + scrollTop: this.element.scrollTop(), + scrollLeft: this.element.scrollLeft() + }; + $.ui.dialog.maxZ += 1; + this.uiDialog.css( "z-index", $.ui.dialog.maxZ ); + this.element.attr( saveScroll ); + this._trigger( "focus", event ); + + return this; + }, + + open: function() { + if ( this._isOpen ) { + return; + } + + var hasFocus, + options = this.options, + uiDialog = this.uiDialog; + + this._size(); + this._position( options.position ); + uiDialog.show( options.show ); + this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null; + this.moveToTop( true ); + + // set focus to the first tabbable element in the content area or the first button + // if there are no tabbable elements, set focus on the dialog itself + hasFocus = this.element.find( ":tabbable" ); + if ( !hasFocus.length ) { + hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); + if ( !hasFocus.length ) { + hasFocus = uiDialog; + } + } + hasFocus.eq( 0 ).focus(); + + this._isOpen = true; + this._trigger( "open" ); + + return this; + }, + + _createButtons: function( buttons ) { + var that = this, + hasButtons = false; + + // if we already have a button pane, remove it + this.uiDialogButtonPane.remove(); + this.uiButtonSet.empty(); + + if ( typeof buttons === "object" && buttons !== null ) { + $.each( buttons, function() { + return !(hasButtons = true); + }); + } + if ( hasButtons ) { + $.each( buttons, function( name, props ) { + var button, click; + props = $.isFunction( props ) ? + { click: props, text: name } : + props; + // Default to a non-submitting button + props = $.extend( { type: "button" }, props ); + // Change the context for the click callback to be the main element + click = props.click; + props.click = function() { + click.apply( that.element[0], arguments ); + }; + button = $( "", props ) + .appendTo( that.uiButtonSet ); + if ( $.fn.button ) { + button.button(); + } + }); + this.uiDialog.addClass( "ui-dialog-buttons" ); + this.uiDialogButtonPane.appendTo( this.uiDialog ); + } else { + this.uiDialog.removeClass( "ui-dialog-buttons" ); + } + }, + + _makeDraggable: function() { + var that = this, + options = this.options; + + function filteredUi( ui ) { + return { + position: ui.position, + offset: ui.offset + }; + } + + this.uiDialog.draggable({ + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", + handle: ".ui-dialog-titlebar", + containment: "document", + start: function( event, ui ) { + $( this ) + .addClass( "ui-dialog-dragging" ); + that._trigger( "dragStart", event, filteredUi( ui ) ); + }, + drag: function( event, ui ) { + that._trigger( "drag", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + options.position = [ + ui.position.left - that.document.scrollLeft(), + ui.position.top - that.document.scrollTop() + ]; + $( this ) + .removeClass( "ui-dialog-dragging" ); + that._trigger( "dragStop", event, filteredUi( ui ) ); + $.ui.dialog.overlay.resize(); + } + }); + }, + + _makeResizable: function( handles ) { + handles = (handles === undefined ? this.options.resizable : handles); + var that = this, + options = this.options, + // .ui-resizable has position: relative defined in the stylesheet + // but dialogs have to use absolute or fixed positioning + position = this.uiDialog.css( "position" ), + resizeHandles = typeof handles === 'string' ? + handles : + "n,e,s,w,se,sw,ne,nw"; + + function filteredUi( ui ) { + return { + originalPosition: ui.originalPosition, + originalSize: ui.originalSize, + position: ui.position, + size: ui.size + }; + } + + this.uiDialog.resizable({ + cancel: ".ui-dialog-content", + containment: "document", + alsoResize: this.element, + maxWidth: options.maxWidth, + maxHeight: options.maxHeight, + minWidth: options.minWidth, + minHeight: this._minHeight(), + handles: resizeHandles, + start: function( event, ui ) { + $( this ).addClass( "ui-dialog-resizing" ); + that._trigger( "resizeStart", event, filteredUi( ui ) ); + }, + resize: function( event, ui ) { + that._trigger( "resize", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + $( this ).removeClass( "ui-dialog-resizing" ); + options.height = $( this ).height(); + options.width = $( this ).width(); + that._trigger( "resizeStop", event, filteredUi( ui ) ); + $.ui.dialog.overlay.resize(); + } + }) + .css( "position", position ) + .find( ".ui-resizable-se" ) + .addClass( "ui-icon ui-icon-grip-diagonal-se" ); + }, + + _minHeight: function() { + var options = this.options; + + if ( options.height === "auto" ) { + return options.minHeight; + } else { + return Math.min( options.minHeight, options.height ); + } + }, + + _position: function( position ) { + var myAt = [], + offset = [ 0, 0 ], + isVisible; + + if ( position ) { + // deep extending converts arrays to objects in jQuery <= 1.3.2 :-( + // if (typeof position == 'string' || $.isArray(position)) { + // myAt = $.isArray(position) ? position : position.split(' '); + + if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) { + myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ]; + if ( myAt.length === 1 ) { + myAt[ 1 ] = myAt[ 0 ]; + } + + $.each( [ "left", "top" ], function( i, offsetPosition ) { + if ( +myAt[ i ] === myAt[ i ] ) { + offset[ i ] = myAt[ i ]; + myAt[ i ] = offsetPosition; + } + }); + + position = { + my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " + + myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]), + at: myAt.join( " " ) + }; + } + + position = $.extend( {}, $.ui.dialog.prototype.options.position, position ); + } else { + position = $.ui.dialog.prototype.options.position; + } + + // need to show the dialog to get the actual offset in the position plugin + isVisible = this.uiDialog.is( ":visible" ); + if ( !isVisible ) { + this.uiDialog.show(); + } + this.uiDialog.position( position ); + if ( !isVisible ) { + this.uiDialog.hide(); + } + }, + + _setOptions: function( options ) { + var that = this, + resizableOptions = {}, + resize = false; + + $.each( options, function( key, value ) { + that._setOption( key, value ); + + if ( key in sizeRelatedOptions ) { + resize = true; + } + if ( key in resizableRelatedOptions ) { + resizableOptions[ key ] = value; + } + }); + + if ( resize ) { + this._size(); + } + if ( this.uiDialog.is( ":data(resizable)" ) ) { + this.uiDialog.resizable( "option", resizableOptions ); + } + }, + + _setOption: function( key, value ) { + var isDraggable, isResizable, + uiDialog = this.uiDialog; + + switch ( key ) { + case "buttons": + this._createButtons( value ); + break; + case "closeText": + // ensure that we always pass a string + this.uiDialogTitlebarCloseText.text( "" + value ); + break; + case "dialogClass": + uiDialog + .removeClass( this.options.dialogClass ) + .addClass( uiDialogClasses + value ); + break; + case "disabled": + if ( value ) { + uiDialog.addClass( "ui-dialog-disabled" ); + } else { + uiDialog.removeClass( "ui-dialog-disabled" ); + } + break; + case "draggable": + isDraggable = uiDialog.is( ":data(draggable)" ); + if ( isDraggable && !value ) { + uiDialog.draggable( "destroy" ); + } + + if ( !isDraggable && value ) { + this._makeDraggable(); + } + break; + case "position": + this._position( value ); + break; + case "resizable": + // currently resizable, becoming non-resizable + isResizable = uiDialog.is( ":data(resizable)" ); + if ( isResizable && !value ) { + uiDialog.resizable( "destroy" ); + } + + // currently resizable, changing handles + if ( isResizable && typeof value === "string" ) { + uiDialog.resizable( "option", "handles", value ); + } + + // currently non-resizable, becoming resizable + if ( !isResizable && value !== false ) { + this._makeResizable( value ); + } + break; + case "title": + // convert whatever was passed in o a string, for html() to not throw up + $( ".ui-dialog-title", this.uiDialogTitlebar ) + .html( "" + ( value || " " ) ); + break; + } + + this._super( key, value ); + }, + + _size: function() { + /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content + * divs will both have width and height set, so we need to reset them + */ + var nonContentHeight, minContentHeight, autoHeight, + options = this.options, + isVisible = this.uiDialog.is( ":visible" ); + + // reset content sizing + this.element.show().css({ + width: "auto", + minHeight: 0, + height: 0 + }); + + if ( options.minWidth > options.width ) { + options.width = options.minWidth; + } + + // reset wrapper sizing + // determine the height of all the non-content elements + nonContentHeight = this.uiDialog.css({ + height: "auto", + width: options.width + }) + .outerHeight(); + minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); + + if ( options.height === "auto" ) { + // only needed for IE6 support + if ( $.support.minHeight ) { + this.element.css({ + minHeight: minContentHeight, + height: "auto" + }); + } else { + this.uiDialog.show(); + autoHeight = this.element.css( "height", "auto" ).height(); + if ( !isVisible ) { + this.uiDialog.hide(); + } + this.element.height( Math.max( autoHeight, minContentHeight ) ); + } + } else { + this.element.height( Math.max( options.height - nonContentHeight, 0 ) ); + } + + if (this.uiDialog.is( ":data(resizable)" ) ) { + this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); + } + } +}); + +$.extend($.ui.dialog, { + uuid: 0, + maxZ: 0, + + getTitleId: function($el) { + var id = $el.attr( "id" ); + if ( !id ) { + this.uuid += 1; + id = this.uuid; + } + return "ui-dialog-title-" + id; + }, + + overlay: function( dialog ) { + this.$el = $.ui.dialog.overlay.create( dialog ); + } +}); + +$.extend( $.ui.dialog.overlay, { + instances: [], + // reuse old instances due to IE memory leak with alpha transparency (see #5185) + oldInstances: [], + maxZ: 0, + events: $.map( + "focus,mousedown,mouseup,keydown,keypress,click".split( "," ), + function( event ) { + return event + ".dialog-overlay"; + } + ).join( " " ), + create: function( dialog ) { + if ( this.instances.length === 0 ) { + // prevent use of anchors and inputs + // we use a setTimeout in case the overlay is created from an + // event that we're going to be cancelling (see #2804) + setTimeout(function() { + // handle $(el).dialog().dialog('close') (see #4065) + if ( $.ui.dialog.overlay.instances.length ) { + $( document ).bind( $.ui.dialog.overlay.events, function( event ) { + // stop events if the z-index of the target is < the z-index of the overlay + // we cannot return true when we don't want to cancel the event (#3523) + if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) { + return false; + } + }); + } + }, 1 ); + + // handle window resize + $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize ); + } + + var $el = ( this.oldInstances.pop() || $( "
                " ).addClass( "ui-widget-overlay" ) ); + + // allow closing by pressing the escape key + $( document ).bind( "keydown.dialog-overlay", function( event ) { + var instances = $.ui.dialog.overlay.instances; + // only react to the event if we're the top overlay + if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el && + dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && + event.keyCode === $.ui.keyCode.ESCAPE ) { + + dialog.close( event ); + event.preventDefault(); + } + }); + + $el.appendTo( document.body ).css({ + width: this.width(), + height: this.height() + }); + + if ( $.fn.bgiframe ) { + $el.bgiframe(); + } + + this.instances.push( $el ); + return $el; + }, + + destroy: function( $el ) { + var indexOf = $.inArray( $el, this.instances ), + maxZ = 0; + + if ( indexOf !== -1 ) { + this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] ); + } + + if ( this.instances.length === 0 ) { + $( [ document, window ] ).unbind( ".dialog-overlay" ); + } + + $el.height( 0 ).width( 0 ).remove(); + + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) + $.each( this.instances, function() { + maxZ = Math.max( maxZ, this.css( "z-index" ) ); + }); + this.maxZ = maxZ; + }, + + height: function() { + var scrollHeight, + offsetHeight; + // handle IE + if ( $.ui.ie ) { + scrollHeight = Math.max( + document.documentElement.scrollHeight, + document.body.scrollHeight + ); + offsetHeight = Math.max( + document.documentElement.offsetHeight, + document.body.offsetHeight + ); + + if ( scrollHeight < offsetHeight ) { + return $( window ).height() + "px"; + } else { + return scrollHeight + "px"; + } + // handle "good" browsers + } else { + return $( document ).height() + "px"; + } + }, + + width: function() { + var scrollWidth, + offsetWidth; + // handle IE + if ( $.ui.ie ) { + scrollWidth = Math.max( + document.documentElement.scrollWidth, + document.body.scrollWidth + ); + offsetWidth = Math.max( + document.documentElement.offsetWidth, + document.body.offsetWidth + ); + + if ( scrollWidth < offsetWidth ) { + return $( window ).width() + "px"; + } else { + return scrollWidth + "px"; + } + // handle "good" browsers + } else { + return $( document ).width() + "px"; + } + }, + + resize: function() { + /* If the dialog is draggable and the user drags it past the + * right edge of the window, the document becomes wider so we + * need to stretch the overlay. If the user then drags the + * dialog back to the left, the document will become narrower, + * so we need to shrink the overlay to the appropriate size. + * This is handled by shrinking the overlay before setting it + * to the full document size. + */ + var $overlays = $( [] ); + $.each( $.ui.dialog.overlay.instances, function() { + $overlays = $overlays.add( this ); + }); + + $overlays.css({ + width: 0, + height: 0 + }).css({ + width: $.ui.dialog.overlay.width(), + height: $.ui.dialog.overlay.height() + }); + } +}); + +$.extend( $.ui.dialog.overlay.prototype, { + destroy: function() { + $.ui.dialog.overlay.destroy( this.$el ); + } +}); + +}( jQuery ) ); +(function( $, undefined ) { + +var mouseHandled = false; + +$.widget( "ui.menu", { + version: "1.9.2", + defaultElement: "
                  ", + delay: 300, + options: { + icons: { + submenu: "ui-icon-carat-1-e" + }, + menus: "ul", + position: { + my: "left top", + at: "right top" + }, + role: "menu", + + // callbacks + blur: null, + focus: null, + select: null + }, + + _create: function() { + this.activeMenu = this.element; + this.element + .uniqueId() + .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) + .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) + .attr({ + role: this.options.role, + tabIndex: 0 + }) + // need to catch all clicks on disabled menu + // not possible through _on + .bind( "click" + this.eventNamespace, $.proxy(function( event ) { + if ( this.options.disabled ) { + event.preventDefault(); + } + }, this )); + + if ( this.options.disabled ) { + this.element + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } + + this._on({ + // Prevent focus from sticking to links inside menu after clicking + // them (focus should always stay on UL during navigation). + "mousedown .ui-menu-item > a": function( event ) { + event.preventDefault(); + }, + "click .ui-state-disabled > a": function( event ) { + event.preventDefault(); + }, + "click .ui-menu-item:has(a)": function( event ) { + var target = $( event.target ).closest( ".ui-menu-item" ); + if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) { + mouseHandled = true; + + this.select( event ); + // Open submenu on click + if ( target.has( ".ui-menu" ).length ) { + this.expand( event ); + } else if ( !this.element.is( ":focus" ) ) { + // Redirect focus to the menu + this.element.trigger( "focus", [ true ] ); + + // If the active item is on the top level, let it stay active. + // Otherwise, blur the active item since it is no longer visible. + if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { + clearTimeout( this.timer ); + } + } + } + }, + "mouseenter .ui-menu-item": function( event ) { + var target = $( event.currentTarget ); + // Remove ui-state-active class from siblings of the newly focused menu item + // to avoid a jump caused by adjacent elements both having a class with a border + target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" ); + this.focus( event, target ); + }, + mouseleave: "collapseAll", + "mouseleave .ui-menu": "collapseAll", + focus: function( event, keepActiveItem ) { + // If there's already an active item, keep it active + // If not, activate the first item + var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 ); + + if ( !keepActiveItem ) { + this.focus( event, item ); + } + }, + blur: function( event ) { + this._delay(function() { + if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { + this.collapseAll( event ); + } + }); + }, + keydown: "_keydown" + }); + + this.refresh(); + + // Clicks outside of a menu collapse any open menus + this._on( this.document, { + click: function( event ) { + if ( !$( event.target ).closest( ".ui-menu" ).length ) { + this.collapseAll( event ); + } + + // Reset the mouseHandled flag + mouseHandled = false; + } + }); + }, + + _destroy: function() { + // Destroy (sub)menus + this.element + .removeAttr( "aria-activedescendant" ) + .find( ".ui-menu" ).andSelf() + .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .show(); + + // Destroy menu items + this.element.find( ".ui-menu-item" ) + .removeClass( "ui-menu-item" ) + .removeAttr( "role" ) + .removeAttr( "aria-disabled" ) + .children( "a" ) + .removeUniqueId() + .removeClass( "ui-corner-all ui-state-hover" ) + .removeAttr( "tabIndex" ) + .removeAttr( "role" ) + .removeAttr( "aria-haspopup" ) + .children().each( function() { + var elem = $( this ); + if ( elem.data( "ui-menu-submenu-carat" ) ) { + elem.remove(); + } + }); + + // Destroy menu dividers + this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); + }, + + _keydown: function( event ) { + var match, prev, character, skip, regex, + preventDefault = true; + + function escape( value ) { + return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); + } + + switch ( event.keyCode ) { + case $.ui.keyCode.PAGE_UP: + this.previousPage( event ); + break; + case $.ui.keyCode.PAGE_DOWN: + this.nextPage( event ); + break; + case $.ui.keyCode.HOME: + this._move( "first", "first", event ); + break; + case $.ui.keyCode.END: + this._move( "last", "last", event ); + break; + case $.ui.keyCode.UP: + this.previous( event ); + break; + case $.ui.keyCode.DOWN: + this.next( event ); + break; + case $.ui.keyCode.LEFT: + this.collapse( event ); + break; + case $.ui.keyCode.RIGHT: + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { + this.expand( event ); + } + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate( event ); + break; + case $.ui.keyCode.ESCAPE: + this.collapse( event ); + break; + default: + preventDefault = false; + prev = this.previousFilter || ""; + character = String.fromCharCode( event.keyCode ); + skip = false; + + clearTimeout( this.filterTimer ); + + if ( character === prev ) { + skip = true; + } else { + character = prev + character; + } + + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + match = skip && match.index( this.active.next() ) !== -1 ? + this.active.nextAll( ".ui-menu-item" ) : + match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if ( !match.length ) { + character = String.fromCharCode( event.keyCode ); + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + } + + if ( match.length ) { + this.focus( event, match ); + if ( match.length > 1 ) { + this.previousFilter = character; + this.filterTimer = this._delay(function() { + delete this.previousFilter; + }, 1000 ); + } else { + delete this.previousFilter; + } + } else { + delete this.previousFilter; + } + } + + if ( preventDefault ) { + event.preventDefault(); + } + }, + + _activate: function( event ) { + if ( !this.active.is( ".ui-state-disabled" ) ) { + if ( this.active.children( "a[aria-haspopup='true']" ).length ) { + this.expand( event ); + } else { + this.select( event ); + } + } + }, + + refresh: function() { + var menus, + icon = this.options.icons.submenu, + submenus = this.element.find( this.options.menus ); + + // Initialize nested menus + submenus.filter( ":not(.ui-menu)" ) + .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) + .hide() + .attr({ + role: this.options.role, + "aria-hidden": "true", + "aria-expanded": "false" + }) + .each(function() { + var menu = $( this ), + item = menu.prev( "a" ), + submenuCarat = $( "" ) + .addClass( "ui-menu-icon ui-icon " + icon ) + .data( "ui-menu-submenu-carat", true ); + + item + .attr( "aria-haspopup", "true" ) + .prepend( submenuCarat ); + menu.attr( "aria-labelledby", item.attr( "id" ) ); + }); + + menus = submenus.add( this.element ); + + // Don't refresh list items that are already adapted + menus.children( ":not(.ui-menu-item):has(a)" ) + .addClass( "ui-menu-item" ) + .attr( "role", "presentation" ) + .children( "a" ) + .uniqueId() + .addClass( "ui-corner-all" ) + .attr({ + tabIndex: -1, + role: this._itemRole() + }); + + // Initialize unlinked menu-items containing spaces and/or dashes only as dividers + menus.children( ":not(.ui-menu-item)" ).each(function() { + var item = $( this ); + // hyphen, em dash, en dash + if ( !/[^\-—–\s]/.test( item.text() ) ) { + item.addClass( "ui-widget-content ui-menu-divider" ); + } + }); + + // Add aria-disabled attribute to any disabled menu item + menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); + + // If the active item has been removed, blur the menu + if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + this.blur(); + } + }, + + _itemRole: function() { + return { + menu: "menuitem", + listbox: "option" + }[ this.options.role ]; + }, + + focus: function( event, item ) { + var nested, focused; + this.blur( event, event && event.type === "focus" ); + + this._scrollIntoView( item ); + + this.active = item.first(); + focused = this.active.children( "a" ).addClass( "ui-state-focus" ); + // Only update aria-activedescendant if there's a role + // otherwise we assume focus is managed elsewhere + if ( this.options.role ) { + this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); + } + + // Highlight active parent menu item, if any + this.active + .parent() + .closest( ".ui-menu-item" ) + .children( "a:first" ) + .addClass( "ui-state-active" ); + + if ( event && event.type === "keydown" ) { + this._close(); + } else { + this.timer = this._delay(function() { + this._close(); + }, this.delay ); + } + + nested = item.children( ".ui-menu" ); + if ( nested.length && ( /^mouse/.test( event.type ) ) ) { + this._startOpening(nested); + } + this.activeMenu = item.parent(); + + this._trigger( "focus", event, { item: item } ); + }, + + _scrollIntoView: function( item ) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if ( this._hasScroll() ) { + borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; + paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height(); + itemHeight = item.height(); + + if ( offset < 0 ) { + this.activeMenu.scrollTop( scroll + offset ); + } else if ( offset + itemHeight > elementHeight ) { + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + } + } + }, + + blur: function( event, fromFocus ) { + if ( !fromFocus ) { + clearTimeout( this.timer ); + } + + if ( !this.active ) { + return; + } + + this.active.children( "a" ).removeClass( "ui-state-focus" ); + this.active = null; + + this._trigger( "blur", event, { item: this.active } ); + }, + + _startOpening: function( submenu ) { + clearTimeout( this.timer ); + + // Don't open if already open fixes a Firefox bug that caused a .5 pixel + // shift in the submenu position when mousing over the carat icon + if ( submenu.attr( "aria-hidden" ) !== "true" ) { + return; + } + + this.timer = this._delay(function() { + this._close(); + this._open( submenu ); + }, this.delay ); + }, + + _open: function( submenu ) { + var position = $.extend({ + of: this.active + }, this.options.position ); + + clearTimeout( this.timer ); + this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) + .hide() + .attr( "aria-hidden", "true" ); + + submenu + .show() + .removeAttr( "aria-hidden" ) + .attr( "aria-expanded", "true" ) + .position( position ); + }, + + collapseAll: function( event, all ) { + clearTimeout( this.timer ); + this.timer = this._delay(function() { + // If we were passed an event, look for the submenu that contains the event + var currentMenu = all ? this.element : + $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); + + // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway + if ( !currentMenu.length ) { + currentMenu = this.element; + } + + this._close( currentMenu ); + + this.blur( event ); + this.activeMenu = currentMenu; + }, this.delay ); + }, + + // With no arguments, closes the currently active menu - if nothing is active + // it closes all menus. If passed an argument, it will search for menus BELOW + _close: function( startMenu ) { + if ( !startMenu ) { + startMenu = this.active ? this.active.parent() : this.element; + } + + startMenu + .find( ".ui-menu" ) + .hide() + .attr( "aria-hidden", "true" ) + .attr( "aria-expanded", "false" ) + .end() + .find( "a.ui-state-active" ) + .removeClass( "ui-state-active" ); + }, + + collapse: function( event ) { + var newItem = this.active && + this.active.parent().closest( ".ui-menu-item", this.element ); + if ( newItem && newItem.length ) { + this._close(); + this.focus( event, newItem ); + } + }, + + expand: function( event ) { + var newItem = this.active && + this.active + .children( ".ui-menu " ) + .children( ".ui-menu-item" ) + .first(); + + if ( newItem && newItem.length ) { + this._open( newItem.parent() ); + + // Delay so Firefox will not hide activedescendant change in expanding submenu from AT + this._delay(function() { + this.focus( event, newItem ); + }); + } + }, + + next: function( event ) { + this._move( "next", "first", event ); + }, + + previous: function( event ) { + this._move( "prev", "last", event ); + }, + + isFirstItem: function() { + return this.active && !this.active.prevAll( ".ui-menu-item" ).length; + }, + + isLastItem: function() { + return this.active && !this.active.nextAll( ".ui-menu-item" ).length; + }, + + _move: function( direction, filter, event ) { + var next; + if ( this.active ) { + if ( direction === "first" || direction === "last" ) { + next = this.active + [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) + .eq( -1 ); + } else { + next = this.active + [ direction + "All" ]( ".ui-menu-item" ) + .eq( 0 ); + } + } + if ( !next || !next.length || !this.active ) { + next = this.activeMenu.children( ".ui-menu-item" )[ filter ](); + } + + this.focus( event, next ); + }, + + nextPage: function( event ) { + var item, base, height; + + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isLastItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.nextAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base - height < 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.children( ".ui-menu-item" ) + [ !this.active ? "first" : "last" ]() ); + } + }, + + previousPage: function( event ) { + var item, base, height; + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isFirstItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.prevAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base + height > 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() ); + } + }, + + _hasScroll: function() { + return this.element.outerHeight() < this.element.prop( "scrollHeight" ); + }, + + select: function( event ) { + // TODO: It should never be possible to not have an active item at this + // point, but the tests don't trigger mouseenter before click. + this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); + var ui = { item: this.active }; + if ( !this.active.has( ".ui-menu" ).length ) { + this.collapseAll( event, true ); + } + this._trigger( "select", event, ui ); + } +}); + +}( jQuery )); +(function( $, undefined ) { + +$.widget( "ui.progressbar", { + version: "1.9.2", + options: { + value: 0, + max: 100 + }, + + min: 0, + + _create: function() { + this.element + .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .attr({ + role: "progressbar", + "aria-valuemin": this.min, + "aria-valuemax": this.options.max, + "aria-valuenow": this._value() + }); + + this.valueDiv = $( "
                  " ) + .appendTo( this.element ); + + this.oldValue = this._value(); + this._refreshValue(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + + this.valueDiv.remove(); + }, + + value: function( newValue ) { + if ( newValue === undefined ) { + return this._value(); + } + + this._setOption( "value", newValue ); + return this; + }, + + _setOption: function( key, value ) { + if ( key === "value" ) { + this.options.value = value; + this._refreshValue(); + if ( this._value() === this.options.max ) { + this._trigger( "complete" ); + } + } + + this._super( key, value ); + }, + + _value: function() { + var val = this.options.value; + // normalize invalid value + if ( typeof val !== "number" ) { + val = 0; + } + return Math.min( this.options.max, Math.max( this.min, val ) ); + }, + + _percentage: function() { + return 100 * this._value() / this.options.max; + }, + + _refreshValue: function() { + var value = this.value(), + percentage = this._percentage(); + + if ( this.oldValue !== value ) { + this.oldValue = value; + this._trigger( "change" ); + } + + this.valueDiv + .toggle( value > this.min ) + .toggleClass( "ui-corner-right", value === this.options.max ) + .width( percentage.toFixed(0) + "%" ); + this.element.attr( "aria-valuenow", value ); + } +}); + +})( jQuery ); +(function( $, undefined ) { + +// number of pages in a slider +// (how many times can you page up/down to go through the whole range) +var numPages = 5; + +$.widget( "ui.slider", $.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "slide", + + options: { + animate: false, + distance: 0, + max: 100, + min: 0, + orientation: "horizontal", + range: false, + step: 1, + value: 0, + values: null + }, + + _create: function() { + var i, handleCount, + o = this.options, + existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), + handle = "", + handles = []; + + this._keySliding = false; + this._mouseSliding = false; + this._animateOff = true; + this._handleIndex = null; + this._detectOrientation(); + this._mouseInit(); + + this.element + .addClass( "ui-slider" + + " ui-slider-" + this.orientation + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all" + + ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) ); + + this.range = $([]); + + if ( o.range ) { + if ( o.range === true ) { + if ( !o.values ) { + o.values = [ this._valueMin(), this._valueMin() ]; + } + if ( o.values.length && o.values.length !== 2 ) { + o.values = [ o.values[0], o.values[0] ]; + } + } + + this.range = $( "
                  " ) + .appendTo( this.element ) + .addClass( "ui-slider-range" + + // note: this isn't the most fittingly semantic framework class for this element, + // but worked best visually with a variety of themes + " ui-widget-header" + + ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) ); + } + + handleCount = ( o.values && o.values.length ) || 1; + + for ( i = existingHandles.length; i < handleCount; i++ ) { + handles.push( handle ); + } + + this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); + + this.handle = this.handles.eq( 0 ); + + this.handles.add( this.range ).filter( "a" ) + .click(function( event ) { + event.preventDefault(); + }) + .mouseenter(function() { + if ( !o.disabled ) { + $( this ).addClass( "ui-state-hover" ); + } + }) + .mouseleave(function() { + $( this ).removeClass( "ui-state-hover" ); + }) + .focus(function() { + if ( !o.disabled ) { + $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" ); + $( this ).addClass( "ui-state-focus" ); + } else { + $( this ).blur(); + } + }) + .blur(function() { + $( this ).removeClass( "ui-state-focus" ); + }); + + this.handles.each(function( i ) { + $( this ).data( "ui-slider-handle-index", i ); + }); + + this._on( this.handles, { + keydown: function( event ) { + var allowed, curVal, newVal, step, + index = $( event.target ).data( "ui-slider-handle-index" ); + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + case $.ui.keyCode.END: + case $.ui.keyCode.PAGE_UP: + case $.ui.keyCode.PAGE_DOWN: + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + event.preventDefault(); + if ( !this._keySliding ) { + this._keySliding = true; + $( event.target ).addClass( "ui-state-active" ); + allowed = this._start( event, index ); + if ( allowed === false ) { + return; + } + } + break; + } + + step = this.options.step; + if ( this.options.values && this.options.values.length ) { + curVal = newVal = this.values( index ); + } else { + curVal = newVal = this.value(); + } + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + newVal = this._valueMin(); + break; + case $.ui.keyCode.END: + newVal = this._valueMax(); + break; + case $.ui.keyCode.PAGE_UP: + newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) ); + break; + case $.ui.keyCode.PAGE_DOWN: + newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) ); + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + if ( curVal === this._valueMax() ) { + return; + } + newVal = this._trimAlignValue( curVal + step ); + break; + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + if ( curVal === this._valueMin() ) { + return; + } + newVal = this._trimAlignValue( curVal - step ); + break; + } + + this._slide( event, index, newVal ); + }, + keyup: function( event ) { + var index = $( event.target ).data( "ui-slider-handle-index" ); + + if ( this._keySliding ) { + this._keySliding = false; + this._stop( event, index ); + this._change( event, index ); + $( event.target ).removeClass( "ui-state-active" ); + } + } + }); + + this._refreshValue(); + + this._animateOff = false; + }, + + _destroy: function() { + this.handles.remove(); + this.range.remove(); + + this.element + .removeClass( "ui-slider" + + " ui-slider-horizontal" + + " ui-slider-vertical" + + " ui-slider-disabled" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all" ); + + this._mouseDestroy(); + }, + + _mouseCapture: function( event ) { + var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, + that = this, + o = this.options; + + if ( o.disabled ) { + return false; + } + + this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight() + }; + this.elementOffset = this.element.offset(); + + position = { x: event.pageX, y: event.pageY }; + normValue = this._normValueFromMouse( position ); + distance = this._valueMax() - this._valueMin() + 1; + this.handles.each(function( i ) { + var thisDistance = Math.abs( normValue - that.values(i) ); + if ( distance > thisDistance ) { + distance = thisDistance; + closestHandle = $( this ); + index = i; + } + }); + + // workaround for bug #3736 (if both handles of a range are at 0, + // the first is always used as the one with least distance, + // and moving it is obviously prevented by preventing negative ranges) + if( o.range === true && this.values(1) === o.min ) { + index += 1; + closestHandle = $( this.handles[index] ); + } + + allowed = this._start( event, index ); + if ( allowed === false ) { + return false; + } + this._mouseSliding = true; + + this._handleIndex = index; + + closestHandle + .addClass( "ui-state-active" ) + .focus(); + + offset = closestHandle.offset(); + mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" ); + this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { + left: event.pageX - offset.left - ( closestHandle.width() / 2 ), + top: event.pageY - offset.top - + ( closestHandle.height() / 2 ) - + ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - + ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + + ( parseInt( closestHandle.css("marginTop"), 10 ) || 0) + }; + + if ( !this.handles.hasClass( "ui-state-hover" ) ) { + this._slide( event, index, normValue ); + } + this._animateOff = true; + return true; + }, + + _mouseStart: function() { + return true; + }, + + _mouseDrag: function( event ) { + var position = { x: event.pageX, y: event.pageY }, + normValue = this._normValueFromMouse( position ); + + this._slide( event, this._handleIndex, normValue ); + + return false; + }, + + _mouseStop: function( event ) { + this.handles.removeClass( "ui-state-active" ); + this._mouseSliding = false; + + this._stop( event, this._handleIndex ); + this._change( event, this._handleIndex ); + + this._handleIndex = null; + this._clickOffset = null; + this._animateOff = false; + + return false; + }, + + _detectOrientation: function() { + this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; + }, + + _normValueFromMouse: function( position ) { + var pixelTotal, + pixelMouse, + percentMouse, + valueTotal, + valueMouse; + + if ( this.orientation === "horizontal" ) { + pixelTotal = this.elementSize.width; + pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); + } else { + pixelTotal = this.elementSize.height; + pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); + } + + percentMouse = ( pixelMouse / pixelTotal ); + if ( percentMouse > 1 ) { + percentMouse = 1; + } + if ( percentMouse < 0 ) { + percentMouse = 0; + } + if ( this.orientation === "vertical" ) { + percentMouse = 1 - percentMouse; + } + + valueTotal = this._valueMax() - this._valueMin(); + valueMouse = this._valueMin() + percentMouse * valueTotal; + + return this._trimAlignValue( valueMouse ); + }, + + _start: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + return this._trigger( "start", event, uiHash ); + }, + + _slide: function( event, index, newVal ) { + var otherVal, + newValues, + allowed; + + if ( this.options.values && this.options.values.length ) { + otherVal = this.values( index ? 0 : 1 ); + + if ( ( this.options.values.length === 2 && this.options.range === true ) && + ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) + ) { + newVal = otherVal; + } + + if ( newVal !== this.values( index ) ) { + newValues = this.values(); + newValues[ index ] = newVal; + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal, + values: newValues + } ); + otherVal = this.values( index ? 0 : 1 ); + if ( allowed !== false ) { + this.values( index, newVal, true ); + } + } + } else { + if ( newVal !== this.value() ) { + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal + } ); + if ( allowed !== false ) { + this.value( newVal ); + } + } + } + }, + + _stop: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + this._trigger( "stop", event, uiHash ); + }, + + _change: function( event, index ) { + if ( !this._keySliding && !this._mouseSliding ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + this._trigger( "change", event, uiHash ); + } + }, + + value: function( newValue ) { + if ( arguments.length ) { + this.options.value = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, 0 ); + return; + } + + return this._value(); + }, + + values: function( index, newValue ) { + var vals, + newValues, + i; + + if ( arguments.length > 1 ) { + this.options.values[ index ] = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, index ); + return; + } + + if ( arguments.length ) { + if ( $.isArray( arguments[ 0 ] ) ) { + vals = this.options.values; + newValues = arguments[ 0 ]; + for ( i = 0; i < vals.length; i += 1 ) { + vals[ i ] = this._trimAlignValue( newValues[ i ] ); + this._change( null, i ); + } + this._refreshValue(); + } else { + if ( this.options.values && this.options.values.length ) { + return this._values( index ); + } else { + return this.value(); + } + } + } else { + return this._values(); + } + }, + + _setOption: function( key, value ) { + var i, + valsLength = 0; + + if ( $.isArray( this.options.values ) ) { + valsLength = this.options.values.length; + } + + $.Widget.prototype._setOption.apply( this, arguments ); + + switch ( key ) { + case "disabled": + if ( value ) { + this.handles.filter( ".ui-state-focus" ).blur(); + this.handles.removeClass( "ui-state-hover" ); + this.handles.prop( "disabled", true ); + this.element.addClass( "ui-disabled" ); + } else { + this.handles.prop( "disabled", false ); + this.element.removeClass( "ui-disabled" ); + } + break; + case "orientation": + this._detectOrientation(); + this.element + .removeClass( "ui-slider-horizontal ui-slider-vertical" ) + .addClass( "ui-slider-" + this.orientation ); + this._refreshValue(); + break; + case "value": + this._animateOff = true; + this._refreshValue(); + this._change( null, 0 ); + this._animateOff = false; + break; + case "values": + this._animateOff = true; + this._refreshValue(); + for ( i = 0; i < valsLength; i += 1 ) { + this._change( null, i ); + } + this._animateOff = false; + break; + case "min": + case "max": + this._animateOff = true; + this._refreshValue(); + this._animateOff = false; + break; + } + }, + + //internal value getter + // _value() returns value trimmed by min and max, aligned by step + _value: function() { + var val = this.options.value; + val = this._trimAlignValue( val ); + + return val; + }, + + //internal values getter + // _values() returns array of values trimmed by min and max, aligned by step + // _values( index ) returns single value trimmed by min and max, aligned by step + _values: function( index ) { + var val, + vals, + i; + + if ( arguments.length ) { + val = this.options.values[ index ]; + val = this._trimAlignValue( val ); + + return val; + } else { + // .slice() creates a copy of the array + // this copy gets trimmed by min and max and then returned + vals = this.options.values.slice(); + for ( i = 0; i < vals.length; i+= 1) { + vals[ i ] = this._trimAlignValue( vals[ i ] ); + } + + return vals; + } + }, + + // returns the step-aligned value that val is closest to, between (inclusive) min and max + _trimAlignValue: function( val ) { + if ( val <= this._valueMin() ) { + return this._valueMin(); + } + if ( val >= this._valueMax() ) { + return this._valueMax(); + } + var step = ( this.options.step > 0 ) ? this.options.step : 1, + valModStep = (val - this._valueMin()) % step, + alignValue = val - valModStep; + + if ( Math.abs(valModStep) * 2 >= step ) { + alignValue += ( valModStep > 0 ) ? step : ( -step ); + } + + // Since JavaScript has problems with large floats, round + // the final value to 5 digits after the decimal point (see #4124) + return parseFloat( alignValue.toFixed(5) ); + }, + + _valueMin: function() { + return this.options.min; + }, + + _valueMax: function() { + return this.options.max; + }, + + _refreshValue: function() { + var lastValPercent, valPercent, value, valueMin, valueMax, + oRange = this.options.range, + o = this.options, + that = this, + animate = ( !this._animateOff ) ? o.animate : false, + _set = {}; + + if ( this.options.values && this.options.values.length ) { + this.handles.each(function( i ) { + valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100; + _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + if ( that.options.range === true ) { + if ( that.orientation === "horizontal" ) { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } else { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + } + lastValPercent = valPercent; + }); + } else { + value = this.value(); + valueMin = this._valueMin(); + valueMax = this._valueMax(); + valPercent = ( valueMax !== valueMin ) ? + ( value - valueMin ) / ( valueMax - valueMin ) * 100 : + 0; + _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + + if ( oRange === "min" && this.orientation === "horizontal" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "horizontal" ) { + this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + if ( oRange === "min" && this.orientation === "vertical" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "vertical" ) { + this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + } + +}); + +}(jQuery)); +(function( $ ) { + +function modifier( fn ) { + return function() { + var previous = this.element.val(); + fn.apply( this, arguments ); + this._refresh(); + if ( previous !== this.element.val() ) { + this._trigger( "change" ); + } + }; +} + +$.widget( "ui.spinner", { + version: "1.9.2", + defaultElement: "", + widgetEventPrefix: "spin", + options: { + culture: null, + icons: { + down: "ui-icon-triangle-1-s", + up: "ui-icon-triangle-1-n" + }, + incremental: true, + max: null, + min: null, + numberFormat: null, + page: 10, + step: 1, + + change: null, + spin: null, + start: null, + stop: null + }, + + _create: function() { + // handle string values that need to be parsed + this._setOption( "max", this.options.max ); + this._setOption( "min", this.options.min ); + this._setOption( "step", this.options.step ); + + // format the value, but don't constrain + this._value( this.element.val(), true ); + + this._draw(); + this._on( this._events ); + this._refresh(); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _getCreateOptions: function() { + var options = {}, + element = this.element; + + $.each( [ "min", "max", "step" ], function( i, option ) { + var value = element.attr( option ); + if ( value !== undefined && value.length ) { + options[ option ] = value; + } + }); + + return options; + }, + + _events: { + keydown: function( event ) { + if ( this._start( event ) && this._keydown( event ) ) { + event.preventDefault(); + } + }, + keyup: "_stop", + focus: function() { + this.previous = this.element.val(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + this._refresh(); + if ( this.previous !== this.element.val() ) { + this._trigger( "change", event ); + } + }, + mousewheel: function( event, delta ) { + if ( !delta ) { + return; + } + if ( !this.spinning && !this._start( event ) ) { + return false; + } + + this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); + clearTimeout( this.mousewheelTimer ); + this.mousewheelTimer = this._delay(function() { + if ( this.spinning ) { + this._stop( event ); + } + }, 100 ); + event.preventDefault(); + }, + "mousedown .ui-spinner-button": function( event ) { + var previous; + + // We never want the buttons to have focus; whenever the user is + // interacting with the spinner, the focus should be on the input. + // If the input is focused then this.previous is properly set from + // when the input first received focus. If the input is not focused + // then we need to set this.previous based on the value before spinning. + previous = this.element[0] === this.document[0].activeElement ? + this.previous : this.element.val(); + function checkFocus() { + var isActive = this.element[0] === this.document[0].activeElement; + if ( !isActive ) { + this.element.focus(); + this.previous = previous; + // support: IE + // IE sets focus asynchronously, so we need to check if focus + // moved off of the input because the user clicked on the button. + this._delay(function() { + this.previous = previous; + }); + } + } + + // ensure focus is on (or stays on) the text field + event.preventDefault(); + checkFocus.call( this ); + + // support: IE + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + // and check (again) if focus moved off of the input. + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + checkFocus.call( this ); + }); + + if ( this._start( event ) === false ) { + return; + } + + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + "mouseup .ui-spinner-button": "_stop", + "mouseenter .ui-spinner-button": function( event ) { + // button will add ui-state-active if mouse was down while mouseleave and kept down + if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { + return; + } + + if ( this._start( event ) === false ) { + return false; + } + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + // TODO: do we really want to consider this a stop? + // shouldn't we just stop the repeater and wait until mouseup before + // we trigger the stop event? + "mouseleave .ui-spinner-button": "_stop" + }, + + _draw: function() { + var uiSpinner = this.uiSpinner = this.element + .addClass( "ui-spinner-input" ) + .attr( "autocomplete", "off" ) + .wrap( this._uiSpinnerHtml() ) + .parent() + // add buttons + .append( this._buttonHtml() ); + + this.element.attr( "role", "spinbutton" ); + + // button bindings + this.buttons = uiSpinner.find( ".ui-spinner-button" ) + .attr( "tabIndex", -1 ) + .button() + .removeClass( "ui-corner-all" ); + + // IE 6 doesn't understand height: 50% for the buttons + // unless the wrapper has an explicit height + if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && + uiSpinner.height() > 0 ) { + uiSpinner.height( uiSpinner.height() ); + } + + // disable spinner if element was already disabled + if ( this.options.disabled ) { + this.disable(); + } + }, + + _keydown: function( event ) { + var options = this.options, + keyCode = $.ui.keyCode; + + switch ( event.keyCode ) { + case keyCode.UP: + this._repeat( null, 1, event ); + return true; + case keyCode.DOWN: + this._repeat( null, -1, event ); + return true; + case keyCode.PAGE_UP: + this._repeat( null, options.page, event ); + return true; + case keyCode.PAGE_DOWN: + this._repeat( null, -options.page, event ); + return true; + } + + return false; + }, + + _uiSpinnerHtml: function() { + return ""; + }, + + _buttonHtml: function() { + return "" + + "" + + "" + + "" + + "" + + "" + + ""; + }, + + _start: function( event ) { + if ( !this.spinning && this._trigger( "start", event ) === false ) { + return false; + } + + if ( !this.counter ) { + this.counter = 1; + } + this.spinning = true; + return true; + }, + + _repeat: function( i, steps, event ) { + i = i || 500; + + clearTimeout( this.timer ); + this.timer = this._delay(function() { + this._repeat( 40, steps, event ); + }, i ); + + this._spin( steps * this.options.step, event ); + }, + + _spin: function( step, event ) { + var value = this.value() || 0; + + if ( !this.counter ) { + this.counter = 1; + } + + value = this._adjustValue( value + step * this._increment( this.counter ) ); + + if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { + this._value( value ); + this.counter++; + } + }, + + _increment: function( i ) { + var incremental = this.options.incremental; + + if ( incremental ) { + return $.isFunction( incremental ) ? + incremental( i ) : + Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 ); + } + + return 1; + }, + + _precision: function() { + var precision = this._precisionOf( this.options.step ); + if ( this.options.min !== null ) { + precision = Math.max( precision, this._precisionOf( this.options.min ) ); + } + return precision; + }, + + _precisionOf: function( num ) { + var str = num.toString(), + decimal = str.indexOf( "." ); + return decimal === -1 ? 0 : str.length - decimal - 1; + }, + + _adjustValue: function( value ) { + var base, aboveMin, + options = this.options; + + // make sure we're at a valid step + // - find out where we are relative to the base (min or 0) + base = options.min !== null ? options.min : 0; + aboveMin = value - base; + // - round to the nearest step + aboveMin = Math.round(aboveMin / options.step) * options.step; + // - rounding is based on 0, so adjust back to our base + value = base + aboveMin; + + // fix precision from bad JS floating point math + value = parseFloat( value.toFixed( this._precision() ) ); + + // clamp the value + if ( options.max !== null && value > options.max) { + return options.max; + } + if ( options.min !== null && value < options.min ) { + return options.min; + } + + return value; + }, + + _stop: function( event ) { + if ( !this.spinning ) { + return; + } + + clearTimeout( this.timer ); + clearTimeout( this.mousewheelTimer ); + this.counter = 0; + this.spinning = false; + this._trigger( "stop", event ); + }, + + _setOption: function( key, value ) { + if ( key === "culture" || key === "numberFormat" ) { + var prevValue = this._parse( this.element.val() ); + this.options[ key ] = value; + this.element.val( this._format( prevValue ) ); + return; + } + + if ( key === "max" || key === "min" || key === "step" ) { + if ( typeof value === "string" ) { + value = this._parse( value ); + } + } + + this._super( key, value ); + + if ( key === "disabled" ) { + if ( value ) { + this.element.prop( "disabled", true ); + this.buttons.button( "disable" ); + } else { + this.element.prop( "disabled", false ); + this.buttons.button( "enable" ); + } + } + }, + + _setOptions: modifier(function( options ) { + this._super( options ); + this._value( this.element.val() ); + }), + + _parse: function( val ) { + if ( typeof val === "string" && val !== "" ) { + val = window.Globalize && this.options.numberFormat ? + Globalize.parseFloat( val, 10, this.options.culture ) : +val; + } + return val === "" || isNaN( val ) ? null : val; + }, + + _format: function( value ) { + if ( value === "" ) { + return ""; + } + return window.Globalize && this.options.numberFormat ? + Globalize.format( value, this.options.numberFormat, this.options.culture ) : + value; + }, + + _refresh: function() { + this.element.attr({ + "aria-valuemin": this.options.min, + "aria-valuemax": this.options.max, + // TODO: what should we do with values that can't be parsed? + "aria-valuenow": this._parse( this.element.val() ) + }); + }, + + // update the value without triggering change + _value: function( value, allowAny ) { + var parsed; + if ( value !== "" ) { + parsed = this._parse( value ); + if ( parsed !== null ) { + if ( !allowAny ) { + parsed = this._adjustValue( parsed ); + } + value = this._format( parsed ); + } + } + this.element.val( value ); + this._refresh(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-spinner-input" ) + .prop( "disabled", false ) + .removeAttr( "autocomplete" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + this.uiSpinner.replaceWith( this.element ); + }, + + stepUp: modifier(function( steps ) { + this._stepUp( steps ); + }), + _stepUp: function( steps ) { + this._spin( (steps || 1) * this.options.step ); + }, + + stepDown: modifier(function( steps ) { + this._stepDown( steps ); + }), + _stepDown: function( steps ) { + this._spin( (steps || 1) * -this.options.step ); + }, + + pageUp: modifier(function( pages ) { + this._stepUp( (pages || 1) * this.options.page ); + }), + + pageDown: modifier(function( pages ) { + this._stepDown( (pages || 1) * this.options.page ); + }), + + value: function( newVal ) { + if ( !arguments.length ) { + return this._parse( this.element.val() ); + } + modifier( this._value ).call( this, newVal ); + }, + + widget: function() { + return this.uiSpinner; + } +}); + +}( jQuery ) ); +(function( $, undefined ) { + +var tabId = 0, + rhash = /#.*$/; + +function getNextTabId() { + return ++tabId; +} + +function isLocal( anchor ) { + return anchor.hash.length > 1 && + anchor.href.replace( rhash, "" ) === + location.href.replace( rhash, "" ) + // support: Safari 5.1 + // Safari 5.1 doesn't encode spaces in window.location + // but it does encode spaces from anchors (#8777) + .replace( /\s/g, "%20" ); +} + +$.widget( "ui.tabs", { + version: "1.9.2", + delay: 300, + options: { + active: null, + collapsible: false, + event: "click", + heightStyle: "content", + hide: null, + show: null, + + // callbacks + activate: null, + beforeActivate: null, + beforeLoad: null, + load: null + }, + + _create: function() { + var that = this, + options = this.options, + active = options.active, + locationHash = location.hash.substring( 1 ); + + this.running = false; + + this.element + .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) + .toggleClass( "ui-tabs-collapsible", options.collapsible ) + // Prevent users from focusing disabled tabs via click + .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) { + if ( $( this ).is( ".ui-state-disabled" ) ) { + event.preventDefault(); + } + }) + // support: IE <9 + // Preventing the default action in mousedown doesn't prevent IE + // from focusing the element, so if the anchor gets focused, blur. + // We don't have to worry about focusing the previously focused + // element since clicking on a non-focusable element should focus + // the body anyway. + .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { + if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { + this.blur(); + } + }); + + this._processTabs(); + + if ( active === null ) { + // check the fragment identifier in the URL + if ( locationHash ) { + this.tabs.each(function( i, tab ) { + if ( $( tab ).attr( "aria-controls" ) === locationHash ) { + active = i; + return false; + } + }); + } + + // check for a tab marked active via a class + if ( active === null ) { + active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); + } + + // no active tab, set to false + if ( active === null || active === -1 ) { + active = this.tabs.length ? 0 : false; + } + } + + // handle numbers: negative, out of range + if ( active !== false ) { + active = this.tabs.index( this.tabs.eq( active ) ); + if ( active === -1 ) { + active = options.collapsible ? false : 0; + } + } + options.active = active; + + // don't allow collapsible: false and active: false + if ( !options.collapsible && options.active === false && this.anchors.length ) { + options.active = 0; + } + + // Take disabling tabs via class attribute from HTML + // into account and update option properly. + if ( $.isArray( options.disabled ) ) { + options.disabled = $.unique( options.disabled.concat( + $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { + return that.tabs.index( li ); + }) + ) ).sort(); + } + + // check for length avoids error when initializing empty list + if ( this.options.active !== false && this.anchors.length ) { + this.active = this._findActive( this.options.active ); + } else { + this.active = $(); + } + + this._refresh(); + + if ( this.active.length ) { + this.load( options.active ); + } + }, + + _getCreateEventData: function() { + return { + tab: this.active, + panel: !this.active.length ? $() : this._getPanelForTab( this.active ) + }; + }, + + _tabKeydown: function( event ) { + var focusedTab = $( this.document[0].activeElement ).closest( "li" ), + selectedIndex = this.tabs.index( focusedTab ), + goingForward = true; + + if ( this._handlePageNav( event ) ) { + return; + } + + switch ( event.keyCode ) { + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + selectedIndex++; + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.LEFT: + goingForward = false; + selectedIndex--; + break; + case $.ui.keyCode.END: + selectedIndex = this.anchors.length - 1; + break; + case $.ui.keyCode.HOME: + selectedIndex = 0; + break; + case $.ui.keyCode.SPACE: + // Activate only, no collapsing + event.preventDefault(); + clearTimeout( this.activating ); + this._activate( selectedIndex ); + return; + case $.ui.keyCode.ENTER: + // Toggle (cancel delayed activation, allow collapsing) + event.preventDefault(); + clearTimeout( this.activating ); + // Determine if we should collapse or activate + this._activate( selectedIndex === this.options.active ? false : selectedIndex ); + return; + default: + return; + } + + // Focus the appropriate tab, based on which key was pressed + event.preventDefault(); + clearTimeout( this.activating ); + selectedIndex = this._focusNextTab( selectedIndex, goingForward ); + + // Navigating with control key will prevent automatic activation + if ( !event.ctrlKey ) { + // Update aria-selected immediately so that AT think the tab is already selected. + // Otherwise AT may confuse the user by stating that they need to activate the tab, + // but the tab will already be activated by the time the announcement finishes. + focusedTab.attr( "aria-selected", "false" ); + this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); + + this.activating = this._delay(function() { + this.option( "active", selectedIndex ); + }, this.delay ); + } + }, + + _panelKeydown: function( event ) { + if ( this._handlePageNav( event ) ) { + return; + } + + // Ctrl+up moves focus to the current tab + if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { + event.preventDefault(); + this.active.focus(); + } + }, + + // Alt+page up/down moves focus to the previous/next tab (and activates) + _handlePageNav: function( event ) { + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { + this._activate( this._focusNextTab( this.options.active - 1, false ) ); + return true; + } + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { + this._activate( this._focusNextTab( this.options.active + 1, true ) ); + return true; + } + }, + + _findNextTab: function( index, goingForward ) { + var lastTabIndex = this.tabs.length - 1; + + function constrain() { + if ( index > lastTabIndex ) { + index = 0; + } + if ( index < 0 ) { + index = lastTabIndex; + } + return index; + } + + while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { + index = goingForward ? index + 1 : index - 1; + } + + return index; + }, + + _focusNextTab: function( index, goingForward ) { + index = this._findNextTab( index, goingForward ); + this.tabs.eq( index ).focus(); + return index; + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "disabled" ) { + // don't use the widget factory's disabled handling + this._setupDisabled( value ); + return; + } + + this._super( key, value); + + if ( key === "collapsible" ) { + this.element.toggleClass( "ui-tabs-collapsible", value ); + // Setting collapsible: false while collapsed; open first panel + if ( !value && this.options.active === false ) { + this._activate( 0 ); + } + } + + if ( key === "event" ) { + this._setupEvents( value ); + } + + if ( key === "heightStyle" ) { + this._setupHeightStyle( value ); + } + }, + + _tabId: function( tab ) { + return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId(); + }, + + _sanitizeSelector: function( hash ) { + return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; + }, + + refresh: function() { + var options = this.options, + lis = this.tablist.children( ":has(a[href])" ); + + // get disabled tabs from class attribute from HTML + // this will get converted to a boolean if needed in _refresh() + options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { + return lis.index( tab ); + }); + + this._processTabs(); + + // was collapsed or no tabs + if ( options.active === false || !this.anchors.length ) { + options.active = false; + this.active = $(); + // was active, but active tab is gone + } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { + // all remaining tabs are disabled + if ( this.tabs.length === options.disabled.length ) { + options.active = false; + this.active = $(); + // activate previous tab + } else { + this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); + } + // was active, active tab still exists + } else { + // make sure active index is correct + options.active = this.tabs.index( this.active ); + } + + this._refresh(); + }, + + _refresh: function() { + this._setupDisabled( this.options.disabled ); + this._setupEvents( this.options.event ); + this._setupHeightStyle( this.options.heightStyle ); + + this.tabs.not( this.active ).attr({ + "aria-selected": "false", + tabIndex: -1 + }); + this.panels.not( this._getPanelForTab( this.active ) ) + .hide() + .attr({ + "aria-expanded": "false", + "aria-hidden": "true" + }); + + // Make sure one tab is in the tab order + if ( !this.active.length ) { + this.tabs.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active + .addClass( "ui-tabs-active ui-state-active" ) + .attr({ + "aria-selected": "true", + tabIndex: 0 + }); + this._getPanelForTab( this.active ) + .show() + .attr({ + "aria-expanded": "true", + "aria-hidden": "false" + }); + } + }, + + _processTabs: function() { + var that = this; + + this.tablist = this._getList() + .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .attr( "role", "tablist" ); + + this.tabs = this.tablist.find( "> li:has(a[href])" ) + .addClass( "ui-state-default ui-corner-top" ) + .attr({ + role: "tab", + tabIndex: -1 + }); + + this.anchors = this.tabs.map(function() { + return $( "a", this )[ 0 ]; + }) + .addClass( "ui-tabs-anchor" ) + .attr({ + role: "presentation", + tabIndex: -1 + }); + + this.panels = $(); + + this.anchors.each(function( i, anchor ) { + var selector, panel, panelId, + anchorId = $( anchor ).uniqueId().attr( "id" ), + tab = $( anchor ).closest( "li" ), + originalAriaControls = tab.attr( "aria-controls" ); + + // inline tab + if ( isLocal( anchor ) ) { + selector = anchor.hash; + panel = that.element.find( that._sanitizeSelector( selector ) ); + // remote tab + } else { + panelId = that._tabId( tab ); + selector = "#" + panelId; + panel = that.element.find( selector ); + if ( !panel.length ) { + panel = that._createPanel( panelId ); + panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); + } + panel.attr( "aria-live", "polite" ); + } + + if ( panel.length) { + that.panels = that.panels.add( panel ); + } + if ( originalAriaControls ) { + tab.data( "ui-tabs-aria-controls", originalAriaControls ); + } + tab.attr({ + "aria-controls": selector.substring( 1 ), + "aria-labelledby": anchorId + }); + panel.attr( "aria-labelledby", anchorId ); + }); + + this.panels + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .attr( "role", "tabpanel" ); + }, + + // allow overriding how to find the list for rare usage scenarios (#7715) + _getList: function() { + return this.element.find( "ol,ul" ).eq( 0 ); + }, + + _createPanel: function( id ) { + return $( "
                  " ) + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "ui-tabs-destroy", true ); + }, + + _setupDisabled: function( disabled ) { + if ( $.isArray( disabled ) ) { + if ( !disabled.length ) { + disabled = false; + } else if ( disabled.length === this.anchors.length ) { + disabled = true; + } + } + + // disable tabs + for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { + if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { + $( li ) + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } else { + $( li ) + .removeClass( "ui-state-disabled" ) + .removeAttr( "aria-disabled" ); + } + } + + this.options.disabled = disabled; + }, + + _setupEvents: function( event ) { + var events = { + click: function( event ) { + event.preventDefault(); + } + }; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.anchors.add( this.tabs ).add( this.panels ) ); + this._on( this.anchors, events ); + this._on( this.tabs, { keydown: "_tabKeydown" } ); + this._on( this.panels, { keydown: "_panelKeydown" } ); + + this._focusable( this.tabs ); + this._hoverable( this.tabs ); + }, + + _setupHeightStyle: function( heightStyle ) { + var maxHeight, overflow, + parent = this.element.parent(); + + if ( heightStyle === "fill" ) { + // IE 6 treats height like minHeight, so we need to turn off overflow + // in order to get a reliable height + // we use the minHeight support test because we assume that only + // browsers that don't support minHeight will treat height as minHeight + if ( !$.support.minHeight ) { + overflow = parent.css( "overflow" ); + parent.css( "overflow", "hidden"); + } + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + if ( overflow ) { + parent.css( "overflow", overflow ); + } + + this.element.children().not( this.panels ).each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.panels.each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.panels.each(function() { + maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); + }).height( maxHeight ); + } + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + anchor = $( event.currentTarget ), + tab = anchor.closest( "li" ), + clickedIsActive = tab[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : this._getPanelForTab( tab ), + toHide = !active.length ? $() : this._getPanelForTab( active ), + eventData = { + oldTab: active, + oldPanel: toHide, + newTab: collapsing ? $() : tab, + newPanel: toShow + }; + + event.preventDefault(); + + if ( tab.hasClass( "ui-state-disabled" ) || + // tab is already loading + tab.hasClass( "ui-tabs-loading" ) || + // can't switch durning an animation + this.running || + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.tabs.index( tab ); + + this.active = clickedIsActive ? $() : tab; + if ( this.xhr ) { + this.xhr.abort(); + } + + if ( !toHide.length && !toShow.length ) { + $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); + } + + if ( toShow.length ) { + this.load( this.tabs.index( tab ), event ); + } + this._toggle( event, eventData ); + }, + + // handles show/hide for selecting tabs + _toggle: function( event, eventData ) { + var that = this, + toShow = eventData.newPanel, + toHide = eventData.oldPanel; + + this.running = true; + + function complete() { + that.running = false; + that._trigger( "activate", event, eventData ); + } + + function show() { + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); + + if ( toShow.length && that.options.show ) { + that._show( toShow, that.options.show, complete ); + } else { + toShow.show(); + complete(); + } + } + + // start out by hiding, then showing, then completing + if ( toHide.length && this.options.hide ) { + this._hide( toHide, this.options.hide, function() { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + show(); + }); + } else { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + toHide.hide(); + show(); + } + + toHide.attr({ + "aria-expanded": "false", + "aria-hidden": "true" + }); + eventData.oldTab.attr( "aria-selected", "false" ); + // If we're switching tabs, remove the old tab from the tab order. + // If we're opening from collapsed state, remove the previous tab from the tab order. + // If we're collapsing, then keep the collapsing tab in the tab order. + if ( toShow.length && toHide.length ) { + eventData.oldTab.attr( "tabIndex", -1 ); + } else if ( toShow.length ) { + this.tabs.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow.attr({ + "aria-expanded": "true", + "aria-hidden": "false" + }); + eventData.newTab.attr({ + "aria-selected": "true", + tabIndex: 0 + }); + }, + + _activate: function( index ) { + var anchor, + active = this._findActive( index ); + + // trying to activate the already active panel + if ( active[ 0 ] === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the current active header + if ( !active.length ) { + active = this.active; + } + + anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; + this._eventHandler({ + target: anchor, + currentTarget: anchor, + preventDefault: $.noop + }); + }, + + _findActive: function( index ) { + return index === false ? $() : this.tabs.eq( index ); + }, + + _getIndex: function( index ) { + // meta-function to give users option to provide a href string instead of a numerical index. + if ( typeof index === "string" ) { + index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); + } + + return index; + }, + + _destroy: function() { + if ( this.xhr ) { + this.xhr.abort(); + } + + this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); + + this.tablist + .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .removeAttr( "role" ); + + this.anchors + .removeClass( "ui-tabs-anchor" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeData( "href.tabs" ) + .removeData( "load.tabs" ) + .removeUniqueId(); + + this.tabs.add( this.panels ).each(function() { + if ( $.data( this, "ui-tabs-destroy" ) ) { + $( this ).remove(); + } else { + $( this ) + .removeClass( "ui-state-default ui-state-active ui-state-disabled " + + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-live" ) + .removeAttr( "aria-busy" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "role" ); + } + }); + + this.tabs.each(function() { + var li = $( this ), + prev = li.data( "ui-tabs-aria-controls" ); + if ( prev ) { + li.attr( "aria-controls", prev ); + } else { + li.removeAttr( "aria-controls" ); + } + }); + + this.panels.show(); + + if ( this.options.heightStyle !== "content" ) { + this.panels.css( "height", "" ); + } + }, + + enable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === false ) { + return; + } + + if ( index === undefined ) { + disabled = false; + } else { + index = this._getIndex( index ); + if ( $.isArray( disabled ) ) { + disabled = $.map( disabled, function( num ) { + return num !== index ? num : null; + }); + } else { + disabled = $.map( this.tabs, function( li, num ) { + return num !== index ? num : null; + }); + } + } + this._setupDisabled( disabled ); + }, + + disable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === true ) { + return; + } + + if ( index === undefined ) { + disabled = true; + } else { + index = this._getIndex( index ); + if ( $.inArray( index, disabled ) !== -1 ) { + return; + } + if ( $.isArray( disabled ) ) { + disabled = $.merge( [ index ], disabled ).sort(); + } else { + disabled = [ index ]; + } + } + this._setupDisabled( disabled ); + }, + + load: function( index, event ) { + index = this._getIndex( index ); + var that = this, + tab = this.tabs.eq( index ), + anchor = tab.find( ".ui-tabs-anchor" ), + panel = this._getPanelForTab( tab ), + eventData = { + tab: tab, + panel: panel + }; + + // not remote + if ( isLocal( anchor[ 0 ] ) ) { + return; + } + + this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); + + // support: jQuery <1.8 + // jQuery <1.8 returns false if the request is canceled in beforeSend, + // but as of 1.8, $.ajax() always returns a jqXHR object. + if ( this.xhr && this.xhr.statusText !== "canceled" ) { + tab.addClass( "ui-tabs-loading" ); + panel.attr( "aria-busy", "true" ); + + this.xhr + .success(function( response ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + panel.html( response ); + that._trigger( "load", event, eventData ); + }, 1 ); + }) + .complete(function( jqXHR, status ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + if ( status === "abort" ) { + that.panels.stop( false, true ); + } + + tab.removeClass( "ui-tabs-loading" ); + panel.removeAttr( "aria-busy" ); + + if ( jqXHR === that.xhr ) { + delete that.xhr; + } + }, 1 ); + }); + } + }, + + // TODO: Remove this function in 1.10 when ajaxOptions is removed + _ajaxSettings: function( anchor, event, eventData ) { + var that = this; + return { + url: anchor.attr( "href" ), + beforeSend: function( jqXHR, settings ) { + return that._trigger( "beforeLoad", event, + $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) ); + } + }; + }, + + _getPanelForTab: function( tab ) { + var id = $( tab ).attr( "aria-controls" ); + return this.element.find( this._sanitizeSelector( "#" + id ) ); + } +}); + +// DEPRECATED +if ( $.uiBackCompat !== false ) { + + // helper method for a lot of the back compat extensions + $.ui.tabs.prototype._ui = function( tab, panel ) { + return { + tab: tab, + panel: panel, + index: this.anchors.index( tab ) + }; + }; + + // url method + $.widget( "ui.tabs", $.ui.tabs, { + url: function( index, url ) { + this.anchors.eq( index ).attr( "href", url ); + } + }); + + // TODO: Remove _ajaxSettings() method when removing this extension + // ajaxOptions and cache options + $.widget( "ui.tabs", $.ui.tabs, { + options: { + ajaxOptions: null, + cache: false + }, + + _create: function() { + this._super(); + + var that = this; + + this._on({ tabsbeforeload: function( event, ui ) { + // tab is already cached + if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) { + event.preventDefault(); + return; + } + + ui.jqXHR.success(function() { + if ( that.options.cache ) { + $.data( ui.tab[ 0 ], "cache.tabs", true ); + } + }); + }}); + }, + + _ajaxSettings: function( anchor, event, ui ) { + var ajaxOptions = this.options.ajaxOptions; + return $.extend( {}, ajaxOptions, { + error: function( xhr, status ) { + try { + // Passing index avoid a race condition when this method is + // called after the user has selected another tab. + // Pass the anchor that initiated this request allows + // loadError to manipulate the tab content panel via $(a.hash) + ajaxOptions.error( + xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] ); + } + catch ( error ) {} + } + }, this._superApply( arguments ) ); + }, + + _setOption: function( key, value ) { + // reset cache if switching from cached to not cached + if ( key === "cache" && value === false ) { + this.anchors.removeData( "cache.tabs" ); + } + this._super( key, value ); + }, + + _destroy: function() { + this.anchors.removeData( "cache.tabs" ); + this._super(); + }, + + url: function( index ){ + this.anchors.eq( index ).removeData( "cache.tabs" ); + this._superApply( arguments ); + } + }); + + // abort method + $.widget( "ui.tabs", $.ui.tabs, { + abort: function() { + if ( this.xhr ) { + this.xhr.abort(); + } + } + }); + + // spinner + $.widget( "ui.tabs", $.ui.tabs, { + options: { + spinner: "Loading…" + }, + _create: function() { + this._super(); + this._on({ + tabsbeforeload: function( event, ui ) { + // Don't react to nested tabs or tabs that don't use a spinner + if ( event.target !== this.element[ 0 ] || + !this.options.spinner ) { + return; + } + + var span = ui.tab.find( "span" ), + html = span.html(); + span.html( this.options.spinner ); + ui.jqXHR.complete(function() { + span.html( html ); + }); + } + }); + } + }); + + // enable/disable events + $.widget( "ui.tabs", $.ui.tabs, { + options: { + enable: null, + disable: null + }, + + enable: function( index ) { + var options = this.options, + trigger; + + if ( index && options.disabled === true || + ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) { + trigger = true; + } + + this._superApply( arguments ); + + if ( trigger ) { + this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); + } + }, + + disable: function( index ) { + var options = this.options, + trigger; + + if ( index && options.disabled === false || + ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) { + trigger = true; + } + + this._superApply( arguments ); + + if ( trigger ) { + this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); + } + } + }); + + // add/remove methods and events + $.widget( "ui.tabs", $.ui.tabs, { + options: { + add: null, + remove: null, + tabTemplate: "
                • #{label}
                • " + }, + + add: function( url, label, index ) { + if ( index === undefined ) { + index = this.anchors.length; + } + + var doInsertAfter, panel, + options = this.options, + li = $( options.tabTemplate + .replace( /#\{href\}/g, url ) + .replace( /#\{label\}/g, label ) ), + id = !url.indexOf( "#" ) ? + url.replace( "#", "" ) : + this._tabId( li ); + + li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true ); + li.attr( "aria-controls", id ); + + doInsertAfter = index >= this.tabs.length; + + // try to find an existing element before creating a new one + panel = this.element.find( "#" + id ); + if ( !panel.length ) { + panel = this._createPanel( id ); + if ( doInsertAfter ) { + if ( index > 0 ) { + panel.insertAfter( this.panels.eq( -1 ) ); + } else { + panel.appendTo( this.element ); + } + } else { + panel.insertBefore( this.panels[ index ] ); + } + } + panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide(); + + if ( doInsertAfter ) { + li.appendTo( this.tablist ); + } else { + li.insertBefore( this.tabs[ index ] ); + } + + options.disabled = $.map( options.disabled, function( n ) { + return n >= index ? ++n : n; + }); + + this.refresh(); + if ( this.tabs.length === 1 && options.active === false ) { + this.option( "active", 0 ); + } + + this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); + return this; + }, + + remove: function( index ) { + index = this._getIndex( index ); + var options = this.options, + tab = this.tabs.eq( index ).remove(), + panel = this._getPanelForTab( tab ).remove(); + + // If selected tab was removed focus tab to the right or + // in case the last tab was removed the tab to the left. + // We check for more than 2 tabs, because if there are only 2, + // then when we remove this tab, there will only be one tab left + // so we don't need to detect which tab to activate. + if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) { + this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) ); + } + + options.disabled = $.map( + $.grep( options.disabled, function( n ) { + return n !== index; + }), + function( n ) { + return n >= index ? --n : n; + }); + + this.refresh(); + + this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) ); + return this; + } + }); + + // length method + $.widget( "ui.tabs", $.ui.tabs, { + length: function() { + return this.anchors.length; + } + }); + + // panel ids (idPrefix option + title attribute) + $.widget( "ui.tabs", $.ui.tabs, { + options: { + idPrefix: "ui-tabs-" + }, + + _tabId: function( tab ) { + var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab; + a = a[0]; + return $( a ).closest( "li" ).attr( "aria-controls" ) || + a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) || + this.options.idPrefix + getNextTabId(); + } + }); + + // _createPanel method + $.widget( "ui.tabs", $.ui.tabs, { + options: { + panelTemplate: "
                  " + }, + + _createPanel: function( id ) { + return $( this.options.panelTemplate ) + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "ui-tabs-destroy", true ); + } + }); + + // selected option + $.widget( "ui.tabs", $.ui.tabs, { + _create: function() { + var options = this.options; + if ( options.active === null && options.selected !== undefined ) { + options.active = options.selected === -1 ? false : options.selected; + } + this._super(); + options.selected = options.active; + if ( options.selected === false ) { + options.selected = -1; + } + }, + + _setOption: function( key, value ) { + if ( key !== "selected" ) { + return this._super( key, value ); + } + + var options = this.options; + this._super( "active", value === -1 ? false : value ); + options.selected = options.active; + if ( options.selected === false ) { + options.selected = -1; + } + }, + + _eventHandler: function() { + this._superApply( arguments ); + this.options.selected = this.options.active; + if ( this.options.selected === false ) { + this.options.selected = -1; + } + } + }); + + // show and select event + $.widget( "ui.tabs", $.ui.tabs, { + options: { + show: null, + select: null + }, + _create: function() { + this._super(); + if ( this.options.active !== false ) { + this._trigger( "show", null, this._ui( + this.active.find( ".ui-tabs-anchor" )[ 0 ], + this._getPanelForTab( this.active )[ 0 ] ) ); + } + }, + _trigger: function( type, event, data ) { + var tab, panel, + ret = this._superApply( arguments ); + + if ( !ret ) { + return false; + } + + if ( type === "beforeActivate" ) { + tab = data.newTab.length ? data.newTab : data.oldTab; + panel = data.newPanel.length ? data.newPanel : data.oldPanel; + ret = this._super( "select", event, { + tab: tab.find( ".ui-tabs-anchor" )[ 0], + panel: panel[ 0 ], + index: tab.closest( "li" ).index() + }); + } else if ( type === "activate" && data.newTab.length ) { + ret = this._super( "show", event, { + tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ], + panel: data.newPanel[ 0 ], + index: data.newTab.closest( "li" ).index() + }); + } + return ret; + } + }); + + // select method + $.widget( "ui.tabs", $.ui.tabs, { + select: function( index ) { + index = this._getIndex( index ); + if ( index === -1 ) { + if ( this.options.collapsible && this.options.selected !== -1 ) { + index = this.options.selected; + } else { + return; + } + } + this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace ); + } + }); + + // cookie option + (function() { + + var listId = 0; + + $.widget( "ui.tabs", $.ui.tabs, { + options: { + cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } + }, + _create: function() { + var options = this.options, + active; + if ( options.active == null && options.cookie ) { + active = parseInt( this._cookie(), 10 ); + if ( active === -1 ) { + active = false; + } + options.active = active; + } + this._super(); + }, + _cookie: function( active ) { + var cookie = [ this.cookie || + ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ]; + if ( arguments.length ) { + cookie.push( active === false ? -1 : active ); + cookie.push( this.options.cookie ); + } + return $.cookie.apply( null, cookie ); + }, + _refresh: function() { + this._super(); + if ( this.options.cookie ) { + this._cookie( this.options.active, this.options.cookie ); + } + }, + _eventHandler: function() { + this._superApply( arguments ); + if ( this.options.cookie ) { + this._cookie( this.options.active, this.options.cookie ); + } + }, + _destroy: function() { + this._super(); + if ( this.options.cookie ) { + this._cookie( null, this.options.cookie ); + } + } + }); + + })(); + + // load event + $.widget( "ui.tabs", $.ui.tabs, { + _trigger: function( type, event, data ) { + var _data = $.extend( {}, data ); + if ( type === "load" ) { + _data.panel = _data.panel[ 0 ]; + _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ]; + } + return this._super( type, event, _data ); + } + }); + + // fx option + // The new animation options (show, hide) conflict with the old show callback. + // The old fx option wins over show/hide anyway (always favor back-compat). + // If a user wants to use the new animation API, they must give up the old API. + $.widget( "ui.tabs", $.ui.tabs, { + options: { + fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 } + }, + + _getFx: function() { + var hide, show, + fx = this.options.fx; + + if ( fx ) { + if ( $.isArray( fx ) ) { + hide = fx[ 0 ]; + show = fx[ 1 ]; + } else { + hide = show = fx; + } + } + + return fx ? { show: show, hide: hide } : null; + }, + + _toggle: function( event, eventData ) { + var that = this, + toShow = eventData.newPanel, + toHide = eventData.oldPanel, + fx = this._getFx(); + + if ( !fx ) { + return this._super( event, eventData ); + } + + that.running = true; + + function complete() { + that.running = false; + that._trigger( "activate", event, eventData ); + } + + function show() { + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); + + if ( toShow.length && fx.show ) { + toShow + .animate( fx.show, fx.show.duration, function() { + complete(); + }); + } else { + toShow.show(); + complete(); + } + } + + // start out by hiding, then showing, then completing + if ( toHide.length && fx.hide ) { + toHide.animate( fx.hide, fx.hide.duration, function() { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + show(); + }); + } else { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + toHide.hide(); + show(); + } + } + }); +} + +})( jQuery ); +(function( $ ) { + +var increments = 0; + +function addDescribedBy( elem, id ) { + var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); + describedby.push( id ); + elem + .data( "ui-tooltip-id", id ) + .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); +} + +function removeDescribedBy( elem ) { + var id = elem.data( "ui-tooltip-id" ), + describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), + index = $.inArray( id, describedby ); + if ( index !== -1 ) { + describedby.splice( index, 1 ); + } + + elem.removeData( "ui-tooltip-id" ); + describedby = $.trim( describedby.join( " " ) ); + if ( describedby ) { + elem.attr( "aria-describedby", describedby ); + } else { + elem.removeAttr( "aria-describedby" ); + } +} + +$.widget( "ui.tooltip", { + version: "1.9.2", + options: { + content: function() { + return $( this ).attr( "title" ); + }, + hide: true, + // Disabled elements have inconsistent behavior across browsers (#8661) + items: "[title]:not([disabled])", + position: { + my: "left top+15", + at: "left bottom", + collision: "flipfit flip" + }, + show: true, + tooltipClass: null, + track: false, + + // callbacks + close: null, + open: null + }, + + _create: function() { + this._on({ + mouseover: "open", + focusin: "open" + }); + + // IDs of generated tooltips, needed for destroy + this.tooltips = {}; + // IDs of parent tooltips where we removed the title attribute + this.parents = {}; + + if ( this.options.disabled ) { + this._disable(); + } + }, + + _setOption: function( key, value ) { + var that = this; + + if ( key === "disabled" ) { + this[ value ? "_disable" : "_enable" ](); + this.options[ key ] = value; + // disable element style changes + return; + } + + this._super( key, value ); + + if ( key === "content" ) { + $.each( this.tooltips, function( id, element ) { + that._updateContent( element ); + }); + } + }, + + _disable: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, element ) { + var event = $.Event( "blur" ); + event.target = event.currentTarget = element[0]; + that.close( event, true ); + }); + + // remove title attributes to prevent native tooltips + this.element.find( this.options.items ).andSelf().each(function() { + var element = $( this ); + if ( element.is( "[title]" ) ) { + element + .data( "ui-tooltip-title", element.attr( "title" ) ) + .attr( "title", "" ); + } + }); + }, + + _enable: function() { + // restore title attributes + this.element.find( this.options.items ).andSelf().each(function() { + var element = $( this ); + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + }); + }, + + open: function( event ) { + var that = this, + target = $( event ? event.target : this.element ) + // we need closest here due to mouseover bubbling, + // but always pointing at the same event target + .closest( this.options.items ); + + // No element to show a tooltip for or the tooltip is already open + if ( !target.length || target.data( "ui-tooltip-id" ) ) { + return; + } + + if ( target.attr( "title" ) ) { + target.data( "ui-tooltip-title", target.attr( "title" ) ); + } + + target.data( "ui-tooltip-open", true ); + + // kill parent tooltips, custom or native, for hover + if ( event && event.type === "mouseover" ) { + target.parents().each(function() { + var parent = $( this ), + blurEvent; + if ( parent.data( "ui-tooltip-open" ) ) { + blurEvent = $.Event( "blur" ); + blurEvent.target = blurEvent.currentTarget = this; + that.close( blurEvent, true ); + } + if ( parent.attr( "title" ) ) { + parent.uniqueId(); + that.parents[ this.id ] = { + element: this, + title: parent.attr( "title" ) + }; + parent.attr( "title", "" ); + } + }); + } + + this._updateContent( target, event ); + }, + + _updateContent: function( target, event ) { + var content, + contentOption = this.options.content, + that = this, + eventType = event ? event.type : null; + + if ( typeof contentOption === "string" ) { + return this._open( event, target, contentOption ); + } + + content = contentOption.call( target[0], function( response ) { + // ignore async response if tooltip was closed already + if ( !target.data( "ui-tooltip-open" ) ) { + return; + } + // IE may instantly serve a cached response for ajax requests + // delay this call to _open so the other call to _open runs first + that._delay(function() { + // jQuery creates a special event for focusin when it doesn't + // exist natively. To improve performance, the native event + // object is reused and the type is changed. Therefore, we can't + // rely on the type being correct after the event finished + // bubbling, so we set it back to the previous value. (#8740) + if ( event ) { + event.type = eventType; + } + this._open( event, target, response ); + }); + }); + if ( content ) { + this._open( event, target, content ); + } + }, + + _open: function( event, target, content ) { + var tooltip, events, delayedShow, + positionOption = $.extend( {}, this.options.position ); + + if ( !content ) { + return; + } + + // Content can be updated multiple times. If the tooltip already + // exists, then just update the content and bail. + tooltip = this._find( target ); + if ( tooltip.length ) { + tooltip.find( ".ui-tooltip-content" ).html( content ); + return; + } + + // if we have a title, clear it to prevent the native tooltip + // we have to check first to avoid defining a title if none exists + // (we don't want to cause an element to start matching [title]) + // + // We use removeAttr only for key events, to allow IE to export the correct + // accessible attributes. For mouse events, set to empty string to avoid + // native tooltip showing up (happens only when removing inside mouseover). + if ( target.is( "[title]" ) ) { + if ( event && event.type === "mouseover" ) { + target.attr( "title", "" ); + } else { + target.removeAttr( "title" ); + } + } + + tooltip = this._tooltip( target ); + addDescribedBy( target, tooltip.attr( "id" ) ); + tooltip.find( ".ui-tooltip-content" ).html( content ); + + function position( event ) { + positionOption.of = event; + if ( tooltip.is( ":hidden" ) ) { + return; + } + tooltip.position( positionOption ); + } + if ( this.options.track && event && /^mouse/.test( event.type ) ) { + this._on( this.document, { + mousemove: position + }); + // trigger once to override element-relative positioning + position( event ); + } else { + tooltip.position( $.extend({ + of: target + }, this.options.position ) ); + } + + tooltip.hide(); + + this._show( tooltip, this.options.show ); + // Handle tracking tooltips that are shown with a delay (#8644). As soon + // as the tooltip is visible, position the tooltip using the most recent + // event. + if ( this.options.show && this.options.show.delay ) { + delayedShow = setInterval(function() { + if ( tooltip.is( ":visible" ) ) { + position( positionOption.of ); + clearInterval( delayedShow ); + } + }, $.fx.interval ); + } + + this._trigger( "open", event, { tooltip: tooltip } ); + + events = { + keyup: function( event ) { + if ( event.keyCode === $.ui.keyCode.ESCAPE ) { + var fakeEvent = $.Event(event); + fakeEvent.currentTarget = target[0]; + this.close( fakeEvent, true ); + } + }, + remove: function() { + this._removeTooltip( tooltip ); + } + }; + if ( !event || event.type === "mouseover" ) { + events.mouseleave = "close"; + } + if ( !event || event.type === "focusin" ) { + events.focusout = "close"; + } + this._on( true, target, events ); + }, + + close: function( event ) { + var that = this, + target = $( event ? event.currentTarget : this.element ), + tooltip = this._find( target ); + + // disabling closes the tooltip, so we need to track when we're closing + // to avoid an infinite loop in case the tooltip becomes disabled on close + if ( this.closing ) { + return; + } + + // only set title if we had one before (see comment in _open()) + if ( target.data( "ui-tooltip-title" ) ) { + target.attr( "title", target.data( "ui-tooltip-title" ) ); + } + + removeDescribedBy( target ); + + tooltip.stop( true ); + this._hide( tooltip, this.options.hide, function() { + that._removeTooltip( $( this ) ); + }); + + target.removeData( "ui-tooltip-open" ); + this._off( target, "mouseleave focusout keyup" ); + // Remove 'remove' binding only on delegated targets + if ( target[0] !== this.element[0] ) { + this._off( target, "remove" ); + } + this._off( this.document, "mousemove" ); + + if ( event && event.type === "mouseleave" ) { + $.each( this.parents, function( id, parent ) { + $( parent.element ).attr( "title", parent.title ); + delete that.parents[ id ]; + }); + } + + this.closing = true; + this._trigger( "close", event, { tooltip: tooltip } ); + this.closing = false; + }, + + _tooltip: function( element ) { + var id = "ui-tooltip-" + increments++, + tooltip = $( "
                  " ) + .attr({ + id: id, + role: "tooltip" + }) + .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + + ( this.options.tooltipClass || "" ) ); + $( "
                  " ) + .addClass( "ui-tooltip-content" ) + .appendTo( tooltip ); + tooltip.appendTo( this.document[0].body ); + if ( $.fn.bgiframe ) { + tooltip.bgiframe(); + } + this.tooltips[ id ] = element; + return tooltip; + }, + + _find: function( target ) { + var id = target.data( "ui-tooltip-id" ); + return id ? $( "#" + id ) : $(); + }, + + _removeTooltip: function( tooltip ) { + tooltip.remove(); + delete this.tooltips[ tooltip.attr( "id" ) ]; + }, + + _destroy: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, element ) { + // Delegate to close method to handle common cleanup + var event = $.Event( "blur" ); + event.target = event.currentTarget = element[0]; + that.close( event, true ); + + // Remove immediately; destroying an open tooltip doesn't use the + // hide animation + $( "#" + id ).remove(); + + // Restore the title + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + element.removeData( "ui-tooltip-title" ); + } + }); + } +}); + +}( jQuery ) ); +;(jQuery.effects || (function($, undefined) { + +var backCompat = $.uiBackCompat !== false, + // prefix used for storing data on .data() + dataSpace = "ui-effects-"; + +$.effects = { + effect: {} +}; + +/*! + * jQuery Color Animations v2.0.0 + * http://jquery.com/ + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Mon Aug 13 13:41:02 2012 -0500 + */ +(function( jQuery, undefined ) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "), + + // plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + // a set of RE's that can match strings and generate color tuples. + stringParsers = [{ + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ] * 2.55, + execResult[ 2 ] * 2.55, + execResult[ 3 ] * 2.55, + execResult[ 4 ] + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ] / 100, + execResult[ 3 ] / 100, + execResult[ 4 ] + ]; + } + }], + + // jQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + props: { + red: { + idx: 0, + type: "byte" + }, + green: { + idx: 1, + type: "byte" + }, + blue: { + idx: 2, + type: "byte" + } + } + }, + + hsla: { + props: { + hue: { + idx: 0, + type: "degrees" + }, + saturation: { + idx: 1, + type: "percent" + }, + lightness: { + idx: 2, + type: "percent" + } + } + } + }, + propTypes = { + "byte": { + floor: true, + max: 255 + }, + "percent": { + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + support = color.support = {}, + + // element for support tests + supportElem = jQuery( "

                  " )[ 0 ], + + // colors = jQuery.Color.names + colors, + + // local aliases of functions called often + each = jQuery.each; + +// determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +}); + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return (allowEmpty || !prop.def) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + // we add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return (value + type.mod) % type.mod; + } + + // for now all property types without mod have min and max + return 0 > value ? 0 : type.max < value ? type.max : value; +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // if this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // exit each( stringParsers ) here because we matched + return false; + } + }); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // if this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = []; + + // more than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + }); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + }); + } else { + each( spaces, function( spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // if the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // if the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // this is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + }); + + // everything defined but alpha? + if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + // use the default of 1 + inst[ cache ][ 3 ] = 1; + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + }); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if (isCache) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + }); + } + return same; + }); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + }); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // if null, don't override start value + if ( endValue === null ) { + return; + } + // if null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + }); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + // if we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + })); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + }); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + }); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + }).join(""); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +}); +color.fn.parse.prototype = color.fn; + +// hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + (q - p) * h * 6; + } + if ( h * 2 < 1) { + return q; + } + if ( h * 3 < 2 ) { + return p + (q - p) * ((2/3) - h) * 6; + } + return p; +} + +spaces.hsla.to = function ( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + if ( l === 0 || l === 1 ) { + s = l; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function ( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + }); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + // alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + }); +}); + +// add .fx.step functions +each( stepHooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + (backgroundColor === "" || backgroundColor === "transparent") && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch( error ) { + // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; +}); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + expanded[ "border" + part + "Color" ] = value; + }); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +})( jQuery ); + + + +/******************************************************************************/ +/****************************** CLASS ANIMATIONS ******************************/ +/******************************************************************************/ +(function() { + +var classAnimationActions = [ "add", "remove", "toggle" ], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + +$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; +}); + +function getElementStyles() { + var style = this.ownerDocument.defaultView ? + this.ownerDocument.defaultView.getComputedStyle( this, null ) : + this.currentStyle, + newStyle = {}, + key, + len; + + // webkit enumerates style porperties + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { + len = style.length; + while ( len-- ) { + key = style[ len ]; + if ( typeof style[ key ] === "string" ) { + newStyle[ $.camelCase( key ) ] = style[ key ]; + } + } + } else { + for ( key in style ) { + if ( typeof style[ key ] === "string" ) { + newStyle[ key ] = style[ key ]; + } + } + } + + return newStyle; +} + + +function styleDifference( oldStyle, newStyle ) { + var diff = {}, + name, value; + + for ( name in newStyle ) { + value = newStyle[ name ]; + if ( oldStyle[ name ] !== value ) { + if ( !shorthandStyles[ name ] ) { + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { + diff[ name ] = value; + } + } + } + } + + return diff; +} + +$.effects.animateClass = function( value, duration, easing, callback ) { + var o = $.speed( duration, easing, callback ); + + return this.queue( function() { + var animated = $( this ), + baseClass = animated.attr( "class" ) || "", + applyClassChange, + allAnimations = o.children ? animated.find( "*" ).andSelf() : animated; + + // map the animated objects to store the original styles. + allAnimations = allAnimations.map(function() { + var el = $( this ); + return { + el: el, + start: getElementStyles.call( this ) + }; + }); + + // apply class change + applyClassChange = function() { + $.each( classAnimationActions, function(i, action) { + if ( value[ action ] ) { + animated[ action + "Class" ]( value[ action ] ); + } + }); + }; + applyClassChange(); + + // map all animated objects again - calculate new styles and diff + allAnimations = allAnimations.map(function() { + this.end = getElementStyles.call( this.el[ 0 ] ); + this.diff = styleDifference( this.start, this.end ); + return this; + }); + + // apply original class + animated.attr( "class", baseClass ); + + // map all animated objects again - this time collecting a promise + allAnimations = allAnimations.map(function() { + var styleInfo = this, + dfd = $.Deferred(), + opts = jQuery.extend({}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ); + } + }); + + this.el.animate( this.diff, opts ); + return dfd.promise(); + }); + + // once all animations have completed: + $.when.apply( $, allAnimations.get() ).done(function() { + + // set the final class + applyClassChange(); + + // for each animated element, + // clear all css properties that were animated + $.each( arguments, function() { + var el = this.el; + $.each( this.diff, function(key) { + el.css( key, '' ); + }); + }); + + // this is guarnteed to be there if you use jQuery.speed() + // it also handles dequeuing the next anim... + o.complete.call( animated[ 0 ] ); + }); + }); +}; + +$.fn.extend({ + _addClass: $.fn.addClass, + addClass: function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + this._addClass( classNames ); + }, + + _removeClass: $.fn.removeClass, + removeClass: function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + this._removeClass( classNames ); + }, + + _toggleClass: $.fn.toggleClass, + toggleClass: function( classNames, force, speed, easing, callback ) { + if ( typeof force === "boolean" || force === undefined ) { + if ( !speed ) { + // without speed parameter + return this._toggleClass( classNames, force ); + } else { + return $.effects.animateClass.call( this, + (force ? { add: classNames } : { remove: classNames }), + speed, easing, callback ); + } + } else { + // without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); + } + }, + + switchClass: function( remove, add, speed, easing, callback) { + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EFFECTS **********************************/ +/******************************************************************************/ + +(function() { + +$.extend( $.effects, { + version: "1.9.2", + + // Saves a set of properties in a data storage + save: function( element, set ) { + for( var i=0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); + } + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function( element, set ) { + var val, i; + for( i=0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + val = element.data( dataSpace + set[ i ] ); + // support: jQuery 1.6.2 + // http://bugs.jquery.com/ticket/9917 + // jQuery 1.6.2 incorrectly returns undefined for any falsy value. + // We can't differentiate between "" and 0 here, so we just assume + // empty string since it's likely to be a more common value... + if ( val === undefined ) { + val = ""; + } + element.css( set[ i ], val ); + } + } + }, + + setMode: function( el, mode ) { + if (mode === "toggle") { + mode = el.is( ":hidden" ) ? "show" : "hide"; + } + return mode; + }, + + // Translates a [top,left] array into a baseline value + // this should be a little more flexible in the future to handle a string & hash + getBaseline: function( origin, original ) { + var y, x; + switch ( origin[ 0 ] ) { + case "top": y = 0; break; + case "middle": y = 0.5; break; + case "bottom": y = 1; break; + default: y = origin[ 0 ] / original.height; + } + switch ( origin[ 1 ] ) { + case "left": x = 0; break; + case "center": x = 0.5; break; + case "right": x = 1; break; + default: x = origin[ 1 ] / original.width; + } + return { + x: x, + y: y + }; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function( element ) { + + // if the element is already wrapped, return it + if ( element.parent().is( ".ui-effects-wrapper" )) { + return element.parent(); + } + + // wrap the element + var props = { + width: element.outerWidth(true), + height: element.outerHeight(true), + "float": element.css( "float" ) + }, + wrapper = $( "

                  " ) + .addClass( "ui-effects-wrapper" ) + .css({ + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + }), + // Store the size in case width/height are defined in % - Fixes #5245 + size = { + width: element.width(), + height: element.height() + }, + active = document.activeElement; + + // support: Firefox + // Firefox incorrectly exposes anonymous content + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 + try { + active.id; + } catch( e ) { + active = document.body; + } + + element.wrap( wrapper ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + + wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element + + // transfer positioning properties to the wrapper + if ( element.css( "position" ) === "static" ) { + wrapper.css({ position: "relative" }); + element.css({ position: "relative" }); + } else { + $.extend( props, { + position: element.css( "position" ), + zIndex: element.css( "z-index" ) + }); + $.each([ "top", "left", "bottom", "right" ], function(i, pos) { + props[ pos ] = element.css( pos ); + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { + props[ pos ] = "auto"; + } + }); + element.css({ + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + }); + } + element.css(size); + + return wrapper.css( props ).show(); + }, + + removeWrapper: function( element ) { + var active = document.activeElement; + + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + element.parent().replaceWith( element ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + } + + + return element; + }, + + setTransition: function( element, list, factor, value ) { + value = value || {}; + $.each( list, function( i, x ) { + var unit = element.cssUnit( x ); + if ( unit[ 0 ] > 0 ) { + value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; + } + }); + return value; + } +}); + +// return an effect options object for the given parameters: +function _normalizeArguments( effect, options, speed, callback ) { + + // allow passing all options as the first parameter + if ( $.isPlainObject( effect ) ) { + options = effect; + effect = effect.effect; + } + + // convert to an object + effect = { effect: effect }; + + // catch (effect, null, ...) + if ( options == null ) { + options = {}; + } + + // catch (effect, callback) + if ( $.isFunction( options ) ) { + callback = options; + speed = null; + options = {}; + } + + // catch (effect, speed, ?) + if ( typeof options === "number" || $.fx.speeds[ options ] ) { + callback = speed; + speed = options; + options = {}; + } + + // catch (effect, options, callback) + if ( $.isFunction( speed ) ) { + callback = speed; + speed = null; + } + + // add options to effect + if ( options ) { + $.extend( effect, options ); + } + + speed = speed || options.duration; + effect.duration = $.fx.off ? 0 : + typeof speed === "number" ? speed : + speed in $.fx.speeds ? $.fx.speeds[ speed ] : + $.fx.speeds._default; + + effect.complete = callback || options.complete; + + return effect; +} + +function standardSpeed( speed ) { + // valid standard speeds + if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) { + return true; + } + + // invalid strings - treat as "normal" speed + if ( typeof speed === "string" && !$.effects.effect[ speed ] ) { + // TODO: remove in 2.0 (#7115) + if ( backCompat && $.effects[ speed ] ) { + return false; + } + return true; + } + + return false; +} + +$.fn.extend({ + effect: function( /* effect, options, speed, callback */ ) { + var args = _normalizeArguments.apply( this, arguments ), + mode = args.mode, + queue = args.queue, + effectMethod = $.effects.effect[ args.effect ], + + // DEPRECATED: remove in 2.0 (#7115) + oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ]; + + if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) { + // delegate to the original method (e.g., .show()) if possible + if ( mode ) { + return this[ mode ]( args.duration, args.complete ); + } else { + return this.each( function() { + if ( args.complete ) { + args.complete.call( this ); + } + }); + } + } + + function run( next ) { + var elem = $( this ), + complete = args.complete, + mode = args.mode; + + function done() { + if ( $.isFunction( complete ) ) { + complete.call( elem[0] ); + } + if ( $.isFunction( next ) ) { + next(); + } + } + + // if the element is hiddden and mode is hide, + // or element is visible and mode is show + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { + done(); + } else { + effectMethod.call( elem[0], args, done ); + } + } + + // TODO: remove this check in 2.0, effectMethod will always be true + if ( effectMethod ) { + return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); + } else { + // DEPRECATED: remove in 2.0 (#7115) + return oldEffectMethod.call(this, { + options: args, + duration: args.duration, + callback: args.complete, + mode: args.mode + }); + } + }, + + _show: $.fn.show, + show: function( speed ) { + if ( standardSpeed( speed ) ) { + return this._show.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "show"; + return this.effect.call( this, args ); + } + }, + + _hide: $.fn.hide, + hide: function( speed ) { + if ( standardSpeed( speed ) ) { + return this._hide.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "hide"; + return this.effect.call( this, args ); + } + }, + + // jQuery core overloads toggle and creates _toggle + __toggle: $.fn.toggle, + toggle: function( speed ) { + if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) { + return this.__toggle.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "toggle"; + return this.effect.call( this, args ); + } + }, + + // helper functions + cssUnit: function(key) { + var style = this.css( key ), + val = []; + + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { + if ( style.indexOf( unit ) > 0 ) { + val = [ parseFloat( style ), unit ]; + } + }); + return val; + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EASING ***********************************/ +/******************************************************************************/ + +(function() { + +// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) + +var baseEasings = {}; + +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { + baseEasings[ name ] = function( p ) { + return Math.pow( p, i + 2 ); + }; +}); + +$.extend( baseEasings, { + Sine: function ( p ) { + return 1 - Math.cos( p * Math.PI / 2 ); + }, + Circ: function ( p ) { + return 1 - Math.sqrt( 1 - p * p ); + }, + Elastic: function( p ) { + return p === 0 || p === 1 ? p : + -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); + }, + Back: function( p ) { + return p * p * ( 3 * p - 2 ); + }, + Bounce: function ( p ) { + var pow2, + bounce = 4; + + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); + } +}); + +$.each( baseEasings, function( name, easeIn ) { + $.easing[ "easeIn" + name ] = easeIn; + $.easing[ "easeOut" + name ] = function( p ) { + return 1 - easeIn( 1 - p ); + }; + $.easing[ "easeInOut" + name ] = function( p ) { + return p < 0.5 ? + easeIn( p * 2 ) / 2 : + 1 - easeIn( p * -2 + 2 ) / 2; + }; +}); + +})(); + +})(jQuery)); +(function( $, undefined ) { + +var rvertical = /up|down|vertical/, + rpositivemotion = /up|left|vertical|horizontal/; + +$.effects.effect.blind = function( o, done ) { + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + direction = o.direction || "up", + vertical = rvertical.test( direction ), + ref = vertical ? "height" : "width", + ref2 = vertical ? "top" : "left", + motion = rpositivemotion.test( direction ), + animation = {}, + show = mode === "show", + wrapper, distance, margin; + + // if already wrapped, the wrapper's properties are my property. #6245 + if ( el.parent().is( ".ui-effects-wrapper" ) ) { + $.effects.save( el.parent(), props ); + } else { + $.effects.save( el, props ); + } + el.show(); + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + distance = wrapper[ ref ](); + margin = parseFloat( wrapper.css( ref2 ) ) || 0; + + animation[ ref ] = show ? distance : 0; + if ( !motion ) { + el + .css( vertical ? "bottom" : "right", 0 ) + .css( vertical ? "top" : "left", "auto" ) + .css({ position: "absolute" }); + + animation[ ref2 ] = show ? margin : distance + margin; + } + + // start at 0 if we are showing + if ( show ) { + wrapper.css( ref, 0 ); + if ( ! motion ) { + wrapper.css( ref2, margin + distance ); + } + } + + // Animate + wrapper.animate( animation, { + duration: o.duration, + easing: o.easing, + queue: false, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.bounce = function( o, done ) { + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + + // defaults: + mode = $.effects.setMode( el, o.mode || "effect" ), + hide = mode === "hide", + show = mode === "show", + direction = o.direction || "up", + distance = o.distance, + times = o.times || 5, + + // number of internal animations + anims = times * 2 + ( show || hide ? 1 : 0 ), + speed = o.duration / anims, + easing = o.easing, + + // utility: + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ), + i, + upAnim, + downAnim, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + // Avoid touching opacity to prevent clearType and PNG issues in IE + if ( show || hide ) { + props.push( "opacity" ); + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); // Create Wrapper + + // default distance for the BIGGEST bounce is the outer Distance / 3 + if ( !distance ) { + distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; + } + + if ( show ) { + downAnim = { opacity: 1 }; + downAnim[ ref ] = 0; + + // if we are showing, force opacity 0 and set the initial position + // then do the "first" animation + el.css( "opacity", 0 ) + .css( ref, motion ? -distance * 2 : distance * 2 ) + .animate( downAnim, speed, easing ); + } + + // start at the smallest distance if we are hiding + if ( hide ) { + distance = distance / Math.pow( 2, times - 1 ); + } + + downAnim = {}; + downAnim[ ref ] = 0; + // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here + for ( i = 0; i < times; i++ ) { + upAnim = {}; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ) + .animate( downAnim, speed, easing ); + + distance = hide ? distance * 2 : distance / 2; + } + + // Last Bounce when Hiding + if ( hide ) { + upAnim = { opacity: 0 }; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ); + } + + el.queue(function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.clip = function( o, done ) { + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "vertical", + vert = direction === "vertical", + size = vert ? "height" : "width", + position = vert ? "top" : "left", + animation = {}, + wrapper, animate, distance; + + // Save & Show + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + animate = ( el[0].tagName === "IMG" ) ? wrapper : el; + distance = animate[ size ](); + + // Shift + if ( show ) { + animate.css( size, 0 ); + animate.css( position, distance / 2 ); + } + + // Create Animation Object: + animation[ size ] = show ? distance : 0; + animation[ position ] = show ? 0 : distance / 2; + + // Animate + animate.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( !show ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.drop = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg", + animation = { + opacity: show ? 1 : 0 + }, + distance; + + // Adjust + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2; + + if ( show ) { + el + .css( "opacity", 0 ) + .css( ref, motion === "pos" ? -distance : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( motion === "pos" ? "+=" : "-=" ) : + ( motion === "pos" ? "-=" : "+=" ) ) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.explode = function( o, done ) { + + var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3, + cells = rows, + el = $( this ), + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + + // show and then visibility:hidden the element before calculating offset + offset = el.show().css( "visibility", "hidden" ).offset(), + + // width and height of a piece + width = Math.ceil( el.outerWidth() / cells ), + height = Math.ceil( el.outerHeight() / rows ), + pieces = [], + + // loop + i, j, left, top, mx, my; + + // children animate complete: + function childComplete() { + pieces.push( this ); + if ( pieces.length === rows * cells ) { + animComplete(); + } + } + + // clone the element for each row and cell. + for( i = 0; i < rows ; i++ ) { // ===> + top = offset.top + i * height; + my = i - ( rows - 1 ) / 2 ; + + for( j = 0; j < cells ; j++ ) { // ||| + left = offset.left + j * width; + mx = j - ( cells - 1 ) / 2 ; + + // Create a clone of the now hidden main element that will be absolute positioned + // within a wrapper div off the -left and -top equal to size of our pieces + el + .clone() + .appendTo( "body" ) + .wrap( "
                  " ) + .css({ + position: "absolute", + visibility: "visible", + left: -j * width, + top: -i * height + }) + + // select the wrapper - make it overflow: hidden and absolute positioned based on + // where the original was located +left and +top equal to the size of pieces + .parent() + .addClass( "ui-effects-explode" ) + .css({ + position: "absolute", + overflow: "hidden", + width: width, + height: height, + left: left + ( show ? mx * width : 0 ), + top: top + ( show ? my * height : 0 ), + opacity: show ? 0 : 1 + }).animate({ + left: left + ( show ? 0 : mx * width ), + top: top + ( show ? 0 : my * height ), + opacity: show ? 1 : 0 + }, o.duration || 500, o.easing, childComplete ); + } + } + + function animComplete() { + el.css({ + visibility: "visible" + }); + $( pieces ).remove(); + if ( !show ) { + el.hide(); + } + done(); + } +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.fade = function( o, done ) { + var el = $( this ), + mode = $.effects.setMode( el, o.mode || "toggle" ); + + el.animate({ + opacity: mode + }, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: done + }); +}; + +})( jQuery ); +(function( $, undefined ) { + +$.effects.effect.fold = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + hide = mode === "hide", + size = o.size || 15, + percent = /([0-9]+)%/.exec( size ), + horizFirst = !!o.horizFirst, + widthFirst = show !== horizFirst, + ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ], + duration = o.duration / 2, + wrapper, distance, + animation1 = {}, + animation2 = {}; + + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + distance = widthFirst ? + [ wrapper.width(), wrapper.height() ] : + [ wrapper.height(), wrapper.width() ]; + + if ( percent ) { + size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; + } + if ( show ) { + wrapper.css( horizFirst ? { + height: 0, + width: size + } : { + height: size, + width: 0 + }); + } + + // Animation + animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size; + animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0; + + // Animate + wrapper + .animate( animation1, duration, o.easing ) + .animate( animation2, duration, o.easing, function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.highlight = function( o, done ) { + var elem = $( this ), + props = [ "backgroundImage", "backgroundColor", "opacity" ], + mode = $.effects.setMode( elem, o.mode || "show" ), + animation = { + backgroundColor: elem.css( "backgroundColor" ) + }; + + if (mode === "hide") { + animation.opacity = 0; + } + + $.effects.save( elem, props ); + + elem + .show() + .css({ + backgroundImage: "none", + backgroundColor: o.color || "#ffff99" + }) + .animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + elem.hide(); + } + $.effects.restore( elem, props ); + done(); + } + }); +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.pulsate = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "show" ), + show = mode === "show", + hide = mode === "hide", + showhide = ( show || mode === "hide" ), + + // showing or hiding leaves of the "last" animation + anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), + duration = o.duration / anims, + animateTo = 0, + queue = elem.queue(), + queuelen = queue.length, + i; + + if ( show || !elem.is(":visible")) { + elem.css( "opacity", 0 ).show(); + animateTo = 1; + } + + // anims - 1 opacity "toggles" + for ( i = 1; i < anims; i++ ) { + elem.animate({ + opacity: animateTo + }, duration, o.easing ); + animateTo = 1 - animateTo; + } + + elem.animate({ + opacity: animateTo + }, duration, o.easing); + + elem.queue(function() { + if ( hide ) { + elem.hide(); + } + done(); + }); + + // We just queued up "anims" animations, we need to put them next in the queue + if ( queuelen > 1 ) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + elem.dequeue(); +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.puff = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "hide" ), + hide = mode === "hide", + percent = parseInt( o.percent, 10 ) || 150, + factor = percent / 100, + original = { + height: elem.height(), + width: elem.width(), + outerHeight: elem.outerHeight(), + outerWidth: elem.outerWidth() + }; + + $.extend( o, { + effect: "scale", + queue: false, + fade: true, + mode: mode, + complete: done, + percent: hide ? percent : 100, + from: hide ? + original : + { + height: original.height * factor, + width: original.width * factor, + outerHeight: original.outerHeight * factor, + outerWidth: original.outerWidth * factor + } + }); + + elem.effect( o ); +}; + +$.effects.effect.scale = function( o, done ) { + + // Create element + var el = $( this ), + options = $.extend( true, {}, o ), + mode = $.effects.setMode( el, o.mode || "effect" ), + percent = parseInt( o.percent, 10 ) || + ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ), + direction = o.direction || "both", + origin = o.origin, + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }, + factor = { + y: direction !== "horizontal" ? (percent / 100) : 1, + x: direction !== "vertical" ? (percent / 100) : 1 + }; + + // We are going to pass this effect to the size effect: + options.effect = "size"; + options.queue = false; + options.complete = done; + + // Set default origin and restore for show/hide + if ( mode !== "effect" ) { + options.origin = origin || ["middle","center"]; + options.restore = true; + } + + options.from = o.from || ( mode === "show" ? { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + } : original ); + options.to = { + height: original.height * factor.y, + width: original.width * factor.x, + outerHeight: original.outerHeight * factor.y, + outerWidth: original.outerWidth * factor.x + }; + + // Fade option to support puff + if ( options.fade ) { + if ( mode === "show" ) { + options.from.opacity = 0; + options.to.opacity = 1; + } + if ( mode === "hide" ) { + options.from.opacity = 1; + options.to.opacity = 0; + } + } + + // Animate + el.effect( options ); + +}; + +$.effects.effect.size = function( o, done ) { + + // Create element + var original, baseline, factor, + el = $( this ), + props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ], + + // Always restore + props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ], + + // Copy for children + props2 = [ "width", "height", "overflow" ], + cProps = [ "fontSize" ], + vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], + hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], + + // Set options + mode = $.effects.setMode( el, o.mode || "effect" ), + restore = o.restore || mode !== "effect", + scale = o.scale || "both", + origin = o.origin || [ "middle", "center" ], + position = el.css( "position" ), + props = restore ? props0 : props1, + zero = { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + }; + + if ( mode === "show" ) { + el.show(); + } + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }; + + if ( o.mode === "toggle" && mode === "show" ) { + el.from = o.to || zero; + el.to = o.from || original; + } else { + el.from = o.from || ( mode === "show" ? zero : original ); + el.to = o.to || ( mode === "hide" ? zero : original ); + } + + // Set scaling factor + factor = { + from: { + y: el.from.height / original.height, + x: el.from.width / original.width + }, + to: { + y: el.to.height / original.height, + x: el.to.width / original.width + } + }; + + // Scale the css box + if ( scale === "box" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( vProps ); + el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + props = props.concat( hProps ); + el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from ); + el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to ); + } + } + + // Scale the content + if ( scale === "content" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( cProps ).concat( props2 ); + el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to ); + } + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + el.css( "overflow", "hidden" ).css( el.from ); + + // Adjust + if (origin) { // Calculate baseline shifts + baseline = $.effects.getBaseline( origin, original ); + el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y; + el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x; + el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y; + el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x; + } + el.css( el.from ); // set top & left + + // Animate + if ( scale === "content" || scale === "both" ) { // Scale the children + + // Add margins/font-size + vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); + hProps = hProps.concat([ "marginLeft", "marginRight" ]); + props2 = props0.concat(vProps).concat(hProps); + + el.find( "*[width]" ).each( function(){ + var child = $( this ), + c_original = { + height: child.height(), + width: child.width(), + outerHeight: child.outerHeight(), + outerWidth: child.outerWidth() + }; + if (restore) { + $.effects.save(child, props2); + } + + child.from = { + height: c_original.height * factor.from.y, + width: c_original.width * factor.from.x, + outerHeight: c_original.outerHeight * factor.from.y, + outerWidth: c_original.outerWidth * factor.from.x + }; + child.to = { + height: c_original.height * factor.to.y, + width: c_original.width * factor.to.x, + outerHeight: c_original.height * factor.to.y, + outerWidth: c_original.width * factor.to.x + }; + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from ); + child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from ); + child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to ); + } + + // Animate children + child.css( child.from ); + child.animate( child.to, o.duration, o.easing, function() { + + // Restore children + if ( restore ) { + $.effects.restore( child, props2 ); + } + }); + }); + } + + // Animate + el.animate( el.to, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( el.to.opacity === 0 ) { + el.css( "opacity", el.from.opacity ); + } + if( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + if ( !restore ) { + + // we need to calculate our new positioning based on the scaling + if ( position === "static" ) { + el.css({ + position: "relative", + top: el.to.top, + left: el.to.left + }); + } else { + $.each([ "top", "left" ], function( idx, pos ) { + el.css( pos, function( _, str ) { + var val = parseInt( str, 10 ), + toRef = idx ? el.to.left : el.to.top; + + // if original was "auto", recalculate the new value from wrapper + if ( str === "auto" ) { + return toRef + "px"; + } + + return val + toRef + "px"; + }); + }); + } + } + + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.shake = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "effect" ), + direction = o.direction || "left", + distance = o.distance || 20, + times = o.times || 3, + anims = times * 2 + 1, + speed = Math.round(o.duration/anims), + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + animation = {}, + animation1 = {}, + animation2 = {}, + i, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + // Animation + animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; + animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; + animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; + + // Animate + el.animate( animation, speed, o.easing ); + + // Shakes + for ( i = 1; i < times; i++ ) { + el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing ); + } + el + .animate( animation1, speed, o.easing ) + .animate( animation, speed / 2, o.easing ) + .queue(function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.slide = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "width", "height" ], + mode = $.effects.setMode( el, o.mode || "show" ), + show = mode === "show", + direction = o.direction || "left", + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + distance, + animation = {}; + + // Adjust + $.effects.save( el, props ); + el.show(); + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ); + + $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + if ( show ) { + el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( positiveMotion ? "+=" : "-=") : + ( positiveMotion ? "-=" : "+=")) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + +})(jQuery); +(function( $, undefined ) { + +$.effects.effect.transfer = function( o, done ) { + var elem = $( this ), + target = $( o.to ), + targetFixed = target.css( "position" ) === "fixed", + body = $("body"), + fixTop = targetFixed ? body.scrollTop() : 0, + fixLeft = targetFixed ? body.scrollLeft() : 0, + endPosition = target.offset(), + animation = { + top: endPosition.top - fixTop , + left: endPosition.left - fixLeft , + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = elem.offset(), + transfer = $( '
                  ' ) + .appendTo( document.body ) + .addClass( o.className ) + .css({ + top: startPosition.top - fixTop , + left: startPosition.left - fixLeft , + height: elem.innerHeight(), + width: elem.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + }) + .animate( animation, o.duration, o.easing, function() { + transfer.remove(); + done(); + }); +}; + +})(jQuery); diff --git a/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/js/jquery-ui-1.9.2.custom.min.js b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/js/jquery-ui-1.9.2.custom.min.js new file mode 100644 index 000000000..e1e35b004 --- /dev/null +++ b/js/vendor/jquery-timepicker/test/resources/jquery-ui/jquery-ui-1.9.2/js/jquery-ui-1.9.2.custom.min.js @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.9.2 - 2014-08-29 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +(function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.ui.version||(e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,i){return"number"==typeof t?this.each(function(){var n=this;setTimeout(function(){e(n).focus(),i&&i.call(n)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e(function(){var t=document.body,i=t.appendChild(i=document.createElement("div"));i.offsetHeight,e.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=100===i.offsetHeight,e.support.selectstart="onselectstart"in i,t.removeChild(i).style.display="none"}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=6===parseFloat(t[1],10)}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},contains:e.contains,hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)},isOverAxis:function(e,t,i){return e>t&&t+i>e},isOver:function(t,i,n,s,a,o){return e.ui.isOverAxis(t,n,a)&&e.ui.isOverAxis(i,s,o)}}))})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(a){}n(e)},t.widget=function(i,s,n){var a,o,r,h,l=i.split(".")[0];i=i.split(".")[1],a=l+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][a.toLowerCase()]=function(e){return!!t.data(e,a)},t[l]=t[l]||{},o=t[l][i],r=t[l][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(e,i){t.isFunction(i)&&(n[e]=function(){var t=function(){return s.prototype[e].apply(this,arguments)},n=function(t){return s.prototype[e].apply(this,t)};return function(){var e,s=this._super,a=this._superApply;return this._super=t,this._superApply=n,e=i.apply(this,arguments),this._super=s,this._superApply=a,e}}())}),r.prototype=t.widget.extend(h,{widgetEventPrefix:o?h.widgetEventPrefix:i},n,{constructor:r,namespace:l,widgetName:i,widgetBaseClass:a,widgetFullName:a}),o?(t.each(o._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete o._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,a,o=s.call(arguments,1),r=0,h=o.length;h>r;r++)for(n in o[r])a=o[r][n],o[r].hasOwnProperty(n)&&a!==e&&(i[n]=t.isPlainObject(a)?t.isPlainObject(i[n])?t.widget.extend({},i[n],a):t.widget.extend({},a):a);return i},t.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;t.fn[i]=function(o){var r="string"==typeof o,h=s.call(arguments,1),l=this;return o=!r&&h.length?t.widget.extend.apply(null,[o].concat(h)):o,r?this.each(function(){var s,n=t.data(this,a);return n?t.isFunction(n[o])&&"_"!==o.charAt(0)?(s=n[o].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+o+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+o+"'")}):this.each(function(){var e=t.data(this,a);e?e.option(o||{})._init():t.data(this,a,new n(o,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
                  ",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetName,this),t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,a,o,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(a=r[i]=t.widget.extend({},this.options[i]),o=0;n.length-1>o;o++)a[n[o]]=a[n[o]]||{},a=a[n[o]];if(i=n.pop(),s===e)return a[i]===e?null:a[i];a[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,o=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),t.each(n,function(n,r){function h(){return i||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?o[r]:r).apply(o,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?a.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,a,o=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(t.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),o=!t.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&t.effects&&(t.effects.effect[r]||t.uiBackCompat!==!1&&t.effects[r])?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){t(this)[e](),a&&a.call(s[0]),i()})}}),t.uiBackCompat!==!1&&(t.Widget.prototype._getCreateOptions=function(){return t.metadata&&t.metadata.get(this.element[0])[this.widgetName]})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseInt(t[0],10)*(d.test(t[0])?e/100:1),parseInt(t[1],10)*(d.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}t.ui=t.ui||{};var n,a=Math.max,o=Math.abs,r=Math.round,l=/left|center|right/,h=/top|center|bottom/,c=/[\+\-]\d+%?/,u=/^\w+/,d=/%$/,p=t.fn.position;t.position={scrollbarWidth:function(){if(n!==e)return n;var i,s,a=t("
                  "),o=a.children()[0];return t("body").append(a),i=o.offsetWidth,a.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=a[0].clientWidth),a.remove(),n=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widths?"left":i>0?"right":"center",vertical:0>r?"top":n>0?"bottom":"middle"};u>d&&d>o(i+s)&&(l.horizontal="center"),p>f&&f>o(n+r)&&(l.vertical="middle"),l.important=a(o(i),o(s))>a(o(n),o(r))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-o-n;e.collisionWidth>o?l>0&&0>=h?(i=t.left+l+e.collisionWidth-o-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+o-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-o-n;e.collisionHeight>o?l>0&&0>=h?(i=t.top+l+e.collisionHeight-o-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+o-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-a,(0>i||o(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>o(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-a,t.top+p+f+g>c&&(0>s||o(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>o(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}(),t.uiBackCompat!==!1&&function(t){var i=t.fn.position;t.fn.position=function(s){if(!s||!s.offset)return i.call(this,s);var n=s.offset.split(" "),a=s.at.split(" ");return 1===n.length&&(n[1]=n[0]),/^\d/.test(n[0])&&(n[0]="+"+n[0]),/^\d/.test(n[1])&&(n[1]="+"+n[1]),1===a.length&&(/left|center|right/.test(a[0])?a[1]="center":(a[1]=a[0],a[0]="center")),i.call(this,t.extend(s,{at:a[0]+n[0]+" "+a[1]+n[1],offset:e}))}}(jQuery)})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){"original"!=this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t('
                  ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=!1;t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1);for(var s=this.element[0],a=!1;s&&(s=s.parentNode);)s==document&&(a=!0);if(!a&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!i||"valid"==this.options.revert&&i||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)){var n=this;t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",e)!==!1&&n._clear()})}else this._trigger("stop",e)!==!1&&this._clear();return!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){var i=this.options.handle&&t(this.options.handle,this.element).length?!1:!0;return t(this.options.handle,this.element).find("*").andSelf().each(function(){this==e.target&&(i=!0)}),i},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"==i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"==i.appendTo?this.element[0].parentNode:i.appendTo),s[0]==this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if("parent"==e.containment&&(e.containment=this.helper[0].parentNode),("document"==e.containment||"window"==e.containment)&&(this.containment=["document"==e.containment?0:t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==e.containment?0:t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==e.containment?0:t(window).scrollLeft())+t("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==e.containment?0:t(window).scrollTop())+(t("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||e.containment.constructor==Array)e.containment.constructor==Array&&(this.containment=e.containment);else{var i=t(e.containment),s=i[0];if(!s)return;i.offset();var a="hidden"!=t(s).css("overflow");this.containment=[(parseInt(t(s).css("borderLeftWidth"),10)||0)+(parseInt(t(s).css("paddingLeft"),10)||0),(parseInt(t(s).css("borderTopWidth"),10)||0)+(parseInt(t(s).css("paddingTop"),10)||0),(a?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(t(s).css("borderLeftWidth"),10)||0)-(parseInt(t(s).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(a?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(t(s).css("borderTopWidth"),10)||0)-(parseInt(t(s).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"==e?1:-1,a=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),n=/(html|body)/i.test(a[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():n?0:a.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():n?0:a.scrollLeft())*s}},_generatePosition:function(e){var i=this.options,s="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(s[0].tagName),n=e.pageX,r=e.pageY;if(this.originalPosition){var o;if(this.containment){if(this.relative_container){var l=this.relative_container.offset();o=[this.containment[0]+l.left,this.containment[1]+l.top,this.containment[2]+l.left,this.containment[3]+l.top]}else o=this.containment;e.pageX-this.offset.click.lefto[2]&&(n=o[2]+this.offset.click.left),e.pageY-this.offset.click.top>o[3]&&(r=o[3]+this.offset.click.top)}if(i.grid){var h=i.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1]:this.originalPageY;r=o?h-this.offset.click.topo[3]?h-this.offset.click.topo[2]?c-this.offset.click.left=0;c--){var d=s.snapElements[c].left,u=d+s.snapElements[c].width,p=s.snapElements[c].top,g=p+s.snapElements[c].height;if(r>d-n&&u+n>r&&l>p-n&&g+n>l||r>d-n&&u+n>r&&h>p-n&&g+n>h||o>d-n&&u+n>o&&l>p-n&&g+n>l||o>d-n&&u+n>o&&h>p-n&&g+n>h){if("inner"!=a.snapMode){var f=n>=Math.abs(p-h),m=n>=Math.abs(g-l),v=n>=Math.abs(d-o),_=n>=Math.abs(u-r);f&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top-s.margins.top),m&&(i.position.top=s._convertPositionTo("relative",{top:g,left:0}).top-s.margins.top),v&&(i.position.left=s._convertPositionTo("relative",{top:0,left:d-s.helperProportions.width}).left-s.margins.left),_&&(i.position.left=s._convertPositionTo("relative",{top:0,left:u}).left-s.margins.left)}var b=f||m||v||_;if("outer"!=a.snapMode){var f=n>=Math.abs(p-l),m=n>=Math.abs(g-h),v=n>=Math.abs(d-r),_=n>=Math.abs(u-o);f&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top-s.margins.top),m&&(i.position.top=s._convertPositionTo("relative",{top:g-s.helperProportions.height,left:0}).top-s.margins.top),v&&(i.position.left=s._convertPositionTo("relative",{top:0,left:d}).left-s.margins.left),_&&(i.position.left=s._convertPositionTo("relative",{top:0,left:u-s.helperProportions.width}).left-s.margins.left)}!s.snapElements[c].snapping&&(f||m||v||_||b)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=f||m||v||_||b}else s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1}}}),t.ui.plugin.add("draggable","stack",{start:function(){var e=t(this).data("draggable").options,i=t.makeArray(t(e.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});if(i.length){var s=parseInt(i[0].style.zIndex)||0;t(i).each(function(t){this.style.zIndex=s+t}),this[0].style.zIndex=s+i.length}}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),a=t(this).data("draggable").options;s.css("zIndex")&&(a._zIndex=s.css("zIndex")),s.css("zIndex",a.zIndex)},stop:function(e,i){var s=t(this).data("draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){t.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var e=this.options,i=e.accept;this.isover=0,this.isout=1,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=t.ui.ddmanager.droppables[this.options.scope],i=0;e.length>i;i++)e[i]==this&&e.splice(i,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"==e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current;if(!s||(s.currentItem||s.element)[0]==this.element[0])return!1;var n=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope==s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n=(e.positionAbs||e.position.absolute).left,a=n+e.helperProportions.width,o=(e.positionAbs||e.position.absolute).top,r=o+e.helperProportions.height,l=i.offset.left,h=l+i.proportions.width,c=i.offset.top,d=c+i.proportions.height;switch(s){case"fit":return n>=l&&h>=a&&o>=c&&d>=r;case"intersect":return n+e.helperProportions.width/2>l&&h>a-e.helperProportions.width/2&&o+e.helperProportions.height/2>c&&d>r-e.helperProportions.height/2;case"pointer":var u=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,p=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,g=t.ui.isOver(p,u,c,l,i.proportions.height,i.proportions.width);return g;case"touch":return(o>=c&&d>=o||r>=c&&d>=r||c>o&&r>d)&&(n>=l&&h>=n||a>=l&&h>=a||l>n&&a>h);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s=t.ui.ddmanager.droppables[e.options.scope]||[],n=i?i.type:null,a=(e.currentItem||e.element).find(":data(droppable)").andSelf();t:for(var o=0;s.length>o;o++)if(!(s[o].options.disabled||e&&!s[o].accept.call(s[o].element[0],e.currentItem||e.element))){for(var r=0;a.length>r;r++)if(a[r]==s[o].element[0]){s[o].proportions.height=0;continue t}s[o].visible="none"!=s[o].element.css("display"),s[o].visible&&("mousedown"==n&&s[o]._activate.call(s[o],i),s[o].offset=s[o].element.offset(),s[o].proportions={width:s[o].element[0].offsetWidth,height:s[o].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s=t.ui.intersect(e,this,this.options.tolerance),n=s||1!=this.isover?s&&0==this.isover?"isover":null:"isout";if(n){var a;if(this.options.greedy){var o=this.options.scope,r=this.element.parents(":data(droppable)").filter(function(){return t.data(this,"droppable").options.scope===o});r.length&&(a=t.data(r[0],"droppable"),a.greedyChild="isover"==n?1:0)}a&&"isover"==n&&(a.isover=0,a.isout=1,a._out.call(a,i)),this[n]=1,this["isout"==n?"isover":"isout"]=0,this["isover"==n?"_over":"_out"].call(this,i),a&&"isout"==n&&(a.isout=0,a.isover=1,a._over.call(a,i))}}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t){t.widget("ui.resizable",t.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var e=this,i=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t('
                  ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=i.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var s=this.handles.split(",");this.handles={};for(var n=0;s.length>n;n++){var a=t.trim(s[n]),o="ui-resizable-"+a,r=t('
                  ');r.css({zIndex:i.zIndex}),"se"==a&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[a]=".ui-resizable-"+a,this.element.append(r)}}this._renderAxis=function(e){e=e||this.element;for(var i in this.handles){if(this.handles[i].constructor==String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var s=t(this.handles[i],this.element),n=0;n=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth();var a=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");e.css(a,n),this._proportionallyResize()}t(this.handles[i]).length}},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!e.resizing){if(this.className)var t=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);e.axis=t&&t[1]?t[1]:"se"}}),i.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){i.disabled||(t(this).removeClass("ui-resizable-autohide"),e._handles.show())}).mouseleave(function(){i.disabled||e.resizing||(t(this).addClass("ui-resizable-autohide"),e._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var i=this.element;this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()}return this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_mouseCapture:function(e){var i=!1;for(var s in this.handles)t(this.handles[s])[0]==e.target&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(i){var s=this.options,n=this.element.position(),a=this.element;this.resizing=!0,this.documentScroll={top:t(document).scrollTop(),left:t(document).scrollLeft()},(a.is(".ui-draggable")||/absolute/.test(a.css("position")))&&a.css({position:"absolute",top:n.top,left:n.left}),this._renderProxy();var o=e(this.helper.css("left")),r=e(this.helper.css("top"));s.containment&&(o+=t(s.containment).scrollLeft()||0,r+=t(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:r},this.size=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalPosition={left:o,top:r},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1;var h=t(".ui-resizable-"+this.axis).css("cursor");return t("body").css("cursor","auto"==h?this.axis+"-resize":h),a.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var e=this.helper,i=(this.options,this.originalMousePosition),s=this.axis,n=t.pageX-i.left||0,a=t.pageY-i.top||0,o=this._change[s];if(!o)return!1;var r=o.apply(this,[t,n,a]);return this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(r=this._updateRatio(r,t)),r=this._respectSize(r,t),this._propagate("resize",t),e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(r),this._trigger("resize",t,this.ui()),!1},_mouseStop:function(e){this.resizing=!1;var i=this.options,s=this;if(this._helper){var n=this._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:s.sizeDiff.height,r=a?0:s.sizeDiff.width,h={width:s.helper.width()-r,height:s.helper.height()-o},l=parseInt(s.element.css("left"),10)+(s.position.left-s.originalPosition.left)||null,c=parseInt(s.element.css("top"),10)+(s.position.top-s.originalPosition.top)||null;i.animate||this.element.css(t.extend(h,{top:c,left:l})),s.helper.height(s.size.height),s.helper.width(s.size.width),this._helper&&!i.animate&&this._proportionallyResize()}return t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.options,this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=(this.options,this.position),s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"==n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"==n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t,e){var s=(this.helper,this._vBoundaries),n=(this._aspectRatio||e.shiftKey,this.axis),a=i(t.width)&&s.maxWidth&&s.maxWidtht.width,h=i(t.height)&&s.minHeight&&s.minHeight>t.height;r&&(t.width=s.minWidth),h&&(t.height=s.minHeight),a&&(t.width=s.maxWidth),o&&(t.height=s.maxHeight);var l=this.originalPosition.left+this.originalSize.width,c=this.position.top+this.size.height,u=/sw|nw|w/.test(n),d=/nw|ne|n/.test(n);r&&u&&(t.left=l-s.minWidth),a&&u&&(t.left=l-s.maxWidth),h&&d&&(t.top=c-s.minHeight),o&&d&&(t.top=c-s.maxHeight);var p=!t.width&&!t.height;return p&&!t.left&&t.top?t.top=null:p&&!t.top&&t.left&&(t.left=null),t},_proportionallyResize:function(){if(this.options,this._proportionallyResizeElements.length)for(var e=this.helper||this.element,i=0;this._proportionallyResizeElements.length>i;i++){var s=this._proportionallyResizeElements[i];if(!this.borderDif){var n=[s.css("borderTopWidth"),s.css("borderRightWidth"),s.css("borderBottomWidth"),s.css("borderLeftWidth")],a=[s.css("paddingTop"),s.css("paddingRight"),s.css("paddingBottom"),s.css("paddingLeft")];this.borderDif=t.map(n,function(t,e){var i=parseInt(t,10)||0,s=parseInt(a[e],10)||0;return i+s})}s.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var e=this.element,i=this.options;if(this.elementOffset=e.offset(),this._helper){this.helper=this.helper||t('
                  ');var s=t.ui.ie6?1:0,n=t.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+n,height:this.element.outerHeight()+n,position:"absolute",left:this.elementOffset.left-s+"px",top:this.elementOffset.top-s+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=(this.options,this.originalSize),s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=(this.options,this.originalSize),n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!=e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i=t(this).data("resizable"),s=i.options,n=i.element,a=s.containment,o=a instanceof t?a.get(0):/parent/.test(a)?n.parent().get(0):a;if(o)if(i.containerElement=t(o),/document/.test(a)||a==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight};else{var r=t(o),h=[];t(["Top","Right","Left","Bottom"]).each(function(t,i){h[t]=e(r.css("padding"+i))}),i.containerOffset=r.offset(),i.containerPosition=r.position(),i.containerSize={height:r.innerHeight()-h[3],width:r.innerWidth()-h[1]};var l=i.containerOffset,c=i.containerSize.height,u=i.containerSize.width,d=t.ui.hasScroll(o,"left")?o.scrollWidth:u,p=t.ui.hasScroll(o)?o.scrollHeight:c;i.parentData={element:o,left:l.left,top:l.top,width:d,height:p}}},resize:function(e){var i=t(this).data("resizable"),s=i.options,n=(i.containerSize,i.containerOffset),a=(i.size,i.position),o=i._aspectRatio||e.shiftKey,r={top:0,left:0},h=i.containerElement;h[0]!=document&&/static/.test(h.css("position"))&&(r=n),a.left<(i._helper?n.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-n.left:i.position.left-r.left),o&&(i.size.height=i.size.width/i.aspectRatio),i.position.left=s.helper?n.left:0),a.top<(i._helper?n.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-n.top:i.position.top),o&&(i.size.width=i.size.height*i.aspectRatio),i.position.top=i._helper?n.top:0),i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top;var l=Math.abs((i._helper?i.offset.left-r.left:i.offset.left-r.left)+i.sizeDiff.width),c=Math.abs((i._helper?i.offset.top-r.top:i.offset.top-n.top)+i.sizeDiff.height),u=i.containerElement.get(0)==i.element.parent().get(0),d=/relative|absolute/.test(i.containerElement.css("position"));u&&d&&(l-=i.parentData.left),l+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-l,o&&(i.size.height=i.size.width/i.aspectRatio)),c+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-c,o&&(i.size.width=i.size.height*i.aspectRatio))},stop:function(){var e=t(this).data("resizable"),i=e.options,s=(e.position,e.containerOffset),n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("resizable");e.options,e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("resizable");e.options,e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(e){var i=t(this).data("resizable"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis;s._aspectRatio||e.shiftKey,s.grid="number"==typeof s.grid?[s.grid,s.grid]:s.grid;var h=Math.round((n.width-a.width)/(s.grid[0]||1))*(s.grid[0]||1),l=Math.round((n.height-a.height)/(s.grid[1]||1))*(s.grid[1]||1);/^(se|s|e)$/.test(r)?(i.size.width=a.width+h,i.size.height=a.height+l):/^(ne)$/.test(r)?(i.size.width=a.width+h,i.size.height=a.height+l,i.position.top=o.top-l):/^(sw)$/.test(r)?(i.size.width=a.width+h,i.size.height=a.height+l,i.position.left=o.left-h):(i.size.width=a.width+h,i.size.height=a.height+l,i.position.top=o.top-l,i.position.left=o.left-h)}});var e=function(t){return parseInt(t,10)||0},i=function(t){return!isNaN(parseInt(t,10))}})(jQuery);(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var i;this.refresh=function(){i=e(t.options.filter,t.element[0]),i.addClass("ui-selectee"),i.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=i.addClass("ui-selectee"),this._mouseInit(),this.helper=e("
                  ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this;if(this.opos=[t.pageX,t.pageY],!this.options.disabled){var s=this.options;this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().andSelf().each(function(){var s=e.data(this,"selectable-item");if(s){var n=!t.metaKey&&!t.ctrlKey||!s.$element.hasClass("ui-selected");return s.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",t,{selecting:s.element}):i._trigger("unselecting",t,{unselecting:s.element}),!1}})}},_mouseDrag:function(t){var i=this;if(this.dragged=!0,!this.options.disabled){var s=this.options,n=this.opos[0],a=this.opos[1],o=t.pageX,r=t.pageY;if(n>o){var l=o;o=n,n=l}if(a>r){var l=r;r=a,a=l}return this.helper.css({left:n,top:a,width:o-n,height:r-a}),this.selectees.each(function(){var l=e.data(this,"selectable-item");if(l&&l.element!=i.element[0]){var h=!1;"touch"==s.tolerance?h=!(l.left>o||n>l.right||l.top>r||a>l.bottom):"fit"==s.tolerance&&(h=l.left>n&&o>l.right&&l.top>a&&r>l.bottom),h?(l.selected&&(l.$element.removeClass("ui-selected"),l.selected=!1),l.unselecting&&(l.$element.removeClass("ui-unselecting"),l.unselecting=!1),l.selecting||(l.$element.addClass("ui-selecting"),l.selecting=!0,i._trigger("selecting",t,{selecting:l.element}))):(l.selecting&&((t.metaKey||t.ctrlKey)&&l.startselected?(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.$element.addClass("ui-selected"),l.selected=!0):(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.startselected&&(l.$element.addClass("ui-unselecting"),l.unselecting=!0),i._trigger("unselecting",t,{unselecting:l.element}))),l.selected&&(t.metaKey||t.ctrlKey||l.startselected||(l.$element.removeClass("ui-selected"),l.selected=!1,l.$element.addClass("ui-unselecting"),l.unselecting=!0,i._trigger("unselecting",t,{unselecting:l.element}))))}}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,this.options,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(t){t.widget("ui.sortable",t.ui.mouse,{version:"1.9.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(e);var n=null;if(t(e.target).parents().each(function(){return t.data(this,s.widgetName+"-item")==s?(n=t(this),!1):undefined}),t.data(e.target,s.widgetName+"-item")==s&&(n=t(e.target)),!n)return!1;if(this.options.handle&&!i){var a=!1;if(t(this.options.handle,n).find("*").andSelf().each(function(){this==e.target&&(a=!0)}),!a)return!1}return this.currentItem=n,this._removeCurrentsFromItems(),!0},_mouseStart:function(e,i,s){var n=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&(t("body").css("cursor")&&(this._storedCursor=t("body").css("cursor")),t("body").css("cursor",n.cursor)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(var a=this.containers.length-1;a>=0;a--)this.containers[a]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var i=this.options,s=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY=0;n--){var a=this.items[n],o=a.item[0],r=this._intersectsWithPointer(a);if(r&&a.instance===this.currentContainer&&o!=this.currentItem[0]&&this.placeholder[1==r?"next":"prev"]()[0]!=o&&!t.contains(this.placeholder[0],o)&&("semi-dynamic"==this.options.type?!t.contains(this.element[0],o):!0)){if(this.direction=1==r?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(a))break;this._rearrange(e,a),this._trigger("change",e,this._uiHash());break}}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset();this.reverting=!0,t(this.helper).animate({left:n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u=s+l>r&&h>s+l&&e+c>a&&o>e+c;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var i="x"===this.options.axis||t.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),s="y"===this.options.axis||t.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"==o||"down"==a?2:1:a&&("down"==a?2:1):!1},_intersectsWithSides:function(e){var i=t.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),s=t.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"==a&&s||"left"==a&&!s:n&&("down"==n&&i||"up"==n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor==String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i=[],s=[],n=this._connectWith();if(n&&e)for(var a=n.length-1;a>=0;a--)for(var o=t(n[a]),r=o.length-1;r>=0;r--){var h=t.data(o[r],this.widgetName);h&&h!=this&&!h.options.disabled&&s.push([t.isFunction(h.options.items)?h.options.items.call(h.element):t(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}s.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var a=s.length-1;a>=0;a--)s[a][0].each(function(){i.push(this)});return t(i)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]==t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i=this.items,s=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],n=this._connectWith();if(n&&this.ready)for(var a=n.length-1;a>=0;a--)for(var o=t(n[a]),r=o.length-1;r>=0;r--){var h=t.data(o[r],this.widgetName);h&&h!=this&&!h.options.disabled&&(s.push([t.isFunction(h.options.items)?h.options.items.call(h.element[0],e,{item:this.currentItem}):t(h.options.items,h.element),h]),this.containers.push(h))}for(var a=s.length-1;a>=0;a--)for(var l=s[a][1],c=s[a][0],r=0,u=c.length;u>r;r++){var d=t(c[r]);d.data(this.widgetName+"-item",l),i.push({item:d,instance:l,width:0,height:0,left:0,top:0})}},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var i=this.items.length-1;i>=0;i--){var s=this.items[i];if(s.instance==this.currentContainer||!this.currentContainer||s.item[0]==this.currentItem[0]){var n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item;e||(s.width=n.outerWidth(),s.height=n.outerHeight());var a=n.offset();s.left=a.left,s.top=a.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var i=this.containers.length-1;i>=0;i--){var a=this.containers[i].element.offset();this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}return this},_createPlaceholder:function(e){e=e||this;var i=e.options;if(!i.placeholder||i.placeholder.constructor==String){var s=i.placeholder;i.placeholder={element:function(){var i=t(document.createElement(e.currentItem[0].nodeName)).addClass(s||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return s||(i.style.visibility="hidden"),i},update:function(t,n){(!s||i.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}}e.placeholder=t(i.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),i.placeholder.update(e,e.placeholder)},_contactContainers:function(e){for(var i=null,s=null,n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(i&&t.contains(this.containers[n].element[0],i.element[0]))continue;i=this.containers[n],s=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(i)if(1===this.containers.length)this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1;else{for(var a=1e4,o=null,r=this.containers[s].floating?"left":"top",h=this.containers[s].floating?"width":"height",l=this.positionAbs[r]+this.offset.click[r],c=this.items.length-1;c>=0;c--)if(t.contains(this.containers[s].element[0],this.items[c].item[0])&&this.items[c].item[0]!=this.currentItem[0]){var u=this.items[c].item.offset()[r],d=!1;Math.abs(u-l)>Math.abs(u+this.items[c][h]-l)&&(d=!0,u+=this.items[c][h]),a>Math.abs(u-l)&&(a=Math.abs(u-l),o=this.items[c],this.direction=d?"up":"down")}if(!o&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[s],o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[s].element,!0),this._trigger("change",e,this._uiHash()),this.containers[s]._trigger("change",e,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"==i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!=i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(""==s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(""==s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if("parent"==e.containment&&(e.containment=this.helper[0].parentNode),("document"==e.containment||"window"==e.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(e.containment)){var i=t(e.containment)[0],s=t(e.containment).offset(),n="hidden"!=t(i).css("overflow");this.containment=[s.left+(parseInt(t(i).css("borderLeftWidth"),10)||0)+(parseInt(t(i).css("paddingLeft"),10)||0)-this.margins.left,s.top+(parseInt(t(i).css("borderTopWidth"),10)||0)+(parseInt(t(i).css("paddingTop"),10)||0)-this.margins.top,s.left+(n?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t(i).css("borderLeftWidth"),10)||0)-(parseInt(t(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,s.top+(n?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t(i).css("borderTopWidth"),10)||0)-(parseInt(t(i).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"==e?1:-1,n=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i=this.options,s="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(s[0].tagName);"relative"!=this.cssPosition||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());var a=e.pageX,o=e.pageY;if(this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.leftthis.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid)){var r=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1];o=this.containment?r-this.offset.click.topthis.containment[3]?r-this.offset.click.topthis.containment[2]?h-this.offset.click.left=0;n--)i||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[n])),this.containers[n].containerCache.over=0);if(this._storedCursor&&t("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!i){this._trigger("beforeStop",e,this._uiHash());for(var n=0;s.length>n;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(i||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null,!i){for(var n=0;s.length>n;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.9.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var i=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t),a=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(a.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),a.collapsible||a.active!==!1&&null!=a.active||(a.active=0),0>a.active&&(a.active+=this.headers.length),this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(t){var a=e(this),n=a.attr("id"),r=a.next(),o=r.attr("id");n||(n=i+"-header-"+t,a.attr("id",n)),o||(o=i+"-panel-"+t,r.attr("id",o)),a.attr("aria-controls",o),r.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(a.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,n=this.headers.index(t.target),r=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(n+1)%a];break;case i.LEFT:case i.UP:r=this.headers[(n-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[a-1]}r&&(e(t.target).attr("tabIndex",-1),e(r).attr("tabIndex",0),r.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,i,a=this.options.heightStyle,n=this.element.parent();"fill"===a?(e.support.minHeight||(i=n.css("overflow"),n.css("overflow","hidden")),t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),a=i.css("position");"absolute"!==a&&"fixed"!==a&&(t-=i.outerHeight(!0))}),i&&n.css("overflow",i),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===a&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={};t&&(e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._on(this.headers,i))},_eventHandler:function(t){var i=this.options,a=this.active,n=e(t.currentTarget),r=n[0]===a[0],o=r&&i.collapsible,s=o?e():n.next(),c=a.next(),d={oldHeader:a,oldPanel:c,newHeader:o?e():n,newPanel:s};t.preventDefault(),r&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=o?!1:this.headers.index(n),this.active=r?e():n,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),r||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-expanded":"false","aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,n){var r,o,s,c=this,d=0,h=e.length&&(!t.length||e.index()",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,n;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,n=!0,i=!0,undefined;t=!1,n=!1,i=!1;var a=e.ui.keyCode;switch(s.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",s);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case a.UP:t=!0,this._keyEvent("previous",s);break;case a.DOWN:t=!0,this._keyEvent("next",s);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case a.TAB:this.menu.active&&this.menu.select(s);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(t)return t=!1,n.preventDefault(),undefined;if(!i){var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(e){return n?(n=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("
                  "+(r[0]>0&&O==r[1]-1?'
                  ':""):""),j+=K}Y+=j}return Y+=w+($.ui.ie6&&!e.inline?'':""),e._keyEvent=!1,Y},_generateMonthYearHeader:function(e,t,i,a,n,s,r,o){var u=this._get(e,"changeMonth"),d=this._get(e,"changeYear"),c=this._get(e,"showMonthAfterYear"),l='
                  ',h="";if(s||!u)h+=''+r[t]+"";else{var p=a&&a.getFullYear()==i,g=n&&n.getFullYear()==i;h+='"}if(c||(l+=h+(!s&&u&&d?"":" ")),!e.yearshtml)if(e.yearshtml="",s||!d)l+=''+i+"";else{var m=this._get(e,"yearRange").split(":"),v=(new Date).getFullYear(),_=function(e){var t=e.match(/c[+-].*/)?i+parseInt(e.substring(1),10):e.match(/[+-].*/)?v+parseInt(e,10):parseInt(e,10);return isNaN(t)?v:t},y=_(m[0]),b=Math.max(y,_(m[1]||""));for(y=a?Math.max(y,a.getFullYear()):y,b=n?Math.min(b,n.getFullYear()):b,e.yearshtml+='",l+=e.yearshtml,e.yearshtml=null}return l+=this._get(e,"yearSuffix"),c&&(l+=(!s&&u&&d?"":" ")+h),l+="
                  "},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"==i?t:0),n=e.drawMonth+("M"==i?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(a,n))+("D"==i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,n,s)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"==i||"Y"==i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return n=a&&n>a?a:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var n=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(i,a+(0>t?t:n[0]*n[1]),1));return 0>t&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max");return(!i||t.getTime()>=i.getTime())&&(!a||t.getTime()<=a.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!=e&&"getDate"!=e&&"widget"!=e?"option"==e&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var i="ui-dialog ui-widget ui-widget-content ui-corner-all ",a={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},n={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),"string"!=typeof this.originalTitle&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var a,n,s,r,o,l=this,u=this.options,d=u.title||" ";a=(this.uiDialog=e("
                  ")).addClass(i+u.dialogClass).css({display:"none",outline:0,zIndex:u.zIndex}).attr("tabIndex",-1).keydown(function(t){u.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(l.close(t),t.preventDefault())}).mousedown(function(e){l.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(a),n=(this.uiDialogTitlebar=e("
                  ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){a.focus()}).prependTo(a),s=e("").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),l.close(e)}).appendTo(n),(this.uiDialogTitlebarCloseText=e("")).addClass("ui-icon ui-icon-closethick").text(u.closeText).appendTo(s),r=e("").uniqueId().addClass("ui-dialog-title").html(d).prependTo(n),o=(this.uiDialogButtonPane=e("
                  ")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("
                  ")).addClass("ui-dialog-buttonset").appendTo(o),a.attr({role:"dialog","aria-labelledby":r.attr("id")}),n.find("*").add(n).disableSelection(),this._hoverable(s),this._focusable(s),u.draggable&&e.fn.draggable&&this._makeDraggable(),u.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(u.buttons),this._isOpen=!1,e.fn.bgiframe&&a.bgiframe(),this._on(a,{keydown:function(i){if(u.modal&&i.keyCode===e.ui.keyCode.TAB){var n=e(":tabbable",a),s=n.filter(":first"),r=n.filter(":last");return i.target!==r[0]||i.shiftKey?i.target===s[0]&&i.shiftKey?(r.focus(1),!1):t:(s.focus(1),!1)}}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var i,a,n=this;if(this._isOpen&&!1!==this._trigger("beforeClose",t))return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(i=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(a=e(this).css("z-index"),isNaN(a)||(i=Math.max(i,a)))}),e.ui.dialog.maxZ=i),this},isOpen:function(){return this._isOpen},moveToTop:function(t,i){var a,n=this.options;return n.modal&&!t||!n.stack&&!n.modal?this._trigger("focus",i):(n.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=n.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),a={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(a),this._trigger("focus",i),this)},open:function(){if(!this._isOpen){var t,i=this.options,a=this.uiDialog;return this._size(),this._position(i.position),a.show(i.show),this.overlay=i.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=a)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this}},_createButtons:function(t){var i=this,a=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),"object"==typeof t&&null!==t&&e.each(t,function(){return!(a=!0)}),a?(e.each(t,function(t,a){var n,s;a=e.isFunction(a)?{click:a,text:t}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(i.element[0],arguments)},n=e("",a).appendTo(i.uiButtonSet),e.fn.button&&n.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,n){e(this).addClass("ui-dialog-dragging"),i._trigger("dragStart",a,t(n))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(n,s){a.position=[s.position.left-i.document.scrollLeft(),s.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._trigger("dragStop",n,t(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(i){function a(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}i=i===t?this.options.resizable:i;var n=this,s=this.options,r=this.uiDialog.css("position"),o="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,i){e(this).addClass("ui-dialog-resizing"),n._trigger("resizeStart",t,a(i))},resize:function(e,t){n._trigger("resize",e,a(t))},stop:function(t,i){e(this).removeClass("ui-dialog-resizing"),s.height=e(this).height(),s.width=e(this).width(),n._trigger("resizeStop",t,a(i)),e.ui.dialog.overlay.resize()}}).css("position",r).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var i,a=[],n=[0,0];t?(("string"==typeof t||"object"==typeof t&&"0"in t)&&(a=t.split?t.split(" "):[t[0],t[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(n[e]=a[e],a[e]=t)}),t={my:a[0]+(0>n[0]?n[0]:"+"+n[0])+" "+a[1]+(0>n[1]?n[1]:"+"+n[1]),at:a.join(" ")}),t=e.extend({},e.ui.dialog.prototype.options.position,t)):t=e.ui.dialog.prototype.options.position,i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var i=this,s={},r=!1;e.each(t,function(e,t){i._setOption(e,t),e in a&&(r=!0),e in n&&(s[e]=t)}),r&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,a){var n,s,r=this.uiDialog;switch(t){case"buttons":this._createButtons(a);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+a);break;case"dialogClass":r.removeClass(this.options.dialogClass).addClass(i+a);break;case"disabled":a?r.addClass("ui-dialog-disabled"):r.removeClass("ui-dialog-disabled");break;case"draggable":n=r.is(":data(draggable)"),n&&!a&&r.draggable("destroy"),!n&&a&&this._makeDraggable();break;case"position":this._position(a);break;case"resizable":s=r.is(":data(resizable)"),s&&!a&&r.resizable("destroy"),s&&"string"==typeof a&&r.resizable("option","handles",a),s||a===!1||this._makeResizable(a);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(a||" "))}this._super(t,a)},_size:function(){var t,i,a,n=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),i=Math.max(0,n.minHeight-t),"auto"===n.height?e.support.minHeight?this.element.css({minHeight:i,height:"auto"}):(this.uiDialog.show(),a=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(a,i))):this.element.height(Math.max(n.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(i){0===this.instances.length&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(i){return e(i.target).zIndex()").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(t){var n=e.ui.dialog.overlay.instances;0!==n.length&&n[n.length-1]===a&&i.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(i.close(t),t.preventDefault())}),a.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&a.bgiframe(),this.instances.push(a),a},destroy:function(t){var i=e.inArray(t,this.instances),a=0;-1!==i&&this.oldInstances.push(this.instances.splice(i,1)[0]),0===this.instances.length&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){a=Math.max(a,this.css("z-index"))}),this.maxZ=a},height:function(){var t,i;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),i=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),i>t?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,i;return e.ui.ie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),i>t?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(e){var t=!1;e.widget("ui.menu",{version:"1.9.2",defaultElement:"
                    ",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(i){var s=e(i.target).closest(".ui-menu-item");!t&&s.not(".ui-state-disabled").length&&(t=!0,this.select(i),s.has(".ui-menu").length?this.expand(i):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(i){e(i.target).closest(".ui-menu").length||this.collapseAll(i),t=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(e(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(t.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(e(this).children("a").text())})),s.length?(this.focus(t,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),s=t.prev("a"),n=e("").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",s.attr("id"))}),t=s.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(t),undefined)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(t),undefined)},_hasScroll:function(){return this.element.outerHeight()
                  ").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this._value():(this._setOption("value",t),this)},_setOption:function(t,e){"value"===t&&(this.options.value=e,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(t,e)},_value:function(){var t=this.options.value;return"number"!=typeof t&&(t=0),Math.min(this.options.max,Math.max(this.min,t))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var t=this.value(),e=this._percentage();this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),this.valueDiv.toggle(t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(e.toFixed(0)+"%"),this.element.attr("aria-valuenow",t)}})})(jQuery);(function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var i,s,n=this.options,a=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="",r=[];for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(n.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),n.range&&(n.range===!0&&(n.values||(n.values=[this._valueMin(),this._valueMin()]),n.values.length&&2!==n.values.length&&(n.values=[n.values[0],n.values[0]])),this.range=e("
                  ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===n.range||"max"===n.range?" ui-slider-range-"+n.range:""))),s=n.values&&n.values.length||1,i=a.length;s>i;i++)r.push(o);this.handles=a.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).mouseenter(function(){n.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")}).focus(function(){n.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)}),this._on(this.handles,{keydown:function(i){var s,n,a,o,r=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case e.ui.keyCode.HOME:a=this._valueMin();break;case e.ui.keyCode.END:a=this._valueMax();break;case e.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));n>i&&(n=i,a=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,a=e(this.handles[o])),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:t.pageX-l.left-a.width()/2,top:t.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i,!0))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch(e.isArray(this.options.values)&&(n=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"disabled":i?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.9.2",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._spin((t||1)*this.options.step)},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._spin((t||1)*-this.options.step)},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&t.href.replace(a,"")===location.href.replace(a,"").replace(/\s/g,"%20")}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var i=this,s=this.options,n=s.active,a=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",s.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),null===n&&(a&&this.tabs.each(function(i,s){return t(s).attr("aria-controls")===a?(n=i,!1):e}),null===n&&(n=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===n||-1===n)&&(n=this.tabs.length?0:!1)),n!==!1&&(n=this.tabs.index(this.tabs.eq(n)),-1===n&&(n=s.collapsible?!1:0)),s.active=n,!s.collapsible&&s.active===!1&&this.anchors.length&&(s.active=0),t.isArray(s.disabled)&&(s.disabled=t.unique(s.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return i.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(this.options.active):t(),this._refresh(),this.active.length&&this.load(s.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("
                  ").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s,n=this.element.parent();"fill"===e?(t.support.minHeight||(s=n.css("overflow"),n.css("overflow","hidden")),i=n.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),s&&n.css("overflow",s),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&(t.ui.tabs.prototype._ui=function(t,e){return{tab:t,panel:e,index:this.anchors.index(t)}},t.widget("ui.tabs",t.ui.tabs,{url:function(t,e){this.anchors.eq(t).attr("href",e)}}),t.widget("ui.tabs",t.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var i=this;this._on({tabsbeforeload:function(s,n){return t.data(n.tab[0],"cache.tabs")?(s.preventDefault(),e):(n.jqXHR.success(function(){i.options.cache&&t.data(n.tab[0],"cache.tabs",!0)}),e)}})},_ajaxSettings:function(e,i,s){var n=this.options.ajaxOptions;return t.extend({},n,{error:function(t,e){try{n.error(t,e,s.tab.closest("li").index(),s.tab[0])}catch(i){}}},this._superApply(arguments))},_setOption:function(t,e){"cache"===t&&e===!1&&this.anchors.removeData("cache.tabs"),this._super(t,e)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(t){this.anchors.eq(t).removeData("cache.tabs"),this._superApply(arguments)}}),t.widget("ui.tabs",t.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),t.widget("ui.tabs",t.ui.tabs,{options:{spinner:"Loading…"},_create:function(){this._super(),this._on({tabsbeforeload:function(t,e){if(t.target===this.element[0]&&this.options.spinner){var i=e.tab.find("span"),s=i.html();i.html(this.options.spinner),e.jqXHR.complete(function(){i.html(s)})}}})}}),t.widget("ui.tabs",t.ui.tabs,{options:{enable:null,disable:null},enable:function(e){var i,s=this.options;(e&&s.disabled===!0||t.isArray(s.disabled)&&-1!==t.inArray(e,s.disabled))&&(i=!0),this._superApply(arguments),i&&this._trigger("enable",null,this._ui(this.anchors[e],this.panels[e]))},disable:function(e){var i,s=this.options;(e&&s.disabled===!1||t.isArray(s.disabled)&&-1===t.inArray(e,s.disabled))&&(i=!0),this._superApply(arguments),i&&this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}}),t.widget("ui.tabs",t.ui.tabs,{options:{add:null,remove:null,tabTemplate:"
                • #{label}
                • "},add:function(i,s,n){n===e&&(n=this.anchors.length);var a,o,r=this.options,h=t(r.tabTemplate.replace(/#\{href\}/g,i).replace(/#\{label\}/g,s)),l=i.indexOf("#")?this._tabId(h):i.replace("#","");return h.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),h.attr("aria-controls",l),a=n>=this.tabs.length,o=this.element.find("#"+l),o.length||(o=this._createPanel(l),a?n>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[n])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),a?h.appendTo(this.tablist):h.insertBefore(this.tabs[n]),r.disabled=t.map(r.disabled,function(t){return t>=n?++t:t}),this.refresh(),1===this.tabs.length&&r.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[n],this.panels[n])),this},remove:function(e){e=this._getIndex(e);var i=this.options,s=this.tabs.eq(e).remove(),n=this._getPanelForTab(s).remove();return s.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(e+(this.anchors.length>e+1?1:-1)),i.disabled=t.map(t.grep(i.disabled,function(t){return t!==e}),function(t){return t>=e?--t:t}),this.refresh(),this._trigger("remove",null,this._ui(s.find("a")[0],n[0])),this}}),t.widget("ui.tabs",t.ui.tabs,{length:function(){return this.anchors.length}}),t.widget("ui.tabs",t.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(e){var s=e.is("li")?e.find("a[href]"):e;return s=s[0],t(s).closest("li").attr("aria-controls")||s.title&&s.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),t.widget("ui.tabs",t.ui.tabs,{options:{panelTemplate:"
                  "},_createPanel:function(e){return t(this.options.panelTemplate).attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),t.widget("ui.tabs",t.ui.tabs,{_create:function(){var t=this.options;null===t.active&&t.selected!==e&&(t.active=-1===t.selected?!1:t.selected),this._super(),t.selected=t.active,t.selected===!1&&(t.selected=-1)},_setOption:function(t,e){if("selected"!==t)return this._super(t,e);var i=this.options;this._super("active",-1===e?!1:e),i.selected=i.active,i.selected===!1&&(i.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),t.widget("ui.tabs",t.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(t,e,i){var s,n,a=this._superApply(arguments);return a?("beforeActivate"===t?(s=i.newTab.length?i.newTab:i.oldTab,n=i.newPanel.length?i.newPanel:i.oldPanel,a=this._super("select",e,{tab:s.find(".ui-tabs-anchor")[0],panel:n[0],index:s.closest("li").index()})):"activate"===t&&i.newTab.length&&(a=this._super("show",e,{tab:i.newTab.find(".ui-tabs-anchor")[0],panel:i.newPanel[0],index:i.newTab.closest("li").index()})),a):!1}}),t.widget("ui.tabs",t.ui.tabs,{select:function(t){if(t=this._getIndex(t),-1===t){if(!this.options.collapsible||-1===this.options.selected)return;t=this.options.selected}this.anchors.eq(t).trigger(this.options.event+this.eventNamespace)}}),function(){var e=0;t.widget("ui.tabs",t.ui.tabs,{options:{cookie:null},_create:function(){var t,e=this.options;null==e.active&&e.cookie&&(t=parseInt(this._cookie(),10),-1===t&&(t=!1),e.active=t),this._super()},_cookie:function(i){var s=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++e)];return arguments.length&&(s.push(i===!1?-1:i),s.push(this.options.cookie)),t.cookie.apply(null,s)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),t.widget("ui.tabs",t.ui.tabs,{_trigger:function(e,i,s){var n=t.extend({},s);return"load"===e&&(n.panel=n.panel[0],n.tab=n.tab.find(".ui-tabs-anchor")[0]),this._super(e,i,n)}}),t.widget("ui.tabs",t.ui.tabs,{options:{fx:null},_getFx:function(){var e,i,s=this.options.fx;return s&&(t.isArray(s)?(e=s[0],i=s[1]):e=i=s),s?{show:i,hide:e}:null},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&h.show?o.animate(h.show,h.show.duration,function(){s()}):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel,h=this._getFx();return h?(a.running=!0,r.length&&h.hide?r.animate(h.hide,h.hide.duration,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),e):this._super(t,i)}}))})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return t(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).andSelf().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("
                  ").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("
                  ").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),t.fn.bgiframe&&n.bgiframe(),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);jQuery.effects||function(t,e){var i=t.uiBackCompat!==!1,s="ui-effects-";t.effects={effect:{}},function(e,i){function s(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function n(t){var s=h(),n=s._rgba=[];return t=t.toLowerCase(),g(c,function(e,a){var o,r=a.re.exec(t),l=r&&a.parse(r),c=a.space||"rgba";return l?(o=s[c](l),s[d[c].cache]=o[d[c].cache],n=s._rgba=o._rgba,!1):i}),n.length?("0,0,0,0"===n.join()&&e.extend(n,o.transparent),s):o[t]}function a(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),l=/^([\-+])=\s*(\d+\.?\d*)/,c=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},d={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},p=h.support={},f=e("

                  ")[0],g=e.each;f.style.cssText="background-color:rgba(1,1,1,.5)",p.rgba=f.style.backgroundColor.indexOf("rgba")>-1,g(d,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=e.extend(h.prototype,{parse:function(a,r,l,c){if(a===i)return this._rgba=[null,null,null,null],this;(a.jquery||a.nodeType)&&(a=e(a).css(r),r=i);var u=this,p=e.type(a),f=this._rgba=[];return r!==i&&(a=[a,r,l,c],p="array"),"string"===p?this.parse(n(a)||o._default):"array"===p?(g(d.rgba.props,function(t,e){f[e.idx]=s(a[e.idx],e)}),this):"object"===p?(a instanceof h?g(d,function(t,e){a[e.cache]&&(u[e.cache]=a[e.cache].slice())}):g(d,function(e,i){var n=i.cache;g(i.props,function(t,e){if(!u[n]&&i.to){if("alpha"===t||null==a[t])return;u[n]=i.to(u._rgba)}u[n][e.idx]=s(a[t],e,!0)}),u[n]&&0>t.inArray(null,u[n].slice(0,3))&&(u[n][3]=1,i.from&&(u._rgba=i.from(u[n])))}),this):i},is:function(t){var e=h(t),s=!0,n=this;return g(d,function(t,a){var o,r=e[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],g(a.props,function(t,e){return null!=r[e.idx]?s=r[e.idx]===o[e.idx]:i})),s}),s},_space:function(){var t=[],e=this;return g(d,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var i=h(t),n=i._space(),a=d[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return i=i[a.cache],g(a.props,function(t,n){var a=n.idx,o=r[a],c=i[a],h=u[n.type]||{};null!==c&&(null===o?l[a]=c:(h.mod&&(c-o>h.mod/2?o+=h.mod:o-c>h.mod/2&&(o-=h.mod)),l[a]=s((c-o)*e+o,n)))}),this[n](l)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(t)._rgba;return h(e.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,d.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),c=r-l,h=r+l,d=.5*h;return e=l===r?0:s===r?60*(n-a)/c+360:n===r?60*(a-s)/c+120:60*(s-n)/c+240,i=0===d||1===d?d:.5>=d?c/h:c/(2-h),[Math.round(e)%360,i,d,null==o?1:o]},d.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*a(r,o,e+1/3)),Math.round(255*a(r,o,e)),Math.round(255*a(r,o,e-1/3)),n]},g(d,function(t,n){var a=n.props,o=n.cache,r=n.to,c=n.from;h.fn[t]=function(t){if(r&&!this[o]&&(this[o]=r(this._rgba)),t===i)return this[o].slice();var n,l=e.type(t),d="array"===l||"object"===l?t:arguments,u=this[o].slice();return g(a,function(t,e){var i=d["object"===l?t:e.idx];null==i&&(i=u[e.idx]),u[e.idx]=s(i,e)}),c?(n=h(c(u)),n[o]=u,n):h(u)},g(a,function(i,s){h.fn[i]||(h.fn[i]=function(n){var a,o=e.type(n),r="alpha"===i?this._hsla?"hsla":"rgba":t,c=this[r](),h=c[s.idx];return"undefined"===o?h:("function"===o&&(n=n.call(this,h),o=e.type(n)),null==n&&s.empty?this:("string"===o&&(a=l.exec(n),a&&(n=h+parseFloat(a[2])*("+"===a[1]?1:-1))),c[s.idx]=n,this[r](c)))})})}),g(r,function(t,i){e.cssHooks[i]={set:function(t,s){var a,o,r="";if("string"!==e.type(s)||(a=n(s))){if(s=h(a||s),!p.rgba&&1!==s._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(l){}s=s.blend(r&&"transparent"!==r?r:"_default")}s=s.toRgbaString()}try{t.style[i]=s}catch(c){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=h(t.elem,i),t.end=h(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}}),e.cssHooks.borderColor={expand:function(t){var e={};return g(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var e,i,s=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)e=s[i],"string"==typeof s[e]&&(n[t.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",c=l.children?o.find("*").andSelf():o;c=c.map(function(){var e=t(this);return{el:e,start:i.call(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),c=c.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),c=c.map(function(){var e=this,i=t.Deferred(),s=jQuery.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,c.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({_addClass:t.fn.addClass,addClass:function(e,i,s,n){return i?t.effects.animateClass.call(this,{add:e},i,s,n):this._addClass(e)},_removeClass:t.fn.removeClass,removeClass:function(e,i,s,n){return i?t.effects.animateClass.call(this,{remove:e},i,s,n):this._removeClass(e)},_toggleClass:t.fn.toggleClass,toggleClass:function(i,s,n,a,o){return"boolean"==typeof s||s===e?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):this._toggleClass(i,s):t.effects.animateClass.call(this,{toggle:i},s,n,a)},switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function n(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function a(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?!1:i&&t.effects[e]?!1:!0}t.extend(t.effects,{version:"1.9.2",save:function(t,e){for(var i=0;e.length>i;i++)null!==e[i]&&t.data(s+e[i],t[0].style[e[i]])},restore:function(t,i){var n,a;for(a=0;i.length>a;a++)null!==i[a]&&(n=t.data(s+i[a]),n===e&&(n=""),t.css(i[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("

                  ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function i(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=s.complete,o=s.mode;(n.is(":hidden")?"hide"===o:"show"===o)?i():r.call(n[0],s,i)}var s=n.apply(this,arguments),a=s.mode,o=s.queue,r=t.effects.effect[s.effect],l=!r&&i&&t.effects[s.effect];return t.fx.off||!r&&!l?a?this[a](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):r?o===!1?this.each(e):this.queue(o||"fx",e):l.call(this,{options:s,duration:s.duration,callback:s.complete,mode:s.mode})},_show:t.fn.show,show:function(t){if(a(t))return this._show.apply(this,arguments);var e=n.apply(this,arguments);return e.mode="show",this.effect.call(this,e)},_hide:t.fn.hide,hide:function(t){if(a(t))return this._hide.apply(this,arguments);var e=n.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)},__toggle:t.fn.toggle,toggle:function(e){if(a(e)||"boolean"==typeof e||t.isFunction(e))return this.__toggle.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)},cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),d=s.direction||"up",u=e.test(d),p=u?"height":"width",f=u?"top":"left",g=i.test(d),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(u?"bottom":"right",0).css(u?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,d=e.direction||"up",u=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===d||"down"===d?"top":"left",_="up"===d||"left"===d,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),u||(u=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-u:2*u).animate(a,g,m)),h&&(u/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+u,o.animate(n,g,m).animate(a,g,m),u=h?2*u:u/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+u,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",d="vertical"===c,u=d?"height":"width",p=d?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[u](),h&&(n.css(u,0),n.css(p,a/2)),f[u]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(e){e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,l=t.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),d[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})}})(jQuery);(function(e){e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*u&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,u=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/u),_=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(l=m.top+a*_,c=a-(d-1)/2,o=0;u>o;o++)r=m.left+o*v,h=o-(u-1)/2,p.clone().appendTo("body").wrap("
                  ").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},t.duration||500,t.easing,s)}})(jQuery);(function(e){e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}})(jQuery);(function(e){e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),l="show"===r,h="hide"===r,c=t.size||15,d=/([0-9]+)%/.exec(c),u=!!t.horizFirst,p=l!==u,f=p?["width","height"]:["height","width"],g=t.duration/2,m={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(c=parseInt(d[1],10)/100*n[h?0:1]),l&&s.css(u?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,t.easing).animate(v,g,t.easing,function(){h&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})}})(jQuery);(function(e){e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})}})(jQuery);(function(e){e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(t.times||5)+(l?1:0),c=t.duration/h,d=0,u=n.queue(),p=u.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;h>s;s++)n.animate({opacity:d},c,t.easing),d=1-d;n.animate({opacity:d},c,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&u.splice.apply(u,[1,0].concat(u.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.y,o.from),o.to=t.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.x,o.from),o.to=t.effects.setTransition(o,u,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(d=d.concat(["marginTop","marginBottom"]).concat(c),u=u.concat(["marginLeft","marginRight"]),h=r.concat(d).concat(u),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,d,a.from.y,i.from),i.to=t.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,u,a.from.x,i.from),i.to=t.effects.setTransition(i,u,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,d=Math.round(e.duration/c),u="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[u]=(p?"-=":"+=")+l,g[u]=(p?"+=":"-=")+2*l,m[u]=(p?"-=":"+=")+2*l,n.animate(f,d,e.easing),s=1;h>s;s++)n.animate(g,d,e.easing).animate(m,d,e.easing);n.animate(g,d,e.easing).animate(f,d/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(e){e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,l=t.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===h?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),d[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})}})(jQuery);(function(e){e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),u=e('
                  ').appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,t.duration,t.easing,function(){u.remove(),i()})}})(jQuery); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/test/resources/jquery.js b/js/vendor/jquery-timepicker/test/resources/jquery.js new file mode 100644 index 000000000..9d23a952f --- /dev/null +++ b/js/vendor/jquery-timepicker/test/resources/jquery.js @@ -0,0 +1,24 @@ +(function() { + + var parts = document.location.search.slice( 1 ).split( "&" ), + length = parts.length, + file = "http://code.jquery.com/jquery-git.js", + version = "2.1.1", + current, + i = 0; + + for ( ; i < length; i++ ) { + current = parts[ i ].split( "=" ); + if ( current[ 0 ] === "jquery" ) { + version = current[ 1 ]; + break; + } + } + + if (version != "git") { + file = "resources/jquery/jquery-" + version + ".min.js"; + } + + document.write( "" ); + +})(); diff --git a/js/vendor/jquery-timepicker/test/resources/jquery.simulate.js b/js/vendor/jquery-timepicker/test/resources/jquery.simulate.js new file mode 100644 index 000000000..816900def --- /dev/null +++ b/js/vendor/jquery-timepicker/test/resources/jquery.simulate.js @@ -0,0 +1,312 @@ + /*! + * jQuery Simulate v@VERSION - simulate browser mouse and keyboard events + * https://github.com/jquery/jquery-simulate + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: @DATE + */ + +;(function( $, undefined ) { + +var rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/; + +$.fn.simulate = function( type, options ) { + return this.each(function() { + new $.simulate( this, type, options ); + }); +}; + +$.simulate = function( elem, type, options ) { + var method = $.camelCase( "simulate-" + type ); + + this.target = elem; + this.options = options; + + if ( this[ method ] ) { + this[ method ](); + } else { + this.simulateEvent( elem, type, options ); + } +}; + +$.extend( $.simulate, { + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + }, + + buttonCode: { + LEFT: 0, + MIDDLE: 1, + RIGHT: 2 + } +}); + +$.extend( $.simulate.prototype, { + + simulateEvent: function( elem, type, options ) { + var event = this.createEvent( type, options ); + this.dispatchEvent( elem, type, event, options ); + }, + + createEvent: function( type, options ) { + if ( rkeyEvent.test( type ) ) { + return this.keyEvent( type, options ); + } + + if ( rmouseEvent.test( type ) ) { + return this.mouseEvent( type, options ); + } + }, + + mouseEvent: function( type, options ) { + var event, eventDoc, doc, body; + options = $.extend({ + bubbles: true, + cancelable: (type !== "mousemove"), + view: window, + detail: 0, + screenX: 0, + screenY: 0, + clientX: 1, + clientY: 1, + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false, + button: 0, + relatedTarget: undefined + }, options ); + + if ( document.createEvent ) { + event = document.createEvent( "MouseEvents" ); + event.initMouseEvent( type, options.bubbles, options.cancelable, + options.view, options.detail, + options.screenX, options.screenY, options.clientX, options.clientY, + options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, + options.button, options.relatedTarget || document.body.parentNode ); + + // IE 9+ creates events with pageX and pageY set to 0. + // Trying to modify the properties throws an error, + // so we define getters to return the correct values. + if ( event.pageX === 0 && event.pageY === 0 && Object.defineProperty ) { + eventDoc = event.relatedTarget.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + Object.defineProperty( event, "pageX", { + get: function() { + return options.clientX + + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - + ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + } + }); + Object.defineProperty( event, "pageY", { + get: function() { + return options.clientY + + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - + ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + }); + } + } else if ( document.createEventObject ) { + event = document.createEventObject(); + $.extend( event, options ); + // standards event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ff974877(v=vs.85).aspx + // old IE event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ms533544(v=vs.85).aspx + // so we actually need to map the standard back to oldIE + event.button = { + 0: 1, + 1: 4, + 2: 2 + }[ event.button ] || event.button; + } + + return event; + }, + + keyEvent: function( type, options ) { + var event; + options = $.extend({ + bubbles: true, + cancelable: true, + view: window, + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false, + keyCode: 0, + charCode: undefined + }, options ); + + if ( document.createEvent ) { + try { + event = document.createEvent( "KeyEvents" ); + event.initKeyEvent( type, options.bubbles, options.cancelable, options.view, + options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, + options.keyCode, options.charCode ); + // initKeyEvent throws an exception in WebKit + // see: http://stackoverflow.com/questions/6406784/initkeyevent-keypress-only-works-in-firefox-need-a-cross-browser-solution + // and also https://bugs.webkit.org/show_bug.cgi?id=13368 + // fall back to a generic event until we decide to implement initKeyboardEvent + } catch( err ) { + event = document.createEvent( "Events" ); + event.initEvent( type, options.bubbles, options.cancelable ); + $.extend( event, { + view: options.view, + ctrlKey: options.ctrlKey, + altKey: options.altKey, + shiftKey: options.shiftKey, + metaKey: options.metaKey, + keyCode: options.keyCode, + charCode: options.charCode + }); + } + } else if ( document.createEventObject ) { + event = document.createEventObject(); + $.extend( event, options ); + } + + if ( !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ) || (({}).toString.call( window.opera ) === "[object Opera]") ) { + event.keyCode = (options.charCode > 0) ? options.charCode : options.keyCode; + event.charCode = undefined; + } + + return event; + }, + + dispatchEvent: function( elem, type, event ) { + if ( elem.dispatchEvent ) { + elem.dispatchEvent( event ); + } else if ( elem.fireEvent ) { + elem.fireEvent( "on" + type, event ); + } + }, + + simulateFocus: function() { + var focusinEvent, + triggered = false, + element = $( this.target ); + + function trigger() { + triggered = true; + } + + element.bind( "focus", trigger ); + element[ 0 ].focus(); + + if ( !triggered ) { + focusinEvent = $.Event( "focusin" ); + focusinEvent.preventDefault(); + element.trigger( focusinEvent ); + element.triggerHandler( "focus" ); + } + element.unbind( "focus", trigger ); + }, + + simulateBlur: function() { + var focusoutEvent, + triggered = false, + element = $( this.target ); + + function trigger() { + triggered = true; + } + + element.bind( "blur", trigger ); + element[ 0 ].blur(); + + // blur events are async in IE + setTimeout(function() { + // IE won't let the blur occur if the window is inactive + if ( element[ 0 ].ownerDocument.activeElement === element[ 0 ] ) { + element[ 0 ].ownerDocument.body.focus(); + } + + // Firefox won't trigger events if the window is inactive + // IE doesn't trigger events if we had to manually focus the body + if ( !triggered ) { + focusoutEvent = $.Event( "focusout" ); + focusoutEvent.preventDefault(); + element.trigger( focusoutEvent ); + element.triggerHandler( "blur" ); + } + element.unbind( "blur", trigger ); + }, 1 ); + } +}); + + + +/** complex events **/ + +function findCenter( elem ) { + var offset, + document = $( elem.ownerDocument ); + elem = $( elem ); + offset = elem.offset(); + + return { + x: offset.left + elem.outerWidth() / 2 - document.scrollLeft(), + y: offset.top + elem.outerHeight() / 2 - document.scrollTop() + }; +} + +$.extend( $.simulate.prototype, { + simulateDrag: function() { + var i = 0, + target = this.target, + options = this.options, + center = findCenter( target ), + x = Math.floor( center.x ), + y = Math.floor( center.y ), + dx = options.dx || 0, + dy = options.dy || 0, + moves = options.moves || 3, + coord = { clientX: x, clientY: y }; + + this.simulateEvent( target, "mousedown", coord ); + + for ( ; i < moves ; i++ ) { + x += dx / moves; + y += dy / moves; + + coord = { + clientX: Math.round( x ), + clientY: Math.round( y ) + }; + + this.simulateEvent( document, "mousemove", coord ); + } + + this.simulateEvent( target, "mouseup", coord ); + this.simulateEvent( target, "click", coord ); + } +}); + +})( jQuery ); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.1.min.js b/js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.1.min.js new file mode 100644 index 000000000..e407e7699 --- /dev/null +++ b/js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.1.min.js @@ -0,0 +1,6 @@ +/*! jQuery v1.10.1 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery-1.10.1.min.map +*/ +(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.1",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=lt(),k=lt(),E=lt(),S=!1,A=function(){return 0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=bt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+xt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return At(e.replace(z,"$1"),t,n,i)}function st(e){return K.test(e+"")}function lt(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function ut(e){return e[b]=!0,e}function ct(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function pt(e,t,n){e=e.split("|");var r,i=e.length,a=n?null:t;while(i--)(r=o.attrHandle[e[i]])&&r!==t||(o.attrHandle[e[i]]=a)}function ft(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:e[t]===!0?t.toLowerCase():null}function dt(e,t){return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function ht(e){return"input"===e.nodeName.toLowerCase()?e.defaultValue:t}function gt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function mt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function yt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function vt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.parentWindow;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.frameElement&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ct(function(e){return e.innerHTML="",pt("type|href|height|width",dt,"#"===e.firstChild.getAttribute("href")),pt(B,ft,null==e.getAttribute("disabled")),e.className="i",!e.getAttribute("className")}),r.input=ct(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}),pt("value",ht,r.attributes&&r.input),r.getElementsByTagName=ct(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ct(function(e){return e.innerHTML="
                  ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ct(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=st(n.querySelectorAll))&&(ct(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ct(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=st(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ct(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=st(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},r.sortDetached=ct(function(e){return 1&e.compareDocumentPosition(n.createElement("div"))}),A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return gt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?gt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:ut,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=bt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?ut(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ut(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?ut(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ut(function(e){return function(t){return at(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:ut(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:vt(function(){return[0]}),last:vt(function(e,t){return[t-1]}),eq:vt(function(e,t,n){return[0>n?n+t:n]}),even:vt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:vt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:vt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:vt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=mt(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=yt(n);function bt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function xt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function wt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function Tt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ct(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function Nt(e,t,n,r,i,o){return r&&!r[b]&&(r=Nt(r)),i&&!i[b]&&(i=Nt(i,o)),ut(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||St(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:Ct(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=Ct(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=Ct(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function kt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=wt(function(e){return e===t},s,!0),p=wt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[wt(Tt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return Nt(l>1&&Tt(f),l>1&&xt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&kt(e.slice(l,r)),i>r&&kt(e=e.slice(r)),i>r&&xt(e))}f.push(n)}return Tt(f)}function Et(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=Ct(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?ut(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=bt(e)),n=t.length;while(n--)o=kt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Et(i,r))}return o};function St(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function At(e,t,n,i){var a,s,u,c,p,f=bt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&xt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}o.pseudos.nth=o.pseudos.eq;function jt(){}jt.prototype=o.filters=o.pseudos,o.setFilters=new jt,r.sortStable=b.split("").sort(A).join("")===b,p(),[0,0].sort(A),r.detectDuplicates=S,x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!u||(n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
                  a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
                  t
                  ",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
                  ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null) +}),n=s=l=u=r=o=null,t}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=x(this),l=t,u=e.match(T)||[];while(o=u[a++])l=r?l:!s.hasClass(o),s[l?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
                  ","
                  "],area:[1,"",""],param:[1,"",""],thead:[1,"","
                  "],tr:[2,"","
                  "],col:[2,"","
                  "],td:[3,"","
                  "],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
                  ","
                  "]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); +u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("' : ''); - inst._keyEvent = false; - return html; - }, - - /* Generate the month and year header. */ - _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, - secondary, monthNames, monthNamesShort) { - var changeMonth = this._get(inst, 'changeMonth'); - var changeYear = this._get(inst, 'changeYear'); - var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); - var html = '
                  '; - var monthHtml = ''; - // month selection - if (secondary || !changeMonth) - monthHtml += '' + monthNames[drawMonth] + ''; - else { - var inMinYear = (minDate && minDate.getFullYear() == drawYear); - var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); - monthHtml += ''; - } - if (!showMonthAfterYear) - html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : ''); - // year selection - if ( !inst.yearshtml ) { - inst.yearshtml = ''; - if (secondary || !changeYear) - html += '' + drawYear + ''; - else { - // determine range of years to display - var years = this._get(inst, 'yearRange').split(':'); - var thisYear = new Date().getFullYear(); - var determineYear = function(value) { - var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) : - (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) : - parseInt(value, 10))); - return (isNaN(year) ? thisYear : year); - }; - var year = determineYear(years[0]); - var endYear = Math.max(year, determineYear(years[1] || '')); - year = (minDate ? Math.max(year, minDate.getFullYear()) : year); - endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); - inst.yearshtml += ''; - - html += inst.yearshtml; - inst.yearshtml = null; - } - } - html += this._get(inst, 'yearSuffix'); - if (showMonthAfterYear) - html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml; - html += '
                  '; // Close datepicker_header - return html; - }, - - /* Adjust one of the date sub-fields. */ - _adjustInstDate: function(inst, offset, period) { - var year = inst.drawYear + (period == 'Y' ? offset : 0); - var month = inst.drawMonth + (period == 'M' ? offset : 0); - var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + - (period == 'D' ? offset : 0); - var date = this._restrictMinMax(inst, - this._daylightSavingAdjust(new Date(year, month, day))); - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - if (period == 'M' || period == 'Y') - this._notifyChange(inst); - }, - - /* Ensure a date is within any min/max bounds. */ - _restrictMinMax: function(inst, date) { - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - var newDate = (minDate && date < minDate ? minDate : date); - newDate = (maxDate && newDate > maxDate ? maxDate : newDate); - return newDate; - }, - - /* Notify change of month/year. */ - _notifyChange: function(inst) { - var onChange = this._get(inst, 'onChangeMonthYear'); - if (onChange) - onChange.apply((inst.input ? inst.input[0] : null), - [inst.selectedYear, inst.selectedMonth + 1, inst]); - }, - - /* Determine the number of months to show. */ - _getNumberOfMonths: function(inst) { - var numMonths = this._get(inst, 'numberOfMonths'); - return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); - }, - - /* Determine the current maximum date - ensure no time components are set. */ - _getMinMaxDate: function(inst, minMax) { - return this._determineDate(inst, this._get(inst, minMax + 'Date'), null); - }, - - /* Find the number of days in a given month. */ - _getDaysInMonth: function(year, month) { - return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); - }, - - /* Find the day of the week of the first of a month. */ - _getFirstDayOfMonth: function(year, month) { - return new Date(year, month, 1).getDay(); - }, - - /* Determines if we should allow a "next/prev" month display change. */ - _canAdjustMonth: function(inst, offset, curYear, curMonth) { - var numMonths = this._getNumberOfMonths(inst); - var date = this._daylightSavingAdjust(new Date(curYear, - curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); - if (offset < 0) - date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); - return this._isInRange(inst, date); - }, - - /* Is the given date in the accepted range? */ - _isInRange: function(inst, date) { - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - return ((!minDate || date.getTime() >= minDate.getTime()) && - (!maxDate || date.getTime() <= maxDate.getTime())); - }, - - /* Provide the configuration settings for formatting/parsing. */ - _getFormatConfig: function(inst) { - var shortYearCutoff = this._get(inst, 'shortYearCutoff'); - shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : - new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); - return {shortYearCutoff: shortYearCutoff, - dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), - monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; - }, - - /* Format the given date for display. */ - _formatDate: function(inst, day, month, year) { - if (!day) { - inst.currentDay = inst.selectedDay; - inst.currentMonth = inst.selectedMonth; - inst.currentYear = inst.selectedYear; - } - var date = (day ? (typeof day == 'object' ? day : - this._daylightSavingAdjust(new Date(year, month, day))) : - this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); - return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); - } -}); - -/* - * Bind hover events for datepicker elements. - * Done via delegate so the binding only occurs once in the lifetime of the parent div. - * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. - */ -function bindHover(dpDiv) { - var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a'; - return dpDiv.delegate(selector, 'mouseout', function() { - $(this).removeClass('ui-state-hover'); - if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover'); - if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover'); - }) - .delegate(selector, 'mouseover', function(){ - if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { - $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); - $(this).addClass('ui-state-hover'); - if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover'); - if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover'); - } - }); -} - -/* jQuery extend now ignores nulls! */ -function extendRemove(target, props) { - $.extend(target, props); - for (var name in props) - if (props[name] == null || props[name] == undefined) - target[name] = props[name]; - return target; -}; - -/* Invoke the datepicker functionality. - @param options string - a command, optionally followed by additional parameters or - Object - settings for attaching new datepicker functionality - @return jQuery object */ -$.fn.datepicker = function(options){ - - /* Verify an empty collection wasn't passed - Fixes #6976 */ - if ( !this.length ) { - return this; - } - - /* Initialise the date picker. */ - if (!$.datepicker.initialized) { - $(document).mousedown($.datepicker._checkExternalClick). - find(document.body).append($.datepicker.dpDiv); - $.datepicker.initialized = true; - } - - var otherArgs = Array.prototype.slice.call(arguments, 1); - if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget')) - return $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this[0]].concat(otherArgs)); - if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') - return $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this[0]].concat(otherArgs)); - return this.each(function() { - typeof options == 'string' ? - $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this].concat(otherArgs)) : - $.datepicker._attachDatepicker(this, options); - }); -}; - -$.datepicker = new Datepicker(); // singleton instance -$.datepicker.initialized = false; -$.datepicker.uuid = new Date().getTime(); -$.datepicker.version = "1.9.2"; - -// Workaround for #4055 -// Add another global to avoid noConflict issues with inline event handlers -window['DP_jQuery_' + dpuuid] = $; - -})(jQuery); -(function( $, undefined ) { - -var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ", - sizeRelatedOptions = { - buttons: true, - height: true, - maxHeight: true, - maxWidth: true, - minHeight: true, - minWidth: true, - width: true - }, - resizableRelatedOptions = { - maxHeight: true, - maxWidth: true, - minHeight: true, - minWidth: true - }; - -$.widget("ui.dialog", { - version: "1.9.2", - options: { - autoOpen: true, - buttons: {}, - closeOnEscape: true, - closeText: "close", - dialogClass: "", - draggable: true, - hide: null, - height: "auto", - maxHeight: false, - maxWidth: false, - minHeight: 150, - minWidth: 150, - modal: false, - position: { - my: "center", - at: "center", - of: window, - collision: "fit", - // ensure that the titlebar is never outside the document - using: function( pos ) { - var topOffset = $( this ).css( pos ).offset().top; - if ( topOffset < 0 ) { - $( this ).css( "top", pos.top - topOffset ); - } - } - }, - resizable: true, - show: null, - stack: true, - title: "", - width: 300, - zIndex: 1000 - }, - - _create: function() { - this.originalTitle = this.element.attr( "title" ); - // #5742 - .attr() might return a DOMElement - if ( typeof this.originalTitle !== "string" ) { - this.originalTitle = ""; - } - this.oldPosition = { - parent: this.element.parent(), - index: this.element.parent().children().index( this.element ) - }; - this.options.title = this.options.title || this.originalTitle; - var that = this, - options = this.options, - - title = options.title || " ", - uiDialog, - uiDialogTitlebar, - uiDialogTitlebarClose, - uiDialogTitle, - uiDialogButtonPane; - - uiDialog = ( this.uiDialog = $( "
                  " ) ) - .addClass( uiDialogClasses + options.dialogClass ) - .css({ - display: "none", - outline: 0, // TODO: move to stylesheet - zIndex: options.zIndex - }) - // setting tabIndex makes the div focusable - .attr( "tabIndex", -1) - .keydown(function( event ) { - if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && - event.keyCode === $.ui.keyCode.ESCAPE ) { - that.close( event ); - event.preventDefault(); - } - }) - .mousedown(function( event ) { - that.moveToTop( false, event ); - }) - .appendTo( "body" ); - - this.element - .show() - .removeAttr( "title" ) - .addClass( "ui-dialog-content ui-widget-content" ) - .appendTo( uiDialog ); - - uiDialogTitlebar = ( this.uiDialogTitlebar = $( "
                  " ) ) - .addClass( "ui-dialog-titlebar ui-widget-header " + - "ui-corner-all ui-helper-clearfix" ) - .bind( "mousedown", function() { - // Dialog isn't getting focus when dragging (#8063) - uiDialog.focus(); - }) - .prependTo( uiDialog ); - - uiDialogTitlebarClose = $( "" ) - .addClass( "ui-dialog-titlebar-close ui-corner-all" ) - .attr( "role", "button" ) - .click(function( event ) { - event.preventDefault(); - that.close( event ); - }) - .appendTo( uiDialogTitlebar ); - - ( this.uiDialogTitlebarCloseText = $( "" ) ) - .addClass( "ui-icon ui-icon-closethick" ) - .text( options.closeText ) - .appendTo( uiDialogTitlebarClose ); - - uiDialogTitle = $( "" ) - .uniqueId() - .addClass( "ui-dialog-title" ) - .html( title ) - .prependTo( uiDialogTitlebar ); - - uiDialogButtonPane = ( this.uiDialogButtonPane = $( "
                  " ) ) - .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); - - ( this.uiButtonSet = $( "
                  " ) ) - .addClass( "ui-dialog-buttonset" ) - .appendTo( uiDialogButtonPane ); - - uiDialog.attr({ - role: "dialog", - "aria-labelledby": uiDialogTitle.attr( "id" ) - }); - - uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection(); - this._hoverable( uiDialogTitlebarClose ); - this._focusable( uiDialogTitlebarClose ); - - if ( options.draggable && $.fn.draggable ) { - this._makeDraggable(); - } - if ( options.resizable && $.fn.resizable ) { - this._makeResizable(); - } - - this._createButtons( options.buttons ); - this._isOpen = false; - - if ( $.fn.bgiframe ) { - uiDialog.bgiframe(); - } - - // prevent tabbing out of modal dialogs - this._on( uiDialog, { keydown: function( event ) { - if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) { - return; - } - - var tabbables = $( ":tabbable", uiDialog ), - first = tabbables.filter( ":first" ), - last = tabbables.filter( ":last" ); - - if ( event.target === last[0] && !event.shiftKey ) { - first.focus( 1 ); - return false; - } else if ( event.target === first[0] && event.shiftKey ) { - last.focus( 1 ); - return false; - } - }}); - }, - - _init: function() { - if ( this.options.autoOpen ) { - this.open(); - } - }, - - _destroy: function() { - var next, - oldPosition = this.oldPosition; - - if ( this.overlay ) { - this.overlay.destroy(); - } - this.uiDialog.hide(); - this.element - .removeClass( "ui-dialog-content ui-widget-content" ) - .hide() - .appendTo( "body" ); - this.uiDialog.remove(); - - if ( this.originalTitle ) { - this.element.attr( "title", this.originalTitle ); - } - - next = oldPosition.parent.children().eq( oldPosition.index ); - // Don't try to place the dialog next to itself (#8613) - if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { - next.before( this.element ); - } else { - oldPosition.parent.append( this.element ); - } - }, - - widget: function() { - return this.uiDialog; - }, - - close: function( event ) { - var that = this, - maxZ, thisZ; - - if ( !this._isOpen ) { - return; - } - - if ( false === this._trigger( "beforeClose", event ) ) { - return; - } - - this._isOpen = false; - - if ( this.overlay ) { - this.overlay.destroy(); - } - - if ( this.options.hide ) { - this._hide( this.uiDialog, this.options.hide, function() { - that._trigger( "close", event ); - }); - } else { - this.uiDialog.hide(); - this._trigger( "close", event ); - } - - $.ui.dialog.overlay.resize(); - - // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) - if ( this.options.modal ) { - maxZ = 0; - $( ".ui-dialog" ).each(function() { - if ( this !== that.uiDialog[0] ) { - thisZ = $( this ).css( "z-index" ); - if ( !isNaN( thisZ ) ) { - maxZ = Math.max( maxZ, thisZ ); - } - } - }); - $.ui.dialog.maxZ = maxZ; - } - - return this; - }, - - isOpen: function() { - return this._isOpen; - }, - - // the force parameter allows us to move modal dialogs to their correct - // position on open - moveToTop: function( force, event ) { - var options = this.options, - saveScroll; - - if ( ( options.modal && !force ) || - ( !options.stack && !options.modal ) ) { - return this._trigger( "focus", event ); - } - - if ( options.zIndex > $.ui.dialog.maxZ ) { - $.ui.dialog.maxZ = options.zIndex; - } - if ( this.overlay ) { - $.ui.dialog.maxZ += 1; - $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ; - this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ ); - } - - // Save and then restore scroll - // Opera 9.5+ resets when parent z-index is changed. - // http://bugs.jqueryui.com/ticket/3193 - saveScroll = { - scrollTop: this.element.scrollTop(), - scrollLeft: this.element.scrollLeft() - }; - $.ui.dialog.maxZ += 1; - this.uiDialog.css( "z-index", $.ui.dialog.maxZ ); - this.element.attr( saveScroll ); - this._trigger( "focus", event ); - - return this; - }, - - open: function() { - if ( this._isOpen ) { - return; - } - - var hasFocus, - options = this.options, - uiDialog = this.uiDialog; - - this._size(); - this._position( options.position ); - uiDialog.show( options.show ); - this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null; - this.moveToTop( true ); - - // set focus to the first tabbable element in the content area or the first button - // if there are no tabbable elements, set focus on the dialog itself - hasFocus = this.element.find( ":tabbable" ); - if ( !hasFocus.length ) { - hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); - if ( !hasFocus.length ) { - hasFocus = uiDialog; - } - } - hasFocus.eq( 0 ).focus(); - - this._isOpen = true; - this._trigger( "open" ); - - return this; - }, - - _createButtons: function( buttons ) { - var that = this, - hasButtons = false; - - // if we already have a button pane, remove it - this.uiDialogButtonPane.remove(); - this.uiButtonSet.empty(); - - if ( typeof buttons === "object" && buttons !== null ) { - $.each( buttons, function() { - return !(hasButtons = true); - }); - } - if ( hasButtons ) { - $.each( buttons, function( name, props ) { - var button, click; - props = $.isFunction( props ) ? - { click: props, text: name } : - props; - // Default to a non-submitting button - props = $.extend( { type: "button" }, props ); - // Change the context for the click callback to be the main element - click = props.click; - props.click = function() { - click.apply( that.element[0], arguments ); - }; - button = $( "", props ) - .appendTo( that.uiButtonSet ); - if ( $.fn.button ) { - button.button(); - } - }); - this.uiDialog.addClass( "ui-dialog-buttons" ); - this.uiDialogButtonPane.appendTo( this.uiDialog ); - } else { - this.uiDialog.removeClass( "ui-dialog-buttons" ); - } - }, - - _makeDraggable: function() { - var that = this, - options = this.options; - - function filteredUi( ui ) { - return { - position: ui.position, - offset: ui.offset - }; - } - - this.uiDialog.draggable({ - cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", - handle: ".ui-dialog-titlebar", - containment: "document", - start: function( event, ui ) { - $( this ) - .addClass( "ui-dialog-dragging" ); - that._trigger( "dragStart", event, filteredUi( ui ) ); - }, - drag: function( event, ui ) { - that._trigger( "drag", event, filteredUi( ui ) ); - }, - stop: function( event, ui ) { - options.position = [ - ui.position.left - that.document.scrollLeft(), - ui.position.top - that.document.scrollTop() - ]; - $( this ) - .removeClass( "ui-dialog-dragging" ); - that._trigger( "dragStop", event, filteredUi( ui ) ); - $.ui.dialog.overlay.resize(); - } - }); - }, - - _makeResizable: function( handles ) { - handles = (handles === undefined ? this.options.resizable : handles); - var that = this, - options = this.options, - // .ui-resizable has position: relative defined in the stylesheet - // but dialogs have to use absolute or fixed positioning - position = this.uiDialog.css( "position" ), - resizeHandles = typeof handles === 'string' ? - handles : - "n,e,s,w,se,sw,ne,nw"; - - function filteredUi( ui ) { - return { - originalPosition: ui.originalPosition, - originalSize: ui.originalSize, - position: ui.position, - size: ui.size - }; - } - - this.uiDialog.resizable({ - cancel: ".ui-dialog-content", - containment: "document", - alsoResize: this.element, - maxWidth: options.maxWidth, - maxHeight: options.maxHeight, - minWidth: options.minWidth, - minHeight: this._minHeight(), - handles: resizeHandles, - start: function( event, ui ) { - $( this ).addClass( "ui-dialog-resizing" ); - that._trigger( "resizeStart", event, filteredUi( ui ) ); - }, - resize: function( event, ui ) { - that._trigger( "resize", event, filteredUi( ui ) ); - }, - stop: function( event, ui ) { - $( this ).removeClass( "ui-dialog-resizing" ); - options.height = $( this ).height(); - options.width = $( this ).width(); - that._trigger( "resizeStop", event, filteredUi( ui ) ); - $.ui.dialog.overlay.resize(); - } - }) - .css( "position", position ) - .find( ".ui-resizable-se" ) - .addClass( "ui-icon ui-icon-grip-diagonal-se" ); - }, - - _minHeight: function() { - var options = this.options; - - if ( options.height === "auto" ) { - return options.minHeight; - } else { - return Math.min( options.minHeight, options.height ); - } - }, - - _position: function( position ) { - var myAt = [], - offset = [ 0, 0 ], - isVisible; - - if ( position ) { - // deep extending converts arrays to objects in jQuery <= 1.3.2 :-( - // if (typeof position == 'string' || $.isArray(position)) { - // myAt = $.isArray(position) ? position : position.split(' '); - - if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) { - myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ]; - if ( myAt.length === 1 ) { - myAt[ 1 ] = myAt[ 0 ]; - } - - $.each( [ "left", "top" ], function( i, offsetPosition ) { - if ( +myAt[ i ] === myAt[ i ] ) { - offset[ i ] = myAt[ i ]; - myAt[ i ] = offsetPosition; - } - }); - - position = { - my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " + - myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]), - at: myAt.join( " " ) - }; - } - - position = $.extend( {}, $.ui.dialog.prototype.options.position, position ); - } else { - position = $.ui.dialog.prototype.options.position; - } - - // need to show the dialog to get the actual offset in the position plugin - isVisible = this.uiDialog.is( ":visible" ); - if ( !isVisible ) { - this.uiDialog.show(); - } - this.uiDialog.position( position ); - if ( !isVisible ) { - this.uiDialog.hide(); - } - }, - - _setOptions: function( options ) { - var that = this, - resizableOptions = {}, - resize = false; - - $.each( options, function( key, value ) { - that._setOption( key, value ); - - if ( key in sizeRelatedOptions ) { - resize = true; - } - if ( key in resizableRelatedOptions ) { - resizableOptions[ key ] = value; - } - }); - - if ( resize ) { - this._size(); - } - if ( this.uiDialog.is( ":data(resizable)" ) ) { - this.uiDialog.resizable( "option", resizableOptions ); - } - }, - - _setOption: function( key, value ) { - var isDraggable, isResizable, - uiDialog = this.uiDialog; - - switch ( key ) { - case "buttons": - this._createButtons( value ); - break; - case "closeText": - // ensure that we always pass a string - this.uiDialogTitlebarCloseText.text( "" + value ); - break; - case "dialogClass": - uiDialog - .removeClass( this.options.dialogClass ) - .addClass( uiDialogClasses + value ); - break; - case "disabled": - if ( value ) { - uiDialog.addClass( "ui-dialog-disabled" ); - } else { - uiDialog.removeClass( "ui-dialog-disabled" ); - } - break; - case "draggable": - isDraggable = uiDialog.is( ":data(draggable)" ); - if ( isDraggable && !value ) { - uiDialog.draggable( "destroy" ); - } - - if ( !isDraggable && value ) { - this._makeDraggable(); - } - break; - case "position": - this._position( value ); - break; - case "resizable": - // currently resizable, becoming non-resizable - isResizable = uiDialog.is( ":data(resizable)" ); - if ( isResizable && !value ) { - uiDialog.resizable( "destroy" ); - } - - // currently resizable, changing handles - if ( isResizable && typeof value === "string" ) { - uiDialog.resizable( "option", "handles", value ); - } - - // currently non-resizable, becoming resizable - if ( !isResizable && value !== false ) { - this._makeResizable( value ); - } - break; - case "title": - // convert whatever was passed in o a string, for html() to not throw up - $( ".ui-dialog-title", this.uiDialogTitlebar ) - .html( "" + ( value || " " ) ); - break; - } - - this._super( key, value ); - }, - - _size: function() { - /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content - * divs will both have width and height set, so we need to reset them - */ - var nonContentHeight, minContentHeight, autoHeight, - options = this.options, - isVisible = this.uiDialog.is( ":visible" ); - - // reset content sizing - this.element.show().css({ - width: "auto", - minHeight: 0, - height: 0 - }); - - if ( options.minWidth > options.width ) { - options.width = options.minWidth; - } - - // reset wrapper sizing - // determine the height of all the non-content elements - nonContentHeight = this.uiDialog.css({ - height: "auto", - width: options.width - }) - .outerHeight(); - minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); - - if ( options.height === "auto" ) { - // only needed for IE6 support - if ( $.support.minHeight ) { - this.element.css({ - minHeight: minContentHeight, - height: "auto" - }); - } else { - this.uiDialog.show(); - autoHeight = this.element.css( "height", "auto" ).height(); - if ( !isVisible ) { - this.uiDialog.hide(); - } - this.element.height( Math.max( autoHeight, minContentHeight ) ); - } - } else { - this.element.height( Math.max( options.height - nonContentHeight, 0 ) ); - } - - if (this.uiDialog.is( ":data(resizable)" ) ) { - this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); - } - } -}); - -$.extend($.ui.dialog, { - uuid: 0, - maxZ: 0, - - getTitleId: function($el) { - var id = $el.attr( "id" ); - if ( !id ) { - this.uuid += 1; - id = this.uuid; - } - return "ui-dialog-title-" + id; - }, - - overlay: function( dialog ) { - this.$el = $.ui.dialog.overlay.create( dialog ); - } -}); - -$.extend( $.ui.dialog.overlay, { - instances: [], - // reuse old instances due to IE memory leak with alpha transparency (see #5185) - oldInstances: [], - maxZ: 0, - events: $.map( - "focus,mousedown,mouseup,keydown,keypress,click".split( "," ), - function( event ) { - return event + ".dialog-overlay"; - } - ).join( " " ), - create: function( dialog ) { - if ( this.instances.length === 0 ) { - // prevent use of anchors and inputs - // we use a setTimeout in case the overlay is created from an - // event that we're going to be cancelling (see #2804) - setTimeout(function() { - // handle $(el).dialog().dialog('close') (see #4065) - if ( $.ui.dialog.overlay.instances.length ) { - $( document ).bind( $.ui.dialog.overlay.events, function( event ) { - // stop events if the z-index of the target is < the z-index of the overlay - // we cannot return true when we don't want to cancel the event (#3523) - if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) { - return false; - } - }); - } - }, 1 ); - - // handle window resize - $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize ); - } - - var $el = ( this.oldInstances.pop() || $( "
                  " ).addClass( "ui-widget-overlay" ) ); - - // allow closing by pressing the escape key - $( document ).bind( "keydown.dialog-overlay", function( event ) { - var instances = $.ui.dialog.overlay.instances; - // only react to the event if we're the top overlay - if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el && - dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && - event.keyCode === $.ui.keyCode.ESCAPE ) { - - dialog.close( event ); - event.preventDefault(); - } - }); - - $el.appendTo( document.body ).css({ - width: this.width(), - height: this.height() - }); - - if ( $.fn.bgiframe ) { - $el.bgiframe(); - } - - this.instances.push( $el ); - return $el; - }, - - destroy: function( $el ) { - var indexOf = $.inArray( $el, this.instances ), - maxZ = 0; - - if ( indexOf !== -1 ) { - this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] ); - } - - if ( this.instances.length === 0 ) { - $( [ document, window ] ).unbind( ".dialog-overlay" ); - } - - $el.height( 0 ).width( 0 ).remove(); - - // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) - $.each( this.instances, function() { - maxZ = Math.max( maxZ, this.css( "z-index" ) ); - }); - this.maxZ = maxZ; - }, - - height: function() { - var scrollHeight, - offsetHeight; - // handle IE - if ( $.ui.ie ) { - scrollHeight = Math.max( - document.documentElement.scrollHeight, - document.body.scrollHeight - ); - offsetHeight = Math.max( - document.documentElement.offsetHeight, - document.body.offsetHeight - ); - - if ( scrollHeight < offsetHeight ) { - return $( window ).height() + "px"; - } else { - return scrollHeight + "px"; - } - // handle "good" browsers - } else { - return $( document ).height() + "px"; - } - }, - - width: function() { - var scrollWidth, - offsetWidth; - // handle IE - if ( $.ui.ie ) { - scrollWidth = Math.max( - document.documentElement.scrollWidth, - document.body.scrollWidth - ); - offsetWidth = Math.max( - document.documentElement.offsetWidth, - document.body.offsetWidth - ); - - if ( scrollWidth < offsetWidth ) { - return $( window ).width() + "px"; - } else { - return scrollWidth + "px"; - } - // handle "good" browsers - } else { - return $( document ).width() + "px"; - } - }, - - resize: function() { - /* If the dialog is draggable and the user drags it past the - * right edge of the window, the document becomes wider so we - * need to stretch the overlay. If the user then drags the - * dialog back to the left, the document will become narrower, - * so we need to shrink the overlay to the appropriate size. - * This is handled by shrinking the overlay before setting it - * to the full document size. - */ - var $overlays = $( [] ); - $.each( $.ui.dialog.overlay.instances, function() { - $overlays = $overlays.add( this ); - }); - - $overlays.css({ - width: 0, - height: 0 - }).css({ - width: $.ui.dialog.overlay.width(), - height: $.ui.dialog.overlay.height() - }); - } -}); - -$.extend( $.ui.dialog.overlay.prototype, { - destroy: function() { - $.ui.dialog.overlay.destroy( this.$el ); - } -}); - -}( jQuery ) ); -(function( $, undefined ) { - -var mouseHandled = false; - -$.widget( "ui.menu", { - version: "1.9.2", - defaultElement: "
                  '+"";for(var W=C?'":"",L=0;7>L;L++){var B=(L+M)%7;W+="=5?' class="ui-datepicker-week-end"':"")+">"+''+I[B]+""}K+=W+"";var U=this._getDaysInMonth(g,p);g==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,U));var Q=(this._getFirstDayOfMonth(g,p)-M+7)%7,z=Math.ceil((Q+U)/7),V=d?this.maxRows>z?this.maxRows:z:z;this.maxRows=V;for(var G=this._daylightSavingAdjust(new Date(g,p,1-Q)),q=0;V>q;q++){K+="";for(var J=C?'":"",L=0;7>L;L++){var X=S?S.apply(e.input?e.input[0]:null,[G]):[!0,""],Z=G.getMonth()!=p,et=Z&&!T||!X[0]||l&&l>G||h&&G>h;J+='",G.setDate(G.getDate()+1),G=this._daylightSavingAdjust(G) -}K+=J+""}p++,p>11&&(p=0,g++),K+="
                  '+this._get(e,"weekHeader")+"
                  '+this._get(e,"calculateWeek")(G)+""+(Z&&!E?" ":et?''+G.getDate()+"":''+G.getDate()+"")+"
                  "+(d?"
                  "+(r[0]>0&&O==r[1]-1?'
                  ':""):""),j+=K}Y+=j}return Y+=w+($.ui.ie6&&!e.inline?'':""),e._keyEvent=!1,Y},_generateMonthYearHeader:function(e,t,i,a,n,s,r,o){var u=this._get(e,"changeMonth"),d=this._get(e,"changeYear"),c=this._get(e,"showMonthAfterYear"),l='
                  ',h="";if(s||!u)h+=''+r[t]+"";else{var p=a&&a.getFullYear()==i,g=n&&n.getFullYear()==i;h+='"}if(c||(l+=h+(!s&&u&&d?"":" ")),!e.yearshtml)if(e.yearshtml="",s||!d)l+=''+i+"";else{var m=this._get(e,"yearRange").split(":"),v=(new Date).getFullYear(),_=function(e){var t=e.match(/c[+-].*/)?i+parseInt(e.substring(1),10):e.match(/[+-].*/)?v+parseInt(e,10):parseInt(e,10);return isNaN(t)?v:t},y=_(m[0]),b=Math.max(y,_(m[1]||""));for(y=a?Math.max(y,a.getFullYear()):y,b=n?Math.min(b,n.getFullYear()):b,e.yearshtml+='",l+=e.yearshtml,e.yearshtml=null}return l+=this._get(e,"yearSuffix"),c&&(l+=(!s&&u&&d?"":" ")+h),l+="
                  "},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"==i?t:0),n=e.drawMonth+("M"==i?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(a,n))+("D"==i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,n,s)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"==i||"Y"==i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return n=a&&n>a?a:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var n=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(i,a+(0>t?t:n[0]*n[1]),1));return 0>t&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max");return(!i||t.getTime()>=i.getTime())&&(!a||t.getTime()<=a.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!=e&&"getDate"!=e&&"widget"!=e?"option"==e&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var i="ui-dialog ui-widget ui-widget-content ui-corner-all ",a={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},n={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),"string"!=typeof this.originalTitle&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var a,n,s,r,o,l=this,u=this.options,d=u.title||" ";a=(this.uiDialog=e("
                  ")).addClass(i+u.dialogClass).css({display:"none",outline:0,zIndex:u.zIndex}).attr("tabIndex",-1).keydown(function(t){u.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(l.close(t),t.preventDefault())}).mousedown(function(e){l.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(a),n=(this.uiDialogTitlebar=e("
                  ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){a.focus()}).prependTo(a),s=e("").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),l.close(e)}).appendTo(n),(this.uiDialogTitlebarCloseText=e("")).addClass("ui-icon ui-icon-closethick").text(u.closeText).appendTo(s),r=e("").uniqueId().addClass("ui-dialog-title").html(d).prependTo(n),o=(this.uiDialogButtonPane=e("
                  ")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("
                  ")).addClass("ui-dialog-buttonset").appendTo(o),a.attr({role:"dialog","aria-labelledby":r.attr("id")}),n.find("*").add(n).disableSelection(),this._hoverable(s),this._focusable(s),u.draggable&&e.fn.draggable&&this._makeDraggable(),u.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(u.buttons),this._isOpen=!1,e.fn.bgiframe&&a.bgiframe(),this._on(a,{keydown:function(i){if(u.modal&&i.keyCode===e.ui.keyCode.TAB){var n=e(":tabbable",a),s=n.filter(":first"),r=n.filter(":last");return i.target!==r[0]||i.shiftKey?i.target===s[0]&&i.shiftKey?(r.focus(1),!1):t:(s.focus(1),!1)}}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var i,a,n=this;if(this._isOpen&&!1!==this._trigger("beforeClose",t))return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(i=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(a=e(this).css("z-index"),isNaN(a)||(i=Math.max(i,a)))}),e.ui.dialog.maxZ=i),this},isOpen:function(){return this._isOpen},moveToTop:function(t,i){var a,n=this.options;return n.modal&&!t||!n.stack&&!n.modal?this._trigger("focus",i):(n.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=n.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),a={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(a),this._trigger("focus",i),this)},open:function(){if(!this._isOpen){var t,i=this.options,a=this.uiDialog;return this._size(),this._position(i.position),a.show(i.show),this.overlay=i.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=a)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this}},_createButtons:function(t){var i=this,a=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),"object"==typeof t&&null!==t&&e.each(t,function(){return!(a=!0)}),a?(e.each(t,function(t,a){var n,s;a=e.isFunction(a)?{click:a,text:t}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(i.element[0],arguments)},n=e("",a).appendTo(i.uiButtonSet),e.fn.button&&n.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,n){e(this).addClass("ui-dialog-dragging"),i._trigger("dragStart",a,t(n))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(n,s){a.position=[s.position.left-i.document.scrollLeft(),s.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._trigger("dragStop",n,t(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(i){function a(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}i=i===t?this.options.resizable:i;var n=this,s=this.options,r=this.uiDialog.css("position"),o="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,i){e(this).addClass("ui-dialog-resizing"),n._trigger("resizeStart",t,a(i))},resize:function(e,t){n._trigger("resize",e,a(t))},stop:function(t,i){e(this).removeClass("ui-dialog-resizing"),s.height=e(this).height(),s.width=e(this).width(),n._trigger("resizeStop",t,a(i)),e.ui.dialog.overlay.resize()}}).css("position",r).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var i,a=[],n=[0,0];t?(("string"==typeof t||"object"==typeof t&&"0"in t)&&(a=t.split?t.split(" "):[t[0],t[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(n[e]=a[e],a[e]=t)}),t={my:a[0]+(0>n[0]?n[0]:"+"+n[0])+" "+a[1]+(0>n[1]?n[1]:"+"+n[1]),at:a.join(" ")}),t=e.extend({},e.ui.dialog.prototype.options.position,t)):t=e.ui.dialog.prototype.options.position,i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var i=this,s={},r=!1;e.each(t,function(e,t){i._setOption(e,t),e in a&&(r=!0),e in n&&(s[e]=t)}),r&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,a){var n,s,r=this.uiDialog;switch(t){case"buttons":this._createButtons(a);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+a);break;case"dialogClass":r.removeClass(this.options.dialogClass).addClass(i+a);break;case"disabled":a?r.addClass("ui-dialog-disabled"):r.removeClass("ui-dialog-disabled");break;case"draggable":n=r.is(":data(draggable)"),n&&!a&&r.draggable("destroy"),!n&&a&&this._makeDraggable();break;case"position":this._position(a);break;case"resizable":s=r.is(":data(resizable)"),s&&!a&&r.resizable("destroy"),s&&"string"==typeof a&&r.resizable("option","handles",a),s||a===!1||this._makeResizable(a);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(a||" "))}this._super(t,a)},_size:function(){var t,i,a,n=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),i=Math.max(0,n.minHeight-t),"auto"===n.height?e.support.minHeight?this.element.css({minHeight:i,height:"auto"}):(this.uiDialog.show(),a=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(a,i))):this.element.height(Math.max(n.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(i){0===this.instances.length&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(i){return e(i.target).zIndex()").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(t){var n=e.ui.dialog.overlay.instances;0!==n.length&&n[n.length-1]===a&&i.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(i.close(t),t.preventDefault())}),a.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&a.bgiframe(),this.instances.push(a),a},destroy:function(t){var i=e.inArray(t,this.instances),a=0;-1!==i&&this.oldInstances.push(this.instances.splice(i,1)[0]),0===this.instances.length&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){a=Math.max(a,this.css("z-index"))}),this.maxZ=a},height:function(){var t,i;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),i=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),i>t?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,i;return e.ui.ie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),i>t?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(e){var t=!1;e.widget("ui.menu",{version:"1.9.2",defaultElement:"
                    ",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(i){var s=e(i.target).closest(".ui-menu-item");!t&&s.not(".ui-state-disabled").length&&(t=!0,this.select(i),s.has(".ui-menu").length?this.expand(i):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(i){e(i.target).closest(".ui-menu").length||this.collapseAll(i),t=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(e(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(t.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(e(this).children("a").text())})),s.length?(this.focus(t,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),s=t.prev("a"),n=e("").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",s.attr("id"))}),t=s.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(t),undefined)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(t),undefined)},_hasScroll:function(){return this.element.outerHeight()
                  ").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this._value():(this._setOption("value",t),this)},_setOption:function(t,e){"value"===t&&(this.options.value=e,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(t,e)},_value:function(){var t=this.options.value;return"number"!=typeof t&&(t=0),Math.min(this.options.max,Math.max(this.min,t))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var t=this.value(),e=this._percentage();this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),this.valueDiv.toggle(t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(e.toFixed(0)+"%"),this.element.attr("aria-valuenow",t)}})})(jQuery);(function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var i,s,n=this.options,a=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="",r=[];for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(n.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),n.range&&(n.range===!0&&(n.values||(n.values=[this._valueMin(),this._valueMin()]),n.values.length&&2!==n.values.length&&(n.values=[n.values[0],n.values[0]])),this.range=e("
                  ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===n.range||"max"===n.range?" ui-slider-range-"+n.range:""))),s=n.values&&n.values.length||1,i=a.length;s>i;i++)r.push(o);this.handles=a.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).mouseenter(function(){n.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")}).focus(function(){n.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)}),this._on(this.handles,{keydown:function(i){var s,n,a,o,r=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case e.ui.keyCode.HOME:a=this._valueMin();break;case e.ui.keyCode.END:a=this._valueMax();break;case e.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));n>i&&(n=i,a=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,a=e(this.handles[o])),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:t.pageX-l.left-a.width()/2,top:t.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i,!0))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch(e.isArray(this.options.values)&&(n=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"disabled":i?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.9.2",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._spin((t||1)*this.options.step)},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._spin((t||1)*-this.options.step)},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&t.href.replace(a,"")===location.href.replace(a,"").replace(/\s/g,"%20")}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var i=this,s=this.options,n=s.active,a=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",s.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),null===n&&(a&&this.tabs.each(function(i,s){return t(s).attr("aria-controls")===a?(n=i,!1):e}),null===n&&(n=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===n||-1===n)&&(n=this.tabs.length?0:!1)),n!==!1&&(n=this.tabs.index(this.tabs.eq(n)),-1===n&&(n=s.collapsible?!1:0)),s.active=n,!s.collapsible&&s.active===!1&&this.anchors.length&&(s.active=0),t.isArray(s.disabled)&&(s.disabled=t.unique(s.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return i.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(this.options.active):t(),this._refresh(),this.active.length&&this.load(s.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("
                  ").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s,n=this.element.parent();"fill"===e?(t.support.minHeight||(s=n.css("overflow"),n.css("overflow","hidden")),i=n.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),s&&n.css("overflow",s),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&(t.ui.tabs.prototype._ui=function(t,e){return{tab:t,panel:e,index:this.anchors.index(t)}},t.widget("ui.tabs",t.ui.tabs,{url:function(t,e){this.anchors.eq(t).attr("href",e)}}),t.widget("ui.tabs",t.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var i=this;this._on({tabsbeforeload:function(s,n){return t.data(n.tab[0],"cache.tabs")?(s.preventDefault(),e):(n.jqXHR.success(function(){i.options.cache&&t.data(n.tab[0],"cache.tabs",!0)}),e)}})},_ajaxSettings:function(e,i,s){var n=this.options.ajaxOptions;return t.extend({},n,{error:function(t,e){try{n.error(t,e,s.tab.closest("li").index(),s.tab[0])}catch(i){}}},this._superApply(arguments))},_setOption:function(t,e){"cache"===t&&e===!1&&this.anchors.removeData("cache.tabs"),this._super(t,e)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(t){this.anchors.eq(t).removeData("cache.tabs"),this._superApply(arguments)}}),t.widget("ui.tabs",t.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),t.widget("ui.tabs",t.ui.tabs,{options:{spinner:"Loading…"},_create:function(){this._super(),this._on({tabsbeforeload:function(t,e){if(t.target===this.element[0]&&this.options.spinner){var i=e.tab.find("span"),s=i.html();i.html(this.options.spinner),e.jqXHR.complete(function(){i.html(s)})}}})}}),t.widget("ui.tabs",t.ui.tabs,{options:{enable:null,disable:null},enable:function(e){var i,s=this.options;(e&&s.disabled===!0||t.isArray(s.disabled)&&-1!==t.inArray(e,s.disabled))&&(i=!0),this._superApply(arguments),i&&this._trigger("enable",null,this._ui(this.anchors[e],this.panels[e]))},disable:function(e){var i,s=this.options;(e&&s.disabled===!1||t.isArray(s.disabled)&&-1===t.inArray(e,s.disabled))&&(i=!0),this._superApply(arguments),i&&this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}}),t.widget("ui.tabs",t.ui.tabs,{options:{add:null,remove:null,tabTemplate:"
                • #{label}
                • "},add:function(i,s,n){n===e&&(n=this.anchors.length);var a,o,r=this.options,h=t(r.tabTemplate.replace(/#\{href\}/g,i).replace(/#\{label\}/g,s)),l=i.indexOf("#")?this._tabId(h):i.replace("#","");return h.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),h.attr("aria-controls",l),a=n>=this.tabs.length,o=this.element.find("#"+l),o.length||(o=this._createPanel(l),a?n>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[n])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),a?h.appendTo(this.tablist):h.insertBefore(this.tabs[n]),r.disabled=t.map(r.disabled,function(t){return t>=n?++t:t}),this.refresh(),1===this.tabs.length&&r.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[n],this.panels[n])),this},remove:function(e){e=this._getIndex(e);var i=this.options,s=this.tabs.eq(e).remove(),n=this._getPanelForTab(s).remove();return s.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(e+(this.anchors.length>e+1?1:-1)),i.disabled=t.map(t.grep(i.disabled,function(t){return t!==e}),function(t){return t>=e?--t:t}),this.refresh(),this._trigger("remove",null,this._ui(s.find("a")[0],n[0])),this}}),t.widget("ui.tabs",t.ui.tabs,{length:function(){return this.anchors.length}}),t.widget("ui.tabs",t.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(e){var s=e.is("li")?e.find("a[href]"):e;return s=s[0],t(s).closest("li").attr("aria-controls")||s.title&&s.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),t.widget("ui.tabs",t.ui.tabs,{options:{panelTemplate:"
                  "},_createPanel:function(e){return t(this.options.panelTemplate).attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),t.widget("ui.tabs",t.ui.tabs,{_create:function(){var t=this.options;null===t.active&&t.selected!==e&&(t.active=-1===t.selected?!1:t.selected),this._super(),t.selected=t.active,t.selected===!1&&(t.selected=-1)},_setOption:function(t,e){if("selected"!==t)return this._super(t,e);var i=this.options;this._super("active",-1===e?!1:e),i.selected=i.active,i.selected===!1&&(i.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),t.widget("ui.tabs",t.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(t,e,i){var s,n,a=this._superApply(arguments);return a?("beforeActivate"===t?(s=i.newTab.length?i.newTab:i.oldTab,n=i.newPanel.length?i.newPanel:i.oldPanel,a=this._super("select",e,{tab:s.find(".ui-tabs-anchor")[0],panel:n[0],index:s.closest("li").index()})):"activate"===t&&i.newTab.length&&(a=this._super("show",e,{tab:i.newTab.find(".ui-tabs-anchor")[0],panel:i.newPanel[0],index:i.newTab.closest("li").index()})),a):!1}}),t.widget("ui.tabs",t.ui.tabs,{select:function(t){if(t=this._getIndex(t),-1===t){if(!this.options.collapsible||-1===this.options.selected)return;t=this.options.selected}this.anchors.eq(t).trigger(this.options.event+this.eventNamespace)}}),function(){var e=0;t.widget("ui.tabs",t.ui.tabs,{options:{cookie:null},_create:function(){var t,e=this.options;null==e.active&&e.cookie&&(t=parseInt(this._cookie(),10),-1===t&&(t=!1),e.active=t),this._super()},_cookie:function(i){var s=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++e)];return arguments.length&&(s.push(i===!1?-1:i),s.push(this.options.cookie)),t.cookie.apply(null,s)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),t.widget("ui.tabs",t.ui.tabs,{_trigger:function(e,i,s){var n=t.extend({},s);return"load"===e&&(n.panel=n.panel[0],n.tab=n.tab.find(".ui-tabs-anchor")[0]),this._super(e,i,n)}}),t.widget("ui.tabs",t.ui.tabs,{options:{fx:null},_getFx:function(){var e,i,s=this.options.fx;return s&&(t.isArray(s)?(e=s[0],i=s[1]):e=i=s),s?{show:i,hide:e}:null},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&h.show?o.animate(h.show,h.show.duration,function(){s()}):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel,h=this._getFx();return h?(a.running=!0,r.length&&h.hide?r.animate(h.hide,h.hide.duration,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),e):this._super(t,i)}}))})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return t(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).andSelf().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("
                  ").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("
                  ").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),t.fn.bgiframe&&n.bgiframe(),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);jQuery.effects||function(t,e){var i=t.uiBackCompat!==!1,s="ui-effects-";t.effects={effect:{}},function(e,i){function s(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function n(t){var s=h(),n=s._rgba=[];return t=t.toLowerCase(),g(c,function(e,a){var o,r=a.re.exec(t),l=r&&a.parse(r),c=a.space||"rgba";return l?(o=s[c](l),s[d[c].cache]=o[d[c].cache],n=s._rgba=o._rgba,!1):i}),n.length?("0,0,0,0"===n.join()&&e.extend(n,o.transparent),s):o[t]}function a(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),l=/^([\-+])=\s*(\d+\.?\d*)/,c=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},d={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},p=h.support={},f=e("

                  ")[0],g=e.each;f.style.cssText="background-color:rgba(1,1,1,.5)",p.rgba=f.style.backgroundColor.indexOf("rgba")>-1,g(d,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=e.extend(h.prototype,{parse:function(a,r,l,c){if(a===i)return this._rgba=[null,null,null,null],this;(a.jquery||a.nodeType)&&(a=e(a).css(r),r=i);var u=this,p=e.type(a),f=this._rgba=[];return r!==i&&(a=[a,r,l,c],p="array"),"string"===p?this.parse(n(a)||o._default):"array"===p?(g(d.rgba.props,function(t,e){f[e.idx]=s(a[e.idx],e)}),this):"object"===p?(a instanceof h?g(d,function(t,e){a[e.cache]&&(u[e.cache]=a[e.cache].slice())}):g(d,function(e,i){var n=i.cache;g(i.props,function(t,e){if(!u[n]&&i.to){if("alpha"===t||null==a[t])return;u[n]=i.to(u._rgba)}u[n][e.idx]=s(a[t],e,!0)}),u[n]&&0>t.inArray(null,u[n].slice(0,3))&&(u[n][3]=1,i.from&&(u._rgba=i.from(u[n])))}),this):i},is:function(t){var e=h(t),s=!0,n=this;return g(d,function(t,a){var o,r=e[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],g(a.props,function(t,e){return null!=r[e.idx]?s=r[e.idx]===o[e.idx]:i})),s}),s},_space:function(){var t=[],e=this;return g(d,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var i=h(t),n=i._space(),a=d[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return i=i[a.cache],g(a.props,function(t,n){var a=n.idx,o=r[a],c=i[a],h=u[n.type]||{};null!==c&&(null===o?l[a]=c:(h.mod&&(c-o>h.mod/2?o+=h.mod:o-c>h.mod/2&&(o-=h.mod)),l[a]=s((c-o)*e+o,n)))}),this[n](l)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(t)._rgba;return h(e.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,d.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),c=r-l,h=r+l,d=.5*h;return e=l===r?0:s===r?60*(n-a)/c+360:n===r?60*(a-s)/c+120:60*(s-n)/c+240,i=0===d||1===d?d:.5>=d?c/h:c/(2-h),[Math.round(e)%360,i,d,null==o?1:o]},d.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*a(r,o,e+1/3)),Math.round(255*a(r,o,e)),Math.round(255*a(r,o,e-1/3)),n]},g(d,function(t,n){var a=n.props,o=n.cache,r=n.to,c=n.from;h.fn[t]=function(t){if(r&&!this[o]&&(this[o]=r(this._rgba)),t===i)return this[o].slice();var n,l=e.type(t),d="array"===l||"object"===l?t:arguments,u=this[o].slice();return g(a,function(t,e){var i=d["object"===l?t:e.idx];null==i&&(i=u[e.idx]),u[e.idx]=s(i,e)}),c?(n=h(c(u)),n[o]=u,n):h(u)},g(a,function(i,s){h.fn[i]||(h.fn[i]=function(n){var a,o=e.type(n),r="alpha"===i?this._hsla?"hsla":"rgba":t,c=this[r](),h=c[s.idx];return"undefined"===o?h:("function"===o&&(n=n.call(this,h),o=e.type(n)),null==n&&s.empty?this:("string"===o&&(a=l.exec(n),a&&(n=h+parseFloat(a[2])*("+"===a[1]?1:-1))),c[s.idx]=n,this[r](c)))})})}),g(r,function(t,i){e.cssHooks[i]={set:function(t,s){var a,o,r="";if("string"!==e.type(s)||(a=n(s))){if(s=h(a||s),!p.rgba&&1!==s._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(l){}s=s.blend(r&&"transparent"!==r?r:"_default")}s=s.toRgbaString()}try{t.style[i]=s}catch(c){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=h(t.elem,i),t.end=h(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}}),e.cssHooks.borderColor={expand:function(t){var e={};return g(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var e,i,s=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)e=s[i],"string"==typeof s[e]&&(n[t.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",c=l.children?o.find("*").andSelf():o;c=c.map(function(){var e=t(this);return{el:e,start:i.call(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),c=c.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),c=c.map(function(){var e=this,i=t.Deferred(),s=jQuery.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,c.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({_addClass:t.fn.addClass,addClass:function(e,i,s,n){return i?t.effects.animateClass.call(this,{add:e},i,s,n):this._addClass(e)},_removeClass:t.fn.removeClass,removeClass:function(e,i,s,n){return i?t.effects.animateClass.call(this,{remove:e},i,s,n):this._removeClass(e)},_toggleClass:t.fn.toggleClass,toggleClass:function(i,s,n,a,o){return"boolean"==typeof s||s===e?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):this._toggleClass(i,s):t.effects.animateClass.call(this,{toggle:i},s,n,a)},switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function n(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function a(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?!1:i&&t.effects[e]?!1:!0}t.extend(t.effects,{version:"1.9.2",save:function(t,e){for(var i=0;e.length>i;i++)null!==e[i]&&t.data(s+e[i],t[0].style[e[i]])},restore:function(t,i){var n,a;for(a=0;i.length>a;a++)null!==i[a]&&(n=t.data(s+i[a]),n===e&&(n=""),t.css(i[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("

                  ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function i(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=s.complete,o=s.mode;(n.is(":hidden")?"hide"===o:"show"===o)?i():r.call(n[0],s,i)}var s=n.apply(this,arguments),a=s.mode,o=s.queue,r=t.effects.effect[s.effect],l=!r&&i&&t.effects[s.effect];return t.fx.off||!r&&!l?a?this[a](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):r?o===!1?this.each(e):this.queue(o||"fx",e):l.call(this,{options:s,duration:s.duration,callback:s.complete,mode:s.mode})},_show:t.fn.show,show:function(t){if(a(t))return this._show.apply(this,arguments);var e=n.apply(this,arguments);return e.mode="show",this.effect.call(this,e)},_hide:t.fn.hide,hide:function(t){if(a(t))return this._hide.apply(this,arguments);var e=n.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)},__toggle:t.fn.toggle,toggle:function(e){if(a(e)||"boolean"==typeof e||t.isFunction(e))return this.__toggle.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)},cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),d=s.direction||"up",u=e.test(d),p=u?"height":"width",f=u?"top":"left",g=i.test(d),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(u?"bottom":"right",0).css(u?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,d=e.direction||"up",u=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===d||"down"===d?"top":"left",_="up"===d||"left"===d,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),u||(u=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-u:2*u).animate(a,g,m)),h&&(u/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+u,o.animate(n,g,m).animate(a,g,m),u=h?2*u:u/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+u,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",d="vertical"===c,u=d?"height":"width",p=d?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[u](),h&&(n.css(u,0),n.css(p,a/2)),f[u]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(e){e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,l=t.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),d[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})}})(jQuery);(function(e){e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*u&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,u=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/u),_=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(l=m.top+a*_,c=a-(d-1)/2,o=0;u>o;o++)r=m.left+o*v,h=o-(u-1)/2,p.clone().appendTo("body").wrap("
                  ").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},t.duration||500,t.easing,s)}})(jQuery);(function(e){e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}})(jQuery);(function(e){e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),l="show"===r,h="hide"===r,c=t.size||15,d=/([0-9]+)%/.exec(c),u=!!t.horizFirst,p=l!==u,f=p?["width","height"]:["height","width"],g=t.duration/2,m={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(c=parseInt(d[1],10)/100*n[h?0:1]),l&&s.css(u?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,t.easing).animate(v,g,t.easing,function(){h&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})}})(jQuery);(function(e){e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})}})(jQuery);(function(e){e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(t.times||5)+(l?1:0),c=t.duration/h,d=0,u=n.queue(),p=u.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;h>s;s++)n.animate({opacity:d},c,t.easing),d=1-d;n.animate({opacity:d},c,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&u.splice.apply(u,[1,0].concat(u.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.y,o.from),o.to=t.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.x,o.from),o.to=t.effects.setTransition(o,u,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(d=d.concat(["marginTop","marginBottom"]).concat(c),u=u.concat(["marginLeft","marginRight"]),h=r.concat(d).concat(u),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,d,a.from.y,i.from),i.to=t.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,u,a.from.x,i.from),i.to=t.effects.setTransition(i,u,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,d=Math.round(e.duration/c),u="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[u]=(p?"-=":"+=")+l,g[u]=(p?"+=":"-=")+2*l,m[u]=(p?"-=":"+=")+2*l,n.animate(f,d,e.easing),s=1;h>s;s++)n.animate(g,d,e.easing).animate(m,d,e.easing);n.animate(g,d,e.easing).animate(f,d/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(e){e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,l=t.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===h?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),d[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})}})(jQuery);(function(e){e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),u=e('
                  ').appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,t.duration,t.easing,function(){u.remove(),i()})}})(jQuery); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/test/resources/jquery.js b/js/vendor/jquery-timepicker/test/resources/jquery.js deleted file mode 100644 index 9d23a952f..000000000 --- a/js/vendor/jquery-timepicker/test/resources/jquery.js +++ /dev/null @@ -1,24 +0,0 @@ -(function() { - - var parts = document.location.search.slice( 1 ).split( "&" ), - length = parts.length, - file = "http://code.jquery.com/jquery-git.js", - version = "2.1.1", - current, - i = 0; - - for ( ; i < length; i++ ) { - current = parts[ i ].split( "=" ); - if ( current[ 0 ] === "jquery" ) { - version = current[ 1 ]; - break; - } - } - - if (version != "git") { - file = "resources/jquery/jquery-" + version + ".min.js"; - } - - document.write( "" ); - -})(); diff --git a/js/vendor/jquery-timepicker/test/resources/jquery.simulate.js b/js/vendor/jquery-timepicker/test/resources/jquery.simulate.js deleted file mode 100644 index 816900def..000000000 --- a/js/vendor/jquery-timepicker/test/resources/jquery.simulate.js +++ /dev/null @@ -1,312 +0,0 @@ - /*! - * jQuery Simulate v@VERSION - simulate browser mouse and keyboard events - * https://github.com/jquery/jquery-simulate - * - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * Date: @DATE - */ - -;(function( $, undefined ) { - -var rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/; - -$.fn.simulate = function( type, options ) { - return this.each(function() { - new $.simulate( this, type, options ); - }); -}; - -$.simulate = function( elem, type, options ) { - var method = $.camelCase( "simulate-" + type ); - - this.target = elem; - this.options = options; - - if ( this[ method ] ) { - this[ method ](); - } else { - this.simulateEvent( elem, type, options ); - } -}; - -$.extend( $.simulate, { - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - }, - - buttonCode: { - LEFT: 0, - MIDDLE: 1, - RIGHT: 2 - } -}); - -$.extend( $.simulate.prototype, { - - simulateEvent: function( elem, type, options ) { - var event = this.createEvent( type, options ); - this.dispatchEvent( elem, type, event, options ); - }, - - createEvent: function( type, options ) { - if ( rkeyEvent.test( type ) ) { - return this.keyEvent( type, options ); - } - - if ( rmouseEvent.test( type ) ) { - return this.mouseEvent( type, options ); - } - }, - - mouseEvent: function( type, options ) { - var event, eventDoc, doc, body; - options = $.extend({ - bubbles: true, - cancelable: (type !== "mousemove"), - view: window, - detail: 0, - screenX: 0, - screenY: 0, - clientX: 1, - clientY: 1, - ctrlKey: false, - altKey: false, - shiftKey: false, - metaKey: false, - button: 0, - relatedTarget: undefined - }, options ); - - if ( document.createEvent ) { - event = document.createEvent( "MouseEvents" ); - event.initMouseEvent( type, options.bubbles, options.cancelable, - options.view, options.detail, - options.screenX, options.screenY, options.clientX, options.clientY, - options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, - options.button, options.relatedTarget || document.body.parentNode ); - - // IE 9+ creates events with pageX and pageY set to 0. - // Trying to modify the properties throws an error, - // so we define getters to return the correct values. - if ( event.pageX === 0 && event.pageY === 0 && Object.defineProperty ) { - eventDoc = event.relatedTarget.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - Object.defineProperty( event, "pageX", { - get: function() { - return options.clientX + - ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - } - }); - Object.defineProperty( event, "pageY", { - get: function() { - return options.clientY + - ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - }); - } - } else if ( document.createEventObject ) { - event = document.createEventObject(); - $.extend( event, options ); - // standards event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ff974877(v=vs.85).aspx - // old IE event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ms533544(v=vs.85).aspx - // so we actually need to map the standard back to oldIE - event.button = { - 0: 1, - 1: 4, - 2: 2 - }[ event.button ] || event.button; - } - - return event; - }, - - keyEvent: function( type, options ) { - var event; - options = $.extend({ - bubbles: true, - cancelable: true, - view: window, - ctrlKey: false, - altKey: false, - shiftKey: false, - metaKey: false, - keyCode: 0, - charCode: undefined - }, options ); - - if ( document.createEvent ) { - try { - event = document.createEvent( "KeyEvents" ); - event.initKeyEvent( type, options.bubbles, options.cancelable, options.view, - options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, - options.keyCode, options.charCode ); - // initKeyEvent throws an exception in WebKit - // see: http://stackoverflow.com/questions/6406784/initkeyevent-keypress-only-works-in-firefox-need-a-cross-browser-solution - // and also https://bugs.webkit.org/show_bug.cgi?id=13368 - // fall back to a generic event until we decide to implement initKeyboardEvent - } catch( err ) { - event = document.createEvent( "Events" ); - event.initEvent( type, options.bubbles, options.cancelable ); - $.extend( event, { - view: options.view, - ctrlKey: options.ctrlKey, - altKey: options.altKey, - shiftKey: options.shiftKey, - metaKey: options.metaKey, - keyCode: options.keyCode, - charCode: options.charCode - }); - } - } else if ( document.createEventObject ) { - event = document.createEventObject(); - $.extend( event, options ); - } - - if ( !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ) || (({}).toString.call( window.opera ) === "[object Opera]") ) { - event.keyCode = (options.charCode > 0) ? options.charCode : options.keyCode; - event.charCode = undefined; - } - - return event; - }, - - dispatchEvent: function( elem, type, event ) { - if ( elem.dispatchEvent ) { - elem.dispatchEvent( event ); - } else if ( elem.fireEvent ) { - elem.fireEvent( "on" + type, event ); - } - }, - - simulateFocus: function() { - var focusinEvent, - triggered = false, - element = $( this.target ); - - function trigger() { - triggered = true; - } - - element.bind( "focus", trigger ); - element[ 0 ].focus(); - - if ( !triggered ) { - focusinEvent = $.Event( "focusin" ); - focusinEvent.preventDefault(); - element.trigger( focusinEvent ); - element.triggerHandler( "focus" ); - } - element.unbind( "focus", trigger ); - }, - - simulateBlur: function() { - var focusoutEvent, - triggered = false, - element = $( this.target ); - - function trigger() { - triggered = true; - } - - element.bind( "blur", trigger ); - element[ 0 ].blur(); - - // blur events are async in IE - setTimeout(function() { - // IE won't let the blur occur if the window is inactive - if ( element[ 0 ].ownerDocument.activeElement === element[ 0 ] ) { - element[ 0 ].ownerDocument.body.focus(); - } - - // Firefox won't trigger events if the window is inactive - // IE doesn't trigger events if we had to manually focus the body - if ( !triggered ) { - focusoutEvent = $.Event( "focusout" ); - focusoutEvent.preventDefault(); - element.trigger( focusoutEvent ); - element.triggerHandler( "blur" ); - } - element.unbind( "blur", trigger ); - }, 1 ); - } -}); - - - -/** complex events **/ - -function findCenter( elem ) { - var offset, - document = $( elem.ownerDocument ); - elem = $( elem ); - offset = elem.offset(); - - return { - x: offset.left + elem.outerWidth() / 2 - document.scrollLeft(), - y: offset.top + elem.outerHeight() / 2 - document.scrollTop() - }; -} - -$.extend( $.simulate.prototype, { - simulateDrag: function() { - var i = 0, - target = this.target, - options = this.options, - center = findCenter( target ), - x = Math.floor( center.x ), - y = Math.floor( center.y ), - dx = options.dx || 0, - dy = options.dy || 0, - moves = options.moves || 3, - coord = { clientX: x, clientY: y }; - - this.simulateEvent( target, "mousedown", coord ); - - for ( ; i < moves ; i++ ) { - x += dx / moves; - y += dy / moves; - - coord = { - clientX: Math.round( x ), - clientY: Math.round( y ) - }; - - this.simulateEvent( document, "mousemove", coord ); - } - - this.simulateEvent( target, "mouseup", coord ); - this.simulateEvent( target, "click", coord ); - } -}); - -})( jQuery ); \ No newline at end of file diff --git a/js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.1.min.js b/js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.1.min.js deleted file mode 100644 index e407e7699..000000000 --- a/js/vendor/jquery-timepicker/test/resources/jquery/jquery-1.10.1.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! jQuery v1.10.1 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license -//@ sourceMappingURL=jquery-1.10.1.min.map -*/ -(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.1",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=lt(),k=lt(),E=lt(),S=!1,A=function(){return 0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=bt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+xt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return At(e.replace(z,"$1"),t,n,i)}function st(e){return K.test(e+"")}function lt(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function ut(e){return e[b]=!0,e}function ct(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function pt(e,t,n){e=e.split("|");var r,i=e.length,a=n?null:t;while(i--)(r=o.attrHandle[e[i]])&&r!==t||(o.attrHandle[e[i]]=a)}function ft(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:e[t]===!0?t.toLowerCase():null}function dt(e,t){return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function ht(e){return"input"===e.nodeName.toLowerCase()?e.defaultValue:t}function gt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function mt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function yt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function vt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.parentWindow;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.frameElement&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ct(function(e){return e.innerHTML="",pt("type|href|height|width",dt,"#"===e.firstChild.getAttribute("href")),pt(B,ft,null==e.getAttribute("disabled")),e.className="i",!e.getAttribute("className")}),r.input=ct(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}),pt("value",ht,r.attributes&&r.input),r.getElementsByTagName=ct(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ct(function(e){return e.innerHTML="
                  ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ct(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=st(n.querySelectorAll))&&(ct(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ct(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=st(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ct(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=st(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},r.sortDetached=ct(function(e){return 1&e.compareDocumentPosition(n.createElement("div"))}),A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return gt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?gt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:ut,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=bt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?ut(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ut(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?ut(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ut(function(e){return function(t){return at(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:ut(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:vt(function(){return[0]}),last:vt(function(e,t){return[t-1]}),eq:vt(function(e,t,n){return[0>n?n+t:n]}),even:vt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:vt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:vt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:vt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=mt(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=yt(n);function bt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function xt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function wt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function Tt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ct(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function Nt(e,t,n,r,i,o){return r&&!r[b]&&(r=Nt(r)),i&&!i[b]&&(i=Nt(i,o)),ut(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||St(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:Ct(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=Ct(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=Ct(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function kt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=wt(function(e){return e===t},s,!0),p=wt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[wt(Tt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return Nt(l>1&&Tt(f),l>1&&xt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&kt(e.slice(l,r)),i>r&&kt(e=e.slice(r)),i>r&&xt(e))}f.push(n)}return Tt(f)}function Et(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=Ct(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?ut(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=bt(e)),n=t.length;while(n--)o=kt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Et(i,r))}return o};function St(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function At(e,t,n,i){var a,s,u,c,p,f=bt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&xt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}o.pseudos.nth=o.pseudos.eq;function jt(){}jt.prototype=o.filters=o.pseudos,o.setFilters=new jt,r.sortStable=b.split("").sort(A).join("")===b,p(),[0,0].sort(A),r.detectDuplicates=S,x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!u||(n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
                  a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
                  t
                  ",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
                  ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null) -}),n=s=l=u=r=o=null,t}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=x(this),l=t,u=e.match(T)||[];while(o=u[a++])l=r?l:!s.hasClass(o),s[l?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
                  ","
                  "],area:[1,"",""],param:[1,"",""],thead:[1,"","
                  "],tr:[2,"","
                  "],col:[2,"","
                  "],td:[3,"","
                  "],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
                  ","
                  "]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); -u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("' : ''); + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + selectedDate, secondary, showStatus, initStatus, monthNames) { + minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate); + var changeMonth = this._get(inst, 'changeMonth'); + var changeYear = this._get(inst, 'changeYear'); + var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); + var html = '
                  '; + var monthHtml = ''; + // month selection + if (secondary || !changeMonth) + monthHtml += monthNames[drawMonth]; + else { + var inMinYear = (minDate && minDate.getFullYear() == drawYear); + var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); + monthHtml += ''; + } + if (!showMonthAfterYear) + html += monthHtml + (secondary || changeMonth || changeYear ? ' ' : ''); + // year selection + if (secondary || !changeYear) + html += drawYear; + else { + // determine range of years to display + var years = this._get(inst, 'yearRange').split(':'); + var year = 0; + var endYear = 0; + if (years.length != 2) { + year = drawYear - 10; + endYear = drawYear + 10; + } else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') { + year = endYear = new Date().getFullYear(); + year += parseInt(years[0], 10); + endYear += parseInt(years[1], 10); + } else { + year = parseInt(years[0], 10); + endYear = parseInt(years[1], 10); + } + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + html += ''; + } + if (showMonthAfterYear) + html += (secondary || changeMonth || changeYear ? ' ' : '') + monthHtml; + html += '
                  '; // Close datepicker_header + return html; + }, + + /* Provide code to set and clear the status panel. */ + _addStatus: function(showStatus, id, text, initStatus) { + return (showStatus ? ' onmouseover="jQuery(\'#ui-datepicker-status-' + id + + '\').html(\'' + (text || initStatus) + '\');" ' + + 'onmouseout="jQuery(\'#ui-datepicker-status-' + id + + '\').html(\'' + initStatus + '\');"' : ''); + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period == 'Y' ? offset : 0); + var month = inst.drawMonth + (period == 'M' ? offset : 0); + var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + + (period == 'D' ? offset : 0); + var date = this._daylightSavingAdjust(new Date(year, month, day)); + // ensure it is within the bounds set + var minDate = this._getMinMaxDate(inst, 'min', true); + var maxDate = this._getMinMaxDate(inst, 'max'); + date = (minDate && date < minDate ? minDate : date); + date = (maxDate && date > maxDate ? maxDate : date); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period == 'M' || period == 'Y') + this._notifyChange(inst); + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, 'onChangeMonthYear'); + if (onChange) + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, 'numberOfMonths'); + return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */ + _getMinMaxDate: function(inst, minMax, checkRange) { + var date = this._determineDate(this._get(inst, minMax + 'Date'), null); + return (!checkRange || !inst.rangeStart ? date : + (!date || inst.rangeStart > date ? inst.rangeStart : date)); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - new Date(year, month, 32).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst); + var date = this._daylightSavingAdjust(new Date( + curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1)); + if (offset < 0) + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + // during range selection, use minimum of selected date and range start + var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust( + new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay))); + newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate); + var minDate = newMinDate || this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate)); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, 'shortYearCutoff'); + shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), + monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day == 'object' ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); + } +}); + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) + if (props[name] == null || props[name] == undefined) + target[name] = props[name]; + return target; +}; + +/* Determine whether an object is an array. */ +function isArray(a) { + return (a && (($.browser.safari && typeof a == 'object' && a.length) || + (a.constructor && a.constructor.toString().match(/\Array\(\)/)))); +}; + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document.body).append($.datepicker.dpDiv). + mousedown($.datepicker._checkExternalClick); + $.datepicker.initialized = true; + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate')) + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + return this.each(function() { + typeof options == 'string' ? + $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.6"; + +})(jQuery); +/* + * jQuery UI Dialog 1.6 + * + * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * ui.core.js + * ui.draggable.js + * ui.resizable.js + */ +(function($) { + +var setDataSwitch = { + dragStart: "start.draggable", + drag: "drag.draggable", + dragStop: "stop.draggable", + maxHeight: "maxHeight.resizable", + minHeight: "minHeight.resizable", + maxWidth: "maxWidth.resizable", + minWidth: "minWidth.resizable", + resizeStart: "start.resizable", + resize: "drag.resizable", + resizeStop: "stop.resizable" +}; + +$.widget("ui.dialog", { + + _init: function() { + this.originalTitle = this.element.attr('title'); + this.options.title = this.options.title || this.originalTitle; + + var self = this, + options = this.options, + + uiDialogContent = this.element + .removeAttr('title') + .addClass('ui-dialog-content') + .wrap('
                  ') + .wrap('
                  '), + + uiDialogContainer = (this.uiDialogContainer = uiDialogContent.parent()) + .addClass('ui-dialog-container') + .css({ + position: 'relative', + width: '100%', + height: '100%' + }), + + uiDialogTitlebar = (this.uiDialogTitlebar = $('
                  ')) + .addClass('ui-dialog-titlebar') + .mousedown(function() { + self.moveToTop(); + }) + .prependTo(uiDialogContainer), + + uiDialogTitlebarClose = $('') + .addClass('ui-dialog-titlebar-close') + .attr('role', 'button') + .appendTo(uiDialogTitlebar), + + uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('')) + .text(options.closeText) + .appendTo(uiDialogTitlebarClose), + + title = options.title || ' ', + titleId = $.ui.dialog.getTitleId(this.element), + uiDialogTitle = $('') + .addClass('ui-dialog-title') + .attr('id', titleId) + .html(title) + .prependTo(uiDialogTitlebar), + + uiDialog = (this.uiDialog = uiDialogContainer.parent()) + .appendTo(document.body) + .hide() + .addClass('ui-dialog') + .addClass(options.dialogClass) + .css({ + position: 'absolute', + width: options.width, + height: options.height, + overflow: 'hidden', + zIndex: options.zIndex + }) + // setting tabIndex makes the div focusable + // setting outline to 0 prevents a border on focus in Mozilla + .attr('tabIndex', -1).css('outline', 0).keydown(function(ev) { + (options.closeOnEscape && ev.keyCode + && ev.keyCode == $.ui.keyCode.ESCAPE && self.close()); + }) + .attr({ + role: 'dialog', + 'aria-labelledby': titleId + }) + .mouseup(function() { + self.moveToTop(); + }), + + uiDialogButtonPane = (this.uiDialogButtonPane = $('
                  ')) + .addClass('ui-dialog-buttonpane') + .css({ + position: 'absolute', + bottom: 0 + }) + .appendTo(uiDialog), + + uiDialogTitlebarClose = $('.ui-dialog-titlebar-close', uiDialogTitlebar) + .hover( + function() { + $(this).addClass('ui-dialog-titlebar-close-hover'); + }, + function() { + $(this).removeClass('ui-dialog-titlebar-close-hover'); + } + ) + .mousedown(function(ev) { + ev.stopPropagation(); + }) + .click(function() { + self.close(); + return false; + }); + + uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection(); + + (options.draggable && $.fn.draggable && this._makeDraggable()); + (options.resizable && $.fn.resizable && this._makeResizable()); + + this._createButtons(options.buttons); + this._isOpen = false; + + (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe()); + (options.autoOpen && this.open()); + }, + + destroy: function() { + (this.overlay && this.overlay.destroy()); + this.uiDialog.hide(); + this.element + .unbind('.dialog') + .removeData('dialog') + .removeClass('ui-dialog-content') + .hide().appendTo('body'); + this.uiDialog.remove(); + + (this.originalTitle && this.element.attr('title', this.originalTitle)); + }, + + close: function() { + if (false === this._trigger('beforeclose', null, { options: this.options })) { + return; + } + + (this.overlay && this.overlay.destroy()); + this.uiDialog + .hide(this.options.hide) + .unbind('keypress.ui-dialog'); + + this._trigger('close', null, { options: this.options }); + $.ui.dialog.overlay.resize(); + + this._isOpen = false; + }, + + isOpen: function() { + return this._isOpen; + }, + + // the force parameter allows us to move modal dialogs to their correct + // position on open + moveToTop: function(force) { + + if ((this.options.modal && !force) + || (!this.options.stack && !this.options.modal)) { + return this._trigger('focus', null, { options: this.options }); + } + + var maxZ = this.options.zIndex, options = this.options; + $('.ui-dialog:visible').each(function() { + maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10) || options.zIndex); + }); + (this.overlay && this.overlay.$el.css('z-index', ++maxZ)); + + //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed. + // http://ui.jquery.com/bugs/ticket/3193 + var saveScroll = { scrollTop: this.element.attr('scrollTop'), scrollLeft: this.element.attr('scrollLeft') }; + this.uiDialog.css('z-index', ++maxZ); + this.element.attr(saveScroll); + this._trigger('focus', null, { options: this.options }); + }, + + open: function() { + if (this._isOpen) { return; } + + this.overlay = this.options.modal ? new $.ui.dialog.overlay(this) : null; + (this.uiDialog.next().length && this.uiDialog.appendTo('body')); + this._position(this.options.position); + this.uiDialog.show(this.options.show); + (this.options.autoResize && this._size()); + this.moveToTop(true); + + // prevent tabbing out of modal dialogs + (this.options.modal && this.uiDialog.bind('keypress.ui-dialog', function(event) { + if (event.keyCode != $.ui.keyCode.TAB) { + return; + } + + var tabbables = $(':tabbable', this), + first = tabbables.filter(':first')[0], + last = tabbables.filter(':last')[0]; + + if (event.target == last && !event.shiftKey) { + setTimeout(function() { + first.focus(); + }, 1); + } else if (event.target == first && event.shiftKey) { + setTimeout(function() { + last.focus(); + }, 1); + } + })); + + this.uiDialog.find(':tabbable:first').focus(); + this._trigger('open', null, { options: this.options }); + this._isOpen = true; + }, + + _createButtons: function(buttons) { + var self = this, + hasButtons = false, + uiDialogButtonPane = this.uiDialogButtonPane; + + // remove any existing buttons + uiDialogButtonPane.empty().hide(); + + $.each(buttons, function() { return !(hasButtons = true); }); + if (hasButtons) { + uiDialogButtonPane.show(); + $.each(buttons, function(name, fn) { + $('') + .text(name) + .click(function() { fn.apply(self.element[0], arguments); }) + .appendTo(uiDialogButtonPane); + }); + } + }, + + _makeDraggable: function() { + var self = this, + options = this.options; + + this.uiDialog.draggable({ + cancel: '.ui-dialog-content', + helper: options.dragHelper, + handle: '.ui-dialog-titlebar', + start: function() { + self.moveToTop(); + (options.dragStart && options.dragStart.apply(self.element[0], arguments)); + }, + drag: function() { + (options.drag && options.drag.apply(self.element[0], arguments)); + }, + stop: function() { + (options.dragStop && options.dragStop.apply(self.element[0], arguments)); + $.ui.dialog.overlay.resize(); + } + }); + }, + + _makeResizable: function(handles) { + handles = (handles === undefined ? this.options.resizable : handles); + var self = this, + options = this.options, + resizeHandles = typeof handles == 'string' + ? handles + : 'n,e,s,w,se,sw,ne,nw'; + + this.uiDialog.resizable({ + cancel: '.ui-dialog-content', + helper: options.resizeHelper, + maxWidth: options.maxWidth, + maxHeight: options.maxHeight, + minWidth: options.minWidth, + minHeight: options.minHeight, + start: function() { + (options.resizeStart && options.resizeStart.apply(self.element[0], arguments)); + }, + resize: function() { + (options.autoResize && self._size.apply(self)); + (options.resize && options.resize.apply(self.element[0], arguments)); + }, + handles: resizeHandles, + stop: function() { + (options.autoResize && self._size.apply(self)); + (options.resizeStop && options.resizeStop.apply(self.element[0], arguments)); + $.ui.dialog.overlay.resize(); + } + }); + }, + + _position: function(pos) { + var wnd = $(window), doc = $(document), + pTop = doc.scrollTop(), pLeft = doc.scrollLeft(), + minTop = pTop; + + if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) { + pos = [ + pos == 'right' || pos == 'left' ? pos : 'center', + pos == 'top' || pos == 'bottom' ? pos : 'middle' + ]; + } + if (pos.constructor != Array) { + pos = ['center', 'middle']; + } + if (pos[0].constructor == Number) { + pLeft += pos[0]; + } else { + switch (pos[0]) { + case 'left': + pLeft += 0; + break; + case 'right': + pLeft += wnd.width() - this.uiDialog.outerWidth(); + break; + default: + case 'center': + pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2; + } + } + if (pos[1].constructor == Number) { + pTop += pos[1]; + } else { + switch (pos[1]) { + case 'top': + pTop += 0; + break; + case 'bottom': + // Opera check fixes #3564, can go away with jQuery 1.3 + pTop += ($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.outerHeight(); + break; + default: + case 'middle': + // Opera check fixes #3564, can go away with jQuery 1.3 + pTop += (($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.outerHeight()) / 2; + } + } + + // prevent the dialog from being too high (make sure the titlebar + // is accessible) + pTop = Math.max(pTop, minTop); + this.uiDialog.css({top: pTop, left: pLeft}); + }, + + _setData: function(key, value){ + (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value)); + switch (key) { + case "buttons": + this._createButtons(value); + break; + case "closeText": + this.uiDialogTitlebarCloseText.text(value); + break; + case "draggable": + (value + ? this._makeDraggable() + : this.uiDialog.draggable('destroy')); + break; + case "height": + this.uiDialog.height(value); + break; + case "position": + this._position(value); + break; + case "resizable": + var uiDialog = this.uiDialog, + isResizable = this.uiDialog.is(':data(resizable)'); + + // currently resizable, becoming non-resizable + (isResizable && !value && uiDialog.resizable('destroy')); + + // currently resizable, changing handles + (isResizable && typeof value == 'string' && + uiDialog.resizable('option', 'handles', value)); + + // currently non-resizable, becoming resizable + (isResizable || this._makeResizable(value)); + + break; + case "title": + $(".ui-dialog-title", this.uiDialogTitlebar).html(value || ' '); + break; + case "width": + this.uiDialog.width(value); + break; + } + + $.widget.prototype._setData.apply(this, arguments); + }, + + _size: function() { + var container = this.uiDialogContainer, + titlebar = this.uiDialogTitlebar, + content = this.element, + tbMargin = (parseInt(content.css('margin-top'), 10) || 0) + + (parseInt(content.css('margin-bottom'), 10) || 0), + lrMargin = (parseInt(content.css('margin-left'), 10) || 0) + + (parseInt(content.css('margin-right'), 10) || 0); + content.height(container.height() - titlebar.outerHeight() - tbMargin); + content.width(container.width() - lrMargin); + } + +}); + +$.extend($.ui.dialog, { + version: "1.6", + defaults: { + autoOpen: true, + autoResize: true, + bgiframe: false, + buttons: {}, + closeOnEscape: true, + closeText: 'close', + draggable: true, + height: 200, + minHeight: 100, + minWidth: 150, + modal: false, + overlay: {}, + position: 'center', + resizable: true, + stack: true, + width: 300, + zIndex: 1000 + }, + + getter: 'isOpen', + + uuid: 0, + + getTitleId: function($el) { + return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid); + }, + + overlay: function(dialog) { + this.$el = $.ui.dialog.overlay.create(dialog); + } +}); + +$.extend($.ui.dialog.overlay, { + instances: [], + events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','), + function(event) { return event + '.dialog-overlay'; }).join(' '), + create: function(dialog) { + if (this.instances.length === 0) { + // prevent use of anchors and inputs + // we use a setTimeout in case the overlay is created from an + // event that we're going to be cancelling (see #2804) + setTimeout(function() { + $('a, :input').bind($.ui.dialog.overlay.events, function() { + // allow use of the element if inside a dialog and + // - there are no modal dialogs + // - there are modal dialogs, but we are in front of the topmost modal + var allow = false; + var $dialog = $(this).parents('.ui-dialog'); + if ($dialog.length) { + var $overlays = $('.ui-dialog-overlay'); + if ($overlays.length) { + var maxZ = parseInt($overlays.css('z-index'), 10); + $overlays.each(function() { + maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10)); + }); + allow = parseInt($dialog.css('z-index'), 10) > maxZ; + } else { + allow = true; + } + } + return allow; + }); + }, 1); + + // allow closing by pressing the escape key + $(document).bind('keydown.dialog-overlay', function(event) { + (dialog.options.closeOnEscape && event.keyCode + && event.keyCode == $.ui.keyCode.ESCAPE && dialog.close()); + }); + + // handle window resize + $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize); + } + + var $el = $('
                  ').appendTo(document.body) + .addClass('ui-dialog-overlay').css($.extend({ + borderWidth: 0, margin: 0, padding: 0, + position: 'absolute', top: 0, left: 0, + width: this.width(), + height: this.height() + }, dialog.options.overlay)); + + (dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe()); + + this.instances.push($el); + return $el; + }, + + destroy: function($el) { + this.instances.splice($.inArray(this.instances, $el), 1); + + if (this.instances.length === 0) { + $('a, :input').add([document, window]).unbind('.dialog-overlay'); + } + + $el.remove(); + }, + + height: function() { + // handle IE 6 + if ($.browser.msie && $.browser.version < 7) { + var scrollHeight = Math.max( + document.documentElement.scrollHeight, + document.body.scrollHeight + ); + var offsetHeight = Math.max( + document.documentElement.offsetHeight, + document.body.offsetHeight + ); + + if (scrollHeight < offsetHeight) { + return $(window).height() + 'px'; + } else { + return scrollHeight + 'px'; + } + // handle Opera + } else if ($.browser.opera) { + return Math.max( + window.innerHeight, + $(document).height() + ) + 'px'; + // handle "good" browsers + } else { + return $(document).height() + 'px'; + } + }, + + width: function() { + // handle IE 6 + if ($.browser.msie && $.browser.version < 7) { + var scrollWidth = Math.max( + document.documentElement.scrollWidth, + document.body.scrollWidth + ); + var offsetWidth = Math.max( + document.documentElement.offsetWidth, + document.body.offsetWidth + ); + + if (scrollWidth < offsetWidth) { + return $(window).width() + 'px'; + } else { + return scrollWidth + 'px'; + } + // handle Opera + } else if ($.browser.opera) { + return Math.max( + window.innerWidth, + $(document).width() + ) + 'px'; + // handle "good" browsers + } else { + return $(document).width() + 'px'; + } + }, + + resize: function() { + /* If the dialog is draggable and the user drags it past the + * right edge of the window, the document becomes wider so we + * need to stretch the overlay. If the user then drags the + * dialog back to the left, the document will become narrower, + * so we need to shrink the overlay to the appropriate size. + * This is handled by shrinking the overlay before setting it + * to the full document size. + */ + var $overlays = $([]); + $.each($.ui.dialog.overlay.instances, function() { + $overlays = $overlays.add(this); + }); + + $overlays.css({ + width: 0, + height: 0 + }).css({ + width: $.ui.dialog.overlay.width(), + height: $.ui.dialog.overlay.height() + }); + } +}); + +$.extend($.ui.dialog.overlay.prototype, { + destroy: function() { + $.ui.dialog.overlay.destroy(this.$el); + } +}); + +})(jQuery); +/* + * jQuery UI Slider 1.6 + * + * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Slider + * + * Depends: + * ui.core.js + */ +(function($) { + +$.fn.unwrap = $.fn.unwrap || function(expr) { + return this.each(function(){ + $(this).parents(expr).eq(0).after(this).remove(); + }); +}; + +$.widget("ui.slider", { + + _init: function() { + + var self = this; + this.element.addClass("ui-slider"); + this._initBoundaries(); + + // Initialize mouse and key events for interaction + this.handle = $(this.options.handle, this.element); + if (!this.handle.length) { + self.handle = self.generated = $(self.options.handles || [0]).map(function() { + var handle = $("
                  ").addClass("ui-slider-handle").appendTo(self.element); + if (this.id) + handle.attr("id", this.id); + return handle[0]; + }); + } + + var handleclass = function(el) { + this.element = $(el); + this.element.data("mouse", this); + this.options = self.options; + + this.element.bind("mousedown", function() { + if(self.currentHandle) this.blur(self.currentHandle); + self._focus(this, true); + }); + + this._mouseInit(); + }; + + $.extend(handleclass.prototype, $.ui.mouse, { + _mouseCapture: function() { return true; }, + _mouseStart: function(event) { return self._start.call(self, event, this.element[0]); }, + _mouseDrag: function(event) { return self._drag.call(self, event, this.element[0]); }, + _mouseStop: function(event) { return self._stop.call(self, event, this.element[0]); }, + trigger: function(event) { this._mouseDown(event); } + }); + + $(this.handle) + .each(function() { + new handleclass(this); + }) + .wrap('') + .parent() + .bind('click', function() { return false; }) + .bind('focus', function(event) { self._focus(this.firstChild); }) + .bind('blur', function(event) { self._blur(this.firstChild); }) + .bind('keydown', function(event) { if(!self.options.noKeyboard) return self._keydown(event.keyCode, this.firstChild); }) + ; + + // Bind the click to the slider itself + this.element.bind('mousedown.slider', function(event) { + + if($(event.target).is('.ui-slider-handle')) return; + + //Go to the actual clicked posiion, apply a click + self._click.apply(self, [event]); + + //initiate a handle drag, so we can click+drag somewhere + self.currentHandle.data("mouse").trigger(event); + + //This is for always triggering the change event + self.firstValue = self.firstValue + 1; + + }); + + // Move the first handle to the startValue + $.each(this.options.handles || [], function(index, handle) { + self.moveTo(handle.start, index, true); + }); + if (!isNaN(this.options.startValue)) + this.moveTo(this.options.startValue, 0, true); + + this.previousHandle = $(this.handle[0]); //set the previous handle to the first to allow clicking before selecting the handle + if(this.handle.length == 2 && this.options.range) this._createRange(); + + }, + + destroy: function() { + + this.element + .removeClass("ui-slider ui-slider-disabled") + .removeData("slider") + .unbind(".slider"); + + if(this.handle && this.handle.length) { + this.handle + .unwrap("a"); + this.handle.each(function() { + var mouse = $(this).data("mouse"); + mouse && mouse._mouseDestroy(); + }); + } + + this.generated && this.generated.remove(); + + }, + + _start: function(event, handle) { + + var o = this.options; + if(o.disabled) return false; + + // Prepare the outer size + this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() }; + + // This is a especially ugly fix for strange blur events happening on mousemove events + if (!this.currentHandle) + this._focus(this.previousHandle, true); + + this.offset = this.element.offset(); + + this.handleOffset = this.currentHandle.offset(); + this.clickOffset = { top: event.pageY - this.handleOffset.top, left: event.pageX - this.handleOffset.left }; + + this.firstValue = this.value(); + + this._propagate('start', event); + this._drag(event, handle); + return true; + + }, + + _drag: function(event, handle) { + + var o = this.options; + + var position = { top: event.pageY - this.offset.top - this.clickOffset.top, left: event.pageX - this.offset.left - this.clickOffset.left}; + if(!this.currentHandle) this._focus(this.previousHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events + + position.left = this._translateLimits(position.left, "x"); + position.top = this._translateLimits(position.top, "y"); + + if (o.stepping.x) { + var value = this._convertValue(position.left, "x"); + value = this._round(value / o.stepping.x) * o.stepping.x; + position.left = this._translateValue(value, "x"); + } + if (o.stepping.y) { + var value = this._convertValue(position.top, "y"); + value = this._round(value / o.stepping.y) * o.stepping.y; + position.top = this._translateValue(value, "y"); + } + + position.left = this._translateRange(position.left, "x"); + position.top = this._translateRange(position.top, "y"); + + if(o.axis != "vertical") this.currentHandle.css({ left: position.left }); + if(o.axis != "horizontal") this.currentHandle.css({ top: position.top }); + + //Store the slider's value + this.currentHandle.data("mouse").sliderValue = { + x: this._round(this._convertValue(position.left, "x")) || 0, + y: this._round(this._convertValue(position.top, "y")) || 0 + }; + + if (this.rangeElement) + this._updateRange(); + this._propagate('slide', event); + return false; + + }, + + _stop: function(event) { + + this._propagate('stop', event); + + if (this.firstValue != this.value()) + this._propagate('change', event); + + // This is a especially ugly fix for strange blur events happening on mousemove events + this._focus(this.currentHandle, true); + + return false; + + }, + + _round: function(value) { + + return this.options.round ? parseInt(value,10) : parseFloat(value); + + }, + + _setData: function(key, value) { + + $.widget.prototype._setData.apply(this, arguments); + + if (/min|max|steps/.test(key)) { + this._initBoundaries(); + } + + if(key == "range") { + value ? this.handle.length == 2 && this._createRange() : this._removeRange(); + } + + }, + + _initBoundaries: function() { + + var element = this.element[0], o = this.options; + this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() }; + + $.extend(o, { + axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'), + max: !isNaN(parseInt(o.max,10)) ? { x: parseInt(o.max, 10), y: parseInt(o.max, 10) } : ({ x: o.max && o.max.x || 100, y: o.max && o.max.y || 100 }), + min: !isNaN(parseInt(o.min,10)) ? { x: parseInt(o.min, 10), y: parseInt(o.min, 10) } : ({ x: o.min && o.min.x || 0, y: o.min && o.min.y || 0 }) + }); + //Prepare the real maxValue + o.realMax = { + x: o.max.x - o.min.x, + y: o.max.y - o.min.y + }; + //Calculate stepping based on steps + o.stepping = { + x: o.stepping && o.stepping.x || parseInt(o.stepping, 10) || (o.steps ? o.realMax.x/(o.steps.x || parseInt(o.steps, 10) || o.realMax.x) : 0), + y: o.stepping && o.stepping.y || parseInt(o.stepping, 10) || (o.steps ? o.realMax.y/(o.steps.y || parseInt(o.steps, 10) || o.realMax.y) : 0) + }; + + }, + + _keydown: function(keyCode, handle) { + + if (this.options.disabled) + return; + + var k = keyCode; + if(/(33|34|35|36|37|38|39|40)/.test(k)) { + var o = this.options, xpos, ypos; + if (/(35|36)/.test(k)) { + xpos = (k == 35) ? o.max.x : o.min.x; + ypos = (k == 35) ? o.max.y : o.min.y; + } else { + var oper = /(34|37|40)/.test(k) ? "-=" : "+="; + var step = /(37|38|39|40)/.test(k) ? "_oneStep" : "_pageStep"; + xpos = oper + this[step]("x"); + ypos = oper + this[step]("y"); + } + this.moveTo({ + x: xpos, + y: ypos + }, handle); + return false; + } + return true; + + }, + + _focus: function(handle,hard) { + + this.currentHandle = $(handle).addClass('ui-slider-handle-active'); + + if (hard) + this.currentHandle.parent()[0].focus(); + + }, + + _blur: function(handle) { + + $(handle).removeClass('ui-slider-handle-active'); + + if(this.currentHandle && this.currentHandle[0] == handle) { + this.previousHandle = this.currentHandle; + this.currentHandle = null; + }; + + }, + + _click: function(event) { + + // This method is only used if: + // - The user didn't click a handle + // - The Slider is not disabled + // - There is a current, or previous selected handle (otherwise we wouldn't know which one to move) + + var pointer = [event.pageX, event.pageY]; + + var clickedHandle = false; + this.handle.each(function() { + if(this == event.target) + clickedHandle = true; + }); + if (clickedHandle || this.options.disabled || !(this.currentHandle || this.previousHandle)) + return; + + // If a previous handle was focussed, focus it again + if (!this.currentHandle && this.previousHandle) + this._focus(this.previousHandle, true); + + // propagate only for distance > 0, otherwise propagation is done my drag + this.offset = this.element.offset(); + + this.moveTo({ + y: this._convertValue(event.pageY - this.offset.top - this.currentHandle[0].offsetHeight/2, "y"), + x: this._convertValue(event.pageX - this.offset.left - this.currentHandle[0].offsetWidth/2, "x") + }, null, !this.options.distance); + + }, + + _createRange: function() { + + if(this.rangeElement) return; + this.rangeElement = $('
                  ') + .addClass('ui-slider-range') + .css({ position: 'absolute' }) + .appendTo(this.element); + this._updateRange(); + + }, + + _removeRange: function() { + + this.rangeElement.remove(); + this.rangeElement = null; + + }, + + _updateRange: function() { + + var prop = this.options.axis == "vertical" ? "top" : "left"; + var size = this.options.axis == "vertical" ? "height" : "width"; + + this.rangeElement.css(prop, (this._round($(this.handle[0]).css(prop)) || 0) + this._handleSize(0, this.options.axis == "vertical" ? "y" : "x")/2); + this.rangeElement.css(size, (this._round($(this.handle[1]).css(prop)) || 0) - (this._round($(this.handle[0]).css(prop)) || 0)); + + }, + + _getRange: function() { + + return this.rangeElement ? this._convertValue(this._round(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width")), this.options.axis == "vertical" ? "y" : "x") : null; + + }, + + _handleIndex: function() { + + return this.handle.index(this.currentHandle[0]); + + }, + + value: function(handle, axis) { + + if(this.handle.length == 1) this.currentHandle = this.handle; + if(!axis) axis = this.options.axis == "vertical" ? "y" : "x"; + + var curHandle = $(handle != undefined && handle !== null ? this.handle[handle] || handle : this.currentHandle); + + if(curHandle.data("mouse").sliderValue) { + return this._round(curHandle.data("mouse").sliderValue[axis]); + } else { + return this._round(((this._round(curHandle.css(axis == "x" ? "left" : "top")) / (this.actualSize[axis == "x" ? "width" : "height"] - this._handleSize(handle,axis))) * this.options.realMax[axis]) + this.options.min[axis]); + } + + }, + + _convertValue: function(value,axis) { + + return this.options.min[axis] + (value / (this.actualSize[axis == "x" ? "width" : "height"] - this._handleSize(null,axis))) * this.options.realMax[axis]; + + }, + + _translateValue: function(value,axis) { + + return ((value - this.options.min[axis]) / this.options.realMax[axis]) * (this.actualSize[axis == "x" ? "width" : "height"] - this._handleSize(null,axis)); + + }, + + _translateRange: function(value,axis) { + + if (this.rangeElement) { + if (this.currentHandle[0] == this.handle[0] && value >= this._translateValue(this.value(1),axis)) + value = this._translateValue(this.value(1,axis) - this._oneStep(axis), axis); + if (this.currentHandle[0] == this.handle[1] && value <= this._translateValue(this.value(0),axis)) + value = this._translateValue(this.value(0,axis) + this._oneStep(axis), axis); + } + + if (this.options.handles) { + var handle = this.options.handles[this._handleIndex()]; + if (value < this._translateValue(handle.min,axis)) { + value = this._translateValue(handle.min,axis); + } else if (value > this._translateValue(handle.max,axis)) { + value = this._translateValue(handle.max,axis); + } + } + + return value; + + }, + + _translateLimits: function(value,axis) { + + if (value >= this.actualSize[axis == "x" ? "width" : "height"] - this._handleSize(null,axis)) + value = this.actualSize[axis == "x" ? "width" : "height"] - this._handleSize(null,axis); + + if (value <= 0) + value = 0; + + return value; + + }, + + _handleSize: function(handle,axis) { + + return $(handle != undefined && handle !== null ? this.handle[handle] : this.currentHandle)[0]["offset"+(axis == "x" ? "Width" : "Height")]; + + }, + + _oneStep: function(axis) { + + return this.options.stepping[axis] || 1; + + }, + + _pageStep: function(axis) { + + return /* this.options.paging[axis] ||*/ 10; + + }, + + moveTo: function(value, handle, noPropagation) { + + var o = this.options; + + // Prepare the outer size + this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() }; + + //If no handle has been passed, no current handle is available and we have multiple handles, return false + if (handle == undefined && !this.currentHandle && this.handle.length != 1) + return false; + + //If only one handle is available, use it + if (handle == undefined && !this.currentHandle) + handle = 0; + + if (handle != undefined) + this.currentHandle = this.previousHandle = $(this.handle[handle] || handle); + + if(value.x !== undefined && value.y !== undefined) { + var x = value.x, y = value.y; + } else { + var x = value, y = value; + } + + if(x !== undefined && x.constructor != Number) { + var me = /^\-\=/.test(x), pe = /^\+\=/.test(x); + if(me || pe) { + x = this.value(null, "x") + this._round(x.replace(me ? '=' : '+=', '')); + } else { + x = isNaN(this._round(x)) ? undefined : this._round(x); + } + } + + if(y !== undefined && y.constructor != Number) { + var me = /^\-\=/.test(y), pe = /^\+\=/.test(y); + if(me || pe) { + y = this.value(null, "y") + this._round(y.replace(me ? '=' : '+=', '')); + } else { + y = isNaN(this._round(y)) ? undefined : this._round(y); + } + } + + if(o.axis != "vertical" && x !== undefined) { + if(o.stepping.x) x = this._round(x / o.stepping.x) * o.stepping.x; + x = this._translateValue(x, "x"); + x = this._translateLimits(x, "x"); + x = this._translateRange(x, "x"); + + o.animate ? this.currentHandle.stop().animate({ left: x }, (Math.abs(parseInt(this.currentHandle.css("left"),10) - x)) * (!isNaN(parseInt(o.animate,10)) ? o.animate : 5)) : this.currentHandle.css({ left: x }); + } + + if(o.axis != "horizontal" && y !== undefined) { + if(o.stepping.y) y = this._round(y / o.stepping.y) * o.stepping.y; + y = this._translateValue(y, "y"); + y = this._translateLimits(y, "y"); + y = this._translateRange(y, "y"); + o.animate ? this.currentHandle.stop().animate({ top: y }, (Math.abs(parseInt(this.currentHandle.css("top"),10) - y)) * (!isNaN(parseInt(o.animate,10)) ? o.animate : 5)) : this.currentHandle.css({ top: y }); + } + + if (this.rangeElement) + this._updateRange(); + + //Store the slider's value + this.currentHandle.data("mouse").sliderValue = { + x: this._round(this._convertValue(x, "x")) || 0, + y: this._round(this._convertValue(y, "y")) || 0 + }; + + if (!noPropagation) { + this._propagate('start', null); + this._propagate("slide", null); + this._propagate('stop', null); + this._propagate('change', null); + } + + }, + + _propagate: function(n, event) { + + $.ui.plugin.call(this, n, [event, this.ui()]); + this.element.triggerHandler(n == "slide" ? n : "slide"+n, [event, this.ui()], this.options[n]); + + }, + + plugins: {}, + + ui: function(event) { + return { + options: this.options, + handle: this.currentHandle, + value: this.options.axis != "both" || !this.options.axis ? + this._round(this.value(null, this.options.axis == "vertical" ? "y" : "x")) : + { + x: this._round(this.value(null, "x")), + y: this._round(this.value(null, "y")) + }, + range: this._getRange() + }; + } + +}); + +$.extend($.ui.slider, { + getter: "value", + version: "1.6", + defaults: { + animate: false, + distance: 1, + handle: ".ui-slider-handle", + round: true + } +}); + +})(jQuery); +/* + * jQuery UI Tabs 1.6 + * + * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.tabs", { + + _init: function() { + // create tabs + this._tabify(true); + }, + + destroy: function() { + var o = this.options; + this.element.unbind('.tabs') + .removeClass(o.navClass).removeData('tabs'); + this.$tabs.each(function() { + var href = $.data(this, 'href.tabs'); + if (href) + this.href = href; + var $this = $(this).unbind('.tabs'); + $.each(['href', 'load', 'cache'], function(i, prefix) { + $this.removeData(prefix + '.tabs'); + }); + }); + this.$lis.add(this.$panels).each(function() { + if ($.data(this, 'destroy.tabs')) + $(this).remove(); + else + $(this).removeClass([o.selectedClass, o.deselectableClass, + o.disabledClass, o.panelClass, o.hideClass].join(' ')); + }); + if (o.cookie) + this._cookie(null, o.cookie); + }, + + _setData: function(key, value) { + if ((/^selected/).test(key)) + this.select(value); + else { + this.options[key] = value; + this._tabify(); + } + }, + + length: function() { + return this.$tabs.length; + }, + + _tabId: function(a) { + return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') + || this.options.idPrefix + $.data(a); + }, + + _sanitizeSelector: function(hash) { + return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":" + }, + + _cookie: function() { + var cookie = this.cookie || (this.cookie = 'ui-tabs-' + $.data(this.element[0])); + return $.cookie.apply(null, [cookie].concat($.makeArray(arguments))); + }, + + _tabify: function(init) { + + this.$lis = $('li:has(a[href])', this.element); + this.$tabs = this.$lis.map(function() { return $('a', this)[0]; }); + this.$panels = $([]); + + var self = this, o = this.options; + + this.$tabs.each(function(i, a) { + // inline tab + if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash + self.$panels = self.$panels.add(self._sanitizeSelector(a.hash)); + // remote tab + else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#" + $.data(a, 'href.tabs', a.href); // required for restore on destroy + $.data(a, 'load.tabs', a.href); // mutable + var id = self._tabId(a); + a.href = '#' + id; + var $panel = $('#' + id); + if (!$panel.length) { + $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass) + .insertAfter(self.$panels[i - 1] || self.element); + $panel.data('destroy.tabs', true); + } + self.$panels = self.$panels.add($panel); + } + // invalid tab href + else + o.disabled.push(i + 1); + }); + + // initialization from scratch + if (init) { + + // attach necessary classes for styling if not present + this.element.addClass(o.navClass); + this.$panels.addClass(o.panelClass); + + // Selected tab + // use "selected" option or try to retrieve: + // 1. from fragment identifier in url + // 2. from cookie + // 3. from selected class attribute on
                • + if (o.selected === undefined) { + if (location.hash) { + this.$tabs.each(function(i, a) { + if (a.hash == location.hash) { + o.selected = i; + return false; // break + } + }); + } + else if (o.cookie) { + var index = parseInt(self._cookie(), 10); + if (index && self.$tabs[index]) o.selected = index; + } + else if (self.$lis.filter('.' + o.selectedClass).length) + o.selected = self.$lis.index( self.$lis.filter('.' + o.selectedClass)[0] ); + } + o.selected = o.selected === null || o.selected !== undefined ? o.selected : 0; // first tab selected by default + + // Take disabling tabs via class attribute from HTML + // into account and update option properly. + // A selected tab cannot become disabled. + o.disabled = $.unique(o.disabled.concat( + $.map(this.$lis.filter('.' + o.disabledClass), + function(n, i) { return self.$lis.index(n); } ) + )).sort(); + if ($.inArray(o.selected, o.disabled) != -1) + o.disabled.splice($.inArray(o.selected, o.disabled), 1); + + // highlight selected tab + this.$panels.addClass(o.hideClass); + this.$lis.removeClass(o.selectedClass); + if (o.selected !== null) { + this.$panels.eq(o.selected).removeClass(o.hideClass); + var classes = [o.selectedClass]; + if (o.deselectable) classes.push(o.deselectableClass); + this.$lis.eq(o.selected).addClass(classes.join(' ')); + + // seems to be expected behavior that the show callback is fired + var onShow = function() { + self._trigger('show', null, + self.ui(self.$tabs[o.selected], self.$panels[o.selected])); + }; + + // load if remote tab + if ($.data(this.$tabs[o.selected], 'load.tabs')) + this.load(o.selected, onShow); + // just trigger show event + else onShow(); + } + + // clean up to avoid memory leaks in certain versions of IE 6 + $(window).bind('unload', function() { + self.$tabs.unbind('.tabs'); + self.$lis = self.$tabs = self.$panels = null; + }); + + } + // update selected after add/remove + else + o.selected = this.$lis.index( this.$lis.filter('.' + o.selectedClass)[0] ); + + // set or update cookie after init and add/remove respectively + if (o.cookie) this._cookie(o.selected, o.cookie); + + // disable tabs + for (var i = 0, li; li = this.$lis[i]; i++) + $(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass); + + // reset cache if switching from cached to not cached + if (o.cache === false) this.$tabs.removeData('cache.tabs'); + + // set up animations + var hideFx, showFx; + if (o.fx) { + if (o.fx.constructor == Array) { + hideFx = o.fx[0]; + showFx = o.fx[1]; + } + else hideFx = showFx = o.fx; + } + + // Reset certain styles left over from animation + // and prevent IE's ClearType bug... + function resetStyle($el, fx) { + $el.css({ display: '' }); + if ($.browser.msie && fx.opacity) $el[0].style.removeAttribute('filter'); + } + + // Show a tab... + var showTab = showFx ? + function(clicked, $show) { + $show.animate(showFx, showFx.duration || 'normal', function() { + $show.removeClass(o.hideClass); + resetStyle($show, showFx); + self._trigger('show', null, self.ui(clicked, $show[0])); + }); + } : + function(clicked, $show) { + $show.removeClass(o.hideClass); + self._trigger('show', null, self.ui(clicked, $show[0])); + }; + + // Hide a tab, $show is optional... + var hideTab = hideFx ? + function(clicked, $hide, $show) { + $hide.animate(hideFx, hideFx.duration || 'normal', function() { + $hide.addClass(o.hideClass); + resetStyle($hide, hideFx); + if ($show) showTab(clicked, $show, $hide); + }); + } : + function(clicked, $hide, $show) { + $hide.addClass(o.hideClass); + if ($show) showTab(clicked, $show); + }; + + // Switch a tab... + function switchTab(clicked, $li, $hide, $show) { + var classes = [o.selectedClass]; + if (o.deselectable) classes.push(o.deselectableClass); + $li.addClass(classes.join(' ')).siblings().removeClass(classes.join(' ')); + hideTab(clicked, $hide, $show); + } + + // attach tab event handler, unbind to avoid duplicates from former tabifying... + this.$tabs.unbind('.tabs').bind(o.event + '.tabs', function() { + + //var trueClick = event.clientX; // add to history only if true click occured, not a triggered click + var $li = $(this).parents('li:eq(0)'), + $hide = self.$panels.filter(':visible'), + $show = $(self._sanitizeSelector(this.hash)); + + // If tab is already selected and not deselectable or tab disabled or + // or is already loading or click callback returns false stop here. + // Check if click handler returns false last so that it is not executed + // for a disabled or loading tab! + if (($li.hasClass(o.selectedClass) && !o.deselectable) + || $li.hasClass(o.disabledClass) + || $(this).hasClass(o.loadingClass) + || self._trigger('select', null, self.ui(this, $show[0])) === false + ) { + this.blur(); + return false; + } + + o.selected = self.$tabs.index(this); + + // if tab may be closed + if (o.deselectable) { + if ($li.hasClass(o.selectedClass)) { + self.options.selected = null; + $li.removeClass([o.selectedClass, o.deselectableClass].join(' ')); + self.$panels.stop(); + hideTab(this, $hide); + this.blur(); + return false; + } else if (!$hide.length) { + self.$panels.stop(); + var a = this; + self.load(self.$tabs.index(this), function() { + $li.addClass([o.selectedClass, o.deselectableClass].join(' ')); + showTab(a, $show); + }); + this.blur(); + return false; + } + } + + if (o.cookie) self._cookie(o.selected, o.cookie); + + // stop possibly running animations + self.$panels.stop(); + + // show new tab + if ($show.length) { + var a = this; + self.load(self.$tabs.index(this), $hide.length ? + function() { + switchTab(a, $li, $hide, $show); + } : + function() { + $li.addClass(o.selectedClass); + showTab(a, $show); + } + ); + } else + throw 'jQuery UI Tabs: Mismatching fragment identifier.'; + + // Prevent IE from keeping other link focussed when using the back button + // and remove dotted border from clicked link. This is controlled via CSS + // in modern browsers; blur() removes focus from address bar in Firefox + // which can become a usability and annoying problem with tabs('rotate'). + if ($.browser.msie) this.blur(); + + return false; + + }); + + // disable click if event is configured to something else + if (o.event != 'click') this.$tabs.bind('click.tabs', function(){return false;}); + + }, + + add: function(url, label, index) { + if (index == undefined) + index = this.$tabs.length; // append by default + + var o = this.options; + var $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label)); + $li.data('destroy.tabs', true); + + var id = url.indexOf('#') == 0 ? url.replace('#', '') : this._tabId( $('a:first-child', $li)[0] ); + + // try to find an existing element before creating a new one + var $panel = $('#' + id); + if (!$panel.length) { + $panel = $(o.panelTemplate).attr('id', id) + .addClass(o.hideClass) + .data('destroy.tabs', true); + } + $panel.addClass(o.panelClass); + if (index >= this.$lis.length) { + $li.appendTo(this.element); + $panel.appendTo(this.element[0].parentNode); + } else { + $li.insertBefore(this.$lis[index]); + $panel.insertBefore(this.$panels[index]); + } + + o.disabled = $.map(o.disabled, + function(n, i) { return n >= index ? ++n : n }); + + this._tabify(); + + if (this.$tabs.length == 1) { + $li.addClass(o.selectedClass); + $panel.removeClass(o.hideClass); + var href = $.data(this.$tabs[0], 'load.tabs'); + if (href) + this.load(index, href); + } + + // callback + this._trigger('add', null, this.ui(this.$tabs[index], this.$panels[index])); + }, + + remove: function(index) { + var o = this.options, $li = this.$lis.eq(index).remove(), + $panel = this.$panels.eq(index).remove(); + + // If selected tab was removed focus tab to the right or + // in case the last tab was removed the tab to the left. + if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1) + this.select(index + (index + 1 < this.$tabs.length ? 1 : -1)); + + o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }), + function(n, i) { return n >= index ? --n : n }); + + this._tabify(); + + // callback + this._trigger('remove', null, this.ui($li.find('a')[0], $panel[0])); + }, + + enable: function(index) { + var o = this.options; + if ($.inArray(index, o.disabled) == -1) + return; + + var $li = this.$lis.eq(index).removeClass(o.disabledClass); + if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2... + $li.css('display', 'inline-block'); + setTimeout(function() { + $li.css('display', 'block'); + }, 0); + } + + o.disabled = $.grep(o.disabled, function(n, i) { return n != index; }); + + // callback + this._trigger('enable', null, this.ui(this.$tabs[index], this.$panels[index])); + }, + + disable: function(index) { + var self = this, o = this.options; + if (index != o.selected) { // cannot disable already selected tab + this.$lis.eq(index).addClass(o.disabledClass); + + o.disabled.push(index); + o.disabled.sort(); + + // callback + this._trigger('disable', null, this.ui(this.$tabs[index], this.$panels[index])); + } + }, + + select: function(index) { + // TODO make null as argument work + if (typeof index == 'string') + index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] ); + this.$tabs.eq(index).trigger(this.options.event + '.tabs'); + }, + + load: function(index, callback) { // callback is for internal usage only + + var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0], + bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs'); + + callback = callback || function() {}; + + // no remote or from cache - just finish with callback + if (!url || !bypassCache && $.data(a, 'cache.tabs')) { + callback(); + return; + } + + // load remote from here on + + var inner = function(parent) { + var $parent = $(parent), $inner = $parent.find('*:last'); + return $inner.length && $inner.is(':not(img)') && $inner || $parent; + }; + var cleanup = function() { + self.$tabs.filter('.' + o.loadingClass).removeClass(o.loadingClass) + .each(function() { + if (o.spinner) + inner(this).parent().html(inner(this).data('label.tabs')); + }); + self.xhr = null; + }; + + if (o.spinner) { + var label = inner(a).html(); + inner(a).wrapInner('') + .find('em').data('label.tabs', label).html(o.spinner); + } + + var ajaxOptions = $.extend({}, o.ajaxOptions, { + url: url, + success: function(r, s) { + $(self._sanitizeSelector(a.hash)).html(r); + cleanup(); + + if (o.cache) + $.data(a, 'cache.tabs', true); // if loaded once do not load them again + + // callbacks + self._trigger('load', null, self.ui(self.$tabs[index], self.$panels[index])); + try { + o.ajaxOptions.success(r, s); + } + catch (event) {} + + // This callback is required because the switch has to take + // place after loading has completed. Call last in order to + // fire load before show callback... + callback(); + } + }); + if (this.xhr) { + // terminate pending requests from other tabs and restore tab label + this.xhr.abort(); + cleanup(); + } + $a.addClass(o.loadingClass); + self.xhr = $.ajax(ajaxOptions); + }, + + url: function(index, url) { + this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url); + }, + + ui: function(tab, panel) { + return { + options: this.options, + tab: tab, + panel: panel, + index: this.$tabs.index(tab) + }; + } + +}); + +$.extend($.ui.tabs, { + version: '1.6', + getter: 'length', + defaults: { + ajaxOptions: null, + cache: false, + cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } + deselectable: false, + deselectableClass: 'ui-tabs-deselectable', + disabled: [], + disabledClass: 'ui-tabs-disabled', + event: 'click', + fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } + hideClass: 'ui-tabs-hide', + idPrefix: 'ui-tabs-', + loadingClass: 'ui-tabs-loading', + navClass: 'ui-tabs-nav', + panelClass: 'ui-tabs-panel', + panelTemplate: '
                  ', + selectedClass: 'ui-tabs-selected', + spinner: 'Loading…', + tabTemplate: '
                • #{label}
                • ' + } +}); + +/* + * Tabs Extensions + */ + +/* + * Rotate + */ +$.extend($.ui.tabs.prototype, { + rotation: null, + rotate: function(ms, continuing) { + + continuing = continuing || false; + + var self = this, t = this.options.selected; + + function start() { + self.rotation = setInterval(function() { + t = ++t < self.$tabs.length ? t : 0; + self.select(t); + }, ms); + } + + function stop(event) { + if (!event || event.clientX) { // only in case of a true click + clearInterval(self.rotation); + } + } + + // start interval + if (ms) { + start(); + if (!continuing) + this.$tabs.bind(this.options.event + '.tabs', stop); + else + this.$tabs.bind(this.options.event + '.tabs', function() { + stop(); + t = self.options.selected; + start(); + }); + } + // stop interval + else { + stop(); + this.$tabs.unbind(this.options.event + '.tabs', stop); + } + } +}); + +})(jQuery); diff --git a/js/vendor_legacy/jquery-timepicker/tests/dialog.html b/js/vendor_legacy/jquery-timepicker/tests/dialog.html new file mode 100644 index 000000000..ca2bbb9cd --- /dev/null +++ b/js/vendor_legacy/jquery-timepicker/tests/dialog.html @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + +

                  Testing the timepicker within a jQuery Dialog

                  + +
                  + +

                  + The timepicker : +
                  + +

                  + + +
                  + + + \ No newline at end of file diff --git a/js/vendor_legacy/jquery-timepicker/tests/jquery.ui.dialog.min.js b/js/vendor_legacy/jquery-timepicker/tests/jquery.ui.dialog.min.js new file mode 100644 index 000000000..a16bf9eb0 --- /dev/null +++ b/js/vendor_legacy/jquery-timepicker/tests/jquery.ui.dialog.min.js @@ -0,0 +1,40 @@ +/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false, +position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
                  ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ +b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
                  ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), +h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id", +e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); +a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!== +b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1; +d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target=== +f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
                  ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
                  ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a, +function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", +handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition, +originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize", +f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "): +[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f); +if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"): +e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a= +this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height- +b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), +create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()
                  ").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&& +c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return 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 1.4.3" - -"jquery@>= 1.4.3": - version "3.2.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787" - js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" diff --git a/templates/main.php b/templates/main.php index b2be0e4f1..aba95681d 100644 --- a/templates/main.php +++ b/templates/main.php @@ -7,7 +7,7 @@ script('tasks', 'vendor/angular-ui-select/dist/select.min'); script('tasks', 'vendor/jstimezonedetect/dist/jstz.min'); script('tasks', 'public/app.min'); - script('tasks', 'vendor/jquery-timepicker/jquery.timepicker'); + script('tasks', 'vendor_legacy/jquery-timepicker/jquery.ui.timepicker'); script('tasks', 'vendor/ical.js/build/ical'); style('tasks', 'style'); style('tasks', 'sprite');